diff options
author | haxar <[email protected]> | 2012-02-21 20:13:04 -0800 |
---|---|---|
committer | haxar <[email protected]> | 2012-02-21 20:13:04 -0800 |
commit | ddaceb232c8b537a7d29a9708928d3a3671b98e5 (patch) | |
tree | d874e557f2999f9550ad2b710f0231ed06f50ba8 /plugins | |
parent | ecd8a153901507f5d210d6f85103693ef81d49c3 (diff) | |
download | mate-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')
117 files changed, 3051 insertions, 3051 deletions
diff --git a/plugins/a11y-keyboard/Makefile.am b/plugins/a11y-keyboard/Makefile.am index 8396513..78737a0 100644 --- a/plugins/a11y-keyboard/Makefile.am +++ b/plugins/a11y-keyboard/Makefile.am @@ -2,7 +2,7 @@ NULL = gtkbuilderdir = $(pkgdatadir) gtkbuilder_DATA = \ - gsd-a11y-preferences-dialog.ui \ + msd-a11y-preferences-dialog.ui \ $(NULL) noinst_PROGRAMS = \ @@ -10,8 +10,8 @@ noinst_PROGRAMS = \ $(NULL) test_a11y_preferences_dialog_SOURCES = \ - gsd-a11y-preferences-dialog.c \ - gsd-a11y-preferences-dialog.h \ + msd-a11y-preferences-dialog.c \ + msd-a11y-preferences-dialog.h \ test-a11y-preferences-dialog.c \ $(NULL) @@ -36,12 +36,12 @@ plugin_LTLIBRARIES = \ $(NULL) liba11y_keyboard_la_SOURCES = \ - gsd-a11y-keyboard-plugin.h \ - gsd-a11y-keyboard-plugin.c \ - gsd-a11y-keyboard-manager.h \ - gsd-a11y-keyboard-manager.c \ - gsd-a11y-preferences-dialog.h \ - gsd-a11y-preferences-dialog.c \ + msd-a11y-keyboard-plugin.h \ + msd-a11y-keyboard-plugin.c \ + msd-a11y-keyboard-manager.h \ + msd-a11y-keyboard-manager.c \ + msd-a11y-preferences-dialog.h \ + msd-a11y-preferences-dialog.c \ $(NULL) liba11y_keyboard_la_CPPFLAGS = \ @@ -56,7 +56,7 @@ liba11y_keyboard_la_CFLAGS = \ $(AM_CFLAGS) liba11y_keyboard_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) liba11y_keyboard_la_LIBADD = \ @@ -84,4 +84,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c index 668fddc..7505b14 100644 --- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c +++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c @@ -51,15 +51,15 @@ #endif /* HAVE_LIBMATENOTIFY */ #include "mate-settings-profile.h" -#include "gsd-a11y-keyboard-manager.h" -#include "gsd-a11y-preferences-dialog.h" +#include "msd-a11y-keyboard-manager.h" +#include "msd-a11y-preferences-dialog.h" #define CONFIG_ROOT "/desktop/mate/accessibility/keyboard" #define NOTIFICATION_TIMEOUT 30 -#define GSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_A11Y_KEYBOARD_MANAGER, GsdA11yKeyboardManagerPrivate)) +#define MSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_A11Y_KEYBOARD_MANAGER, MsdA11yKeyboardManagerPrivate)) -struct GsdA11yKeyboardManagerPrivate +struct MsdA11yKeyboardManagerPrivate { int xkbEventBase; gboolean stickykeys_shortcut_val; @@ -77,14 +77,14 @@ struct GsdA11yKeyboardManagerPrivate #endif /* HAVE_LIBMATENOTIFY */ }; -static void gsd_a11y_keyboard_manager_class_init (GsdA11yKeyboardManagerClass *klass); -static void gsd_a11y_keyboard_manager_init (GsdA11yKeyboardManager *a11y_keyboard_manager); -static void gsd_a11y_keyboard_manager_finalize (GObject *object); -static void gsd_a11y_keyboard_manager_ensure_status_icon (GsdA11yKeyboardManager *manager); -static void set_server_from_mateconf (GsdA11yKeyboardManager *manager, +static void msd_a11y_keyboard_manager_class_init (MsdA11yKeyboardManagerClass *klass); +static void msd_a11y_keyboard_manager_init (MsdA11yKeyboardManager *a11y_keyboard_manager); +static void msd_a11y_keyboard_manager_finalize (GObject *object); +static void msd_a11y_keyboard_manager_ensure_status_icon (MsdA11yKeyboardManager *manager); +static void set_server_from_mateconf (MsdA11yKeyboardManager *manager, MateConfClient *client); -G_DEFINE_TYPE (GsdA11yKeyboardManager, gsd_a11y_keyboard_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdA11yKeyboardManager, msd_a11y_keyboard_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -133,7 +133,7 @@ supports_xinput_devices (void) } static void -set_devicepresence_handler (GsdA11yKeyboardManager *manager) +set_devicepresence_handler (MsdA11yKeyboardManager *manager) { Display *display; XEventClass class_presence; @@ -161,7 +161,7 @@ set_devicepresence_handler (GsdA11yKeyboardManager *manager) #endif static gboolean -xkb_enabled (GsdA11yKeyboardManager *manager) +xkb_enabled (MsdA11yKeyboardManager *manager) { gboolean have_xkb; int opcode, errorBase, major, minor; @@ -178,7 +178,7 @@ xkb_enabled (GsdA11yKeyboardManager *manager) } static XkbDescRec * -get_xkb_desc_rec (GsdA11yKeyboardManager *manager) +get_xkb_desc_rec (MsdA11yKeyboardManager *manager) { XkbDescRec *desc; Status status = Success; @@ -265,7 +265,7 @@ set_ctrl_from_mateconf (XkbDescRec *desc, } static void -set_server_from_mateconf (GsdA11yKeyboardManager *manager, +set_server_from_mateconf (MsdA11yKeyboardManager *manager, MateConfClient *client) { XkbDescRec *desc; @@ -404,7 +404,7 @@ set_server_from_mateconf (GsdA11yKeyboardManager *manager, } static gboolean -ax_response_callback (GsdA11yKeyboardManager *manager, +ax_response_callback (MsdA11yKeyboardManager *manager, GtkWindow *parent, gint response_id, guint revert_controls_mask, @@ -475,7 +475,7 @@ ax_response_callback (GsdA11yKeyboardManager *manager, static void ax_stickykeys_response (GtkDialog *dialog, gint response_id, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { if (ax_response_callback (manager, GTK_WINDOW (dialog), response_id, XkbStickyKeysMask, @@ -487,7 +487,7 @@ ax_stickykeys_response (GtkDialog *dialog, static void ax_slowkeys_response (GtkDialog *dialog, gint response_id, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { if (ax_response_callback (manager, GTK_WINDOW (dialog), response_id, XkbSlowKeysMask, @@ -497,7 +497,7 @@ ax_slowkeys_response (GtkDialog *dialog, } static void -maybe_show_status_icon (GsdA11yKeyboardManager *manager) +maybe_show_status_icon (MsdA11yKeyboardManager *manager) { gboolean show; MateConfClient *client; @@ -510,14 +510,14 @@ maybe_show_status_icon (GsdA11yKeyboardManager *manager) if (!show && manager->priv->status_icon == NULL) return; - gsd_a11y_keyboard_manager_ensure_status_icon (manager); + msd_a11y_keyboard_manager_ensure_status_icon (manager); gtk_status_icon_set_visible (manager->priv->status_icon, show); } #ifdef HAVE_LIBMATENOTIFY static void on_notification_closed (NotifyNotification *notification, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { g_object_unref (manager->priv->notification); manager->priv->notification = NULL; @@ -526,7 +526,7 @@ on_notification_closed (NotifyNotification *notification, static void on_slow_keys_action (NotifyNotification *notification, const char *action, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { gboolean res; int response_id; @@ -552,7 +552,7 @@ on_slow_keys_action (NotifyNotification *notification, static void on_sticky_keys_action (NotifyNotification *notification, const char *action, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { gboolean res; int response_id; @@ -578,7 +578,7 @@ on_sticky_keys_action (NotifyNotification *notification, #endif /* HAVE_LIBMATENOTIFY */ static gboolean -ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager, +ax_slowkeys_warning_post_bubble (MsdA11yKeyboardManager *manager, gboolean enabled) { #ifdef HAVE_LIBMATENOTIFY @@ -605,7 +605,7 @@ ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager, notify_notification_close (manager->priv->notification, NULL); } - gsd_a11y_keyboard_manager_ensure_status_icon (manager); + msd_a11y_keyboard_manager_ensure_status_icon (manager); manager->priv->notification = notify_notification_new (title, message, "preferences-desktop-accessibility", @@ -634,7 +634,7 @@ ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager, error = NULL; res = notify_notification_show (manager->priv->notification, &error); if (! res) { - g_warning ("GsdA11yKeyboardManager: unable to show notification: %s", error->message); + g_warning ("MsdA11yKeyboardManager: unable to show notification: %s", error->message); g_error_free (error); notify_notification_close (manager->priv->notification, NULL); } @@ -647,7 +647,7 @@ ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager, static void -ax_slowkeys_warning_post_dialog (GsdA11yKeyboardManager *manager, +ax_slowkeys_warning_post_dialog (MsdA11yKeyboardManager *manager, gboolean enabled) { const char *title; @@ -701,7 +701,7 @@ ax_slowkeys_warning_post_dialog (GsdA11yKeyboardManager *manager, } static void -ax_slowkeys_warning_post (GsdA11yKeyboardManager *manager, +ax_slowkeys_warning_post (MsdA11yKeyboardManager *manager, gboolean enabled) { @@ -714,7 +714,7 @@ ax_slowkeys_warning_post (GsdA11yKeyboardManager *manager, } static gboolean -ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager, +ax_stickykeys_warning_post_bubble (MsdA11yKeyboardManager *manager, gboolean enabled) { #ifdef HAVE_LIBMATENOTIFY @@ -744,7 +744,7 @@ ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager, notify_notification_close (manager->priv->notification, NULL); } - gsd_a11y_keyboard_manager_ensure_status_icon (manager); + msd_a11y_keyboard_manager_ensure_status_icon (manager); manager->priv->notification = notify_notification_new (title, message, "preferences-desktop-accessibility", @@ -773,7 +773,7 @@ ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager, error = NULL; res = notify_notification_show (manager->priv->notification, &error); if (! res) { - g_warning ("GsdA11yKeyboardManager: unable to show notification: %s", error->message); + g_warning ("MsdA11yKeyboardManager: unable to show notification: %s", error->message); g_error_free (error); notify_notification_close (manager->priv->notification, NULL); } @@ -785,7 +785,7 @@ ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager, } static void -ax_stickykeys_warning_post_dialog (GsdA11yKeyboardManager *manager, +ax_stickykeys_warning_post_dialog (MsdA11yKeyboardManager *manager, gboolean enabled) { const char *title; @@ -842,7 +842,7 @@ ax_stickykeys_warning_post_dialog (GsdA11yKeyboardManager *manager, } static void -ax_stickykeys_warning_post (GsdA11yKeyboardManager *manager, +ax_stickykeys_warning_post (MsdA11yKeyboardManager *manager, gboolean enabled) { @@ -855,7 +855,7 @@ ax_stickykeys_warning_post (GsdA11yKeyboardManager *manager, } static void -set_mateconf_from_server (GsdA11yKeyboardManager *manager) +set_mateconf_from_server (MsdA11yKeyboardManager *manager) { MateConfClient *client; MateConfChangeSet *cs; @@ -1003,7 +1003,7 @@ set_mateconf_from_server (GsdA11yKeyboardManager *manager) static GdkFilterReturn cb_xkb_event_filter (GdkXEvent *xevent, GdkEvent *ignored1, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { XEvent *xev = (XEvent *) xevent; XkbEvent *xkbEv = (XkbEvent *) xevent; @@ -1031,14 +1031,14 @@ static void keyboard_callback (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { set_server_from_mateconf (manager, client); maybe_show_status_icon (manager); } static void -register_config_callback (GsdA11yKeyboardManager *manager, +register_config_callback (MsdA11yKeyboardManager *manager, MateConfClient *client, const char *path, MateConfClientNotifyFunc func, @@ -1049,7 +1049,7 @@ register_config_callback (GsdA11yKeyboardManager *manager, } static gboolean -start_a11y_keyboard_idle_cb (GsdA11yKeyboardManager *manager) +start_a11y_keyboard_idle_cb (MsdA11yKeyboardManager *manager) { guint event_mask; MateConfClient *client; @@ -1104,7 +1104,7 @@ start_a11y_keyboard_idle_cb (GsdA11yKeyboardManager *manager) gboolean -gsd_a11y_keyboard_manager_start (GsdA11yKeyboardManager *manager, +msd_a11y_keyboard_manager_start (MsdA11yKeyboardManager *manager, GError **error) { mate_settings_profile_start (NULL); @@ -1117,7 +1117,7 @@ gsd_a11y_keyboard_manager_start (GsdA11yKeyboardManager *manager, } static void -restore_server_xkb_config (GsdA11yKeyboardManager *manager) +restore_server_xkb_config (MsdA11yKeyboardManager *manager) { gdk_error_trap_push (); XkbSetControls (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), @@ -1142,9 +1142,9 @@ restore_server_xkb_config (GsdA11yKeyboardManager *manager) } void -gsd_a11y_keyboard_manager_stop (GsdA11yKeyboardManager *manager) +msd_a11y_keyboard_manager_stop (MsdA11yKeyboardManager *manager) { - GsdA11yKeyboardManagerPrivate *p = manager->priv; + MsdA11yKeyboardManagerPrivate *p = manager->priv; g_debug ("Stopping a11y_keyboard manager"); @@ -1182,14 +1182,14 @@ gsd_a11y_keyboard_manager_stop (GsdA11yKeyboardManager *manager) } static void -gsd_a11y_keyboard_manager_set_property (GObject *object, +msd_a11y_keyboard_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdA11yKeyboardManager *self; + MsdA11yKeyboardManager *self; - self = GSD_A11Y_KEYBOARD_MANAGER (object); + self = MSD_A11Y_KEYBOARD_MANAGER (object); switch (prop_id) { default: @@ -1199,14 +1199,14 @@ gsd_a11y_keyboard_manager_set_property (GObject *object, } static void -gsd_a11y_keyboard_manager_get_property (GObject *object, +msd_a11y_keyboard_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdA11yKeyboardManager *self; + MsdA11yKeyboardManager *self; - self = GSD_A11Y_KEYBOARD_MANAGER (object); + self = MSD_A11Y_KEYBOARD_MANAGER (object); switch (prop_id) { default: @@ -1216,16 +1216,16 @@ gsd_a11y_keyboard_manager_get_property (GObject *object, } static GObject * -gsd_a11y_keyboard_manager_constructor (GType type, +msd_a11y_keyboard_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdA11yKeyboardManager *a11y_keyboard_manager; - GsdA11yKeyboardManagerClass *klass; + MsdA11yKeyboardManager *a11y_keyboard_manager; + MsdA11yKeyboardManagerClass *klass; - klass = GSD_A11Y_KEYBOARD_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_A11Y_KEYBOARD_MANAGER)); + klass = MSD_A11Y_KEYBOARD_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_A11Y_KEYBOARD_MANAGER)); - a11y_keyboard_manager = GSD_A11Y_KEYBOARD_MANAGER (G_OBJECT_CLASS (gsd_a11y_keyboard_manager_parent_class)->constructor (type, + a11y_keyboard_manager = MSD_A11Y_KEYBOARD_MANAGER (G_OBJECT_CLASS (msd_a11y_keyboard_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -1233,33 +1233,33 @@ gsd_a11y_keyboard_manager_constructor (GType type, } static void -gsd_a11y_keyboard_manager_dispose (GObject *object) +msd_a11y_keyboard_manager_dispose (GObject *object) { - GsdA11yKeyboardManager *a11y_keyboard_manager; + MsdA11yKeyboardManager *a11y_keyboard_manager; - a11y_keyboard_manager = GSD_A11Y_KEYBOARD_MANAGER (object); + a11y_keyboard_manager = MSD_A11Y_KEYBOARD_MANAGER (object); - G_OBJECT_CLASS (gsd_a11y_keyboard_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_a11y_keyboard_manager_parent_class)->dispose (object); } static void -gsd_a11y_keyboard_manager_class_init (GsdA11yKeyboardManagerClass *klass) +msd_a11y_keyboard_manager_class_init (MsdA11yKeyboardManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_a11y_keyboard_manager_get_property; - object_class->set_property = gsd_a11y_keyboard_manager_set_property; - object_class->constructor = gsd_a11y_keyboard_manager_constructor; - object_class->dispose = gsd_a11y_keyboard_manager_dispose; - object_class->finalize = gsd_a11y_keyboard_manager_finalize; + object_class->get_property = msd_a11y_keyboard_manager_get_property; + object_class->set_property = msd_a11y_keyboard_manager_set_property; + object_class->constructor = msd_a11y_keyboard_manager_constructor; + object_class->dispose = msd_a11y_keyboard_manager_dispose; + object_class->finalize = msd_a11y_keyboard_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdA11yKeyboardManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdA11yKeyboardManagerPrivate)); } static void on_preferences_dialog_response (GtkDialog *dialog, int response, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { g_signal_handlers_disconnect_by_func (dialog, on_preferences_dialog_response, @@ -1271,10 +1271,10 @@ on_preferences_dialog_response (GtkDialog *dialog, static void on_status_icon_activate (GtkStatusIcon *status_icon, - GsdA11yKeyboardManager *manager) + MsdA11yKeyboardManager *manager) { if (manager->priv->preferences_dialog == NULL) { - manager->priv->preferences_dialog = gsd_a11y_preferences_dialog_new (); + manager->priv->preferences_dialog = msd_a11y_preferences_dialog_new (); g_signal_connect (manager->priv->preferences_dialog, "response", G_CALLBACK (on_preferences_dialog_response), @@ -1291,7 +1291,7 @@ on_status_icon_activate (GtkStatusIcon *status_icon, } static void -gsd_a11y_keyboard_manager_ensure_status_icon (GsdA11yKeyboardManager *manager) +msd_a11y_keyboard_manager_ensure_status_icon (MsdA11yKeyboardManager *manager) { mate_settings_profile_start (NULL); @@ -1308,9 +1308,9 @@ gsd_a11y_keyboard_manager_ensure_status_icon (GsdA11yKeyboardManager *manager) } static void -gsd_a11y_keyboard_manager_init (GsdA11yKeyboardManager *manager) +msd_a11y_keyboard_manager_init (MsdA11yKeyboardManager *manager) { - manager->priv = GSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE (manager); #ifdef HAVE_LIBMATENOTIFY notify_init ("mate-settings-daemon"); @@ -1318,30 +1318,30 @@ gsd_a11y_keyboard_manager_init (GsdA11yKeyboardManager *manager) } static void -gsd_a11y_keyboard_manager_finalize (GObject *object) +msd_a11y_keyboard_manager_finalize (GObject *object) { - GsdA11yKeyboardManager *a11y_keyboard_manager; + MsdA11yKeyboardManager *a11y_keyboard_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_A11Y_KEYBOARD_MANAGER (object)); + g_return_if_fail (MSD_IS_A11Y_KEYBOARD_MANAGER (object)); - a11y_keyboard_manager = GSD_A11Y_KEYBOARD_MANAGER (object); + a11y_keyboard_manager = MSD_A11Y_KEYBOARD_MANAGER (object); g_return_if_fail (a11y_keyboard_manager->priv != NULL); - G_OBJECT_CLASS (gsd_a11y_keyboard_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_a11y_keyboard_manager_parent_class)->finalize (object); } -GsdA11yKeyboardManager * -gsd_a11y_keyboard_manager_new (void) +MsdA11yKeyboardManager * +msd_a11y_keyboard_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_A11Y_KEYBOARD_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_A11Y_KEYBOARD_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_A11Y_KEYBOARD_MANAGER (manager_object); + return MSD_A11Y_KEYBOARD_MANAGER (manager_object); } diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.h b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.h index 4fb817f..1869cf4 100644 --- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.h +++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_A11Y_KEYBOARD_MANAGER_H -#define __GSD_A11Y_KEYBOARD_MANAGER_H +#ifndef __MSD_A11Y_KEYBOARD_MANAGER_H +#define __MSD_A11Y_KEYBOARD_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_A11Y_KEYBOARD_MANAGER (gsd_a11y_keyboard_manager_get_type ()) -#define GSD_A11Y_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_A11Y_KEYBOARD_MANAGER, GsdA11yKeyboardManager)) -#define GSD_A11Y_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_A11Y_KEYBOARD_MANAGER, GsdA11yKeyboardManagerClass)) -#define GSD_IS_A11Y_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_A11Y_KEYBOARD_MANAGER)) -#define GSD_IS_A11Y_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_A11Y_KEYBOARD_MANAGER)) -#define GSD_A11Y_KEYBOARD_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_A11Y_KEYBOARD_MANAGER, GsdA11yKeyboardManagerClass)) +#define MSD_TYPE_A11Y_KEYBOARD_MANAGER (msd_a11y_keyboard_manager_get_type ()) +#define MSD_A11Y_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_A11Y_KEYBOARD_MANAGER, MsdA11yKeyboardManager)) +#define MSD_A11Y_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_A11Y_KEYBOARD_MANAGER, MsdA11yKeyboardManagerClass)) +#define MSD_IS_A11Y_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_A11Y_KEYBOARD_MANAGER)) +#define MSD_IS_A11Y_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_A11Y_KEYBOARD_MANAGER)) +#define MSD_A11Y_KEYBOARD_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_A11Y_KEYBOARD_MANAGER, MsdA11yKeyboardManagerClass)) -typedef struct GsdA11yKeyboardManagerPrivate GsdA11yKeyboardManagerPrivate; +typedef struct MsdA11yKeyboardManagerPrivate MsdA11yKeyboardManagerPrivate; typedef struct { GObject parent; - GsdA11yKeyboardManagerPrivate *priv; -} GsdA11yKeyboardManager; + MsdA11yKeyboardManagerPrivate *priv; +} MsdA11yKeyboardManager; typedef struct { GObjectClass parent_class; -} GsdA11yKeyboardManagerClass; +} MsdA11yKeyboardManagerClass; -GType gsd_a11y_keyboard_manager_get_type (void); +GType msd_a11y_keyboard_manager_get_type (void); -GsdA11yKeyboardManager *gsd_a11y_keyboard_manager_new (void); -gboolean gsd_a11y_keyboard_manager_start (GsdA11yKeyboardManager *manager, +MsdA11yKeyboardManager *msd_a11y_keyboard_manager_new (void); +gboolean msd_a11y_keyboard_manager_start (MsdA11yKeyboardManager *manager, GError **error); -void gsd_a11y_keyboard_manager_stop (GsdA11yKeyboardManager *manager); +void msd_a11y_keyboard_manager_stop (MsdA11yKeyboardManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_A11Y_KEYBOARD_MANAGER_H */ +#endif /* __MSD_A11Y_KEYBOARD_MANAGER_H */ diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c index 7846ba6..7eed1c4 100644 --- a/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c +++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-a11y-keyboard-plugin.h" -#include "gsd-a11y-keyboard-manager.h" +#include "msd-a11y-keyboard-plugin.h" +#include "msd-a11y-keyboard-manager.h" -struct GsdA11yKeyboardPluginPrivate { - GsdA11yKeyboardManager *manager; +struct MsdA11yKeyboardPluginPrivate { + MsdA11yKeyboardManager *manager; }; -#define GSD_A11Y_KEYBOARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_A11Y_KEYBOARD_PLUGIN, GsdA11yKeyboardPluginPrivate)) +#define MSD_A11Y_KEYBOARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_A11Y_KEYBOARD_PLUGIN, MsdA11yKeyboardPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdA11yKeyboardPlugin, gsd_a11y_keyboard_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdA11yKeyboardPlugin, msd_a11y_keyboard_plugin) static void -gsd_a11y_keyboard_plugin_init (GsdA11yKeyboardPlugin *plugin) +msd_a11y_keyboard_plugin_init (MsdA11yKeyboardPlugin *plugin) { - plugin->priv = GSD_A11Y_KEYBOARD_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_A11Y_KEYBOARD_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdA11yKeyboardPlugin initializing"); + g_debug ("MsdA11yKeyboardPlugin initializing"); - plugin->priv->manager = gsd_a11y_keyboard_manager_new (); + plugin->priv->manager = msd_a11y_keyboard_manager_new (); } static void -gsd_a11y_keyboard_plugin_finalize (GObject *object) +msd_a11y_keyboard_plugin_finalize (GObject *object) { - GsdA11yKeyboardPlugin *plugin; + MsdA11yKeyboardPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_A11Y_KEYBOARD_PLUGIN (object)); + g_return_if_fail (MSD_IS_A11Y_KEYBOARD_PLUGIN (object)); - g_debug ("GsdA11yKeyboardPlugin finalizing"); + g_debug ("MsdA11yKeyboardPlugin finalizing"); - plugin = GSD_A11Y_KEYBOARD_PLUGIN (object); + plugin = MSD_A11Y_KEYBOARD_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_a11y_keyboard_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_a11y_keyboard_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_a11y_keyboard_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating a11y_keyboard plugin"); error = NULL; - res = gsd_a11y_keyboard_manager_start (GSD_A11Y_KEYBOARD_PLUGIN (plugin)->priv->manager, &error); + res = msd_a11y_keyboard_manager_start (MSD_A11Y_KEYBOARD_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start a11y_keyboard manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating a11y_keyboard plugin"); - gsd_a11y_keyboard_manager_stop (GSD_A11Y_KEYBOARD_PLUGIN (plugin)->priv->manager); + msd_a11y_keyboard_manager_stop (MSD_A11Y_KEYBOARD_PLUGIN (plugin)->priv->manager); } static void -gsd_a11y_keyboard_plugin_class_init (GsdA11yKeyboardPluginClass *klass) +msd_a11y_keyboard_plugin_class_init (MsdA11yKeyboardPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_a11y_keyboard_plugin_finalize; + object_class->finalize = msd_a11y_keyboard_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdA11yKeyboardPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdA11yKeyboardPluginPrivate)); } diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.h b/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.h index ebf246c..f4b8320 100644 --- a/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.h +++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_A11Y_KEYBOARD_PLUGIN_H__ -#define __GSD_A11Y_KEYBOARD_PLUGIN_H__ +#ifndef __MSD_A11Y_KEYBOARD_PLUGIN_H__ +#define __MSD_A11Y_KEYBOARD_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_A11Y_KEYBOARD_PLUGIN (gsd_a11y_keyboard_plugin_get_type ()) -#define GSD_A11Y_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_A11Y_KEYBOARD_PLUGIN, GsdA11yKeyboardPlugin)) -#define GSD_A11Y_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_A11Y_KEYBOARD_PLUGIN, GsdA11yKeyboardPluginClass)) -#define GSD_IS_A11Y_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_A11Y_KEYBOARD_PLUGIN)) -#define GSD_IS_A11Y_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_A11Y_KEYBOARD_PLUGIN)) -#define GSD_A11Y_KEYBOARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_A11Y_KEYBOARD_PLUGIN, GsdA11yKeyboardPluginClass)) +#define MSD_TYPE_A11Y_KEYBOARD_PLUGIN (msd_a11y_keyboard_plugin_get_type ()) +#define MSD_A11Y_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_A11Y_KEYBOARD_PLUGIN, MsdA11yKeyboardPlugin)) +#define MSD_A11Y_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_A11Y_KEYBOARD_PLUGIN, MsdA11yKeyboardPluginClass)) +#define MSD_IS_A11Y_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_A11Y_KEYBOARD_PLUGIN)) +#define MSD_IS_A11Y_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_A11Y_KEYBOARD_PLUGIN)) +#define MSD_A11Y_KEYBOARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_A11Y_KEYBOARD_PLUGIN, MsdA11yKeyboardPluginClass)) -typedef struct GsdA11yKeyboardPluginPrivate GsdA11yKeyboardPluginPrivate; +typedef struct MsdA11yKeyboardPluginPrivate MsdA11yKeyboardPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdA11yKeyboardPluginPrivate *priv; -} GsdA11yKeyboardPlugin; + MsdA11yKeyboardPluginPrivate *priv; +} MsdA11yKeyboardPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdA11yKeyboardPluginClass; +} MsdA11yKeyboardPluginClass; -GType gsd_a11y_keyboard_plugin_get_type (void) G_GNUC_CONST; +GType msd_a11y_keyboard_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_A11Y_KEYBOARD_PLUGIN_H__ */ +#endif /* __MSD_A11Y_KEYBOARD_PLUGIN_H__ */ diff --git a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c index 752ee18..a5db11c 100644 --- a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c +++ b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.c @@ -34,16 +34,16 @@ #include <mateconf/mateconf-client.h> -#include "gsd-a11y-preferences-dialog.h" +#include "msd-a11y-preferences-dialog.h" #define SM_DBUS_NAME "org.mate.SessionManager" #define SM_DBUS_PATH "/org/mate/SessionManager" #define SM_DBUS_INTERFACE "org.mate.SessionManager" -#define GSD_A11Y_PREFERENCES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_A11Y_PREFERENCES_DIALOG, GsdA11yPreferencesDialogPrivate)) +#define MSD_A11Y_PREFERENCES_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_A11Y_PREFERENCES_DIALOG, MsdA11yPreferencesDialogPrivate)) -#define GTKBUILDER_UI_FILE "gsd-a11y-preferences-dialog.ui" +#define GTKBUILDER_UI_FILE "msd-a11y-preferences-dialog.ui" #define KEY_A11Y_DIR "/desktop/mate/accessibility" #define KEY_STICKY_KEYS_ENABLED KEY_A11Y_DIR "/keyboard/stickykeys_enable" @@ -83,7 +83,7 @@ #define HIGH_CONTRAST_THEME "HighContrast" -struct GsdA11yPreferencesDialogPrivate +struct MsdA11yPreferencesDialogPrivate { GtkWidget *sticky_keys_checkbutton; GtkWidget *slow_keys_checkbutton; @@ -97,21 +97,21 @@ struct GsdA11yPreferencesDialogPrivate GtkWidget *screen_magnifier_checkbutton; guint a11y_dir_cnxn; - guint gsd_a11y_dir_cnxn; + guint msd_a11y_dir_cnxn; }; enum { PROP_0, }; -static void gsd_a11y_preferences_dialog_class_init (GsdA11yPreferencesDialogClass *klass); -static void gsd_a11y_preferences_dialog_init (GsdA11yPreferencesDialog *a11y_preferences_dialog); -static void gsd_a11y_preferences_dialog_finalize (GObject *object); +static void msd_a11y_preferences_dialog_class_init (MsdA11yPreferencesDialogClass *klass); +static void msd_a11y_preferences_dialog_init (MsdA11yPreferencesDialog *a11y_preferences_dialog); +static void msd_a11y_preferences_dialog_finalize (GObject *object); -G_DEFINE_TYPE (GsdA11yPreferencesDialog, gsd_a11y_preferences_dialog, GTK_TYPE_DIALOG) +G_DEFINE_TYPE (MsdA11yPreferencesDialog, msd_a11y_preferences_dialog, GTK_TYPE_DIALOG) static void -gsd_a11y_preferences_dialog_set_property (GObject *object, +msd_a11y_preferences_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) @@ -124,7 +124,7 @@ gsd_a11y_preferences_dialog_set_property (GObject *object, } static void -gsd_a11y_preferences_dialog_get_property (GObject *object, +msd_a11y_preferences_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) @@ -137,13 +137,13 @@ gsd_a11y_preferences_dialog_get_property (GObject *object, } static GObject * -gsd_a11y_preferences_dialog_constructor (GType type, +msd_a11y_preferences_dialog_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdA11yPreferencesDialog *a11y_preferences_dialog; + MsdA11yPreferencesDialog *a11y_preferences_dialog; - a11y_preferences_dialog = GSD_A11Y_PREFERENCES_DIALOG (G_OBJECT_CLASS (gsd_a11y_preferences_dialog_parent_class)->constructor (type, + a11y_preferences_dialog = MSD_A11Y_PREFERENCES_DIALOG (G_OBJECT_CLASS (msd_a11y_preferences_dialog_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -151,27 +151,27 @@ gsd_a11y_preferences_dialog_constructor (GType type, } static void -gsd_a11y_preferences_dialog_dispose (GObject *object) +msd_a11y_preferences_dialog_dispose (GObject *object) { - G_OBJECT_CLASS (gsd_a11y_preferences_dialog_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_a11y_preferences_dialog_parent_class)->dispose (object); } static void -gsd_a11y_preferences_dialog_class_init (GsdA11yPreferencesDialogClass *klass) +msd_a11y_preferences_dialog_class_init (MsdA11yPreferencesDialogClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_a11y_preferences_dialog_get_property; - object_class->set_property = gsd_a11y_preferences_dialog_set_property; - object_class->constructor = gsd_a11y_preferences_dialog_constructor; - object_class->dispose = gsd_a11y_preferences_dialog_dispose; - object_class->finalize = gsd_a11y_preferences_dialog_finalize; + object_class->get_property = msd_a11y_preferences_dialog_get_property; + object_class->set_property = msd_a11y_preferences_dialog_set_property; + object_class->constructor = msd_a11y_preferences_dialog_constructor; + object_class->dispose = msd_a11y_preferences_dialog_dispose; + object_class->finalize = msd_a11y_preferences_dialog_finalize; - g_type_class_add_private (klass, sizeof (GsdA11yPreferencesDialogPrivate)); + g_type_class_add_private (klass, sizeof (MsdA11yPreferencesDialogPrivate)); } static void -on_response (GsdA11yPreferencesDialog *dialog, +on_response (MsdA11yPreferencesDialog *dialog, gint response_id) { switch (response_id) { @@ -293,7 +293,7 @@ config_get_large_print (gboolean *is_writable) g_object_unref (client); - g_debug ("GsdA11yPreferences: got x-dpi=%f user-dpi=%f", x_dpi, u_dpi); + g_debug ("MsdA11yPreferences: got x-dpi=%f user-dpi=%f", x_dpi, u_dpi); ret = (((double)DPI_FACTOR_LARGE * x_dpi) < u_dpi); @@ -314,7 +314,7 @@ config_set_large_print (gboolean enabled) x_dpi = get_dpi_from_x_server (); u_dpi = (double)DPI_FACTOR_LARGER * x_dpi; - g_debug ("GsdA11yPreferences: setting x-dpi=%f user-dpi=%f", x_dpi, u_dpi); + g_debug ("MsdA11yPreferences: setting x-dpi=%f user-dpi=%f", x_dpi, u_dpi); mateconf_client_set_float (client, KEY_FONT_DPI, u_dpi, NULL); } else { @@ -501,62 +501,62 @@ config_set_at_screen_magnifier (gboolean enabled) static void on_sticky_keys_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_sticky_keys (gtk_toggle_button_get_active (button)); } static void on_bounce_keys_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_bounce_keys (gtk_toggle_button_get_active (button)); } static void on_slow_keys_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_slow_keys (gtk_toggle_button_get_active (button)); } static void on_high_contrast_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_high_contrast (gtk_toggle_button_get_active (button)); } static void on_at_screen_reader_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_at_screen_reader (gtk_toggle_button_get_active (button)); } static void on_at_screen_keyboard_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_at_screen_keyboard (gtk_toggle_button_get_active (button)); } static void on_at_screen_magnifier_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_at_screen_magnifier (gtk_toggle_button_get_active (button)); } static void on_large_print_checkbutton_toggled (GtkToggleButton *button, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { config_set_large_print (gtk_toggle_button_get_active (button)); } static void -ui_set_sticky_keys (GsdA11yPreferencesDialog *dialog, +ui_set_sticky_keys (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -568,7 +568,7 @@ ui_set_sticky_keys (GsdA11yPreferencesDialog *dialog, } static void -ui_set_bounce_keys (GsdA11yPreferencesDialog *dialog, +ui_set_bounce_keys (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -580,7 +580,7 @@ ui_set_bounce_keys (GsdA11yPreferencesDialog *dialog, } static void -ui_set_slow_keys (GsdA11yPreferencesDialog *dialog, +ui_set_slow_keys (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -592,7 +592,7 @@ ui_set_slow_keys (GsdA11yPreferencesDialog *dialog, } static void -ui_set_high_contrast (GsdA11yPreferencesDialog *dialog, +ui_set_high_contrast (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -604,7 +604,7 @@ ui_set_high_contrast (GsdA11yPreferencesDialog *dialog, } static void -ui_set_at_screen_reader (GsdA11yPreferencesDialog *dialog, +ui_set_at_screen_reader (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -616,7 +616,7 @@ ui_set_at_screen_reader (GsdA11yPreferencesDialog *dialog, } static void -ui_set_at_screen_keyboard (GsdA11yPreferencesDialog *dialog, +ui_set_at_screen_keyboard (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -628,7 +628,7 @@ ui_set_at_screen_keyboard (GsdA11yPreferencesDialog *dialog, } static void -ui_set_at_screen_magnifier (GsdA11yPreferencesDialog *dialog, +ui_set_at_screen_magnifier (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -640,7 +640,7 @@ ui_set_at_screen_magnifier (GsdA11yPreferencesDialog *dialog, } static void -ui_set_large_print (GsdA11yPreferencesDialog *dialog, +ui_set_large_print (MsdA11yPreferencesDialog *dialog, gboolean enabled) { gboolean active; @@ -655,7 +655,7 @@ static void key_changed_cb (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdA11yPreferencesDialog *dialog) + MsdA11yPreferencesDialog *dialog) { const char *key; MateConfValue *value; @@ -729,7 +729,7 @@ key_changed_cb (MateConfClient *client, } static void -setup_dialog (GsdA11yPreferencesDialog *dialog, +setup_dialog (MsdA11yPreferencesDialog *dialog, GtkBuilder *builder) { GtkWidget *widget; @@ -876,7 +876,7 @@ setup_dialog (GsdA11yPreferencesDialog *dialog, KEY_AT_DIR, MATECONF_CLIENT_PRELOAD_ONELEVEL, NULL); - dialog->priv->gsd_a11y_dir_cnxn = mateconf_client_notify_add (client, + dialog->priv->msd_a11y_dir_cnxn = mateconf_client_notify_add (client, KEY_AT_DIR, (MateConfClientNotifyFunc)key_changed_cb, dialog, @@ -887,14 +887,14 @@ setup_dialog (GsdA11yPreferencesDialog *dialog, } static void -gsd_a11y_preferences_dialog_init (GsdA11yPreferencesDialog *dialog) +msd_a11y_preferences_dialog_init (MsdA11yPreferencesDialog *dialog) { static const gchar *ui_file_path = GTKBUILDERDIR "/" GTKBUILDER_UI_FILE; gchar *objects[] = {"main_box", NULL}; GError *error = NULL; GtkBuilder *builder; - dialog->priv = GSD_A11Y_PREFERENCES_DIALOG_GET_PRIVATE (dialog); + dialog->priv = MSD_A11Y_PREFERENCES_DIALOG_GET_PRIVATE (dialog); builder = gtk_builder_new (); gtk_builder_set_translation_domain (builder, PACKAGE); @@ -937,15 +937,15 @@ gsd_a11y_preferences_dialog_init (GsdA11yPreferencesDialog *dialog) } static void -gsd_a11y_preferences_dialog_finalize (GObject *object) +msd_a11y_preferences_dialog_finalize (GObject *object) { - GsdA11yPreferencesDialog *dialog; + MsdA11yPreferencesDialog *dialog; MateConfClient *client; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_A11Y_PREFERENCES_DIALOG (object)); + g_return_if_fail (MSD_IS_A11Y_PREFERENCES_DIALOG (object)); - dialog = GSD_A11Y_PREFERENCES_DIALOG (object); + dialog = MSD_A11Y_PREFERENCES_DIALOG (object); g_return_if_fail (dialog->priv != NULL); @@ -954,21 +954,21 @@ gsd_a11y_preferences_dialog_finalize (GObject *object) if (dialog->priv->a11y_dir_cnxn > 0) { mateconf_client_notify_remove (client, dialog->priv->a11y_dir_cnxn); } - if (dialog->priv->gsd_a11y_dir_cnxn > 0) { - mateconf_client_notify_remove (client, dialog->priv->gsd_a11y_dir_cnxn); + if (dialog->priv->msd_a11y_dir_cnxn > 0) { + mateconf_client_notify_remove (client, dialog->priv->msd_a11y_dir_cnxn); } g_object_unref (client); - G_OBJECT_CLASS (gsd_a11y_preferences_dialog_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_a11y_preferences_dialog_parent_class)->finalize (object); } GtkWidget * -gsd_a11y_preferences_dialog_new (void) +msd_a11y_preferences_dialog_new (void) { GObject *object; - object = g_object_new (GSD_TYPE_A11Y_PREFERENCES_DIALOG, + object = g_object_new (MSD_TYPE_A11Y_PREFERENCES_DIALOG, NULL); return GTK_WIDGET (object); diff --git a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.h b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.h index 2be096a..967a94e 100644 --- a/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.h +++ b/plugins/a11y-keyboard/gsd-a11y-preferences-dialog.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_A11Y_PREFERENCES_DIALOG_H -#define __GSD_A11Y_PREFERENCES_DIALOG_H +#ifndef __MSD_A11Y_PREFERENCES_DIALOG_H +#define __MSD_A11Y_PREFERENCES_DIALOG_H #include <glib-object.h> #include <gtk/gtk.h> @@ -28,32 +28,32 @@ extern "C" { #endif -#define GSD_TYPE_A11Y_PREFERENCES_DIALOG (gsd_a11y_preferences_dialog_get_type ()) -#define GSD_A11Y_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_A11Y_PREFERENCES_DIALOG, GsdA11yPreferencesDialog)) -#define GSD_A11Y_PREFERENCES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_A11Y_PREFERENCES_DIALOG, GsdA11yPreferencesDialogClass)) -#define GSD_IS_A11Y_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_A11Y_PREFERENCES_DIALOG)) -#define GSD_IS_A11Y_PREFERENCES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_A11Y_PREFERENCES_DIALOG)) -#define GSD_A11Y_PREFERENCES_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_A11Y_PREFERENCES_DIALOG, GsdA11yPreferencesDialogClass)) +#define MSD_TYPE_A11Y_PREFERENCES_DIALOG (msd_a11y_preferences_dialog_get_type ()) +#define MSD_A11Y_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_A11Y_PREFERENCES_DIALOG, MsdA11yPreferencesDialog)) +#define MSD_A11Y_PREFERENCES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_A11Y_PREFERENCES_DIALOG, MsdA11yPreferencesDialogClass)) +#define MSD_IS_A11Y_PREFERENCES_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_A11Y_PREFERENCES_DIALOG)) +#define MSD_IS_A11Y_PREFERENCES_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_A11Y_PREFERENCES_DIALOG)) +#define MSD_A11Y_PREFERENCES_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_A11Y_PREFERENCES_DIALOG, MsdA11yPreferencesDialogClass)) -typedef struct GsdA11yPreferencesDialogPrivate GsdA11yPreferencesDialogPrivate; +typedef struct MsdA11yPreferencesDialogPrivate MsdA11yPreferencesDialogPrivate; typedef struct { GtkDialog parent; - GsdA11yPreferencesDialogPrivate *priv; -} GsdA11yPreferencesDialog; + MsdA11yPreferencesDialogPrivate *priv; +} MsdA11yPreferencesDialog; typedef struct { GtkDialogClass parent_class; -} GsdA11yPreferencesDialogClass; +} MsdA11yPreferencesDialogClass; -GType gsd_a11y_preferences_dialog_get_type (void); +GType msd_a11y_preferences_dialog_get_type (void); -GtkWidget * gsd_a11y_preferences_dialog_new (void); +GtkWidget * msd_a11y_preferences_dialog_new (void); #ifdef __cplusplus } #endif -#endif /* __GSD_A11Y_PREFERENCES_DIALOG_H */ +#endif /* __MSD_A11Y_PREFERENCES_DIALOG_H */ diff --git a/plugins/a11y-keyboard/test-a11y-preferences-dialog.c b/plugins/a11y-keyboard/test-a11y-preferences-dialog.c index 343f61c..0325a36 100644 --- a/plugins/a11y-keyboard/test-a11y-preferences-dialog.c +++ b/plugins/a11y-keyboard/test-a11y-preferences-dialog.c @@ -27,14 +27,14 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include "gsd-a11y-preferences-dialog.h" +#include "msd-a11y-preferences-dialog.h" static void test_window (void) { GtkWidget *window; - window = gsd_a11y_preferences_dialog_new (); + window = msd_a11y_preferences_dialog_new (); gtk_dialog_run (GTK_DIALOG (window)); } diff --git a/plugins/background/Makefile.am b/plugins/background/Makefile.am index f773144..a047573 100644 --- a/plugins/background/Makefile.am +++ b/plugins/background/Makefile.am @@ -6,8 +6,8 @@ noinst_PROGRAMS = \ test_background_SOURCES = \ test-background.c \ - gsd-background-manager.h \ - gsd-background-manager.c \ + msd-background-manager.h \ + msd-background-manager.c \ $(NULL) test_background_CPPFLAGS = \ @@ -20,7 +20,7 @@ test_background_CFLAGS = \ $(AM_CFLAGS) test_background_LDADD = \ - $(top_builddir)/mate-settings-daemon/libgsd-profile.la \ + $(top_builddir)/mate-settings-daemon/libmsd-profile.la \ $(SETTINGS_PLUGIN_LIBS) \ $(X11_LIBS) \ $(NULL) @@ -30,10 +30,10 @@ plugin_LTLIBRARIES = \ $(NULL) libbackground_la_SOURCES = \ - gsd-background-plugin.h \ - gsd-background-plugin.c \ - gsd-background-manager.h \ - gsd-background-manager.c \ + msd-background-plugin.h \ + msd-background-plugin.c \ + msd-background-manager.h \ + msd-background-manager.c \ $(NULL) libbackground_la_CPPFLAGS = \ @@ -47,7 +47,7 @@ libbackground_la_CFLAGS = \ $(AM_CFLAGS) libbackground_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libbackground_la_LIBADD = \ @@ -72,4 +72,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/background/gsd-background-manager.c b/plugins/background/gsd-background-manager.c index c05ec3f..25ab7ec 100644 --- a/plugins/background/gsd-background-manager.c +++ b/plugins/background/gsd-background-manager.c @@ -45,13 +45,13 @@ #include <X11/Xatom.h> #include "mate-settings-profile.h" -#include "gsd-background-manager.h" +#include "msd-background-manager.h" #define CAJA_SHOW_DESKTOP_KEY "/apps/caja/preferences/show_desktop" -#define GSD_BACKGROUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_BACKGROUND_MANAGER, GsdBackgroundManagerPrivate)) +#define MSD_BACKGROUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_BACKGROUND_MANAGER, MsdBackgroundManagerPrivate)) -struct GsdBackgroundManagerPrivate +struct MsdBackgroundManagerPrivate { MateConfClient *client; MateBG *bg; @@ -61,11 +61,11 @@ struct GsdBackgroundManagerPrivate DBusConnection *dbus_connection; }; -static void gsd_background_manager_class_init (GsdBackgroundManagerClass *klass); -static void gsd_background_manager_init (GsdBackgroundManager *background_manager); -static void gsd_background_manager_finalize (GObject *object); +static void msd_background_manager_class_init (MsdBackgroundManagerClass *klass); +static void msd_background_manager_init (MsdBackgroundManager *background_manager); +static void msd_background_manager_finalize (GObject *object); -G_DEFINE_TYPE (GsdBackgroundManager, gsd_background_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdBackgroundManager, msd_background_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -161,7 +161,7 @@ caja_is_running (void) } static void -draw_background (GsdBackgroundManager *manager, +draw_background (MsdBackgroundManager *manager, gboolean use_crossfade) { GdkDisplay *display; @@ -210,14 +210,14 @@ draw_background (GsdBackgroundManager *manager, static void on_bg_changed (MateBG *bg, - GsdBackgroundManager *manager) + MsdBackgroundManager *manager) { draw_background (manager, TRUE); } static void on_bg_transitioned (MateBG *bg, - GsdBackgroundManager *manager) + MsdBackgroundManager *manager) { draw_background (manager, FALSE); } @@ -226,14 +226,14 @@ static void mateconf_changed_callback (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdBackgroundManager *manager) + MsdBackgroundManager *manager) { mate_bg_load_from_preferences (manager->priv->bg, manager->priv->client); } static void -watch_bg_preferences (GsdBackgroundManager *manager) +watch_bg_preferences (MsdBackgroundManager *manager) { g_assert (manager->priv->bg_notify_id == 0); @@ -250,7 +250,7 @@ watch_bg_preferences (GsdBackgroundManager *manager) } static void -setup_bg (GsdBackgroundManager *manager) +setup_bg (MsdBackgroundManager *manager) { g_return_if_fail (manager->priv->bg == NULL); @@ -272,7 +272,7 @@ setup_bg (GsdBackgroundManager *manager) } static gboolean -queue_draw_background (GsdBackgroundManager *manager) +queue_draw_background (MsdBackgroundManager *manager) { manager->priv->timeout_id = 0; if (caja_is_running ()) { @@ -288,7 +288,7 @@ on_bus_message (DBusConnection *connection, DBusMessage *message, void *user_data) { - GsdBackgroundManager *manager = user_data; + MsdBackgroundManager *manager = user_data; if (dbus_message_is_signal (message, "org.mate.SessionManager", @@ -315,7 +315,7 @@ on_bus_message (DBusConnection *connection, } static void -draw_background_after_session_loads (GsdBackgroundManager *manager) +draw_background_after_session_loads (MsdBackgroundManager *manager) { DBusConnection *connection; @@ -334,7 +334,7 @@ draw_background_after_session_loads (GsdBackgroundManager *manager) static void on_screen_size_changed (GdkScreen *screen, - GsdBackgroundManager *manager) + MsdBackgroundManager *manager) { gboolean caja_show_desktop; @@ -351,7 +351,7 @@ on_screen_size_changed (GdkScreen *screen, } static void -disconnect_screen_signals (GsdBackgroundManager *manager) +disconnect_screen_signals (MsdBackgroundManager *manager) { GdkDisplay *display; int i; @@ -370,7 +370,7 @@ disconnect_screen_signals (GsdBackgroundManager *manager) } static void -connect_screen_signals (GsdBackgroundManager *manager) +connect_screen_signals (MsdBackgroundManager *manager) { GdkDisplay *display; int i; @@ -394,7 +394,7 @@ connect_screen_signals (GsdBackgroundManager *manager) } gboolean -gsd_background_manager_start (GsdBackgroundManager *manager, +msd_background_manager_start (MsdBackgroundManager *manager, GError **error) { gboolean caja_show_desktop; @@ -429,9 +429,9 @@ gsd_background_manager_start (GsdBackgroundManager *manager, } void -gsd_background_manager_stop (GsdBackgroundManager *manager) +msd_background_manager_stop (MsdBackgroundManager *manager) { - GsdBackgroundManagerPrivate *p = manager->priv; + MsdBackgroundManagerPrivate *p = manager->priv; g_debug ("Stopping background manager"); @@ -469,14 +469,14 @@ gsd_background_manager_stop (GsdBackgroundManager *manager) } static void -gsd_background_manager_set_property (GObject *object, +msd_background_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdBackgroundManager *self; + MsdBackgroundManager *self; - self = GSD_BACKGROUND_MANAGER (object); + self = MSD_BACKGROUND_MANAGER (object); switch (prop_id) { default: @@ -486,14 +486,14 @@ gsd_background_manager_set_property (GObject *object, } static void -gsd_background_manager_get_property (GObject *object, +msd_background_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdBackgroundManager *self; + MsdBackgroundManager *self; - self = GSD_BACKGROUND_MANAGER (object); + self = MSD_BACKGROUND_MANAGER (object); switch (prop_id) { default: @@ -503,16 +503,16 @@ gsd_background_manager_get_property (GObject *object, } static GObject * -gsd_background_manager_constructor (GType type, +msd_background_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdBackgroundManager *background_manager; - GsdBackgroundManagerClass *klass; + MsdBackgroundManager *background_manager; + MsdBackgroundManagerClass *klass; - klass = GSD_BACKGROUND_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_BACKGROUND_MANAGER)); + klass = MSD_BACKGROUND_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_BACKGROUND_MANAGER)); - background_manager = GSD_BACKGROUND_MANAGER (G_OBJECT_CLASS (gsd_background_manager_parent_class)->constructor (type, + background_manager = MSD_BACKGROUND_MANAGER (G_OBJECT_CLASS (msd_background_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -520,60 +520,60 @@ gsd_background_manager_constructor (GType type, } static void -gsd_background_manager_dispose (GObject *object) +msd_background_manager_dispose (GObject *object) { - GsdBackgroundManager *background_manager; + MsdBackgroundManager *background_manager; - background_manager = GSD_BACKGROUND_MANAGER (object); + background_manager = MSD_BACKGROUND_MANAGER (object); - G_OBJECT_CLASS (gsd_background_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_background_manager_parent_class)->dispose (object); } static void -gsd_background_manager_class_init (GsdBackgroundManagerClass *klass) +msd_background_manager_class_init (MsdBackgroundManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_background_manager_get_property; - object_class->set_property = gsd_background_manager_set_property; - object_class->constructor = gsd_background_manager_constructor; - object_class->dispose = gsd_background_manager_dispose; - object_class->finalize = gsd_background_manager_finalize; + object_class->get_property = msd_background_manager_get_property; + object_class->set_property = msd_background_manager_set_property; + object_class->constructor = msd_background_manager_constructor; + object_class->dispose = msd_background_manager_dispose; + object_class->finalize = msd_background_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdBackgroundManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdBackgroundManagerPrivate)); } static void -gsd_background_manager_init (GsdBackgroundManager *manager) +msd_background_manager_init (MsdBackgroundManager *manager) { - manager->priv = GSD_BACKGROUND_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_BACKGROUND_MANAGER_GET_PRIVATE (manager); } static void -gsd_background_manager_finalize (GObject *object) +msd_background_manager_finalize (GObject *object) { - GsdBackgroundManager *background_manager; + MsdBackgroundManager *background_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_BACKGROUND_MANAGER (object)); + g_return_if_fail (MSD_IS_BACKGROUND_MANAGER (object)); - background_manager = GSD_BACKGROUND_MANAGER (object); + background_manager = MSD_BACKGROUND_MANAGER (object); g_return_if_fail (background_manager->priv != NULL); - G_OBJECT_CLASS (gsd_background_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_background_manager_parent_class)->finalize (object); } -GsdBackgroundManager * -gsd_background_manager_new (void) +MsdBackgroundManager * +msd_background_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_BACKGROUND_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_BACKGROUND_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_BACKGROUND_MANAGER (manager_object); + return MSD_BACKGROUND_MANAGER (manager_object); } diff --git a/plugins/background/gsd-background-manager.h b/plugins/background/gsd-background-manager.h index 27c900a..91e232c 100644 --- a/plugins/background/gsd-background-manager.h +++ b/plugins/background/gsd-background-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_BACKGROUND_MANAGER_H -#define __GSD_BACKGROUND_MANAGER_H +#ifndef __MSD_BACKGROUND_MANAGER_H +#define __MSD_BACKGROUND_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_BACKGROUND_MANAGER (gsd_background_manager_get_type ()) -#define GSD_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_BACKGROUND_MANAGER, GsdBackgroundManager)) -#define GSD_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_BACKGROUND_MANAGER, GsdBackgroundManagerClass)) -#define GSD_IS_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_BACKGROUND_MANAGER)) -#define GSD_IS_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_BACKGROUND_MANAGER)) -#define GSD_BACKGROUND_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_BACKGROUND_MANAGER, GsdBackgroundManagerClass)) +#define MSD_TYPE_BACKGROUND_MANAGER (msd_background_manager_get_type ()) +#define MSD_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_BACKGROUND_MANAGER, MsdBackgroundManager)) +#define MSD_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_BACKGROUND_MANAGER, MsdBackgroundManagerClass)) +#define MSD_IS_BACKGROUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_BACKGROUND_MANAGER)) +#define MSD_IS_BACKGROUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_BACKGROUND_MANAGER)) +#define MSD_BACKGROUND_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_BACKGROUND_MANAGER, MsdBackgroundManagerClass)) -typedef struct GsdBackgroundManagerPrivate GsdBackgroundManagerPrivate; +typedef struct MsdBackgroundManagerPrivate MsdBackgroundManagerPrivate; typedef struct { GObject parent; - GsdBackgroundManagerPrivate *priv; -} GsdBackgroundManager; + MsdBackgroundManagerPrivate *priv; +} MsdBackgroundManager; typedef struct { GObjectClass parent_class; -} GsdBackgroundManagerClass; +} MsdBackgroundManagerClass; -GType gsd_background_manager_get_type (void); +GType msd_background_manager_get_type (void); -GsdBackgroundManager * gsd_background_manager_new (void); -gboolean gsd_background_manager_start (GsdBackgroundManager *manager, +MsdBackgroundManager * msd_background_manager_new (void); +gboolean msd_background_manager_start (MsdBackgroundManager *manager, GError **error); -void gsd_background_manager_stop (GsdBackgroundManager *manager); +void msd_background_manager_stop (MsdBackgroundManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_BACKGROUND_MANAGER_H */ +#endif /* __MSD_BACKGROUND_MANAGER_H */ diff --git a/plugins/background/gsd-background-plugin.c b/plugins/background/gsd-background-plugin.c index e001f39..d12bb2b 100644 --- a/plugins/background/gsd-background-plugin.c +++ b/plugins/background/gsd-background-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-background-plugin.h" -#include "gsd-background-manager.h" +#include "msd-background-plugin.h" +#include "msd-background-manager.h" -struct GsdBackgroundPluginPrivate { - GsdBackgroundManager *manager; +struct MsdBackgroundPluginPrivate { + MsdBackgroundManager *manager; }; -#define GSD_BACKGROUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPluginPrivate)) +#define MSD_BACKGROUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_BACKGROUND_PLUGIN, MsdBackgroundPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdBackgroundPlugin, gsd_background_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdBackgroundPlugin, msd_background_plugin) static void -gsd_background_plugin_init (GsdBackgroundPlugin *plugin) +msd_background_plugin_init (MsdBackgroundPlugin *plugin) { - plugin->priv = GSD_BACKGROUND_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_BACKGROUND_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdBackgroundPlugin initializing"); + g_debug ("MsdBackgroundPlugin initializing"); - plugin->priv->manager = gsd_background_manager_new (); + plugin->priv->manager = msd_background_manager_new (); } static void -gsd_background_plugin_finalize (GObject *object) +msd_background_plugin_finalize (GObject *object) { - GsdBackgroundPlugin *plugin; + MsdBackgroundPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_BACKGROUND_PLUGIN (object)); + g_return_if_fail (MSD_IS_BACKGROUND_PLUGIN (object)); - g_debug ("GsdBackgroundPlugin finalizing"); + g_debug ("MsdBackgroundPlugin finalizing"); - plugin = GSD_BACKGROUND_PLUGIN (object); + plugin = MSD_BACKGROUND_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_background_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_background_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_background_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating background plugin"); error = NULL; - res = gsd_background_manager_start (GSD_BACKGROUND_PLUGIN (plugin)->priv->manager, &error); + res = msd_background_manager_start (MSD_BACKGROUND_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start background manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating background plugin"); - gsd_background_manager_stop (GSD_BACKGROUND_PLUGIN (plugin)->priv->manager); + msd_background_manager_stop (MSD_BACKGROUND_PLUGIN (plugin)->priv->manager); } static void -gsd_background_plugin_class_init (GsdBackgroundPluginClass *klass) +msd_background_plugin_class_init (MsdBackgroundPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_background_plugin_finalize; + object_class->finalize = msd_background_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdBackgroundPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdBackgroundPluginPrivate)); } diff --git a/plugins/background/gsd-background-plugin.h b/plugins/background/gsd-background-plugin.h index 1acaf9f..dd52572 100644 --- a/plugins/background/gsd-background-plugin.h +++ b/plugins/background/gsd-background-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_BACKGROUND_PLUGIN_H__ -#define __GSD_BACKGROUND_PLUGIN_H__ +#ifndef __MSD_BACKGROUND_PLUGIN_H__ +#define __MSD_BACKGROUND_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_BACKGROUND_PLUGIN (gsd_background_plugin_get_type ()) -#define GSD_BACKGROUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPlugin)) -#define GSD_BACKGROUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPluginClass)) -#define GSD_IS_BACKGROUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_BACKGROUND_PLUGIN)) -#define GSD_IS_BACKGROUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_BACKGROUND_PLUGIN)) -#define GSD_BACKGROUND_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_BACKGROUND_PLUGIN, GsdBackgroundPluginClass)) +#define MSD_TYPE_BACKGROUND_PLUGIN (msd_background_plugin_get_type ()) +#define MSD_BACKGROUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_BACKGROUND_PLUGIN, MsdBackgroundPlugin)) +#define MSD_BACKGROUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_BACKGROUND_PLUGIN, MsdBackgroundPluginClass)) +#define MSD_IS_BACKGROUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_BACKGROUND_PLUGIN)) +#define MSD_IS_BACKGROUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_BACKGROUND_PLUGIN)) +#define MSD_BACKGROUND_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_BACKGROUND_PLUGIN, MsdBackgroundPluginClass)) -typedef struct GsdBackgroundPluginPrivate GsdBackgroundPluginPrivate; +typedef struct MsdBackgroundPluginPrivate MsdBackgroundPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdBackgroundPluginPrivate *priv; -} GsdBackgroundPlugin; + MsdBackgroundPluginPrivate *priv; +} MsdBackgroundPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdBackgroundPluginClass; +} MsdBackgroundPluginClass; -GType gsd_background_plugin_get_type (void) G_GNUC_CONST; +GType msd_background_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_BACKGROUND_PLUGIN_H__ */ +#endif /* __MSD_BACKGROUND_PLUGIN_H__ */ diff --git a/plugins/background/test-background.c b/plugins/background/test-background.c index a7b5ef7..f9b0849 100644 --- a/plugins/background/test-background.c +++ b/plugins/background/test-background.c @@ -28,19 +28,19 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include "gsd-background-manager.h" +#include "msd-background-manager.h" static gboolean -idle (GsdBackgroundManager *manager) +idle (MsdBackgroundManager *manager) { - gsd_background_manager_start (manager, NULL); + msd_background_manager_start (manager, NULL); return FALSE; } int main (int argc, char *argv[]) { - GsdBackgroundManager *manager; + MsdBackgroundManager *manager; bindtextdomain (GETTEXT_PACKAGE, MATE_SETTINGS_LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); @@ -50,7 +50,7 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); - manager = gsd_background_manager_new (); + manager = msd_background_manager_new (); g_idle_add ((GSourceFunc)idle, manager); gtk_main (); diff --git a/plugins/clipboard/Makefile.am b/plugins/clipboard/Makefile.am index f50a86e..4b1fdca 100644 --- a/plugins/clipboard/Makefile.am +++ b/plugins/clipboard/Makefile.am @@ -5,10 +5,10 @@ plugin_LTLIBRARIES = \ $(NULL) libclipboard_la_SOURCES = \ - gsd-clipboard-plugin.h \ - gsd-clipboard-plugin.c \ - gsd-clipboard-manager.h \ - gsd-clipboard-manager.c \ + msd-clipboard-plugin.h \ + msd-clipboard-plugin.c \ + msd-clipboard-manager.h \ + msd-clipboard-manager.c \ xutils.h \ xutils.c \ list.h \ @@ -25,7 +25,7 @@ libclipboard_la_CFLAGS = \ $(AM_CFLAGS) libclipboard_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libclipboard_la_LIBADD = \ @@ -50,4 +50,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/clipboard/gsd-clipboard-manager.c b/plugins/clipboard/gsd-clipboard-manager.c index fcbc839..c6d5a57 100644 --- a/plugins/clipboard/gsd-clipboard-manager.c +++ b/plugins/clipboard/gsd-clipboard-manager.c @@ -45,11 +45,11 @@ #include "list.h" #include "mate-settings-profile.h" -#include "gsd-clipboard-manager.h" +#include "msd-clipboard-manager.h" -#define GSD_CLIPBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_CLIPBOARD_MANAGER, GsdClipboardManagerPrivate)) +#define MSD_CLIPBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_CLIPBOARD_MANAGER, MsdClipboardManagerPrivate)) -struct GsdClipboardManagerPrivate +struct MsdClipboardManagerPrivate { Display *display; Window window; @@ -82,17 +82,17 @@ typedef struct int offset; } IncrConversion; -static void gsd_clipboard_manager_class_init (GsdClipboardManagerClass *klass); -static void gsd_clipboard_manager_init (GsdClipboardManager *clipboard_manager); -static void gsd_clipboard_manager_finalize (GObject *object); +static void msd_clipboard_manager_class_init (MsdClipboardManagerClass *klass); +static void msd_clipboard_manager_init (MsdClipboardManager *clipboard_manager); +static void msd_clipboard_manager_finalize (GObject *object); -static void clipboard_manager_watch_cb (GsdClipboardManager *manager, +static void clipboard_manager_watch_cb (MsdClipboardManager *manager, Window window, Bool is_start, long mask, void *cb_data); -G_DEFINE_TYPE (GsdClipboardManager, gsd_clipboard_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdClipboardManager, msd_clipboard_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -127,7 +127,7 @@ conversion_free (IncrConversion *rdata) } static void -send_selection_notify (GsdClipboardManager *manager, +send_selection_notify (MsdClipboardManager *manager, Bool success) { XSelectionEvent notify; @@ -155,7 +155,7 @@ send_selection_notify (GsdClipboardManager *manager, } static void -finish_selection_request (GsdClipboardManager *manager, +finish_selection_request (MsdClipboardManager *manager, XEvent *xev, Bool success) { @@ -195,7 +195,7 @@ clipboard_bytes_per_item (int format) } static void -save_targets (GsdClipboardManager *manager, +save_targets (MsdClipboardManager *manager, Atom *save_targets, int nitems) { @@ -263,7 +263,7 @@ find_conversion_requestor (IncrConversion *rdata, static void get_property (TargetData *tdata, - GsdClipboardManager *manager) + MsdClipboardManager *manager) { Atom type; int format; @@ -300,7 +300,7 @@ get_property (TargetData *tdata, } static Bool -receive_incrementally (GsdClipboardManager *manager, +receive_incrementally (MsdClipboardManager *manager, XEvent *xev) { List *list; @@ -359,7 +359,7 @@ receive_incrementally (GsdClipboardManager *manager, } static Bool -send_incrementally (GsdClipboardManager *manager, +send_incrementally (MsdClipboardManager *manager, XEvent *xev) { List *list; @@ -397,7 +397,7 @@ send_incrementally (GsdClipboardManager *manager, } static void -convert_clipboard_manager (GsdClipboardManager *manager, +convert_clipboard_manager (MsdClipboardManager *manager, XEvent *xev) { Atom type = None; @@ -486,7 +486,7 @@ convert_clipboard_manager (GsdClipboardManager *manager, static void convert_clipboard_target (IncrConversion *rdata, - GsdClipboardManager *manager) + MsdClipboardManager *manager) { TargetData *tdata; Atom *targets; @@ -561,7 +561,7 @@ convert_clipboard_target (IncrConversion *rdata, static void collect_incremental (IncrConversion *rdata, - GsdClipboardManager *manager) + MsdClipboardManager *manager) { if (rdata->offset >= 0) manager->priv->conversions = list_prepend (manager->priv->conversions, rdata); @@ -575,7 +575,7 @@ collect_incremental (IncrConversion *rdata, } static void -convert_clipboard (GsdClipboardManager *manager, +convert_clipboard (MsdClipboardManager *manager, XEvent *xev) { List *list; @@ -656,7 +656,7 @@ convert_clipboard (GsdClipboardManager *manager, } static Bool -clipboard_manager_process_event (GsdClipboardManager *manager, +clipboard_manager_process_event (MsdClipboardManager *manager, XEvent *xev) { Atom type; @@ -805,7 +805,7 @@ clipboard_manager_process_event (GsdClipboardManager *manager, static GdkFilterReturn clipboard_manager_event_filter (GdkXEvent *xevent, GdkEvent *event, - GsdClipboardManager *manager) + MsdClipboardManager *manager) { if (clipboard_manager_process_event (manager, (XEvent *)xevent)) { return GDK_FILTER_REMOVE; @@ -815,7 +815,7 @@ clipboard_manager_event_filter (GdkXEvent *xevent, } static void -clipboard_manager_watch_cb (GsdClipboardManager *manager, +clipboard_manager_watch_cb (MsdClipboardManager *manager, Window window, Bool is_start, long mask, @@ -849,7 +849,7 @@ clipboard_manager_watch_cb (GsdClipboardManager *manager, } static gboolean -start_clipboard_idle_cb (GsdClipboardManager *manager) +start_clipboard_idle_cb (MsdClipboardManager *manager) { XClientMessageEvent xev; @@ -924,7 +924,7 @@ start_clipboard_idle_cb (GsdClipboardManager *manager) } gboolean -gsd_clipboard_manager_start (GsdClipboardManager *manager, +msd_clipboard_manager_start (MsdClipboardManager *manager, GError **error) { mate_settings_profile_start (NULL); @@ -937,7 +937,7 @@ gsd_clipboard_manager_start (GsdClipboardManager *manager, } void -gsd_clipboard_manager_stop (GsdClipboardManager *manager) +msd_clipboard_manager_stop (MsdClipboardManager *manager) { g_debug ("Stopping clipboard manager"); @@ -956,14 +956,14 @@ gsd_clipboard_manager_stop (GsdClipboardManager *manager) } static void -gsd_clipboard_manager_set_property (GObject *object, +msd_clipboard_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdClipboardManager *self; + MsdClipboardManager *self; - self = GSD_CLIPBOARD_MANAGER (object); + self = MSD_CLIPBOARD_MANAGER (object); switch (prop_id) { default: @@ -973,14 +973,14 @@ gsd_clipboard_manager_set_property (GObject *object, } static void -gsd_clipboard_manager_get_property (GObject *object, +msd_clipboard_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdClipboardManager *self; + MsdClipboardManager *self; - self = GSD_CLIPBOARD_MANAGER (object); + self = MSD_CLIPBOARD_MANAGER (object); switch (prop_id) { default: @@ -990,16 +990,16 @@ gsd_clipboard_manager_get_property (GObject *object, } static GObject * -gsd_clipboard_manager_constructor (GType type, +msd_clipboard_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdClipboardManager *clipboard_manager; - GsdClipboardManagerClass *klass; + MsdClipboardManager *clipboard_manager; + MsdClipboardManagerClass *klass; - klass = GSD_CLIPBOARD_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_CLIPBOARD_MANAGER)); + klass = MSD_CLIPBOARD_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_CLIPBOARD_MANAGER)); - clipboard_manager = GSD_CLIPBOARD_MANAGER (G_OBJECT_CLASS (gsd_clipboard_manager_parent_class)->constructor (type, + clipboard_manager = MSD_CLIPBOARD_MANAGER (G_OBJECT_CLASS (msd_clipboard_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -1007,63 +1007,63 @@ gsd_clipboard_manager_constructor (GType type, } static void -gsd_clipboard_manager_dispose (GObject *object) +msd_clipboard_manager_dispose (GObject *object) { - GsdClipboardManager *clipboard_manager; + MsdClipboardManager *clipboard_manager; - clipboard_manager = GSD_CLIPBOARD_MANAGER (object); + clipboard_manager = MSD_CLIPBOARD_MANAGER (object); - G_OBJECT_CLASS (gsd_clipboard_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_clipboard_manager_parent_class)->dispose (object); } static void -gsd_clipboard_manager_class_init (GsdClipboardManagerClass *klass) +msd_clipboard_manager_class_init (MsdClipboardManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_clipboard_manager_get_property; - object_class->set_property = gsd_clipboard_manager_set_property; - object_class->constructor = gsd_clipboard_manager_constructor; - object_class->dispose = gsd_clipboard_manager_dispose; - object_class->finalize = gsd_clipboard_manager_finalize; + object_class->get_property = msd_clipboard_manager_get_property; + object_class->set_property = msd_clipboard_manager_set_property; + object_class->constructor = msd_clipboard_manager_constructor; + object_class->dispose = msd_clipboard_manager_dispose; + object_class->finalize = msd_clipboard_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdClipboardManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdClipboardManagerPrivate)); } static void -gsd_clipboard_manager_init (GsdClipboardManager *manager) +msd_clipboard_manager_init (MsdClipboardManager *manager) { - manager->priv = GSD_CLIPBOARD_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_CLIPBOARD_MANAGER_GET_PRIVATE (manager); manager->priv->display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); } static void -gsd_clipboard_manager_finalize (GObject *object) +msd_clipboard_manager_finalize (GObject *object) { - GsdClipboardManager *clipboard_manager; + MsdClipboardManager *clipboard_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_CLIPBOARD_MANAGER (object)); + g_return_if_fail (MSD_IS_CLIPBOARD_MANAGER (object)); - clipboard_manager = GSD_CLIPBOARD_MANAGER (object); + clipboard_manager = MSD_CLIPBOARD_MANAGER (object); g_return_if_fail (clipboard_manager->priv != NULL); - G_OBJECT_CLASS (gsd_clipboard_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_clipboard_manager_parent_class)->finalize (object); } -GsdClipboardManager * -gsd_clipboard_manager_new (void) +MsdClipboardManager * +msd_clipboard_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_CLIPBOARD_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_CLIPBOARD_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_CLIPBOARD_MANAGER (manager_object); + return MSD_CLIPBOARD_MANAGER (manager_object); } diff --git a/plugins/clipboard/gsd-clipboard-manager.h b/plugins/clipboard/gsd-clipboard-manager.h index 0338799..e4af711 100644 --- a/plugins/clipboard/gsd-clipboard-manager.h +++ b/plugins/clipboard/gsd-clipboard-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_CLIPBOARD_MANAGER_H -#define __GSD_CLIPBOARD_MANAGER_H +#ifndef __MSD_CLIPBOARD_MANAGER_H +#define __MSD_CLIPBOARD_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_CLIPBOARD_MANAGER (gsd_clipboard_manager_get_type ()) -#define GSD_CLIPBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_CLIPBOARD_MANAGER, GsdClipboardManager)) -#define GSD_CLIPBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_CLIPBOARD_MANAGER, GsdClipboardManagerClass)) -#define GSD_IS_CLIPBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_CLIPBOARD_MANAGER)) -#define GSD_IS_CLIPBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_CLIPBOARD_MANAGER)) -#define GSD_CLIPBOARD_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_CLIPBOARD_MANAGER, GsdClipboardManagerClass)) +#define MSD_TYPE_CLIPBOARD_MANAGER (msd_clipboard_manager_get_type ()) +#define MSD_CLIPBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_CLIPBOARD_MANAGER, MsdClipboardManager)) +#define MSD_CLIPBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_CLIPBOARD_MANAGER, MsdClipboardManagerClass)) +#define MSD_IS_CLIPBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_CLIPBOARD_MANAGER)) +#define MSD_IS_CLIPBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_CLIPBOARD_MANAGER)) +#define MSD_CLIPBOARD_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_CLIPBOARD_MANAGER, MsdClipboardManagerClass)) -typedef struct GsdClipboardManagerPrivate GsdClipboardManagerPrivate; +typedef struct MsdClipboardManagerPrivate MsdClipboardManagerPrivate; typedef struct { GObject parent; - GsdClipboardManagerPrivate *priv; -} GsdClipboardManager; + MsdClipboardManagerPrivate *priv; +} MsdClipboardManager; typedef struct { GObjectClass parent_class; -} GsdClipboardManagerClass; +} MsdClipboardManagerClass; -GType gsd_clipboard_manager_get_type (void); +GType msd_clipboard_manager_get_type (void); -GsdClipboardManager * gsd_clipboard_manager_new (void); -gboolean gsd_clipboard_manager_start (GsdClipboardManager *manager, +MsdClipboardManager * msd_clipboard_manager_new (void); +gboolean msd_clipboard_manager_start (MsdClipboardManager *manager, GError **error); -void gsd_clipboard_manager_stop (GsdClipboardManager *manager); +void msd_clipboard_manager_stop (MsdClipboardManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_CLIPBOARD_MANAGER_H */ +#endif /* __MSD_CLIPBOARD_MANAGER_H */ diff --git a/plugins/clipboard/gsd-clipboard-plugin.c b/plugins/clipboard/gsd-clipboard-plugin.c index f384b52..6674265 100644 --- a/plugins/clipboard/gsd-clipboard-plugin.c +++ b/plugins/clipboard/gsd-clipboard-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-clipboard-plugin.h" -#include "gsd-clipboard-manager.h" +#include "msd-clipboard-plugin.h" +#include "msd-clipboard-manager.h" -struct GsdClipboardPluginPrivate { - GsdClipboardManager *manager; +struct MsdClipboardPluginPrivate { + MsdClipboardManager *manager; }; -#define GSD_CLIPBOARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_CLIPBOARD_PLUGIN, GsdClipboardPluginPrivate)) +#define MSD_CLIPBOARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_CLIPBOARD_PLUGIN, MsdClipboardPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdClipboardPlugin, gsd_clipboard_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdClipboardPlugin, msd_clipboard_plugin) static void -gsd_clipboard_plugin_init (GsdClipboardPlugin *plugin) +msd_clipboard_plugin_init (MsdClipboardPlugin *plugin) { - plugin->priv = GSD_CLIPBOARD_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_CLIPBOARD_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdClipboardPlugin initializing"); + g_debug ("MsdClipboardPlugin initializing"); - plugin->priv->manager = gsd_clipboard_manager_new (); + plugin->priv->manager = msd_clipboard_manager_new (); } static void -gsd_clipboard_plugin_finalize (GObject *object) +msd_clipboard_plugin_finalize (GObject *object) { - GsdClipboardPlugin *plugin; + MsdClipboardPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_CLIPBOARD_PLUGIN (object)); + g_return_if_fail (MSD_IS_CLIPBOARD_PLUGIN (object)); - g_debug ("GsdClipboardPlugin finalizing"); + g_debug ("MsdClipboardPlugin finalizing"); - plugin = GSD_CLIPBOARD_PLUGIN (object); + plugin = MSD_CLIPBOARD_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_clipboard_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_clipboard_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_clipboard_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating clipboard plugin"); error = NULL; - res = gsd_clipboard_manager_start (GSD_CLIPBOARD_PLUGIN (plugin)->priv->manager, &error); + res = msd_clipboard_manager_start (MSD_CLIPBOARD_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start clipboard manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating clipboard plugin"); - gsd_clipboard_manager_stop (GSD_CLIPBOARD_PLUGIN (plugin)->priv->manager); + msd_clipboard_manager_stop (MSD_CLIPBOARD_PLUGIN (plugin)->priv->manager); } static void -gsd_clipboard_plugin_class_init (GsdClipboardPluginClass *klass) +msd_clipboard_plugin_class_init (MsdClipboardPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_clipboard_plugin_finalize; + object_class->finalize = msd_clipboard_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdClipboardPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdClipboardPluginPrivate)); } diff --git a/plugins/clipboard/gsd-clipboard-plugin.h b/plugins/clipboard/gsd-clipboard-plugin.h index 4148c09..7b2ea1e 100644 --- a/plugins/clipboard/gsd-clipboard-plugin.h +++ b/plugins/clipboard/gsd-clipboard-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_CLIPBOARD_PLUGIN_H__ -#define __GSD_CLIPBOARD_PLUGIN_H__ +#ifndef __MSD_CLIPBOARD_PLUGIN_H__ +#define __MSD_CLIPBOARD_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_CLIPBOARD_PLUGIN (gsd_clipboard_plugin_get_type ()) -#define GSD_CLIPBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_CLIPBOARD_PLUGIN, GsdClipboardPlugin)) -#define GSD_CLIPBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_CLIPBOARD_PLUGIN, GsdClipboardPluginClass)) -#define GSD_IS_CLIPBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_CLIPBOARD_PLUGIN)) -#define GSD_IS_CLIPBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_CLIPBOARD_PLUGIN)) -#define GSD_CLIPBOARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_CLIPBOARD_PLUGIN, GsdClipboardPluginClass)) +#define MSD_TYPE_CLIPBOARD_PLUGIN (msd_clipboard_plugin_get_type ()) +#define MSD_CLIPBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_CLIPBOARD_PLUGIN, MsdClipboardPlugin)) +#define MSD_CLIPBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_CLIPBOARD_PLUGIN, MsdClipboardPluginClass)) +#define MSD_IS_CLIPBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_CLIPBOARD_PLUGIN)) +#define MSD_IS_CLIPBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_CLIPBOARD_PLUGIN)) +#define MSD_CLIPBOARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_CLIPBOARD_PLUGIN, MsdClipboardPluginClass)) -typedef struct GsdClipboardPluginPrivate GsdClipboardPluginPrivate; +typedef struct MsdClipboardPluginPrivate MsdClipboardPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdClipboardPluginPrivate *priv; -} GsdClipboardPlugin; + MsdClipboardPluginPrivate *priv; +} MsdClipboardPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdClipboardPluginClass; +} MsdClipboardPluginClass; -GType gsd_clipboard_plugin_get_type (void) G_GNUC_CONST; +GType msd_clipboard_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_CLIPBOARD_PLUGIN_H__ */ +#endif /* __MSD_CLIPBOARD_PLUGIN_H__ */ diff --git a/plugins/common/Makefile.am b/plugins/common/Makefile.am index 447d02d..3733a90 100644 --- a/plugins/common/Makefile.am +++ b/plugins/common/Makefile.am @@ -4,10 +4,10 @@ noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = \ eggaccelerators.c \ eggaccelerators.h \ - gsd-keygrab.c \ - gsd-keygrab.h \ - gsd-osd-window.c \ - gsd-osd-window.h + msd-keygrab.c \ + msd-keygrab.h \ + msd-osd-window.c \ + msd-osd-window.h libcommon_la_CPPFLAGS = \ $(AM_CPPFLAGS) @@ -17,7 +17,7 @@ libcommon_la_CFLAGS = \ $(AM_CFLAGS) libcommon_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) $(X11_LIBS) + $(MSD_PLUGIN_LDFLAGS) $(X11_LIBS) libcommon_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) diff --git a/plugins/common/gsd-keygrab.c b/plugins/common/gsd-keygrab.c index d94fd29..7a16f4e 100644 --- a/plugins/common/gsd-keygrab.c +++ b/plugins/common/gsd-keygrab.c @@ -32,25 +32,25 @@ #include "eggaccelerators.h" -#include "gsd-keygrab.h" +#include "msd-keygrab.h" /* these are the mods whose combinations are ignored by the keygrabbing code */ -static GdkModifierType gsd_ignored_mods = 0; +static GdkModifierType msd_ignored_mods = 0; /* these are the ones we actually use for global keys, we always only check * for these set */ -static GdkModifierType gsd_used_mods = 0; +static GdkModifierType msd_used_mods = 0; static void setup_modifiers (void) { - if (gsd_used_mods == 0 || gsd_ignored_mods == 0) { + if (msd_used_mods == 0 || msd_ignored_mods == 0) { GdkModifierType dynmods; /* default modifiers */ - gsd_ignored_mods = \ + msd_ignored_mods = \ 0x2000 /*Xkb modifier*/ | GDK_LOCK_MASK | GDK_HYPER_MASK; - gsd_used_mods = \ + msd_used_mods = \ GDK_SHIFT_MASK | GDK_CONTROL_MASK |\ GDK_MOD1_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK | GDK_MOD4_MASK |\ GDK_MOD5_MASK | GDK_SUPER_MASK | GDK_META_MASK; @@ -62,8 +62,8 @@ setup_modifiers (void) EGG_VIRTUAL_NUM_LOCK_MASK, &dynmods); - gsd_ignored_mods |= dynmods; - gsd_used_mods &= ~dynmods; + msd_ignored_mods |= dynmods; + msd_used_mods &= ~dynmods; } } @@ -89,7 +89,7 @@ grab_key_real (guint keycode, } } -/* Grab the key. In order to ignore GSD_IGNORED_MODS we need to grab +/* Grab the key. In order to ignore MSD_IGNORED_MODS we need to grab * all combinations of the ignored modifiers and those actually used * for the binding (if any). * @@ -124,7 +124,7 @@ grab_key_unsafe (Key *key, setup_modifiers (); - mask = gsd_ignored_mods & ~key->state & GDK_MODIFIER_MASK; + mask = msd_ignored_mods & ~key->state & GDK_MODIFIER_MASK; bit = 0; /* store the indexes of all set bits in mask in the array */ @@ -236,11 +236,11 @@ match_key (Key *key, XEvent *event) consumed &= ~GDK_SHIFT_MASK; return ((lower == key->keysym || upper == key->keysym) - && (event->xkey.state & ~consumed & gsd_used_mods) == key->state); + && (event->xkey.state & ~consumed & msd_used_mods) == key->state); } /* The key we passed doesn't have a keysym, so try with just the keycode */ return (key != NULL - && key->state == (event->xkey.state & gsd_used_mods) + && key->state == (event->xkey.state & msd_used_mods) && key_uses_keycode (key, event->xkey.keycode)); } diff --git a/plugins/common/gsd-keygrab.h b/plugins/common/gsd-keygrab.h index a157ab4..8ebef21 100644 --- a/plugins/common/gsd-keygrab.h +++ b/plugins/common/gsd-keygrab.h @@ -17,8 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __GSD_COMMON_KEYGRAB_H -#define __GSD_COMMON_KEYGRAB_H +#ifndef __MSD_COMMON_KEYGRAB_H +#define __MSD_COMMON_KEYGRAB_H #ifdef __cplusplus extern "C" { @@ -48,4 +48,4 @@ gboolean key_uses_keycode (const Key *key, } #endif -#endif /* __GSD_COMMON_KEYGRAB_H */ +#endif /* __MSD_COMMON_KEYGRAB_H */ diff --git a/plugins/common/gsd-osd-window.c b/plugins/common/gsd-osd-window.c index 03ca316..123313c 100644 --- a/plugins/common/gsd-osd-window.c +++ b/plugins/common/gsd-osd-window.c @@ -36,7 +36,7 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include "gsd-osd-window.h" +#include "msd-osd-window.h" #define DIALOG_TIMEOUT 2000 /* dialog timeout in ms */ #define DIALOG_FADE_TIMEOUT 1500 /* timeout before fade starts */ @@ -44,9 +44,9 @@ #define BG_ALPHA 0.75 -#define GSD_OSD_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_OSD_WINDOW, GsdOsdWindowPrivate)) +#define MSD_OSD_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_OSD_WINDOW, MsdOsdWindowPrivate)) -struct GsdOsdWindowPrivate +struct MsdOsdWindowPrivate { guint is_composited : 1; guint hide_timeout_id; @@ -61,10 +61,10 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; -G_DEFINE_TYPE (GsdOsdWindow, gsd_osd_window, GTK_TYPE_WINDOW) +G_DEFINE_TYPE (MsdOsdWindow, msd_osd_window, GTK_TYPE_WINDOW) static gboolean -fade_timeout (GsdOsdWindow *window) +fade_timeout (MsdOsdWindow *window) { if (window->priv->fade_out_alpha <= 0.0) { gtk_widget_hide (GTK_WIDGET (window)); @@ -95,7 +95,7 @@ fade_timeout (GsdOsdWindow *window) } static gboolean -hide_timeout (GsdOsdWindow *window) +hide_timeout (MsdOsdWindow *window) { if (window->priv->is_composited) { window->priv->hide_timeout_id = 0; @@ -110,7 +110,7 @@ hide_timeout (GsdOsdWindow *window) } static void -remove_hide_timeout (GsdOsdWindow *window) +remove_hide_timeout (MsdOsdWindow *window) { if (window->priv->hide_timeout_id != 0) { g_source_remove (window->priv->hide_timeout_id); @@ -125,7 +125,7 @@ remove_hide_timeout (GsdOsdWindow *window) } static void -add_hide_timeout (GsdOsdWindow *window) +add_hide_timeout (MsdOsdWindow *window) { int timeout; @@ -140,7 +140,7 @@ add_hide_timeout (GsdOsdWindow *window) } void -gsd_osd_window_draw_rounded_rectangle (cairo_t* cr, +msd_osd_window_draw_rounded_rectangle (cairo_t* cr, gdouble aspect, gdouble x, gdouble y, @@ -192,7 +192,7 @@ gsd_osd_window_draw_rounded_rectangle (cairo_t* cr, } void -gsd_osd_window_color_reverse (const GdkColor *a, +msd_osd_window_color_reverse (const GdkColor *a, GdkColor *b) { gdouble red; @@ -228,7 +228,7 @@ gsd_osd_window_color_reverse (const GdkColor *a, static void expose_when_composited (GtkWidget *widget, GdkEventExpose *event) { - GsdOsdWindow *window; + MsdOsdWindow *window; cairo_t *context; cairo_t *cr; cairo_surface_t *surface; @@ -238,7 +238,7 @@ expose_when_composited (GtkWidget *widget, GdkEventExpose *event) GdkColor color; double r, g, b; - window = GSD_OSD_WINDOW (widget); + window = MSD_OSD_WINDOW (widget); context = gdk_cairo_create (gtk_widget_get_window (widget)); @@ -264,15 +264,15 @@ expose_when_composited (GtkWidget *widget, GdkEventExpose *event) cairo_paint (cr); /* draw a box */ - gsd_osd_window_draw_rounded_rectangle (cr, 1.0, 0.5, 0.5, height / 10, width-1, height-1); - gsd_osd_window_color_reverse (&style->bg[GTK_STATE_NORMAL], &color); + msd_osd_window_draw_rounded_rectangle (cr, 1.0, 0.5, 0.5, height / 10, width-1, height-1); + msd_osd_window_color_reverse (&style->bg[GTK_STATE_NORMAL], &color); r = (float)color.red / 65535.0; g = (float)color.green / 65535.0; b = (float)color.blue / 65535.0; cairo_set_source_rgba (cr, r, g, b, BG_ALPHA); cairo_fill_preserve (cr); - gsd_osd_window_color_reverse (&style->text_aa[GTK_STATE_NORMAL], &color); + msd_osd_window_color_reverse (&style->text_aa[GTK_STATE_NORMAL], &color); r = (float)color.red / 65535.0; g = (float)color.green / 65535.0; b = (float)color.blue / 65535.0; @@ -308,10 +308,10 @@ expose_when_composited (GtkWidget *widget, GdkEventExpose *event) static void expose_when_not_composited (GtkWidget *widget, GdkEventExpose *event) { - GsdOsdWindow *window; + MsdOsdWindow *window; GtkAllocation allocation; - window = GSD_OSD_WINDOW (widget); + window = MSD_OSD_WINDOW (widget); gtk_widget_get_allocation (widget, &allocation); @@ -321,7 +321,7 @@ expose_when_not_composited (GtkWidget *widget, GdkEventExpose *event) GTK_SHADOW_OUT, &event->area, widget, - NULL, /* NULL detail -> themes should use the GsdOsdWindow widget name, probably */ + NULL, /* NULL detail -> themes should use the MsdOsdWindow widget name, probably */ 0, 0, allocation.width, @@ -329,13 +329,13 @@ expose_when_not_composited (GtkWidget *widget, GdkEventExpose *event) } static gboolean -gsd_osd_window_expose_event (GtkWidget *widget, +msd_osd_window_expose_event (GtkWidget *widget, GdkEventExpose *event) { - GsdOsdWindow *window; + MsdOsdWindow *window; GtkWidget *child; - window = GSD_OSD_WINDOW (widget); + window = MSD_OSD_WINDOW (widget); if (window->priv->is_composited) expose_when_composited (widget, event); @@ -350,34 +350,34 @@ gsd_osd_window_expose_event (GtkWidget *widget, } static void -gsd_osd_window_real_show (GtkWidget *widget) +msd_osd_window_real_show (GtkWidget *widget) { - GsdOsdWindow *window; + MsdOsdWindow *window; - if (GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->show) { - GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->show (widget); + if (GTK_WIDGET_CLASS (msd_osd_window_parent_class)->show) { + GTK_WIDGET_CLASS (msd_osd_window_parent_class)->show (widget); } - window = GSD_OSD_WINDOW (widget); + window = MSD_OSD_WINDOW (widget); remove_hide_timeout (window); add_hide_timeout (window); } static void -gsd_osd_window_real_hide (GtkWidget *widget) +msd_osd_window_real_hide (GtkWidget *widget) { - GsdOsdWindow *window; + MsdOsdWindow *window; - if (GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->hide) { - GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->hide (widget); + if (GTK_WIDGET_CLASS (msd_osd_window_parent_class)->hide) { + GTK_WIDGET_CLASS (msd_osd_window_parent_class)->hide (widget); } - window = GSD_OSD_WINDOW (widget); + window = MSD_OSD_WINDOW (widget); remove_hide_timeout (window); } static void -gsd_osd_window_real_realize (GtkWidget *widget) +msd_osd_window_real_realize (GtkWidget *widget) { GdkColormap *colormap; GtkAllocation allocation; @@ -390,8 +390,8 @@ gsd_osd_window_real_realize (GtkWidget *widget) gtk_widget_set_colormap (widget, colormap); } - if (GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->realize) { - GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->realize (widget); + if (GTK_WIDGET_CLASS (msd_osd_window_parent_class)->realize) { + GTK_WIDGET_CLASS (msd_osd_window_parent_class)->realize (widget); } gtk_widget_get_allocation (widget, &allocation); @@ -412,12 +412,12 @@ gsd_osd_window_real_realize (GtkWidget *widget) } static void -gsd_osd_window_style_set (GtkWidget *widget, +msd_osd_window_style_set (GtkWidget *widget, GtkStyle *previous_style) { GtkStyle *style; - GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->style_set (widget, previous_style); + GTK_WIDGET_CLASS (msd_osd_window_parent_class)->style_set (widget, previous_style); /* We set our border width to 12 (per the MATE standard), plus the * thickness of the frame that we draw in our expose handler. This will @@ -429,14 +429,14 @@ gsd_osd_window_style_set (GtkWidget *widget, } static void -gsd_osd_window_size_request (GtkWidget *widget, +msd_osd_window_size_request (GtkWidget *widget, GtkRequisition *requisition) { GtkStyle *style; - GTK_WIDGET_CLASS (gsd_osd_window_parent_class)->size_request (widget, requisition); + GTK_WIDGET_CLASS (msd_osd_window_parent_class)->size_request (widget, requisition); - /* See the comment in gsd_osd_window_style_set() for why we add the thickness here */ + /* See the comment in msd_osd_window_style_set() for why we add the thickness here */ style = gtk_widget_get_style (widget); @@ -445,13 +445,13 @@ gsd_osd_window_size_request (GtkWidget *widget, } static GObject * -gsd_osd_window_constructor (GType type, +msd_osd_window_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params) { GObject *object; - object = G_OBJECT_CLASS (gsd_osd_window_parent_class)->constructor (type, n_construct_properties, construct_params); + object = G_OBJECT_CLASS (msd_osd_window_parent_class)->constructor (type, n_construct_properties, construct_params); g_object_set (object, "type", GTK_WINDOW_POPUP, @@ -465,64 +465,64 @@ gsd_osd_window_constructor (GType type, } static void -gsd_osd_window_class_init (GsdOsdWindowClass *klass) +msd_osd_window_class_init (MsdOsdWindowClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - gobject_class->constructor = gsd_osd_window_constructor; + gobject_class->constructor = msd_osd_window_constructor; - widget_class->show = gsd_osd_window_real_show; - widget_class->hide = gsd_osd_window_real_hide; - widget_class->realize = gsd_osd_window_real_realize; - widget_class->style_set = gsd_osd_window_style_set; - widget_class->size_request = gsd_osd_window_size_request; - widget_class->expose_event = gsd_osd_window_expose_event; + widget_class->show = msd_osd_window_real_show; + widget_class->hide = msd_osd_window_real_hide; + widget_class->realize = msd_osd_window_real_realize; + widget_class->style_set = msd_osd_window_style_set; + widget_class->size_request = msd_osd_window_size_request; + widget_class->expose_event = msd_osd_window_expose_event; signals[EXPOSE_WHEN_COMPOSITED] = g_signal_new ("expose-when-composited", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (GsdOsdWindowClass, expose_when_composited), + G_STRUCT_OFFSET (MsdOsdWindowClass, expose_when_composited), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); - g_type_class_add_private (klass, sizeof (GsdOsdWindowPrivate)); + g_type_class_add_private (klass, sizeof (MsdOsdWindowPrivate)); } /** - * gsd_osd_window_is_composited: - * @window: a #GsdOsdWindow + * msd_osd_window_is_composited: + * @window: a #MsdOsdWindow * * Return value: whether the window was created on a composited screen. */ gboolean -gsd_osd_window_is_composited (GsdOsdWindow *window) +msd_osd_window_is_composited (MsdOsdWindow *window) { return window->priv->is_composited; } /** - * gsd_osd_window_is_valid: - * @window: a #GsdOsdWindow + * msd_osd_window_is_valid: + * @window: a #MsdOsdWindow * * Return value: TRUE if the @window's idea of being composited matches whether * its current screen is actually composited. */ gboolean -gsd_osd_window_is_valid (GsdOsdWindow *window) +msd_osd_window_is_valid (MsdOsdWindow *window) { GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (window)); return gdk_screen_is_composited (screen) == window->priv->is_composited; } static void -gsd_osd_window_init (GsdOsdWindow *window) +msd_osd_window_init (MsdOsdWindow *window) { GdkScreen *screen; - window->priv = GSD_OSD_WINDOW_GET_PRIVATE (window); + window->priv = MSD_OSD_WINDOW_GET_PRIVATE (window); screen = gtk_widget_get_screen (GTK_WIDGET (window)); @@ -550,19 +550,19 @@ gsd_osd_window_init (GsdOsdWindow *window) } GtkWidget * -gsd_osd_window_new (void) +msd_osd_window_new (void) { - return g_object_new (GSD_TYPE_OSD_WINDOW, NULL); + return g_object_new (MSD_TYPE_OSD_WINDOW, NULL); } /** - * gsd_osd_window_update_and_hide: - * @window: a #GsdOsdWindow + * msd_osd_window_update_and_hide: + * @window: a #MsdOsdWindow * * Queues the @window for immediate drawing, and queues a timer to hide the window. */ void -gsd_osd_window_update_and_hide (GsdOsdWindow *window) +msd_osd_window_update_and_hide (MsdOsdWindow *window) { remove_hide_timeout (window); add_hide_timeout (window); diff --git a/plugins/common/gsd-osd-window.h b/plugins/common/gsd-osd-window.h index 0d8040b..f539e5e 100644 --- a/plugins/common/gsd-osd-window.h +++ b/plugins/common/gsd-osd-window.h @@ -27,18 +27,18 @@ * */ -/* GsdOsdWindow is an "on-screen-display" window (OSD). It is the cute, +/* MsdOsdWindow is an "on-screen-display" window (OSD). It is the cute, * semi-transparent, curved popup that appears when you press a hotkey global to * the desktop, such as to change the volume, switch your monitor's parameters, * etc. * - * You can create a GsdOsdWindow and use it as a normal GtkWindow. It will + * You can create a MsdOsdWindow and use it as a normal GtkWindow. It will * automatically center itself, figure out if it needs to be composited, etc. * Just pack your widgets in it, sit back, and enjoy the ride. */ -#ifndef GSD_OSD_WINDOW_H -#define GSD_OSD_WINDOW_H +#ifndef MSD_OSD_WINDOW_H +#define MSD_OSD_WINDOW_H #include <glib-object.h> #include <gtk/gtk.h> @@ -48,39 +48,39 @@ extern "C" { #endif /* Alpha value to be used for foreground objects drawn in an OSD window */ -#define GSD_OSD_WINDOW_FG_ALPHA 1.0 +#define MSD_OSD_WINDOW_FG_ALPHA 1.0 -#define GSD_TYPE_OSD_WINDOW (gsd_osd_window_get_type ()) -#define GSD_OSD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_OSD_WINDOW, GsdOsdWindow)) -#define GSD_OSD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_OSD_WINDOW, GsdOsdWindowClass)) -#define GSD_IS_OSD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSD_TYPE_OSD_WINDOW)) -#define GSD_IS_OSD_WINDOW_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS ((klass), GSD_TYPE_OSD_WINDOW)) -#define GSD_OSD_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSD_TYPE_OSD_WINDOW, GsdOsdWindowClass)) +#define MSD_TYPE_OSD_WINDOW (msd_osd_window_get_type ()) +#define MSD_OSD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MSD_TYPE_OSD_WINDOW, MsdOsdWindow)) +#define MSD_OSD_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSD_TYPE_OSD_WINDOW, MsdOsdWindowClass)) +#define MSD_IS_OSD_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MSD_TYPE_OSD_WINDOW)) +#define MSD_IS_OSD_WINDOW_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS ((klass), MSD_TYPE_OSD_WINDOW)) +#define MSD_OSD_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MSD_TYPE_OSD_WINDOW, MsdOsdWindowClass)) -typedef struct GsdOsdWindow GsdOsdWindow; -typedef struct GsdOsdWindowClass GsdOsdWindowClass; -typedef struct GsdOsdWindowPrivate GsdOsdWindowPrivate; +typedef struct MsdOsdWindow MsdOsdWindow; +typedef struct MsdOsdWindowClass MsdOsdWindowClass; +typedef struct MsdOsdWindowPrivate MsdOsdWindowPrivate; -struct GsdOsdWindow { +struct MsdOsdWindow { GtkWindow parent; - GsdOsdWindowPrivate *priv; + MsdOsdWindowPrivate *priv; }; -struct GsdOsdWindowClass { +struct MsdOsdWindowClass { GtkWindowClass parent_class; - void (* expose_when_composited) (GsdOsdWindow *window, cairo_t *cr); + void (* expose_when_composited) (MsdOsdWindow *window, cairo_t *cr); }; -GType gsd_osd_window_get_type (void); +GType msd_osd_window_get_type (void); -GtkWidget * gsd_osd_window_new (void); -gboolean gsd_osd_window_is_composited (GsdOsdWindow *window); -gboolean gsd_osd_window_is_valid (GsdOsdWindow *window); -void gsd_osd_window_update_and_hide (GsdOsdWindow *window); +GtkWidget * msd_osd_window_new (void); +gboolean msd_osd_window_is_composited (MsdOsdWindow *window); +gboolean msd_osd_window_is_valid (MsdOsdWindow *window); +void msd_osd_window_update_and_hide (MsdOsdWindow *window); -void gsd_osd_window_draw_rounded_rectangle (cairo_t *cr, +void msd_osd_window_draw_rounded_rectangle (cairo_t *cr, gdouble aspect, gdouble x, gdouble y, @@ -88,7 +88,7 @@ void gsd_osd_window_draw_rounded_rectangle (cairo_t *cr, gdouble width, gdouble height); -void gsd_osd_window_color_reverse (const GdkColor *a, +void msd_osd_window_color_reverse (const GdkColor *a, GdkColor *b); #ifdef __cplusplus 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 diff --git a/plugins/dummy/Makefile.am b/plugins/dummy/Makefile.am index 0f77530..c578fd8 100644 --- a/plugins/dummy/Makefile.am +++ b/plugins/dummy/Makefile.am @@ -2,10 +2,10 @@ plugin_LTLIBRARIES = \ libdummy.la libdummy_la_SOURCES = \ - gsd-dummy-manager.c \ - gsd-dummy-manager.h \ - gsd-dummy-plugin.c \ - gsd-dummy-plugin.h + msd-dummy-manager.c \ + msd-dummy-manager.h \ + msd-dummy-plugin.c \ + msd-dummy-plugin.h libdummy_la_CPPFLAGS = \ -I$(top_srcdir)/mate-settings-daemon \ @@ -17,7 +17,7 @@ libdummy_la_CFLAGS = \ $(AM_CFLAGS) libdummy_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) + $(MSD_PLUGIN_LDFLAGS) libdummy_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) @@ -36,7 +36,7 @@ CLEANFILES = \ DISTCLEANFILES = \ $(plugin_DATA) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ # override to _not_ install the test plugin # do not copy into your plugin diff --git a/plugins/dummy/gsd-dummy-manager.c b/plugins/dummy/gsd-dummy-manager.c index 568c832..2744aeb 100644 --- a/plugins/dummy/gsd-dummy-manager.c +++ b/plugins/dummy/gsd-dummy-manager.c @@ -37,11 +37,11 @@ #include <gtk/gtk.h> #include "mate-settings-profile.h" -#include "gsd-dummy-manager.h" +#include "msd-dummy-manager.h" -#define GSD_DUMMY_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_DUMMY_MANAGER, GsdDummyManagerPrivate)) +#define MSD_DUMMY_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_DUMMY_MANAGER, MsdDummyManagerPrivate)) -struct GsdDummyManagerPrivate +struct MsdDummyManagerPrivate { gboolean padding; }; @@ -50,16 +50,16 @@ enum { PROP_0, }; -static void gsd_dummy_manager_class_init (GsdDummyManagerClass *klass); -static void gsd_dummy_manager_init (GsdDummyManager *dummy_manager); -static void gsd_dummy_manager_finalize (GObject *object); +static void msd_dummy_manager_class_init (MsdDummyManagerClass *klass); +static void msd_dummy_manager_init (MsdDummyManager *dummy_manager); +static void msd_dummy_manager_finalize (GObject *object); -G_DEFINE_TYPE (GsdDummyManager, gsd_dummy_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdDummyManager, msd_dummy_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; gboolean -gsd_dummy_manager_start (GsdDummyManager *manager, +msd_dummy_manager_start (MsdDummyManager *manager, GError **error) { g_debug ("Starting dummy manager"); @@ -69,20 +69,20 @@ gsd_dummy_manager_start (GsdDummyManager *manager, } void -gsd_dummy_manager_stop (GsdDummyManager *manager) +msd_dummy_manager_stop (MsdDummyManager *manager) { g_debug ("Stopping dummy manager"); } static void -gsd_dummy_manager_set_property (GObject *object, +msd_dummy_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdDummyManager *self; + MsdDummyManager *self; - self = GSD_DUMMY_MANAGER (object); + self = MSD_DUMMY_MANAGER (object); switch (prop_id) { default: @@ -92,14 +92,14 @@ gsd_dummy_manager_set_property (GObject *object, } static void -gsd_dummy_manager_get_property (GObject *object, +msd_dummy_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdDummyManager *self; + MsdDummyManager *self; - self = GSD_DUMMY_MANAGER (object); + self = MSD_DUMMY_MANAGER (object); switch (prop_id) { default: @@ -109,16 +109,16 @@ gsd_dummy_manager_get_property (GObject *object, } static GObject * -gsd_dummy_manager_constructor (GType type, +msd_dummy_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdDummyManager *dummy_manager; - GsdDummyManagerClass *klass; + MsdDummyManager *dummy_manager; + MsdDummyManagerClass *klass; - klass = GSD_DUMMY_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_DUMMY_MANAGER)); + klass = MSD_DUMMY_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_DUMMY_MANAGER)); - dummy_manager = GSD_DUMMY_MANAGER (G_OBJECT_CLASS (gsd_dummy_manager_parent_class)->constructor (type, + dummy_manager = MSD_DUMMY_MANAGER (G_OBJECT_CLASS (msd_dummy_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -126,61 +126,61 @@ gsd_dummy_manager_constructor (GType type, } static void -gsd_dummy_manager_dispose (GObject *object) +msd_dummy_manager_dispose (GObject *object) { - GsdDummyManager *dummy_manager; + MsdDummyManager *dummy_manager; - dummy_manager = GSD_DUMMY_MANAGER (object); + dummy_manager = MSD_DUMMY_MANAGER (object); - G_OBJECT_CLASS (gsd_dummy_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_dummy_manager_parent_class)->dispose (object); } static void -gsd_dummy_manager_class_init (GsdDummyManagerClass *klass) +msd_dummy_manager_class_init (MsdDummyManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_dummy_manager_get_property; - object_class->set_property = gsd_dummy_manager_set_property; - object_class->constructor = gsd_dummy_manager_constructor; - object_class->dispose = gsd_dummy_manager_dispose; - object_class->finalize = gsd_dummy_manager_finalize; + object_class->get_property = msd_dummy_manager_get_property; + object_class->set_property = msd_dummy_manager_set_property; + object_class->constructor = msd_dummy_manager_constructor; + object_class->dispose = msd_dummy_manager_dispose; + object_class->finalize = msd_dummy_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdDummyManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdDummyManagerPrivate)); } static void -gsd_dummy_manager_init (GsdDummyManager *manager) +msd_dummy_manager_init (MsdDummyManager *manager) { - manager->priv = GSD_DUMMY_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_DUMMY_MANAGER_GET_PRIVATE (manager); } static void -gsd_dummy_manager_finalize (GObject *object) +msd_dummy_manager_finalize (GObject *object) { - GsdDummyManager *dummy_manager; + MsdDummyManager *dummy_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_DUMMY_MANAGER (object)); + g_return_if_fail (MSD_IS_DUMMY_MANAGER (object)); - dummy_manager = GSD_DUMMY_MANAGER (object); + dummy_manager = MSD_DUMMY_MANAGER (object); g_return_if_fail (dummy_manager->priv != NULL); - G_OBJECT_CLASS (gsd_dummy_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_dummy_manager_parent_class)->finalize (object); } -GsdDummyManager * -gsd_dummy_manager_new (void) +MsdDummyManager * +msd_dummy_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_DUMMY_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_DUMMY_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_DUMMY_MANAGER (manager_object); + return MSD_DUMMY_MANAGER (manager_object); } diff --git a/plugins/dummy/gsd-dummy-manager.h b/plugins/dummy/gsd-dummy-manager.h index ba63560..91f989a 100644 --- a/plugins/dummy/gsd-dummy-manager.h +++ b/plugins/dummy/gsd-dummy-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_DUMMY_MANAGER_H -#define __GSD_DUMMY_MANAGER_H +#ifndef __MSD_DUMMY_MANAGER_H +#define __MSD_DUMMY_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_DUMMY_MANAGER (gsd_dummy_manager_get_type ()) -#define GSD_DUMMY_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_DUMMY_MANAGER, GsdDummyManager)) -#define GSD_DUMMY_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_DUMMY_MANAGER, GsdDummyManagerClass)) -#define GSD_IS_DUMMY_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_DUMMY_MANAGER)) -#define GSD_IS_DUMMY_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_DUMMY_MANAGER)) -#define GSD_DUMMY_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_DUMMY_MANAGER, GsdDummyManagerClass)) +#define MSD_TYPE_DUMMY_MANAGER (msd_dummy_manager_get_type ()) +#define MSD_DUMMY_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_DUMMY_MANAGER, MsdDummyManager)) +#define MSD_DUMMY_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_DUMMY_MANAGER, MsdDummyManagerClass)) +#define MSD_IS_DUMMY_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_DUMMY_MANAGER)) +#define MSD_IS_DUMMY_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_DUMMY_MANAGER)) +#define MSD_DUMMY_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_DUMMY_MANAGER, MsdDummyManagerClass)) -typedef struct GsdDummyManagerPrivate GsdDummyManagerPrivate; +typedef struct MsdDummyManagerPrivate MsdDummyManagerPrivate; typedef struct { GObject parent; - GsdDummyManagerPrivate *priv; -} GsdDummyManager; + MsdDummyManagerPrivate *priv; +} MsdDummyManager; typedef struct { GObjectClass parent_class; -} GsdDummyManagerClass; +} MsdDummyManagerClass; -GType gsd_dummy_manager_get_type (void); +GType msd_dummy_manager_get_type (void); -GsdDummyManager * gsd_dummy_manager_new (void); -gboolean gsd_dummy_manager_start (GsdDummyManager *manager, +MsdDummyManager * msd_dummy_manager_new (void); +gboolean msd_dummy_manager_start (MsdDummyManager *manager, GError **error); -void gsd_dummy_manager_stop (GsdDummyManager *manager); +void msd_dummy_manager_stop (MsdDummyManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_DUMMY_MANAGER_H */ +#endif /* __MSD_DUMMY_MANAGER_H */ diff --git a/plugins/dummy/gsd-dummy-plugin.c b/plugins/dummy/gsd-dummy-plugin.c index f284423..c1e18bb 100644 --- a/plugins/dummy/gsd-dummy-plugin.c +++ b/plugins/dummy/gsd-dummy-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-dummy-plugin.h" -#include "gsd-dummy-manager.h" +#include "msd-dummy-plugin.h" +#include "msd-dummy-manager.h" -struct GsdDummyPluginPrivate { - GsdDummyManager *manager; +struct MsdDummyPluginPrivate { + MsdDummyManager *manager; }; -#define GSD_DUMMY_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_DUMMY_PLUGIN, GsdDummyPluginPrivate)) +#define MSD_DUMMY_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_DUMMY_PLUGIN, MsdDummyPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdDummyPlugin, gsd_dummy_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdDummyPlugin, msd_dummy_plugin) static void -gsd_dummy_plugin_init (GsdDummyPlugin *plugin) +msd_dummy_plugin_init (MsdDummyPlugin *plugin) { - plugin->priv = GSD_DUMMY_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_DUMMY_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdDummyPlugin initializing"); + g_debug ("MsdDummyPlugin initializing"); - plugin->priv->manager = gsd_dummy_manager_new (); + plugin->priv->manager = msd_dummy_manager_new (); } static void -gsd_dummy_plugin_finalize (GObject *object) +msd_dummy_plugin_finalize (GObject *object) { - GsdDummyPlugin *plugin; + MsdDummyPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_DUMMY_PLUGIN (object)); + g_return_if_fail (MSD_IS_DUMMY_PLUGIN (object)); - g_debug ("GsdDummyPlugin finalizing"); + g_debug ("MsdDummyPlugin finalizing"); - plugin = GSD_DUMMY_PLUGIN (object); + plugin = MSD_DUMMY_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_dummy_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_dummy_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_dummy_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating dummy plugin"); error = NULL; - res = gsd_dummy_manager_start (GSD_DUMMY_PLUGIN (plugin)->priv->manager, &error); + res = msd_dummy_manager_start (MSD_DUMMY_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start dummy manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating dummy plugin"); - gsd_dummy_manager_stop (GSD_DUMMY_PLUGIN (plugin)->priv->manager); + msd_dummy_manager_stop (MSD_DUMMY_PLUGIN (plugin)->priv->manager); } static void -gsd_dummy_plugin_class_init (GsdDummyPluginClass *klass) +msd_dummy_plugin_class_init (MsdDummyPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_dummy_plugin_finalize; + object_class->finalize = msd_dummy_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdDummyPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdDummyPluginPrivate)); } diff --git a/plugins/dummy/gsd-dummy-plugin.h b/plugins/dummy/gsd-dummy-plugin.h index 153e0fa..f07f78c 100644 --- a/plugins/dummy/gsd-dummy-plugin.h +++ b/plugins/dummy/gsd-dummy-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_DUMMY_PLUGIN_H__ -#define __GSD_DUMMY_PLUGIN_H__ +#ifndef __MSD_DUMMY_PLUGIN_H__ +#define __MSD_DUMMY_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_DUMMY_PLUGIN (gsd_dummy_plugin_get_type ()) -#define GSD_DUMMY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_DUMMY_PLUGIN, GsdDummyPlugin)) -#define GSD_DUMMY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_DUMMY_PLUGIN, GsdDummyPluginClass)) -#define GSD_IS_DUMMY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_DUMMY_PLUGIN)) -#define GSD_IS_DUMMY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_DUMMY_PLUGIN)) -#define GSD_DUMMY_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_DUMMY_PLUGIN, GsdDummyPluginClass)) +#define MSD_TYPE_DUMMY_PLUGIN (msd_dummy_plugin_get_type ()) +#define MSD_DUMMY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_DUMMY_PLUGIN, MsdDummyPlugin)) +#define MSD_DUMMY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_DUMMY_PLUGIN, MsdDummyPluginClass)) +#define MSD_IS_DUMMY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_DUMMY_PLUGIN)) +#define MSD_IS_DUMMY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_DUMMY_PLUGIN)) +#define MSD_DUMMY_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_DUMMY_PLUGIN, MsdDummyPluginClass)) -typedef struct GsdDummyPluginPrivate GsdDummyPluginPrivate; +typedef struct MsdDummyPluginPrivate MsdDummyPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdDummyPluginPrivate *priv; -} GsdDummyPlugin; + MsdDummyPluginPrivate *priv; +} MsdDummyPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdDummyPluginClass; +} MsdDummyPluginClass; -GType gsd_dummy_plugin_get_type (void) G_GNUC_CONST; +GType msd_dummy_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_DUMMY_PLUGIN_H__ */ +#endif /* __MSD_DUMMY_PLUGIN_H__ */ diff --git a/plugins/font/Makefile.am b/plugins/font/Makefile.am index 99dff34..d0cf9ce 100644 --- a/plugins/font/Makefile.am +++ b/plugins/font/Makefile.am @@ -5,10 +5,10 @@ plugin_LTLIBRARIES = \ $(NULL) libfont_la_SOURCES = \ - gsd-font-plugin.h \ - gsd-font-plugin.c \ - gsd-font-manager.h \ - gsd-font-manager.c \ + msd-font-plugin.h \ + msd-font-plugin.c \ + msd-font-manager.h \ + msd-font-manager.c \ delayed-dialog.h \ delayed-dialog.c \ $(NULL) @@ -23,7 +23,7 @@ libfont_la_CFLAGS = \ $(AM_CFLAGS) libfont_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libfont_la_LIBADD = \ @@ -48,4 +48,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/font/gsd-font-manager.c b/plugins/font/gsd-font-manager.c index 3db06ce..bcae037 100644 --- a/plugins/font/gsd-font-manager.c +++ b/plugins/font/gsd-font-manager.c @@ -44,13 +44,13 @@ #include <mateconf/mateconf-client.h> #include "mate-settings-profile.h" -#include "gsd-font-manager.h" +#include "msd-font-manager.h" #include "delayed-dialog.h" -static void gsd_font_manager_class_init (GsdFontManagerClass *klass); -static void gsd_font_manager_init (GsdFontManager *font_manager); +static void msd_font_manager_class_init (MsdFontManagerClass *klass); +static void msd_font_manager_init (MsdFontManager *font_manager); -G_DEFINE_TYPE (GsdFontManager, gsd_font_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdFontManager, msd_font_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -338,7 +338,7 @@ done: } gboolean -gsd_font_manager_start (GsdFontManager *manager, +msd_font_manager_start (MsdFontManager *manager, GError **error) { MateConfClient *client; @@ -359,20 +359,20 @@ gsd_font_manager_start (GsdFontManager *manager, } void -gsd_font_manager_stop (GsdFontManager *manager) +msd_font_manager_stop (MsdFontManager *manager) { g_debug ("Stopping font manager"); } static void -gsd_font_manager_set_property (GObject *object, +msd_font_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdFontManager *self; + MsdFontManager *self; - self = GSD_FONT_MANAGER (object); + self = MSD_FONT_MANAGER (object); switch (prop_id) { default: @@ -382,14 +382,14 @@ gsd_font_manager_set_property (GObject *object, } static void -gsd_font_manager_get_property (GObject *object, +msd_font_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdFontManager *self; + MsdFontManager *self; - self = GSD_FONT_MANAGER (object); + self = MSD_FONT_MANAGER (object); switch (prop_id) { default: @@ -399,16 +399,16 @@ gsd_font_manager_get_property (GObject *object, } static GObject * -gsd_font_manager_constructor (GType type, +msd_font_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdFontManager *font_manager; - GsdFontManagerClass *klass; + MsdFontManager *font_manager; + MsdFontManagerClass *klass; - klass = GSD_FONT_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_FONT_MANAGER)); + klass = MSD_FONT_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_FONT_MANAGER)); - font_manager = GSD_FONT_MANAGER (G_OBJECT_CLASS (gsd_font_manager_parent_class)->constructor (type, + font_manager = MSD_FONT_MANAGER (G_OBJECT_CLASS (msd_font_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -416,30 +416,30 @@ gsd_font_manager_constructor (GType type, } static void -gsd_font_manager_class_init (GsdFontManagerClass *klass) +msd_font_manager_class_init (MsdFontManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_font_manager_get_property; - object_class->set_property = gsd_font_manager_set_property; - object_class->constructor = gsd_font_manager_constructor; + object_class->get_property = msd_font_manager_get_property; + object_class->set_property = msd_font_manager_set_property; + object_class->constructor = msd_font_manager_constructor; } static void -gsd_font_manager_init (GsdFontManager *manager) +msd_font_manager_init (MsdFontManager *manager) { } -GsdFontManager * -gsd_font_manager_new (void) +MsdFontManager * +msd_font_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_FONT_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_FONT_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_FONT_MANAGER (manager_object); + return MSD_FONT_MANAGER (manager_object); } diff --git a/plugins/font/gsd-font-manager.h b/plugins/font/gsd-font-manager.h index be53d98..3709d0f 100644 --- a/plugins/font/gsd-font-manager.h +++ b/plugins/font/gsd-font-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_FONT_MANAGER_H -#define __GSD_FONT_MANAGER_H +#ifndef __MSD_FONT_MANAGER_H +#define __MSD_FONT_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_FONT_MANAGER (gsd_font_manager_get_type ()) -#define GSD_FONT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_FONT_MANAGER, GsdFontManager)) -#define GSD_FONT_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_FONT_MANAGER, GsdFontManagerClass)) -#define GSD_IS_FONT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_FONT_MANAGER)) -#define GSD_IS_FONT_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_FONT_MANAGER)) -#define GSD_FONT_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_FONT_MANAGER, GsdFontManagerClass)) +#define MSD_TYPE_FONT_MANAGER (msd_font_manager_get_type ()) +#define MSD_FONT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_FONT_MANAGER, MsdFontManager)) +#define MSD_FONT_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_FONT_MANAGER, MsdFontManagerClass)) +#define MSD_IS_FONT_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_FONT_MANAGER)) +#define MSD_IS_FONT_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_FONT_MANAGER)) +#define MSD_FONT_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_FONT_MANAGER, MsdFontManagerClass)) -typedef struct GsdFontManagerPrivate GsdFontManagerPrivate; +typedef struct MsdFontManagerPrivate MsdFontManagerPrivate; typedef struct { GObject parent; - GsdFontManagerPrivate *priv; -} GsdFontManager; + MsdFontManagerPrivate *priv; +} MsdFontManager; typedef struct { GObjectClass parent_class; -} GsdFontManagerClass; +} MsdFontManagerClass; -GType gsd_font_manager_get_type (void); +GType msd_font_manager_get_type (void); -GsdFontManager * gsd_font_manager_new (void); -gboolean gsd_font_manager_start (GsdFontManager *manager, +MsdFontManager * msd_font_manager_new (void); +gboolean msd_font_manager_start (MsdFontManager *manager, GError **error); -void gsd_font_manager_stop (GsdFontManager *manager); +void msd_font_manager_stop (MsdFontManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_FONT_MANAGER_H */ +#endif /* __MSD_FONT_MANAGER_H */ diff --git a/plugins/font/gsd-font-plugin.c b/plugins/font/gsd-font-plugin.c index dc34c6b..7711e19 100644 --- a/plugins/font/gsd-font-plugin.c +++ b/plugins/font/gsd-font-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-font-plugin.h" -#include "gsd-font-manager.h" +#include "msd-font-plugin.h" +#include "msd-font-manager.h" -struct GsdFontPluginPrivate { - GsdFontManager *manager; +struct MsdFontPluginPrivate { + MsdFontManager *manager; }; -#define GSD_FONT_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_FONT_PLUGIN, GsdFontPluginPrivate)) +#define MSD_FONT_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_FONT_PLUGIN, MsdFontPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdFontPlugin, gsd_font_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdFontPlugin, msd_font_plugin) static void -gsd_font_plugin_init (GsdFontPlugin *plugin) +msd_font_plugin_init (MsdFontPlugin *plugin) { - plugin->priv = GSD_FONT_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_FONT_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdFontPlugin initializing"); + g_debug ("MsdFontPlugin initializing"); - plugin->priv->manager = gsd_font_manager_new (); + plugin->priv->manager = msd_font_manager_new (); } static void -gsd_font_plugin_finalize (GObject *object) +msd_font_plugin_finalize (GObject *object) { - GsdFontPlugin *plugin; + MsdFontPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_FONT_PLUGIN (object)); + g_return_if_fail (MSD_IS_FONT_PLUGIN (object)); - g_debug ("GsdFontPlugin finalizing"); + g_debug ("MsdFontPlugin finalizing"); - plugin = GSD_FONT_PLUGIN (object); + plugin = MSD_FONT_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_font_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_font_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_font_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating font plugin"); error = NULL; - res = gsd_font_manager_start (GSD_FONT_PLUGIN (plugin)->priv->manager, &error); + res = msd_font_manager_start (MSD_FONT_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start font manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating font plugin"); - gsd_font_manager_stop (GSD_FONT_PLUGIN (plugin)->priv->manager); + msd_font_manager_stop (MSD_FONT_PLUGIN (plugin)->priv->manager); } static void -gsd_font_plugin_class_init (GsdFontPluginClass *klass) +msd_font_plugin_class_init (MsdFontPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_font_plugin_finalize; + object_class->finalize = msd_font_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdFontPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdFontPluginPrivate)); } diff --git a/plugins/font/gsd-font-plugin.h b/plugins/font/gsd-font-plugin.h index 06dd2be..9865412 100644 --- a/plugins/font/gsd-font-plugin.h +++ b/plugins/font/gsd-font-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_FONT_PLUGIN_H__ -#define __GSD_FONT_PLUGIN_H__ +#ifndef __MSD_FONT_PLUGIN_H__ +#define __MSD_FONT_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_FONT_PLUGIN (gsd_font_plugin_get_type ()) -#define GSD_FONT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_FONT_PLUGIN, GsdFontPlugin)) -#define GSD_FONT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_FONT_PLUGIN, GsdFontPluginClass)) -#define GSD_IS_FONT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_FONT_PLUGIN)) -#define GSD_IS_FONT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_FONT_PLUGIN)) -#define GSD_FONT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_FONT_PLUGIN, GsdFontPluginClass)) +#define MSD_TYPE_FONT_PLUGIN (msd_font_plugin_get_type ()) +#define MSD_FONT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_FONT_PLUGIN, MsdFontPlugin)) +#define MSD_FONT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_FONT_PLUGIN, MsdFontPluginClass)) +#define MSD_IS_FONT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_FONT_PLUGIN)) +#define MSD_IS_FONT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_FONT_PLUGIN)) +#define MSD_FONT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_FONT_PLUGIN, MsdFontPluginClass)) -typedef struct GsdFontPluginPrivate GsdFontPluginPrivate; +typedef struct MsdFontPluginPrivate MsdFontPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdFontPluginPrivate *priv; -} GsdFontPlugin; + MsdFontPluginPrivate *priv; +} MsdFontPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdFontPluginClass; +} MsdFontPluginClass; -GType gsd_font_plugin_get_type (void) G_GNUC_CONST; +GType msd_font_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_FONT_PLUGIN_H__ */ +#endif /* __MSD_FONT_PLUGIN_H__ */ diff --git a/plugins/housekeeping/Makefile.am b/plugins/housekeeping/Makefile.am index 485d4ed..4eb4517 100644 --- a/plugins/housekeeping/Makefile.am +++ b/plugins/housekeeping/Makefile.am @@ -1,16 +1,16 @@ plugin_LTLIBRARIES = libhousekeeping.la libhousekeeping_la_SOURCES = \ - gsd-ldsm-dialog.c \ - gsd-ldsm-dialog.h \ - gsd-ldsm-trash-empty.c \ - gsd-ldsm-trash-empty.h \ - gsd-disk-space.c \ - gsd-disk-space.h \ - gsd-housekeeping-manager.c \ - gsd-housekeeping-manager.h \ - gsd-housekeeping-plugin.c \ - gsd-housekeeping-plugin.h + msd-ldsm-dialog.c \ + msd-ldsm-dialog.h \ + msd-ldsm-trash-empty.c \ + msd-ldsm-trash-empty.h \ + msd-disk-space.c \ + msd-disk-space.h \ + msd-housekeeping-manager.c \ + msd-housekeeping-manager.h \ + msd-housekeeping-plugin.c \ + msd-housekeeping-plugin.h libhousekeeping_la_CPPFLAGS = \ -I$(top_srcdir)/mate-settings-daemon \ @@ -23,7 +23,7 @@ libhousekeeping_la_CFLAGS = \ $(LIBMATENOTIFY_CFLAGS) \ $(AM_CFLAGS) -libhousekeeping_la_LDFLAGS = $(GSD_PLUGIN_LDFLAGS) +libhousekeeping_la_LDFLAGS = $(MSD_PLUGIN_LDFLAGS) libhousekeeping_la_LIBADD = $(SETTINGS_PLUGIN_LIBS) $(GIOUNIX_LIBS) $(LIBMATENOTIFY_LIBS) @@ -37,4 +37,4 @@ CLEANFILES = $(plugin_DATA) DISTCLEANFILES = (plugin_DATA) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c index 97e2093..6842ae5 100644 --- a/plugins/housekeeping/gsd-disk-space.c +++ b/plugins/housekeeping/gsd-disk-space.c @@ -21,7 +21,7 @@ * */ -/* gcc -DHAVE_LIBMATENOTIFY -DTEST -Wall `pkg-config --cflags --libs gobject-2.0 gio-unix-2.0 glib-2.0 gtk+-2.0 libmatenotify` -o gsd-disk-space-test gsd-disk-space.c */ +/* gcc -DHAVE_LIBMATENOTIFY -DTEST -Wall `pkg-config --cflags --libs gobject-2.0 gio-unix-2.0 glib-2.0 gtk+-2.0 libmatenotify` -o msd-disk-space-test msd-disk-space.c */ #include "config.h" @@ -37,9 +37,9 @@ #include <gtk/gtk.h> #include <mateconf/mateconf-client.h> -#include "gsd-disk-space.h" -#include "gsd-ldsm-dialog.h" -#include "gsd-ldsm-trash-empty.h" +#include "msd-disk-space.h" +#include "msd-ldsm-dialog.h" +#include "msd-ldsm-trash-empty.h" #define GIGABYTE 1024 * 1024 * 1024 @@ -72,7 +72,7 @@ static unsigned int min_notify_period = 10; static GSList *ignore_paths = NULL; static unsigned int mateconf_notify_id; static MateConfClient *client = NULL; -static GsdLdsmDialog *dialog = NULL; +static MsdLdsmDialog *dialog = NULL; static guint64 *time_read; static gchar* @@ -196,7 +196,7 @@ ldsm_notify_for_mount (LdsmMountInfo *mount, has_disk_analyzer = (program != NULL); g_free (program); - dialog = gsd_ldsm_dialog_new (other_usable_volumes, + dialog = msd_ldsm_dialog_new (other_usable_volumes, multiple_volumes, has_disk_analyzer, has_trash, @@ -216,13 +216,13 @@ ldsm_notify_for_mount (LdsmMountInfo *mount, case GTK_RESPONSE_CANCEL: retval = FALSE; break; - case GSD_LDSM_DIALOG_RESPONSE_ANALYZE: + case MSD_LDSM_DIALOG_RESPONSE_ANALYZE: retval = FALSE; ldsm_analyze_path (g_unix_mount_get_mount_path (mount->mount)); break; - case GSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH: + case MSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH: retval = TRUE; - gsd_ldsm_trash_empty (); + msd_ldsm_trash_empty (); break; case GTK_RESPONSE_NONE: case GTK_RESPONSE_DELETE_EVENT: @@ -566,7 +566,7 @@ ldsm_is_hash_item_in_ignore_paths (gpointer key, } static void -gsd_ldsm_get_config () +msd_ldsm_get_config () { GError *error = NULL; @@ -629,16 +629,16 @@ gsd_ldsm_get_config () } static void -gsd_ldsm_update_config (MateConfClient *client, +msd_ldsm_update_config (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, gpointer user_data) { - gsd_ldsm_get_config (); + msd_ldsm_get_config (); } void -gsd_ldsm_setup (gboolean check_now) +msd_ldsm_setup (gboolean check_now) { GError *error = NULL; @@ -653,10 +653,10 @@ gsd_ldsm_setup (gboolean check_now) client = mateconf_client_get_default (); if (client != NULL) { - gsd_ldsm_get_config (); + msd_ldsm_get_config (); mateconf_notify_id = mateconf_client_notify_add (client, MATECONF_HOUSEKEEPING_DIR, - (MateConfClientNotifyFunc) gsd_ldsm_update_config, + (MateConfClientNotifyFunc) msd_ldsm_update_config, NULL, NULL, &error); if (error != NULL) { g_warning ("Cannot register callback for MateConf notification"); @@ -680,7 +680,7 @@ gsd_ldsm_setup (gboolean check_now) } void -gsd_ldsm_clean (void) +msd_ldsm_clean (void) { if (ldsm_timeout_id) g_source_remove (ldsm_timeout_id); @@ -721,11 +721,11 @@ main (int argc, loop = g_main_loop_new (NULL, FALSE); - gsd_ldsm_setup (TRUE); + msd_ldsm_setup (TRUE); g_main_loop_run (loop); - gsd_ldsm_clean (); + msd_ldsm_clean (); g_main_loop_unref (loop); return 0; diff --git a/plugins/housekeeping/gsd-disk-space.h b/plugins/housekeeping/gsd-disk-space.h index 9a079a4..43f7059 100644 --- a/plugins/housekeeping/gsd-disk-space.h +++ b/plugins/housekeeping/gsd-disk-space.h @@ -21,8 +21,8 @@ * */ -#ifndef __GSD_DISK_SPACE_H -#define __GSD_DISK_SPACE_H +#ifndef __MSD_DISK_SPACE_H +#define __MSD_DISK_SPACE_H #include <glib.h> @@ -30,11 +30,11 @@ extern "C" { #endif -void gsd_ldsm_setup (gboolean check_now); -void gsd_ldsm_clean (void); +void msd_ldsm_setup (gboolean check_now); +void msd_ldsm_clean (void); #ifdef __cplusplus } #endif -#endif /* __GSD_DISK_SPACE_H */ +#endif /* __MSD_DISK_SPACE_H */ diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/gsd-housekeeping-manager.c index bbdea2c..6cb3353 100644 --- a/plugins/housekeeping/gsd-housekeeping-manager.c +++ b/plugins/housekeeping/gsd-housekeeping-manager.c @@ -25,8 +25,8 @@ #include <string.h> #include "mate-settings-profile.h" -#include "gsd-housekeeping-manager.h" -#include "gsd-disk-space.h" +#include "msd-housekeeping-manager.h" +#include "msd-disk-space.h" /* General */ @@ -42,19 +42,19 @@ #define MATECONF_THUMB_BINDING_DIR "/desktop/mate/thumbnail_cache" -struct GsdHousekeepingManagerPrivate { +struct MsdHousekeepingManagerPrivate { guint long_term_cb; guint short_term_cb; guint mateconf_notify; }; -#define GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerPrivate)) +#define MSD_HOUSEKEEPING_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManagerPrivate)) -static void gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass); -static void gsd_housekeeping_manager_init (GsdHousekeepingManager *housekeeping_manager); +static void msd_housekeeping_manager_class_init (MsdHousekeepingManagerClass *klass); +static void msd_housekeeping_manager_init (MsdHousekeepingManager *housekeeping_manager); -G_DEFINE_TYPE (GsdHousekeepingManager, gsd_housekeeping_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdHousekeepingManager, msd_housekeeping_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -241,7 +241,7 @@ purge_thumbnail_cache (void) static gboolean -do_cleanup (GsdHousekeepingManager *manager) +do_cleanup (MsdHousekeepingManager *manager) { purge_thumbnail_cache (); return TRUE; @@ -249,7 +249,7 @@ do_cleanup (GsdHousekeepingManager *manager) static gboolean -do_cleanup_once (GsdHousekeepingManager *manager) +do_cleanup_once (MsdHousekeepingManager *manager) { do_cleanup (manager); manager->priv->short_term_cb = 0; @@ -258,7 +258,7 @@ do_cleanup_once (GsdHousekeepingManager *manager) static void -do_cleanup_soon (GsdHousekeepingManager *manager) +do_cleanup_soon (MsdHousekeepingManager *manager) { if (manager->priv->short_term_cb == 0) { g_debug ("housekeeping: will tidy up in 2 minutes"); @@ -273,14 +273,14 @@ static void bindings_callback (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdHousekeepingManager *manager) + MsdHousekeepingManager *manager) { do_cleanup_soon (manager); } static guint -register_config_callback (GsdHousekeepingManager *manager, +register_config_callback (MsdHousekeepingManager *manager, const char *path, MateConfClientNotifyFunc func) { @@ -297,13 +297,13 @@ register_config_callback (GsdHousekeepingManager *manager, gboolean -gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, +msd_housekeeping_manager_start (MsdHousekeepingManager *manager, GError **error) { g_debug ("Starting housekeeping manager"); mate_settings_profile_start (NULL); - gsd_ldsm_setup (FALSE); + msd_ldsm_setup (FALSE); manager->priv->mateconf_notify = register_config_callback (manager, MATECONF_THUMB_BINDING_DIR, @@ -323,9 +323,9 @@ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, void -gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager) +msd_housekeeping_manager_stop (MsdHousekeepingManager *manager) { - GsdHousekeepingManagerPrivate *p = manager->priv; + MsdHousekeepingManagerPrivate *p = manager->priv; g_debug ("Stopping housekeeping manager"); @@ -356,34 +356,34 @@ gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager) } } - gsd_ldsm_clean (); + msd_ldsm_clean (); } static void -gsd_housekeeping_manager_class_init (GsdHousekeepingManagerClass *klass) +msd_housekeeping_manager_class_init (MsdHousekeepingManagerClass *klass) { - g_type_class_add_private (klass, sizeof (GsdHousekeepingManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdHousekeepingManagerPrivate)); } static void -gsd_housekeeping_manager_init (GsdHousekeepingManager *manager) +msd_housekeeping_manager_init (MsdHousekeepingManager *manager) { - manager->priv = GSD_HOUSEKEEPING_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_HOUSEKEEPING_MANAGER_GET_PRIVATE (manager); } -GsdHousekeepingManager * -gsd_housekeeping_manager_new (void) +MsdHousekeepingManager * +msd_housekeeping_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_HOUSEKEEPING_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_HOUSEKEEPING_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_HOUSEKEEPING_MANAGER (manager_object); + return MSD_HOUSEKEEPING_MANAGER (manager_object); } diff --git a/plugins/housekeeping/gsd-housekeeping-manager.h b/plugins/housekeeping/gsd-housekeeping-manager.h index 3cba840..11f50a7 100644 --- a/plugins/housekeeping/gsd-housekeeping-manager.h +++ b/plugins/housekeeping/gsd-housekeeping-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_HOUSEKEEPING_MANAGER_H -#define __GSD_HOUSEKEEPING_MANAGER_H +#ifndef __MSD_HOUSEKEEPING_MANAGER_H +#define __MSD_HOUSEKEEPING_MANAGER_H #include <glib-object.h> @@ -27,33 +27,33 @@ extern "C" { #endif -#define GSD_TYPE_HOUSEKEEPING_MANAGER (gsd_housekeeping_manager_get_type ()) -#define GSD_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManager)) -#define GSD_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerClass)) -#define GSD_IS_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_HOUSEKEEPING_MANAGER)) -#define GSD_IS_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_HOUSEKEEPING_MANAGER)) -#define GSD_HOUSEKEEPING_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_HOUSEKEEPING_MANAGER, GsdHousekeepingManagerClass)) +#define MSD_TYPE_HOUSEKEEPING_MANAGER (msd_housekeeping_manager_get_type ()) +#define MSD_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManager)) +#define MSD_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManagerClass)) +#define MSD_IS_HOUSEKEEPING_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_HOUSEKEEPING_MANAGER)) +#define MSD_IS_HOUSEKEEPING_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_HOUSEKEEPING_MANAGER)) +#define MSD_HOUSEKEEPING_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_HOUSEKEEPING_MANAGER, MsdHousekeepingManagerClass)) -typedef struct GsdHousekeepingManagerPrivate GsdHousekeepingManagerPrivate; +typedef struct MsdHousekeepingManagerPrivate MsdHousekeepingManagerPrivate; typedef struct { GObject parent; - GsdHousekeepingManagerPrivate *priv; -} GsdHousekeepingManager; + MsdHousekeepingManagerPrivate *priv; +} MsdHousekeepingManager; typedef struct { GObjectClass parent_class; -} GsdHousekeepingManagerClass; +} MsdHousekeepingManagerClass; -GType gsd_housekeeping_manager_get_type (void); +GType msd_housekeeping_manager_get_type (void); -GsdHousekeepingManager * gsd_housekeeping_manager_new (void); -gboolean gsd_housekeeping_manager_start (GsdHousekeepingManager *manager, +MsdHousekeepingManager * msd_housekeeping_manager_new (void); +gboolean msd_housekeeping_manager_start (MsdHousekeepingManager *manager, GError **error); -void gsd_housekeeping_manager_stop (GsdHousekeepingManager *manager); +void msd_housekeeping_manager_stop (MsdHousekeepingManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_HOUSEKEEPING_MANAGER_H */ +#endif /* __MSD_HOUSEKEEPING_MANAGER_H */ diff --git a/plugins/housekeeping/gsd-housekeeping-plugin.c b/plugins/housekeeping/gsd-housekeeping-plugin.c index 1bbddb0..5b0cfef 100644 --- a/plugins/housekeeping/gsd-housekeeping-plugin.c +++ b/plugins/housekeeping/gsd-housekeeping-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-housekeeping-plugin.h" -#include "gsd-housekeeping-manager.h" +#include "msd-housekeeping-plugin.h" +#include "msd-housekeeping-manager.h" -struct GsdHousekeepingPluginPrivate { - GsdHousekeepingManager *manager; +struct MsdHousekeepingPluginPrivate { + MsdHousekeepingManager *manager; }; -#define GSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPluginPrivate)) +#define MSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdHousekeepingPlugin, gsd_housekeeping_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdHousekeepingPlugin, msd_housekeeping_plugin) static void -gsd_housekeeping_plugin_init (GsdHousekeepingPlugin *plugin) +msd_housekeeping_plugin_init (MsdHousekeepingPlugin *plugin) { - plugin->priv = GSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_HOUSEKEEPING_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdHousekeepingPlugin initializing"); + g_debug ("MsdHousekeepingPlugin initializing"); - plugin->priv->manager = gsd_housekeeping_manager_new (); + plugin->priv->manager = msd_housekeeping_manager_new (); } static void -gsd_housekeeping_plugin_finalize (GObject *object) +msd_housekeeping_plugin_finalize (GObject *object) { - GsdHousekeepingPlugin *plugin; + MsdHousekeepingPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_HOUSEKEEPING_PLUGIN (object)); + g_return_if_fail (MSD_IS_HOUSEKEEPING_PLUGIN (object)); - g_debug ("GsdHousekeepingPlugin finalizing"); + g_debug ("MsdHousekeepingPlugin finalizing"); - plugin = GSD_HOUSEKEEPING_PLUGIN (object); + plugin = MSD_HOUSEKEEPING_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_housekeeping_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_housekeeping_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_housekeeping_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating housekeeping plugin"); error = NULL; - res = gsd_housekeeping_manager_start (GSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager, &error); + res = msd_housekeeping_manager_start (MSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start housekeeping manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating housekeeping plugin"); - gsd_housekeeping_manager_stop (GSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager); + msd_housekeeping_manager_stop (MSD_HOUSEKEEPING_PLUGIN (plugin)->priv->manager); } static void -gsd_housekeeping_plugin_class_init (GsdHousekeepingPluginClass *klass) +msd_housekeeping_plugin_class_init (MsdHousekeepingPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_housekeeping_plugin_finalize; + object_class->finalize = msd_housekeeping_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdHousekeepingPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdHousekeepingPluginPrivate)); } diff --git a/plugins/housekeeping/gsd-housekeeping-plugin.h b/plugins/housekeeping/gsd-housekeeping-plugin.h index daca16b..1c2d816 100644 --- a/plugins/housekeeping/gsd-housekeeping-plugin.h +++ b/plugins/housekeeping/gsd-housekeeping-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_HOUSEKEEPING_PLUGIN_H__ -#define __GSD_HOUSEKEEPING_PLUGIN_H__ +#ifndef __MSD_HOUSEKEEPING_PLUGIN_H__ +#define __MSD_HOUSEKEEPING_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,25 +31,25 @@ extern "C" { #endif -#define GSD_TYPE_HOUSEKEEPING_PLUGIN (gsd_housekeeping_plugin_get_type ()) -#define GSD_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPlugin)) -#define GSD_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPluginClass)) -#define GSD_IS_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_HOUSEKEEPING_PLUGIN)) -#define GSD_IS_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_HOUSEKEEPING_PLUGIN)) -#define GSD_HOUSEKEEPING_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_HOUSEKEEPING_PLUGIN, GsdHousekeepingPluginClass)) +#define MSD_TYPE_HOUSEKEEPING_PLUGIN (msd_housekeeping_plugin_get_type ()) +#define MSD_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPlugin)) +#define MSD_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPluginClass)) +#define MSD_IS_HOUSEKEEPING_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_HOUSEKEEPING_PLUGIN)) +#define MSD_IS_HOUSEKEEPING_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_HOUSEKEEPING_PLUGIN)) +#define MSD_HOUSEKEEPING_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_HOUSEKEEPING_PLUGIN, MsdHousekeepingPluginClass)) -typedef struct GsdHousekeepingPluginPrivate GsdHousekeepingPluginPrivate; +typedef struct MsdHousekeepingPluginPrivate MsdHousekeepingPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdHousekeepingPluginPrivate *priv; -} GsdHousekeepingPlugin; + MsdHousekeepingPluginPrivate *priv; +} MsdHousekeepingPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdHousekeepingPluginClass; +} MsdHousekeepingPluginClass; -GType gsd_housekeeping_plugin_get_type (void) G_GNUC_CONST; +GType msd_housekeeping_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -58,4 +58,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_HOUSEKEEPING_PLUGIN_H__ */ +#endif /* __MSD_HOUSEKEEPING_PLUGIN_H__ */ diff --git a/plugins/housekeeping/gsd-ldsm-dialog.c b/plugins/housekeeping/gsd-ldsm-dialog.c index 695db91..80ca857 100644 --- a/plugins/housekeeping/gsd-ldsm-dialog.c +++ b/plugins/housekeeping/gsd-ldsm-dialog.c @@ -1,14 +1,14 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * gsd-ldsm-dialog.c + * msd-ldsm-dialog.c * Copyright (C) Chris Coulson 2009 <[email protected]> * - * gsd-ldsm-dialog.c is free software: you can redistribute it and/or modify it + * msd-ldsm-dialog.c 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 3 of the License, or * (at your option) any later version. * - * gsd-ldsm-dialog.c is distributed in the hope that it will be useful, but + * msd-ldsm-dialog.c 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 General Public License for more details. @@ -20,7 +20,7 @@ #include <glib/gi18n.h> #include <mateconf/mateconf-client.h> -#include "gsd-ldsm-dialog.h" +#include "msd-ldsm-dialog.h" #define MATECONF_CLIENT_IGNORE_PATHS "/apps/mate_settings_daemon/plugins/housekeeping/ignore_paths" @@ -35,7 +35,7 @@ enum PROP_MOUNT_PATH }; -struct GsdLdsmDialogPrivate +struct MsdLdsmDialogPrivate { GtkWidget *primary_label; GtkWidget *secondary_label; @@ -48,17 +48,17 @@ struct GsdLdsmDialogPrivate gchar *mount_path; }; -#define GSD_LDSM_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialogPrivate)) +#define MSD_LDSM_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialogPrivate)) -static void gsd_ldsm_dialog_class_init (GsdLdsmDialogClass *klass); -static void gsd_ldsm_dialog_init (GsdLdsmDialog *dialog); +static void msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass); +static void msd_ldsm_dialog_init (MsdLdsmDialog *dialog); -G_DEFINE_TYPE (GsdLdsmDialog, gsd_ldsm_dialog, GTK_TYPE_DIALOG); +G_DEFINE_TYPE (MsdLdsmDialog, msd_ldsm_dialog, GTK_TYPE_DIALOG); static const gchar* -gsd_ldsm_dialog_get_checkbutton_text (GsdLdsmDialog *dialog) +msd_ldsm_dialog_get_checkbutton_text (MsdLdsmDialog *dialog) { - g_return_val_if_fail (GSD_IS_LDSM_DIALOG (dialog), NULL); + g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); if (dialog->priv->other_partitions) return _("Don't show any warnings again for this file system"); @@ -67,11 +67,11 @@ gsd_ldsm_dialog_get_checkbutton_text (GsdLdsmDialog *dialog) } static gchar* -gsd_ldsm_dialog_get_primary_text (GsdLdsmDialog *dialog) +msd_ldsm_dialog_get_primary_text (MsdLdsmDialog *dialog) { gchar *primary_text, *free_space; - g_return_val_if_fail (GSD_IS_LDSM_DIALOG (dialog), NULL); + g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); free_space = g_format_size_for_display (dialog->priv->space_remaining); @@ -89,9 +89,9 @@ gsd_ldsm_dialog_get_primary_text (GsdLdsmDialog *dialog) } static const gchar* -gsd_ldsm_dialog_get_secondary_text (GsdLdsmDialog *dialog) +msd_ldsm_dialog_get_secondary_text (MsdLdsmDialog *dialog) { - g_return_val_if_fail (GSD_IS_LDSM_DIALOG (dialog), NULL); + g_return_val_if_fail (MSD_IS_LDSM_DIALOG (dialog), NULL); if (dialog->priv->other_usable_partitions) { if (dialog->priv->has_trash) { @@ -148,7 +148,7 @@ static void ignore_check_button_toggled_cb (GtkToggleButton *button, gpointer user_data) { - GsdLdsmDialog *dialog = (GsdLdsmDialog *)user_data; + MsdLdsmDialog *dialog = (MsdLdsmDialog *)user_data; MateConfClient *client; GSList *ignore_paths; GError *error = NULL; @@ -191,12 +191,12 @@ ignore_check_button_toggled_cb (GtkToggleButton *button, } static void -gsd_ldsm_dialog_init (GsdLdsmDialog *dialog) +msd_ldsm_dialog_init (MsdLdsmDialog *dialog) { GtkWidget *main_vbox, *text_vbox, *hbox; GtkWidget *image; - dialog->priv = GSD_LDSM_DIALOG_GET_PRIVATE (dialog); + dialog->priv = MSD_LDSM_DIALOG_GET_PRIVATE (dialog); main_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); @@ -261,14 +261,14 @@ gsd_ldsm_dialog_init (GsdLdsmDialog *dialog) } static void -gsd_ldsm_dialog_finalize (GObject *object) +msd_ldsm_dialog_finalize (GObject *object) { - GsdLdsmDialog *self; + MsdLdsmDialog *self; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_LDSM_DIALOG (object)); + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - self = GSD_LDSM_DIALOG (object); + self = MSD_LDSM_DIALOG (object); if (self->priv->partition_name) g_free (self->priv->partition_name); @@ -276,17 +276,17 @@ gsd_ldsm_dialog_finalize (GObject *object) if (self->priv->mount_path) g_free (self->priv->mount_path); - G_OBJECT_CLASS (gsd_ldsm_dialog_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_ldsm_dialog_parent_class)->finalize (object); } static void -gsd_ldsm_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +msd_ldsm_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdLdsmDialog *self; + MsdLdsmDialog *self; - g_return_if_fail (GSD_IS_LDSM_DIALOG (object)); + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - self = GSD_LDSM_DIALOG (object); + self = MSD_LDSM_DIALOG (object); switch (prop_id) { @@ -315,13 +315,13 @@ gsd_ldsm_dialog_set_property (GObject *object, guint prop_id, const GValue *valu } static void -gsd_ldsm_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +msd_ldsm_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdLdsmDialog *self; + MsdLdsmDialog *self; - g_return_if_fail (GSD_IS_LDSM_DIALOG (object)); + g_return_if_fail (MSD_IS_LDSM_DIALOG (object)); - self = GSD_LDSM_DIALOG (object); + self = MSD_LDSM_DIALOG (object); switch (prop_id) { @@ -350,13 +350,13 @@ gsd_ldsm_dialog_get_property (GObject *object, guint prop_id, GValue *value, GPa } static void -gsd_ldsm_dialog_class_init (GsdLdsmDialogClass *klass) +msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass) { GObjectClass* object_class = G_OBJECT_CLASS (klass); - object_class->finalize = gsd_ldsm_dialog_finalize; - object_class->set_property = gsd_ldsm_dialog_set_property; - object_class->get_property = gsd_ldsm_dialog_get_property; + object_class->finalize = msd_ldsm_dialog_finalize; + object_class->set_property = msd_ldsm_dialog_set_property; + object_class->get_property = msd_ldsm_dialog_get_property; g_object_class_install_property (object_class, PROP_OTHER_USABLE_PARTITIONS, @@ -406,11 +406,11 @@ gsd_ldsm_dialog_class_init (GsdLdsmDialogClass *klass) "Unknown", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - g_type_class_add_private (klass, sizeof (GsdLdsmDialogPrivate)); + g_type_class_add_private (klass, sizeof (MsdLdsmDialogPrivate)); } -GsdLdsmDialog* -gsd_ldsm_dialog_new (gboolean other_usable_partitions, +MsdLdsmDialog* +msd_ldsm_dialog_new (gboolean other_usable_partitions, gboolean other_partitions, gboolean display_baobab, gboolean display_empty_trash, @@ -418,13 +418,13 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, const gchar *partition_name, const gchar *mount_path) { - GsdLdsmDialog *dialog; + MsdLdsmDialog *dialog; GtkWidget *button_empty_trash, *button_ignore, *button_analyze; GtkWidget *empty_trash_image, *analyze_image, *ignore_image; gchar *primary_text, *primary_text_markup; const gchar *secondary_text, *checkbutton_text; - dialog = GSD_LDSM_DIALOG (g_object_new (GSD_TYPE_LDSM_DIALOG, + dialog = MSD_LDSM_DIALOG (g_object_new (MSD_TYPE_LDSM_DIALOG, "other-usable-partitions", other_usable_partitions, "other-partitions", other_partitions, "has-trash", display_empty_trash, @@ -437,7 +437,7 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, if (dialog->priv->has_trash) { button_empty_trash = gtk_dialog_add_button (GTK_DIALOG (dialog), _("Empty Trash"), - GSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH); + MSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH); empty_trash_image = gtk_image_new_from_stock (GTK_STOCK_CLEAR, GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button_empty_trash), empty_trash_image); } @@ -445,7 +445,7 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, if (display_baobab) { button_analyze = gtk_dialog_add_button (GTK_DIALOG (dialog), _("Examine…"), - GSD_LDSM_DIALOG_RESPONSE_ANALYZE); + MSD_LDSM_DIALOG_RESPONSE_ANALYZE); analyze_image = gtk_image_new_from_icon_name ("baobab", GTK_ICON_SIZE_BUTTON); gtk_button_set_image (GTK_BUTTON (button_analyze), analyze_image); } @@ -459,14 +459,14 @@ gsd_ldsm_dialog_new (gboolean other_usable_partitions, gtk_widget_grab_default (button_ignore); /* Set the label text */ - primary_text = gsd_ldsm_dialog_get_primary_text (dialog); + primary_text = msd_ldsm_dialog_get_primary_text (dialog); primary_text_markup = g_markup_printf_escaped ("<big><b>%s</b></big>", primary_text); gtk_label_set_markup (GTK_LABEL (dialog->priv->primary_label), primary_text_markup); - secondary_text = gsd_ldsm_dialog_get_secondary_text (dialog); + secondary_text = msd_ldsm_dialog_get_secondary_text (dialog); gtk_label_set_text (GTK_LABEL (dialog->priv->secondary_label), secondary_text); - checkbutton_text = gsd_ldsm_dialog_get_checkbutton_text (dialog); + checkbutton_text = msd_ldsm_dialog_get_checkbutton_text (dialog); gtk_button_set_label (GTK_BUTTON (dialog->priv->ignore_check_button), checkbutton_text); g_free (primary_text); diff --git a/plugins/housekeeping/gsd-ldsm-dialog.h b/plugins/housekeeping/gsd-ldsm-dialog.h index 81e2f1b..8b95fb9 100644 --- a/plugins/housekeeping/gsd-ldsm-dialog.h +++ b/plugins/housekeeping/gsd-ldsm-dialog.h @@ -1,14 +1,14 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * gsd-ldsm-dialog.c + * msd-ldsm-dialog.c * Copyright (C) Chris Coulson 2009 <[email protected]> * - * gsd-ldsm-dialog.c is free software: you can redistribute it and/or modify it + * msd-ldsm-dialog.c 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 3 of the License, or * (at your option) any later version. * - * gsd-ldsm-dialog.c is distributed in the hope that it will be useful, but + * msd-ldsm-dialog.c 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 General Public License for more details. @@ -17,8 +17,8 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _GSD_LDSM_DIALOG_H_ -#define _GSD_LDSM_DIALOG_H_ +#ifndef _MSD_LDSM_DIALOG_H_ +#define _MSD_LDSM_DIALOG_H_ #include <glib-object.h> #include <gtk/gtk.h> @@ -27,37 +27,37 @@ extern "C" { #endif -#define GSD_TYPE_LDSM_DIALOG (gsd_ldsm_dialog_get_type ()) -#define GSD_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialog)) -#define GSD_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialogClass)) -#define GSD_IS_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSD_TYPE_LDSM_DIALOG)) -#define GSD_IS_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSD_TYPE_LDSM_DIALOG)) -#define GSD_LDSM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSD_TYPE_LDSM_DIALOG, GsdLdsmDialogClass)) +#define MSD_TYPE_LDSM_DIALOG (msd_ldsm_dialog_get_type ()) +#define MSD_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialog)) +#define MSD_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialogClass)) +#define MSD_IS_LDSM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MSD_TYPE_LDSM_DIALOG)) +#define MSD_IS_LDSM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MSD_TYPE_LDSM_DIALOG)) +#define MSD_LDSM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialogClass)) enum { - GSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH = -20, - GSD_LDSM_DIALOG_RESPONSE_ANALYZE = -21 + MSD_LDSM_DIALOG_RESPONSE_EMPTY_TRASH = -20, + MSD_LDSM_DIALOG_RESPONSE_ANALYZE = -21 }; -typedef struct GsdLdsmDialogPrivate GsdLdsmDialogPrivate; -typedef struct _GsdLdsmDialogClass GsdLdsmDialogClass; -typedef struct _GsdLdsmDialog GsdLdsmDialog; +typedef struct MsdLdsmDialogPrivate MsdLdsmDialogPrivate; +typedef struct _MsdLdsmDialogClass MsdLdsmDialogClass; +typedef struct _MsdLdsmDialog MsdLdsmDialog; -struct _GsdLdsmDialogClass +struct _MsdLdsmDialogClass { GtkDialogClass parent_class; }; -struct _GsdLdsmDialog +struct _MsdLdsmDialog { GtkDialog parent_instance; - GsdLdsmDialogPrivate *priv; + MsdLdsmDialogPrivate *priv; }; -GType gsd_ldsm_dialog_get_type (void) G_GNUC_CONST; +GType msd_ldsm_dialog_get_type (void) G_GNUC_CONST; -GsdLdsmDialog * gsd_ldsm_dialog_new (gboolean other_usable_partitions, +MsdLdsmDialog * msd_ldsm_dialog_new (gboolean other_usable_partitions, gboolean other_partitions, gboolean display_baobab, gboolean display_empty_trash, @@ -69,4 +69,4 @@ GsdLdsmDialog * gsd_ldsm_dialog_new (gboolean other_usable_partitions, } #endif -#endif /* _GSD_LDSM_DIALOG_H_ */ +#endif /* _MSD_LDSM_DIALOG_H_ */ diff --git a/plugins/housekeeping/gsd-ldsm-trash-empty.c b/plugins/housekeeping/gsd-ldsm-trash-empty.c index d4ea183..05f82cd 100644 --- a/plugins/housekeeping/gsd-ldsm-trash-empty.c +++ b/plugins/housekeeping/gsd-ldsm-trash-empty.c @@ -1,15 +1,15 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * gsd-ldsm-trash-empty.c + * msd-ldsm-trash-empty.c * Copyright (C) Chris Coulson 2009 <[email protected]> * (C) Ryan Lortie 2008 * - * gsd-ldsm-trash-empty.c is free software: you can redistribute it and/or modify it + * msd-ldsm-trash-empty.c 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 3 of the License, or * (at your option) any later version. * - * gsd-ldsm-trash-empty.c is distributed in the hope that it will be useful, but + * msd-ldsm-trash-empty.c 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 General Public License for more details. @@ -22,7 +22,7 @@ #include <glib/gi18n.h> #include <gio/gio.h> -#include "gsd-ldsm-trash-empty.h" +#include "msd-ldsm-trash-empty.h" #define CAJA_CONFIRM_TRASH_KEY "/apps/caja/preferences/confirm_trash" @@ -387,7 +387,7 @@ trash_empty_show_confirmation_dialog () } void -gsd_ldsm_trash_empty () +msd_ldsm_trash_empty () { if (trash_empty_confirm_dialog) gtk_window_present (GTK_WINDOW (trash_empty_confirm_dialog)); diff --git a/plugins/housekeeping/gsd-ldsm-trash-empty.h b/plugins/housekeeping/gsd-ldsm-trash-empty.h index 4d46a5b..85b09c0 100644 --- a/plugins/housekeeping/gsd-ldsm-trash-empty.h +++ b/plugins/housekeeping/gsd-ldsm-trash-empty.h @@ -1,14 +1,14 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * - * gsd-ldsm-trash-empty.h + * msd-ldsm-trash-empty.h * Copyright (C) Chris Coulson 2009 <[email protected]> * - * gsd-ldsm-trash-empty.h is free software: you can redistribute it and/or modify it + * msd-ldsm-trash-empty.h 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 3 of the License, or * (at your option) any later version. * - * gsd-ldsm-trash-empty.h is distributed in the hope that it will be useful, but + * msd-ldsm-trash-empty.h 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 General Public License for more details. @@ -17,11 +17,11 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _gsd_ldsm_trash_empty_h_ -#define _gsd_ldsm_trash_empty_h_ +#ifndef _msd_ldsm_trash_empty_h_ +#define _msd_ldsm_trash_empty_h_ #include <gtk/gtk.h> -void gsd_ldsm_trash_empty (); +void msd_ldsm_trash_empty (); -#endif /* _gsd_ldsm_trash_empty_h_ */ +#endif /* _msd_ldsm_trash_empty_h_ */ diff --git a/plugins/keybindings/Makefile.am b/plugins/keybindings/Makefile.am index c4fe7b2..d8e2b5f 100644 --- a/plugins/keybindings/Makefile.am +++ b/plugins/keybindings/Makefile.am @@ -5,10 +5,10 @@ plugin_LTLIBRARIES = \ $(NULL) libkeybindings_la_SOURCES = \ - gsd-keybindings-plugin.h \ - gsd-keybindings-plugin.c \ - gsd-keybindings-manager.h \ - gsd-keybindings-manager.c \ + msd-keybindings-plugin.h \ + msd-keybindings-plugin.c \ + msd-keybindings-manager.h \ + msd-keybindings-manager.c \ $(NULL) libkeybindings_la_CPPFLAGS = \ @@ -22,7 +22,7 @@ libkeybindings_la_CFLAGS = \ $(AM_CFLAGS) libkeybindings_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libkeybindings_la_LIBADD = \ @@ -48,4 +48,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/keybindings/gsd-keybindings-manager.c b/plugins/keybindings/gsd-keybindings-manager.c index 74014cc..c1f876c 100644 --- a/plugins/keybindings/gsd-keybindings-manager.c +++ b/plugins/keybindings/gsd-keybindings-manager.c @@ -39,15 +39,15 @@ #include <mateconf/mateconf-client.h> #include "mate-settings-profile.h" -#include "gsd-keybindings-manager.h" +#include "msd-keybindings-manager.h" -#include "gsd-keygrab.h" +#include "msd-keygrab.h" #include "eggaccelerators.h" #define MATECONF_BINDING_DIR "/desktop/mate/keybindings" #define ALLOWED_KEYS_KEY MATECONF_BINDING_DIR "/allowed_keys" -#define GSD_KEYBINDINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_KEYBINDINGS_MANAGER, GsdKeybindingsManagerPrivate)) +#define MSD_KEYBINDINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_KEYBINDINGS_MANAGER, MsdKeybindingsManagerPrivate)) typedef struct { char *binding_str; @@ -57,7 +57,7 @@ typedef struct { Key previous_key; } Binding; -struct GsdKeybindingsManagerPrivate +struct MsdKeybindingsManagerPrivate { GSList *binding_list; GSList *allowed_keys; @@ -65,11 +65,11 @@ struct GsdKeybindingsManagerPrivate guint notify; }; -static void gsd_keybindings_manager_class_init (GsdKeybindingsManagerClass *klass); -static void gsd_keybindings_manager_init (GsdKeybindingsManager *keybindings_manager); -static void gsd_keybindings_manager_finalize (GObject *object); +static void msd_keybindings_manager_class_init (MsdKeybindingsManagerClass *klass); +static void msd_keybindings_manager_init (MsdKeybindingsManager *keybindings_manager); +static void msd_keybindings_manager_finalize (GObject *object); -G_DEFINE_TYPE (GsdKeybindingsManager, gsd_keybindings_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdKeybindingsManager, msd_keybindings_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -152,7 +152,7 @@ compare_bindings (gconstpointer a, } static gboolean -bindings_get_entry (GsdKeybindingsManager *manager, +bindings_get_entry (MsdKeybindingsManager *manager, MateConfClient *client, const char *subdir) { @@ -278,7 +278,7 @@ same_key (const Key *key, const Key *other) } static gboolean -key_already_used (GsdKeybindingsManager *manager, +key_already_used (MsdKeybindingsManager *manager, Binding *binding) { GSList *li; @@ -297,7 +297,7 @@ key_already_used (GsdKeybindingsManager *manager, } static void -binding_unregister_keys (GsdKeybindingsManager *manager) +binding_unregister_keys (MsdKeybindingsManager *manager) { GSList *li; gboolean need_flush = FALSE; @@ -319,7 +319,7 @@ binding_unregister_keys (GsdKeybindingsManager *manager) } static void -binding_register_keys (GsdKeybindingsManager *manager) +binding_register_keys (MsdKeybindingsManager *manager) { GSList *li; gboolean need_flush = FALSE; @@ -448,7 +448,7 @@ get_exec_environment (XEvent *xevent) static GdkFilterReturn keybindings_filter (GdkXEvent *gdk_xevent, GdkEvent *event, - GsdKeybindingsManager *manager) + MsdKeybindingsManager *manager) { XEvent *xevent = (XEvent *) gdk_xevent; GSList *li; @@ -510,7 +510,7 @@ static void bindings_callback (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdKeybindingsManager *manager) + MsdKeybindingsManager *manager) { char** key_elems; char* binding_entry; @@ -541,7 +541,7 @@ bindings_callback (MateConfClient *client, } static guint -register_config_callback (GsdKeybindingsManager *manager, +register_config_callback (MsdKeybindingsManager *manager, MateConfClient *client, const char *path, MateConfClientNotifyFunc func) @@ -551,7 +551,7 @@ register_config_callback (GsdKeybindingsManager *manager, } gboolean -gsd_keybindings_manager_start (GsdKeybindingsManager *manager, +msd_keybindings_manager_start (MsdKeybindingsManager *manager, GError **error) { MateConfClient *client; @@ -606,9 +606,9 @@ gsd_keybindings_manager_start (GsdKeybindingsManager *manager, } void -gsd_keybindings_manager_stop (GsdKeybindingsManager *manager) +msd_keybindings_manager_stop (MsdKeybindingsManager *manager) { - GsdKeybindingsManagerPrivate *p = manager->priv; + MsdKeybindingsManagerPrivate *p = manager->priv; GSList *l; g_debug ("Stopping keybindings manager"); @@ -647,14 +647,14 @@ gsd_keybindings_manager_stop (GsdKeybindingsManager *manager) } static void -gsd_keybindings_manager_set_property (GObject *object, +msd_keybindings_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdKeybindingsManager *self; + MsdKeybindingsManager *self; - self = GSD_KEYBINDINGS_MANAGER (object); + self = MSD_KEYBINDINGS_MANAGER (object); switch (prop_id) { default: @@ -664,14 +664,14 @@ gsd_keybindings_manager_set_property (GObject *object, } static void -gsd_keybindings_manager_get_property (GObject *object, +msd_keybindings_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdKeybindingsManager *self; + MsdKeybindingsManager *self; - self = GSD_KEYBINDINGS_MANAGER (object); + self = MSD_KEYBINDINGS_MANAGER (object); switch (prop_id) { default: @@ -681,16 +681,16 @@ gsd_keybindings_manager_get_property (GObject *object, } static GObject * -gsd_keybindings_manager_constructor (GType type, +msd_keybindings_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdKeybindingsManager *keybindings_manager; - GsdKeybindingsManagerClass *klass; + MsdKeybindingsManager *keybindings_manager; + MsdKeybindingsManagerClass *klass; - klass = GSD_KEYBINDINGS_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_KEYBINDINGS_MANAGER)); + klass = MSD_KEYBINDINGS_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_KEYBINDINGS_MANAGER)); - keybindings_manager = GSD_KEYBINDINGS_MANAGER (G_OBJECT_CLASS (gsd_keybindings_manager_parent_class)->constructor (type, + keybindings_manager = MSD_KEYBINDINGS_MANAGER (G_OBJECT_CLASS (msd_keybindings_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -698,61 +698,61 @@ gsd_keybindings_manager_constructor (GType type, } static void -gsd_keybindings_manager_dispose (GObject *object) +msd_keybindings_manager_dispose (GObject *object) { - GsdKeybindingsManager *keybindings_manager; + MsdKeybindingsManager *keybindings_manager; - keybindings_manager = GSD_KEYBINDINGS_MANAGER (object); + keybindings_manager = MSD_KEYBINDINGS_MANAGER (object); - G_OBJECT_CLASS (gsd_keybindings_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_keybindings_manager_parent_class)->dispose (object); } static void -gsd_keybindings_manager_class_init (GsdKeybindingsManagerClass *klass) +msd_keybindings_manager_class_init (MsdKeybindingsManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_keybindings_manager_get_property; - object_class->set_property = gsd_keybindings_manager_set_property; - object_class->constructor = gsd_keybindings_manager_constructor; - object_class->dispose = gsd_keybindings_manager_dispose; - object_class->finalize = gsd_keybindings_manager_finalize; + object_class->get_property = msd_keybindings_manager_get_property; + object_class->set_property = msd_keybindings_manager_set_property; + object_class->constructor = msd_keybindings_manager_constructor; + object_class->dispose = msd_keybindings_manager_dispose; + object_class->finalize = msd_keybindings_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdKeybindingsManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdKeybindingsManagerPrivate)); } static void -gsd_keybindings_manager_init (GsdKeybindingsManager *manager) +msd_keybindings_manager_init (MsdKeybindingsManager *manager) { - manager->priv = GSD_KEYBINDINGS_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_KEYBINDINGS_MANAGER_GET_PRIVATE (manager); } static void -gsd_keybindings_manager_finalize (GObject *object) +msd_keybindings_manager_finalize (GObject *object) { - GsdKeybindingsManager *keybindings_manager; + MsdKeybindingsManager *keybindings_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_KEYBINDINGS_MANAGER (object)); + g_return_if_fail (MSD_IS_KEYBINDINGS_MANAGER (object)); - keybindings_manager = GSD_KEYBINDINGS_MANAGER (object); + keybindings_manager = MSD_KEYBINDINGS_MANAGER (object); g_return_if_fail (keybindings_manager->priv != NULL); - G_OBJECT_CLASS (gsd_keybindings_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_keybindings_manager_parent_class)->finalize (object); } -GsdKeybindingsManager * -gsd_keybindings_manager_new (void) +MsdKeybindingsManager * +msd_keybindings_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_KEYBINDINGS_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_KEYBINDINGS_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_KEYBINDINGS_MANAGER (manager_object); + return MSD_KEYBINDINGS_MANAGER (manager_object); } diff --git a/plugins/keybindings/gsd-keybindings-manager.h b/plugins/keybindings/gsd-keybindings-manager.h index 7de64d9..95b1bed 100644 --- a/plugins/keybindings/gsd-keybindings-manager.h +++ b/plugins/keybindings/gsd-keybindings-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_KEYBINDINGS_MANAGER_H -#define __GSD_KEYBINDINGS_MANAGER_H +#ifndef __MSD_KEYBINDINGS_MANAGER_H +#define __MSD_KEYBINDINGS_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_KEYBINDINGS_MANAGER (gsd_keybindings_manager_get_type ()) -#define GSD_KEYBINDINGS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_KEYBINDINGS_MANAGER, GsdKeybindingsManager)) -#define GSD_KEYBINDINGS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_KEYBINDINGS_MANAGER, GsdKeybindingsManagerClass)) -#define GSD_IS_KEYBINDINGS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_KEYBINDINGS_MANAGER)) -#define GSD_IS_KEYBINDINGS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_KEYBINDINGS_MANAGER)) -#define GSD_KEYBINDINGS_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_KEYBINDINGS_MANAGER, GsdKeybindingsManagerClass)) +#define MSD_TYPE_KEYBINDINGS_MANAGER (msd_keybindings_manager_get_type ()) +#define MSD_KEYBINDINGS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_KEYBINDINGS_MANAGER, MsdKeybindingsManager)) +#define MSD_KEYBINDINGS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_KEYBINDINGS_MANAGER, MsdKeybindingsManagerClass)) +#define MSD_IS_KEYBINDINGS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_KEYBINDINGS_MANAGER)) +#define MSD_IS_KEYBINDINGS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_KEYBINDINGS_MANAGER)) +#define MSD_KEYBINDINGS_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_KEYBINDINGS_MANAGER, MsdKeybindingsManagerClass)) -typedef struct GsdKeybindingsManagerPrivate GsdKeybindingsManagerPrivate; +typedef struct MsdKeybindingsManagerPrivate MsdKeybindingsManagerPrivate; typedef struct { GObject parent; - GsdKeybindingsManagerPrivate *priv; -} GsdKeybindingsManager; + MsdKeybindingsManagerPrivate *priv; +} MsdKeybindingsManager; typedef struct { GObjectClass parent_class; -} GsdKeybindingsManagerClass; +} MsdKeybindingsManagerClass; -GType gsd_keybindings_manager_get_type (void); +GType msd_keybindings_manager_get_type (void); -GsdKeybindingsManager * gsd_keybindings_manager_new (void); -gboolean gsd_keybindings_manager_start (GsdKeybindingsManager *manager, +MsdKeybindingsManager * msd_keybindings_manager_new (void); +gboolean msd_keybindings_manager_start (MsdKeybindingsManager *manager, GError **error); -void gsd_keybindings_manager_stop (GsdKeybindingsManager *manager); +void msd_keybindings_manager_stop (MsdKeybindingsManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_KEYBINDINGS_MANAGER_H */ +#endif /* __MSD_KEYBINDINGS_MANAGER_H */ diff --git a/plugins/keybindings/gsd-keybindings-plugin.c b/plugins/keybindings/gsd-keybindings-plugin.c index a96f420..5b0cebb 100644 --- a/plugins/keybindings/gsd-keybindings-plugin.c +++ b/plugins/keybindings/gsd-keybindings-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-keybindings-plugin.h" -#include "gsd-keybindings-manager.h" +#include "msd-keybindings-plugin.h" +#include "msd-keybindings-manager.h" -struct GsdKeybindingsPluginPrivate { - GsdKeybindingsManager *manager; +struct MsdKeybindingsPluginPrivate { + MsdKeybindingsManager *manager; }; -#define GSD_KEYBINDINGS_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_KEYBINDINGS_PLUGIN, GsdKeybindingsPluginPrivate)) +#define MSD_KEYBINDINGS_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_KEYBINDINGS_PLUGIN, MsdKeybindingsPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdKeybindingsPlugin, gsd_keybindings_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdKeybindingsPlugin, msd_keybindings_plugin) static void -gsd_keybindings_plugin_init (GsdKeybindingsPlugin *plugin) +msd_keybindings_plugin_init (MsdKeybindingsPlugin *plugin) { - plugin->priv = GSD_KEYBINDINGS_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_KEYBINDINGS_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdKeybindingsPlugin initializing"); + g_debug ("MsdKeybindingsPlugin initializing"); - plugin->priv->manager = gsd_keybindings_manager_new (); + plugin->priv->manager = msd_keybindings_manager_new (); } static void -gsd_keybindings_plugin_finalize (GObject *object) +msd_keybindings_plugin_finalize (GObject *object) { - GsdKeybindingsPlugin *plugin; + MsdKeybindingsPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_KEYBINDINGS_PLUGIN (object)); + g_return_if_fail (MSD_IS_KEYBINDINGS_PLUGIN (object)); - g_debug ("GsdKeybindingsPlugin finalizing"); + g_debug ("MsdKeybindingsPlugin finalizing"); - plugin = GSD_KEYBINDINGS_PLUGIN (object); + plugin = MSD_KEYBINDINGS_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_keybindings_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_keybindings_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_keybindings_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating keybindings plugin"); error = NULL; - res = gsd_keybindings_manager_start (GSD_KEYBINDINGS_PLUGIN (plugin)->priv->manager, &error); + res = msd_keybindings_manager_start (MSD_KEYBINDINGS_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start keybindings manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating keybindings plugin"); - gsd_keybindings_manager_stop (GSD_KEYBINDINGS_PLUGIN (plugin)->priv->manager); + msd_keybindings_manager_stop (MSD_KEYBINDINGS_PLUGIN (plugin)->priv->manager); } static void -gsd_keybindings_plugin_class_init (GsdKeybindingsPluginClass *klass) +msd_keybindings_plugin_class_init (MsdKeybindingsPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_keybindings_plugin_finalize; + object_class->finalize = msd_keybindings_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdKeybindingsPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdKeybindingsPluginPrivate)); } diff --git a/plugins/keybindings/gsd-keybindings-plugin.h b/plugins/keybindings/gsd-keybindings-plugin.h index dea237d..f45d0f8 100644 --- a/plugins/keybindings/gsd-keybindings-plugin.h +++ b/plugins/keybindings/gsd-keybindings-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_KEYBINDINGS_PLUGIN_H__ -#define __GSD_KEYBINDINGS_PLUGIN_H__ +#ifndef __MSD_KEYBINDINGS_PLUGIN_H__ +#define __MSD_KEYBINDINGS_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_KEYBINDINGS_PLUGIN (gsd_keybindings_plugin_get_type ()) -#define GSD_KEYBINDINGS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_KEYBINDINGS_PLUGIN, GsdKeybindingsPlugin)) -#define GSD_KEYBINDINGS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_KEYBINDINGS_PLUGIN, GsdKeybindingsPluginClass)) -#define GSD_IS_KEYBINDINGS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_KEYBINDINGS_PLUGIN)) -#define GSD_IS_KEYBINDINGS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_KEYBINDINGS_PLUGIN)) -#define GSD_KEYBINDINGS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_KEYBINDINGS_PLUGIN, GsdKeybindingsPluginClass)) +#define MSD_TYPE_KEYBINDINGS_PLUGIN (msd_keybindings_plugin_get_type ()) +#define MSD_KEYBINDINGS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_KEYBINDINGS_PLUGIN, MsdKeybindingsPlugin)) +#define MSD_KEYBINDINGS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_KEYBINDINGS_PLUGIN, MsdKeybindingsPluginClass)) +#define MSD_IS_KEYBINDINGS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_KEYBINDINGS_PLUGIN)) +#define MSD_IS_KEYBINDINGS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_KEYBINDINGS_PLUGIN)) +#define MSD_KEYBINDINGS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_KEYBINDINGS_PLUGIN, MsdKeybindingsPluginClass)) -typedef struct GsdKeybindingsPluginPrivate GsdKeybindingsPluginPrivate; +typedef struct MsdKeybindingsPluginPrivate MsdKeybindingsPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdKeybindingsPluginPrivate *priv; -} GsdKeybindingsPlugin; + MsdKeybindingsPluginPrivate *priv; +} MsdKeybindingsPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdKeybindingsPluginClass; +} MsdKeybindingsPluginClass; -GType gsd_keybindings_plugin_get_type (void) G_GNUC_CONST; +GType msd_keybindings_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_KEYBINDINGS_PLUGIN_H__ */ +#endif /* __MSD_KEYBINDINGS_PLUGIN_H__ */ diff --git a/plugins/keyboard/Makefile.am b/plugins/keyboard/Makefile.am index fdad2a8..327ad7e 100644 --- a/plugins/keyboard/Makefile.am +++ b/plugins/keyboard/Makefile.am @@ -17,14 +17,14 @@ uidir = $(pkgdatadir) ui_DATA = modmap-dialog.ui libkeyboard_la_SOURCES = \ - gsd-keyboard-plugin.h \ - gsd-keyboard-plugin.c \ - gsd-keyboard-manager.h \ - gsd-keyboard-manager.c \ - gsd-keyboard-xkb.h \ - gsd-keyboard-xkb.c \ - gsd-xmodmap.h \ - gsd-xmodmap.c \ + msd-keyboard-plugin.h \ + msd-keyboard-plugin.c \ + msd-keyboard-manager.h \ + msd-keyboard-manager.c \ + msd-keyboard-xkb.h \ + msd-keyboard-xkb.c \ + msd-xmodmap.h \ + msd-xmodmap.c \ delayed-dialog.h \ delayed-dialog.c \ $(NULL) @@ -41,7 +41,7 @@ libkeyboard_la_CFLAGS = \ $(AM_CFLAGS) libkeyboard_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libkeyboard_la_LIBADD = \ @@ -70,4 +70,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/keyboard/delayed-dialog.c b/plugins/keyboard/delayed-dialog.c index 1aa13e1..acbb99a 100644 --- a/plugins/keyboard/delayed-dialog.c +++ b/plugins/keyboard/delayed-dialog.c @@ -33,7 +33,7 @@ static GdkFilterReturn message_filter (GdkXEvent *xevent, static GSList *dialogs = NULL; /** - * gsd_delayed_show_dialog: + * msd_delayed_show_dialog: * @dialog: the dialog * * Shows the dialog as with gtk_widget_show(), unless a window manager @@ -41,7 +41,7 @@ static GSList *dialogs = NULL; * for that to happen before showing the dialog. **/ void -gsd_delayed_show_dialog (GtkWidget *dialog) +msd_delayed_show_dialog (GtkWidget *dialog) { GdkDisplay *display = gtk_widget_get_display (dialog); Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); diff --git a/plugins/keyboard/delayed-dialog.h b/plugins/keyboard/delayed-dialog.h index 353dbe6..a28bf90 100644 --- a/plugins/keyboard/delayed-dialog.h +++ b/plugins/keyboard/delayed-dialog.h @@ -27,7 +27,7 @@ extern "C" { #endif -void gsd_delayed_show_dialog (GtkWidget *dialog); +void msd_delayed_show_dialog (GtkWidget *dialog); #ifdef __cplusplus } diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c index 24d6729..0969459 100644 --- a/plugins/keyboard/gsd-keyboard-manager.c +++ b/plugins/keyboard/gsd-keyboard-manager.c @@ -47,42 +47,42 @@ #endif #include "mate-settings-profile.h" -#include "gsd-keyboard-manager.h" +#include "msd-keyboard-manager.h" -#include "gsd-keyboard-xkb.h" -#include "gsd-xmodmap.h" +#include "msd-keyboard-xkb.h" +#include "msd-xmodmap.h" -#define GSD_KEYBOARD_MANAGER_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE((o), GSD_TYPE_KEYBOARD_MANAGER, GsdKeyboardManagerPrivate)) +#define MSD_KEYBOARD_MANAGER_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE((o), MSD_TYPE_KEYBOARD_MANAGER, MsdKeyboardManagerPrivate)) #ifndef HOST_NAME_MAX #define HOST_NAME_MAX 255 #endif -#define GSD_KEYBOARD_KEY "/desktop/mate/peripherals/keyboard" +#define MSD_KEYBOARD_KEY "/desktop/mate/peripherals/keyboard" -#define KEY_REPEAT GSD_KEYBOARD_KEY "/repeat" -#define KEY_CLICK GSD_KEYBOARD_KEY "/click" -#define KEY_RATE GSD_KEYBOARD_KEY "/rate" -#define KEY_DELAY GSD_KEYBOARD_KEY "/delay" -#define KEY_CLICK_VOLUME GSD_KEYBOARD_KEY "/click_volume" +#define KEY_REPEAT MSD_KEYBOARD_KEY "/repeat" +#define KEY_CLICK MSD_KEYBOARD_KEY "/click" +#define KEY_RATE MSD_KEYBOARD_KEY "/rate" +#define KEY_DELAY MSD_KEYBOARD_KEY "/delay" +#define KEY_CLICK_VOLUME MSD_KEYBOARD_KEY "/click_volume" -#define KEY_BELL_VOLUME GSD_KEYBOARD_KEY "/bell_volume" -#define KEY_BELL_PITCH GSD_KEYBOARD_KEY "/bell_pitch" -#define KEY_BELL_DURATION GSD_KEYBOARD_KEY "/bell_duration" -#define KEY_BELL_MODE GSD_KEYBOARD_KEY "/bell_mode" +#define KEY_BELL_VOLUME MSD_KEYBOARD_KEY "/bell_volume" +#define KEY_BELL_PITCH MSD_KEYBOARD_KEY "/bell_pitch" +#define KEY_BELL_DURATION MSD_KEYBOARD_KEY "/bell_duration" +#define KEY_BELL_MODE MSD_KEYBOARD_KEY "/bell_mode" -struct GsdKeyboardManagerPrivate { +struct MsdKeyboardManagerPrivate { gboolean have_xkb; gint xkb_event_base; guint notify; }; -static void gsd_keyboard_manager_class_init (GsdKeyboardManagerClass* klass); -static void gsd_keyboard_manager_init (GsdKeyboardManager* keyboard_manager); -static void gsd_keyboard_manager_finalize (GObject* object); +static void msd_keyboard_manager_class_init (MsdKeyboardManagerClass* klass); +static void msd_keyboard_manager_init (MsdKeyboardManager* keyboard_manager); +static void msd_keyboard_manager_finalize (GObject* object); -G_DEFINE_TYPE (GsdKeyboardManager, gsd_keyboard_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdKeyboardManager, msd_keyboard_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -126,7 +126,7 @@ static gboolean xkb_set_keyboard_autorepeat_rate(int delay, int rate) } #endif -static char* gsd_keyboard_get_hostname_key (const char *subkey) +static char* msd_keyboard_get_hostname_key (const char *subkey) { char hostname[HOST_NAME_MAX + 1]; @@ -137,7 +137,7 @@ static char* gsd_keyboard_get_hostname_key (const char *subkey) char *key; escaped = mateconf_escape_key (hostname, -1); - key = g_strconcat (GSD_KEYBOARD_KEY + key = g_strconcat (MSD_KEYBOARD_KEY "/host-", escaped, "/0/", @@ -158,7 +158,7 @@ typedef enum { } NumLockState; static void -numlock_xkb_init (GsdKeyboardManager *manager) +numlock_xkb_init (MsdKeyboardManager *manager) { Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); gboolean have_xkb; @@ -206,7 +206,7 @@ numlock_set_xkb_state (NumLockState new_state) static char * numlock_mateconf_state_key (void) { - char *key = gsd_keyboard_get_hostname_key ("numlock_on"); + char *key = msd_keyboard_get_hostname_key ("numlock_on"); if (!key) { g_message ("NumLock remembering disabled because hostname is set to \"localhost\""); } @@ -274,7 +274,7 @@ numlock_xkb_callback (GdkXEvent *xev_, } static void -numlock_install_xkb_callback (GsdKeyboardManager *manager) +numlock_install_xkb_callback (MsdKeyboardManager *manager) { if (!manager->priv->have_xkb) return; @@ -290,7 +290,7 @@ static void apply_settings (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdKeyboardManager *manager) + MsdKeyboardManager *manager) { XKeyboardControl kbdcontrol; gboolean repeat; @@ -322,7 +322,7 @@ apply_settings (MateConfClient *client, g_free (volume_string); #ifdef HAVE_X11_EXTENSIONS_XKB_H - rnumlock = mateconf_client_get_bool (client, GSD_KEYBOARD_KEY "/remember_numlock_state", NULL); + rnumlock = mateconf_client_get_bool (client, MSD_KEYBOARD_KEY "/remember_numlock_state", NULL); #endif /* HAVE_X11_EXTENSIONS_XKB_H */ gdk_error_trap_push (); @@ -370,7 +370,7 @@ apply_settings (MateConfClient *client, } void -gsd_keyboard_manager_apply_settings (GsdKeyboardManager *manager) +msd_keyboard_manager_apply_settings (MsdKeyboardManager *manager) { MateConfClient *client; @@ -380,7 +380,7 @@ gsd_keyboard_manager_apply_settings (GsdKeyboardManager *manager) } static gboolean -start_keyboard_idle_cb (GsdKeyboardManager *manager) +start_keyboard_idle_cb (MsdKeyboardManager *manager) { MateConfClient *client; @@ -391,20 +391,20 @@ start_keyboard_idle_cb (GsdKeyboardManager *manager) manager->priv->have_xkb = 0; client = mateconf_client_get_default (); - mateconf_client_add_dir (client, GSD_KEYBOARD_KEY, MATECONF_CLIENT_PRELOAD_RECURSIVE, NULL); + mateconf_client_add_dir (client, MSD_KEYBOARD_KEY, MATECONF_CLIENT_PRELOAD_RECURSIVE, NULL); /* Essential - xkb initialization should happen before */ - gsd_keyboard_xkb_set_post_activation_callback ((PostActivationCallback) gsd_load_modmap_files, NULL); - gsd_keyboard_xkb_init (client, manager); + msd_keyboard_xkb_set_post_activation_callback ((PostActivationCallback) msd_load_modmap_files, NULL); + msd_keyboard_xkb_init (client, manager); #ifdef HAVE_X11_EXTENSIONS_XKB_H numlock_xkb_init (manager); #endif /* HAVE_X11_EXTENSIONS_XKB_H */ /* apply current settings before we install the callback */ - gsd_keyboard_manager_apply_settings (manager); + msd_keyboard_manager_apply_settings (manager); - manager->priv->notify = mateconf_client_notify_add (client, GSD_KEYBOARD_KEY, + manager->priv->notify = mateconf_client_notify_add (client, MSD_KEYBOARD_KEY, (MateConfClientNotifyFunc) apply_settings, manager, NULL, NULL); @@ -420,7 +420,7 @@ start_keyboard_idle_cb (GsdKeyboardManager *manager) } gboolean -gsd_keyboard_manager_start (GsdKeyboardManager *manager, +msd_keyboard_manager_start (MsdKeyboardManager *manager, GError **error) { mate_settings_profile_start (NULL); @@ -433,15 +433,15 @@ gsd_keyboard_manager_start (GsdKeyboardManager *manager, } void -gsd_keyboard_manager_stop (GsdKeyboardManager *manager) +msd_keyboard_manager_stop (MsdKeyboardManager *manager) { - GsdKeyboardManagerPrivate *p = manager->priv; + MsdKeyboardManagerPrivate *p = manager->priv; g_debug ("Stopping keyboard manager"); if (p->notify != 0) { MateConfClient *client = mateconf_client_get_default (); - mateconf_client_remove_dir (client, GSD_KEYBOARD_KEY, NULL); + mateconf_client_remove_dir (client, MSD_KEYBOARD_KEY, NULL); mateconf_client_notify_remove (client, p->notify); g_object_unref (client); p->notify = 0; @@ -455,18 +455,18 @@ gsd_keyboard_manager_stop (GsdKeyboardManager *manager) } #endif /* HAVE_X11_EXTENSIONS_XKB_H */ - gsd_keyboard_xkb_shutdown (); + msd_keyboard_xkb_shutdown (); } static void -gsd_keyboard_manager_set_property (GObject *object, +msd_keyboard_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdKeyboardManager *self; + MsdKeyboardManager *self; - self = GSD_KEYBOARD_MANAGER (object); + self = MSD_KEYBOARD_MANAGER (object); switch (prop_id) { default: @@ -476,14 +476,14 @@ gsd_keyboard_manager_set_property (GObject *object, } static void -gsd_keyboard_manager_get_property (GObject *object, +msd_keyboard_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdKeyboardManager *self; + MsdKeyboardManager *self; - self = GSD_KEYBOARD_MANAGER (object); + self = MSD_KEYBOARD_MANAGER (object); switch (prop_id) { default: @@ -493,16 +493,16 @@ gsd_keyboard_manager_get_property (GObject *object, } static GObject * -gsd_keyboard_manager_constructor (GType type, +msd_keyboard_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdKeyboardManager *keyboard_manager; - GsdKeyboardManagerClass *klass; + MsdKeyboardManager *keyboard_manager; + MsdKeyboardManagerClass *klass; - klass = GSD_KEYBOARD_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_KEYBOARD_MANAGER)); + klass = MSD_KEYBOARD_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_KEYBOARD_MANAGER)); - keyboard_manager = GSD_KEYBOARD_MANAGER (G_OBJECT_CLASS (gsd_keyboard_manager_parent_class)->constructor (type, + keyboard_manager = MSD_KEYBOARD_MANAGER (G_OBJECT_CLASS (msd_keyboard_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -510,60 +510,60 @@ gsd_keyboard_manager_constructor (GType type, } static void -gsd_keyboard_manager_dispose (GObject *object) +msd_keyboard_manager_dispose (GObject *object) { - GsdKeyboardManager *keyboard_manager; + MsdKeyboardManager *keyboard_manager; - keyboard_manager = GSD_KEYBOARD_MANAGER (object); + keyboard_manager = MSD_KEYBOARD_MANAGER (object); - G_OBJECT_CLASS (gsd_keyboard_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_keyboard_manager_parent_class)->dispose (object); } static void -gsd_keyboard_manager_class_init (GsdKeyboardManagerClass *klass) +msd_keyboard_manager_class_init (MsdKeyboardManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_keyboard_manager_get_property; - object_class->set_property = gsd_keyboard_manager_set_property; - object_class->constructor = gsd_keyboard_manager_constructor; - object_class->dispose = gsd_keyboard_manager_dispose; - object_class->finalize = gsd_keyboard_manager_finalize; + object_class->get_property = msd_keyboard_manager_get_property; + object_class->set_property = msd_keyboard_manager_set_property; + object_class->constructor = msd_keyboard_manager_constructor; + object_class->dispose = msd_keyboard_manager_dispose; + object_class->finalize = msd_keyboard_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdKeyboardManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdKeyboardManagerPrivate)); } static void -gsd_keyboard_manager_init (GsdKeyboardManager *manager) +msd_keyboard_manager_init (MsdKeyboardManager *manager) { - manager->priv = GSD_KEYBOARD_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_KEYBOARD_MANAGER_GET_PRIVATE (manager); } static void -gsd_keyboard_manager_finalize (GObject *object) +msd_keyboard_manager_finalize (GObject *object) { - GsdKeyboardManager *keyboard_manager; + MsdKeyboardManager *keyboard_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_KEYBOARD_MANAGER (object)); + g_return_if_fail (MSD_IS_KEYBOARD_MANAGER (object)); - keyboard_manager = GSD_KEYBOARD_MANAGER (object); + keyboard_manager = MSD_KEYBOARD_MANAGER (object); g_return_if_fail (keyboard_manager->priv != NULL); - G_OBJECT_CLASS (gsd_keyboard_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_keyboard_manager_parent_class)->finalize (object); } -GsdKeyboardManager * -gsd_keyboard_manager_new (void) +MsdKeyboardManager * +msd_keyboard_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_KEYBOARD_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_KEYBOARD_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_KEYBOARD_MANAGER (manager_object); + return MSD_KEYBOARD_MANAGER (manager_object); } diff --git a/plugins/keyboard/gsd-keyboard-manager.h b/plugins/keyboard/gsd-keyboard-manager.h index a518e9a..aa3ae95 100644 --- a/plugins/keyboard/gsd-keyboard-manager.h +++ b/plugins/keyboard/gsd-keyboard-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_KEYBOARD_MANAGER_H -#define __GSD_KEYBOARD_MANAGER_H +#ifndef __MSD_KEYBOARD_MANAGER_H +#define __MSD_KEYBOARD_MANAGER_H #include <glib-object.h> @@ -27,36 +27,36 @@ extern "C" { #endif -#define GSD_TYPE_KEYBOARD_MANAGER (gsd_keyboard_manager_get_type ()) -#define GSD_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_KEYBOARD_MANAGER, GsdKeyboardManager)) -#define GSD_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_KEYBOARD_MANAGER, GsdKeyboardManagerClass)) -#define GSD_IS_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_KEYBOARD_MANAGER)) -#define GSD_IS_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_KEYBOARD_MANAGER)) -#define GSD_KEYBOARD_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_KEYBOARD_MANAGER, GsdKeyboardManagerClass)) +#define MSD_TYPE_KEYBOARD_MANAGER (msd_keyboard_manager_get_type ()) +#define MSD_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_KEYBOARD_MANAGER, MsdKeyboardManager)) +#define MSD_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_KEYBOARD_MANAGER, MsdKeyboardManagerClass)) +#define MSD_IS_KEYBOARD_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_KEYBOARD_MANAGER)) +#define MSD_IS_KEYBOARD_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_KEYBOARD_MANAGER)) +#define MSD_KEYBOARD_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_KEYBOARD_MANAGER, MsdKeyboardManagerClass)) -typedef struct GsdKeyboardManagerPrivate GsdKeyboardManagerPrivate; +typedef struct MsdKeyboardManagerPrivate MsdKeyboardManagerPrivate; typedef struct { GObject parent; - GsdKeyboardManagerPrivate *priv; -} GsdKeyboardManager; + MsdKeyboardManagerPrivate *priv; +} MsdKeyboardManager; typedef struct { GObjectClass parent_class; -} GsdKeyboardManagerClass; +} MsdKeyboardManagerClass; -GType gsd_keyboard_manager_get_type (void); +GType msd_keyboard_manager_get_type (void); -GsdKeyboardManager * gsd_keyboard_manager_new (void); -gboolean gsd_keyboard_manager_start (GsdKeyboardManager *manager, +MsdKeyboardManager * msd_keyboard_manager_new (void); +gboolean msd_keyboard_manager_start (MsdKeyboardManager *manager, GError **error); -void gsd_keyboard_manager_stop (GsdKeyboardManager *manager); -void gsd_keyboard_manager_apply_settings (GsdKeyboardManager *manager); +void msd_keyboard_manager_stop (MsdKeyboardManager *manager); +void msd_keyboard_manager_apply_settings (MsdKeyboardManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_KEYBOARD_MANAGER_H */ +#endif /* __MSD_KEYBOARD_MANAGER_H */ diff --git a/plugins/keyboard/gsd-keyboard-plugin.c b/plugins/keyboard/gsd-keyboard-plugin.c index b501d80..5f89ca2 100644 --- a/plugins/keyboard/gsd-keyboard-plugin.c +++ b/plugins/keyboard/gsd-keyboard-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-keyboard-plugin.h" -#include "gsd-keyboard-manager.h" +#include "msd-keyboard-plugin.h" +#include "msd-keyboard-manager.h" -struct GsdKeyboardPluginPrivate { - GsdKeyboardManager *manager; +struct MsdKeyboardPluginPrivate { + MsdKeyboardManager *manager; }; -#define GSD_KEYBOARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_KEYBOARD_PLUGIN, GsdKeyboardPluginPrivate)) +#define MSD_KEYBOARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_KEYBOARD_PLUGIN, MsdKeyboardPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdKeyboardPlugin, gsd_keyboard_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdKeyboardPlugin, msd_keyboard_plugin) static void -gsd_keyboard_plugin_init (GsdKeyboardPlugin *plugin) +msd_keyboard_plugin_init (MsdKeyboardPlugin *plugin) { - plugin->priv = GSD_KEYBOARD_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_KEYBOARD_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdKeyboardPlugin initializing"); + g_debug ("MsdKeyboardPlugin initializing"); - plugin->priv->manager = gsd_keyboard_manager_new (); + plugin->priv->manager = msd_keyboard_manager_new (); } static void -gsd_keyboard_plugin_finalize (GObject *object) +msd_keyboard_plugin_finalize (GObject *object) { - GsdKeyboardPlugin *plugin; + MsdKeyboardPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_KEYBOARD_PLUGIN (object)); + g_return_if_fail (MSD_IS_KEYBOARD_PLUGIN (object)); - g_debug ("GsdKeyboardPlugin finalizing"); + g_debug ("MsdKeyboardPlugin finalizing"); - plugin = GSD_KEYBOARD_PLUGIN (object); + plugin = MSD_KEYBOARD_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_keyboard_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_keyboard_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_keyboard_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating keyboard plugin"); error = NULL; - res = gsd_keyboard_manager_start (GSD_KEYBOARD_PLUGIN (plugin)->priv->manager, &error); + res = msd_keyboard_manager_start (MSD_KEYBOARD_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start keyboard manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating keyboard plugin"); - gsd_keyboard_manager_stop (GSD_KEYBOARD_PLUGIN (plugin)->priv->manager); + msd_keyboard_manager_stop (MSD_KEYBOARD_PLUGIN (plugin)->priv->manager); } static void -gsd_keyboard_plugin_class_init (GsdKeyboardPluginClass *klass) +msd_keyboard_plugin_class_init (MsdKeyboardPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_keyboard_plugin_finalize; + object_class->finalize = msd_keyboard_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdKeyboardPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdKeyboardPluginPrivate)); } diff --git a/plugins/keyboard/gsd-keyboard-plugin.h b/plugins/keyboard/gsd-keyboard-plugin.h index 3d25861..84f2420 100644 --- a/plugins/keyboard/gsd-keyboard-plugin.h +++ b/plugins/keyboard/gsd-keyboard-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_KEYBOARD_PLUGIN_H__ -#define __GSD_KEYBOARD_PLUGIN_H__ +#ifndef __MSD_KEYBOARD_PLUGIN_H__ +#define __MSD_KEYBOARD_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_KEYBOARD_PLUGIN (gsd_keyboard_plugin_get_type ()) -#define GSD_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_KEYBOARD_PLUGIN, GsdKeyboardPlugin)) -#define GSD_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_KEYBOARD_PLUGIN, GsdKeyboardPluginClass)) -#define GSD_IS_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_KEYBOARD_PLUGIN)) -#define GSD_IS_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_KEYBOARD_PLUGIN)) -#define GSD_KEYBOARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_KEYBOARD_PLUGIN, GsdKeyboardPluginClass)) +#define MSD_TYPE_KEYBOARD_PLUGIN (msd_keyboard_plugin_get_type ()) +#define MSD_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_KEYBOARD_PLUGIN, MsdKeyboardPlugin)) +#define MSD_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_KEYBOARD_PLUGIN, MsdKeyboardPluginClass)) +#define MSD_IS_KEYBOARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_KEYBOARD_PLUGIN)) +#define MSD_IS_KEYBOARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_KEYBOARD_PLUGIN)) +#define MSD_KEYBOARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_KEYBOARD_PLUGIN, MsdKeyboardPluginClass)) -typedef struct GsdKeyboardPluginPrivate GsdKeyboardPluginPrivate; +typedef struct MsdKeyboardPluginPrivate MsdKeyboardPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdKeyboardPluginPrivate *priv; -} GsdKeyboardPlugin; + MsdKeyboardPluginPrivate *priv; +} MsdKeyboardPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdKeyboardPluginClass; +} MsdKeyboardPluginClass; -GType gsd_keyboard_plugin_get_type (void) G_GNUC_CONST; +GType msd_keyboard_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_KEYBOARD_PLUGIN_H__ */ +#endif /* __MSD_KEYBOARD_PLUGIN_H__ */ diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c index 0808272..9042f03 100644 --- a/plugins/keyboard/gsd-keyboard-xkb.c +++ b/plugins/keyboard/gsd-keyboard-xkb.c @@ -37,14 +37,14 @@ #include <libmatekbd/matekbd-keyboard-config.h> #include <libmatekbd/matekbd-util.h> -#include "gsd-xmodmap.h" -#include "gsd-keyboard-xkb.h" +#include "msd-xmodmap.h" +#include "msd-keyboard-xkb.h" #include "delayed-dialog.h" #include "mate-settings-profile.h" #define GTK_RESPONSE_PRINT 2 -static GsdKeyboardManager* manager = NULL; +static MsdKeyboardManager* manager = NULL; static XklEngine* xkl_engine; static XklConfigRegistry* xkl_registry = NULL; @@ -92,12 +92,12 @@ static const gchar* indicator_off_icon_names[] = { "kbd-capslock-off" }; -//#define noGSDKX +//#define noMSDKX -#ifdef GSDKX +#ifdef MSDKX static FILE *logfile; -static void gsd_keyboard_log_appender(const char file[], const char function[], int level, const char format[], va_list args) +static void msd_keyboard_log_appender(const char file[], const char function[], int level, const char format[], va_list args) { time_t now = time (NULL); fprintf (logfile, "[%08ld,%03d,%s:%s/] \t", now, @@ -150,7 +150,7 @@ activation_error (void) "mateconftool-2 -R /desktop/mate/peripherals/keyboard/kbd"); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); - gsd_delayed_show_dialog (dialog); + msd_delayed_show_dialog (dialog); } static void @@ -162,7 +162,7 @@ apply_desktop_settings (void) if (!inited_ok) return; - gsd_keyboard_manager_apply_settings (manager); + msd_keyboard_manager_apply_settings (manager); matekbd_desktop_config_load_from_mateconf (¤t_config); /* again, probably it would be nice to compare things before activating them */ @@ -600,7 +600,7 @@ apply_xkb_settings (void) } static void -gsd_keyboard_xkb_analyze_sysconfig (void) +msd_keyboard_xkb_analyze_sysconfig (void) { MateConfClient *conf_client; @@ -616,7 +616,7 @@ gsd_keyboard_xkb_analyze_sysconfig (void) } static gboolean -gsd_chk_file_list (void) +msd_chk_file_list (void) { GDir *home_dir; const char *fname; @@ -684,16 +684,16 @@ gsd_chk_file_list (void) } static void -gsd_keyboard_xkb_chk_lcl_xmm (void) +msd_keyboard_xkb_chk_lcl_xmm (void) { - if (gsd_chk_file_list ()) { - gsd_modmap_dialog_call (); + if (msd_chk_file_list ()) { + msd_modmap_dialog_call (); } - gsd_load_modmap_files (); + msd_load_modmap_files (); } void -gsd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun, +msd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun, void *user_data) { pa_callback = fun; @@ -701,7 +701,7 @@ gsd_keyboard_xkb_set_post_activation_callback (PostActivationCallback fun, } static GdkFilterReturn -gsd_keyboard_xkb_evt_filter (GdkXEvent * xev, GdkEvent * event) +msd_keyboard_xkb_evt_filter (GdkXEvent * xev, GdkEvent * event) { XEvent *xevent = (XEvent *) xev; xkl_engine_filter_events (xkl_engine, xevent); @@ -720,14 +720,14 @@ register_config_callback (MateConfClient * client, /* When new Keyboard is plugged in - reload the settings */ static void -gsd_keyboard_new_device (XklEngine * engine) +msd_keyboard_new_device (XklEngine * engine) { apply_desktop_settings (); apply_xkb_settings (); } static void -gsd_keyboard_update_indicator_icons () +msd_keyboard_update_indicator_icons () { Bool state; int new_state, i; @@ -758,20 +758,20 @@ gsd_keyboard_update_indicator_icons () } static void -gsd_keyboard_state_changed (XklEngine * engine, XklEngineStateChange type, +msd_keyboard_state_changed (XklEngine * engine, XklEngineStateChange type, gint new_group, gboolean restore) { xkl_debug (160, "State changed: type %d, new group: %d, restore: %d.\n", type, new_group, restore); if (type == INDICATORS_CHANGED) { - gsd_keyboard_update_indicator_icons (); + msd_keyboard_update_indicator_icons (); } } void -gsd_keyboard_xkb_init (MateConfClient * client, - GsdKeyboardManager * kbd_manager) +msd_keyboard_xkb_init (MateConfClient * client, + MsdKeyboardManager * kbd_manager) { int i; Display *display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); @@ -792,12 +792,12 @@ gsd_keyboard_xkb_init (MateConfClient * client, (indicator_off_icon_names[i]); } - gsd_keyboard_update_indicator_icons (); + msd_keyboard_update_indicator_icons (); -#ifdef GSDKX +#ifdef MSDKX xkl_set_debug_level (200); - logfile = fopen ("/tmp/gsdkx.log", "a"); - xkl_set_log_appender (gsd_keyboard_log_appender); + logfile = fopen ("/tmp/msdkx.log", "a"); + xkl_set_log_appender (msd_keyboard_log_appender); #endif manager = kbd_manager; mate_settings_profile_start ("xkl_engine_get_instance"); @@ -813,12 +813,12 @@ gsd_keyboard_xkb_init (MateConfClient * client, matekbd_keyboard_config_init (¤t_kbd_config, client, xkl_engine); xkl_engine_backup_names_prop (xkl_engine); - gsd_keyboard_xkb_analyze_sysconfig (); + msd_keyboard_xkb_analyze_sysconfig (); mate_settings_profile_start - ("gsd_keyboard_xkb_chk_lcl_xmm"); - gsd_keyboard_xkb_chk_lcl_xmm (); + ("msd_keyboard_xkb_chk_lcl_xmm"); + msd_keyboard_xkb_chk_lcl_xmm (); mate_settings_profile_end - ("gsd_keyboard_xkb_chk_lcl_xmm"); + ("msd_keyboard_xkb_chk_lcl_xmm"); notify_desktop = register_config_callback (client, @@ -833,16 +833,16 @@ gsd_keyboard_xkb_init (MateConfClient * client, apply_xkb_settings); gdk_window_add_filter (NULL, (GdkFilterFunc) - gsd_keyboard_xkb_evt_filter, NULL); + msd_keyboard_xkb_evt_filter, NULL); if (xkl_engine_get_features (xkl_engine) & XKLF_DEVICE_DISCOVERY) g_signal_connect (xkl_engine, "X-new-device", G_CALLBACK - (gsd_keyboard_new_device), NULL); + (msd_keyboard_new_device), NULL); g_signal_connect (xkl_engine, "X-state-changed", G_CALLBACK - (gsd_keyboard_state_changed), NULL); + (msd_keyboard_state_changed), NULL); mate_settings_profile_start ("xkl_engine_start_listen"); xkl_engine_start_listen (xkl_engine, @@ -863,7 +863,7 @@ gsd_keyboard_xkb_init (MateConfClient * client, } void -gsd_keyboard_xkb_shutdown (void) +msd_keyboard_xkb_shutdown (void) { MateConfClient *client; int i; @@ -888,7 +888,7 @@ gsd_keyboard_xkb_shutdown (void) XKLL_MANAGE_WINDOW_STATES); gdk_window_remove_filter (NULL, (GdkFilterFunc) - gsd_keyboard_xkb_evt_filter, NULL); + msd_keyboard_xkb_evt_filter, NULL); client = mateconf_client_get_default (); diff --git a/plugins/keyboard/gsd-keyboard-xkb.h b/plugins/keyboard/gsd-keyboard-xkb.h index 41a50c6..7d2d558 100644 --- a/plugins/keyboard/gsd-keyboard-xkb.h +++ b/plugins/keyboard/gsd-keyboard-xkb.h @@ -21,20 +21,20 @@ * 02111-1307, USA. */ -#ifndef __GSD_KEYBOARD_XKB_H -#define __GSD_KEYBOARD_XKB_H +#ifndef __MSD_KEYBOARD_XKB_H +#define __MSD_KEYBOARD_XKB_H #include <mateconf/mateconf.h> #include <mateconf/mateconf-client.h> #include <libxklavier/xklavier.h> -#include "gsd-keyboard-manager.h" +#include "msd-keyboard-manager.h" -void gsd_keyboard_xkb_init(MateConfClient* client, GsdKeyboardManager* manager); -void gsd_keyboard_xkb_shutdown(void); +void msd_keyboard_xkb_init(MateConfClient* client, MsdKeyboardManager* manager); +void msd_keyboard_xkb_shutdown(void); typedef void (*PostActivationCallback) (void* userData); -void gsd_keyboard_xkb_set_post_activation_callback(PostActivationCallback fun, void* userData); +void msd_keyboard_xkb_set_post_activation_callback(PostActivationCallback fun, void* userData); #endif diff --git a/plugins/keyboard/gsd-xmodmap.c b/plugins/keyboard/gsd-xmodmap.c index b9ffc9c..5baf37c 100644 --- a/plugins/keyboard/gsd-xmodmap.c +++ b/plugins/keyboard/gsd-xmodmap.c @@ -28,7 +28,7 @@ #include <gtk/gtk.h> #include <mateconf/mateconf-client.h> -#include "gsd-xmodmap.h" +#include "msd-xmodmap.h" static const char DISABLE_XMM_WARNING_KEY[] = "/desktop/mate/peripherals/keyboard/disable_xmm_and_xkb_warning"; @@ -54,7 +54,7 @@ check_button_callback (GtkWidget *chk_button, } void -gsd_load_modmap_files (void) +msd_load_modmap_files (void) { MateConfClient *client; GSList *tmp; @@ -90,7 +90,7 @@ response_callback (GtkWidget *dialog, if (id == GTK_RESPONSE_OK) { GtkWidget *chk_button = g_object_get_data (G_OBJECT (dialog), "check_button"); check_button_callback (chk_button, NULL); - gsd_load_modmap_files (); + msd_load_modmap_files (); } gtk_widget_destroy (dialog); } @@ -256,7 +256,7 @@ out: } void -gsd_modmap_dialog_call (void) +msd_modmap_dialog_call (void) { GtkBuilder *builder; guint res; diff --git a/plugins/keyboard/gsd-xmodmap.h b/plugins/keyboard/gsd-xmodmap.h index 7cfff74..04b4505 100644 --- a/plugins/keyboard/gsd-xmodmap.h +++ b/plugins/keyboard/gsd-xmodmap.h @@ -23,7 +23,7 @@ #ifndef XMODMAP_H #define XMODMAP_H -void gsd_load_modmap_files (void); -void gsd_modmap_dialog_call (void); +void msd_load_modmap_files (void); +void msd_modmap_dialog_call (void); #endif diff --git a/plugins/media-keys/Makefile.am b/plugins/media-keys/Makefile.am index 3a2f65e..9bd9553 100644 --- a/plugins/media-keys/Makefile.am +++ b/plugins/media-keys/Makefile.am @@ -7,9 +7,9 @@ SUBDIRS = cut-n-paste plugin_LTLIBRARIES = libmedia-keys.la BUILT_SOURCES = \ - gsd-media-keys-manager-glue.h \ - gsd-marshal.h \ - gsd-marshal.c \ + msd-media-keys-manager-glue.h \ + msd-marshal.h \ + msd-marshal.c \ $(NULL) ICON_FILES = \ @@ -55,24 +55,24 @@ uninstall-local: rm -f $(DESTDIR)$(icondir)/32x32/$(context)/touchpad-disabled.png rm -f $(DESTDIR)$(icondir)/scalable/$(context)/touchpad-disabled.svg -gsd-media-keys-manager-glue.h: gsd-media-keys-manager.xml Makefile - dbus-binding-tool --prefix=gsd_media_keys_manager --mode=glib-server $< > xgen-$(@F) \ +msd-media-keys-manager-glue.h: msd-media-keys-manager.xml Makefile + dbus-binding-tool --prefix=msd_media_keys_manager --mode=glib-server $< > xgen-$(@F) \ && ( cmp -s xgen-$(@F) $@ || cp xgen-$(@F) $@ ) \ && rm -f xgen-$(@F) -gsd-marshal.c: gsd-marshal.list - $(GLIB_GENMARSHAL) --prefix=gsd_marshal $< --header --body --internal > $@ +msd-marshal.c: msd-marshal.list + $(GLIB_GENMARSHAL) --prefix=msd_marshal $< --header --body --internal > $@ -gsd-marshal.h: gsd-marshal.list - $(GLIB_GENMARSHAL) --prefix=gsd_marshal $< --header --internal > $@ +msd-marshal.h: msd-marshal.list + $(GLIB_GENMARSHAL) --prefix=msd_marshal $< --header --internal > $@ libmedia_keys_la_SOURCES = \ - gsd-media-keys-plugin.h \ - gsd-media-keys-plugin.c \ - gsd-media-keys-manager.h \ - gsd-media-keys-manager.c \ - gsd-media-keys-window.h \ - gsd-media-keys-window.c \ + msd-media-keys-plugin.h \ + msd-media-keys-plugin.c \ + msd-media-keys-manager.h \ + msd-media-keys-manager.c \ + msd-media-keys-window.h \ + msd-media-keys-window.c \ acme.h \ $(BUILT_SOURCES) \ $(NULL) @@ -91,7 +91,7 @@ libmedia_keys_la_CFLAGS = \ $(AM_CFLAGS) libmedia_keys_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) + $(MSD_PLUGIN_LDFLAGS) libmedia_keys_la_LIBADD = \ $(top_builddir)/plugins/common/libcommon.la \ @@ -111,8 +111,8 @@ noinst_PROGRAMS = \ $(NULL) test_media_window_SOURCES = \ - gsd-media-keys-window.c \ - gsd-media-keys-window.h \ + msd-media-keys-window.c \ + msd-media-keys-window.h \ test-media-window.c \ $(NULL) @@ -139,10 +139,10 @@ test_media_window_LDADD = \ -lm test_media_keys_SOURCES = \ - gsd-media-keys-manager.c \ - gsd-media-keys-manager.h \ - gsd-media-keys-window.h \ - gsd-media-keys-window.c \ + msd-media-keys-manager.c \ + msd-media-keys-manager.h \ + msd-media-keys-window.h \ + msd-media-keys-window.c \ test-media-keys.c \ $(BUILT_SOURCES) \ $(NULL) @@ -161,7 +161,7 @@ test_media_keys_CFLAGS = \ $(AM_CFLAGS) test_media_keys_LDADD = \ - $(top_builddir)/mate-settings-daemon/libgsd-profile.la \ + $(top_builddir)/mate-settings-daemon/libmsd-profile.la \ $(top_builddir)/plugins/common/libcommon.la \ $(SETTINGS_DAEMON_LIBS) \ $(SETTINGS_PLUGIN_LIBS) \ @@ -179,8 +179,8 @@ gtkbuilder_DATA = \ DIST_SUBDIRS = cut-n-paste EXTRA_DIST = \ - gsd-media-keys-manager.xml \ - gsd-marshal.list \ + msd-media-keys-manager.xml \ + msd-marshal.list \ $(plugin_in_files) \ $(gtkbuilder_DATA) \ $(pixmaps_DATA) \ @@ -195,4 +195,4 @@ CLEANFILES = \ DISTCLEANFILES = \ $(plugin_DATA) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/media-keys/acme.h b/plugins/media-keys/acme.h index 66e13bc..41228e0 100644 --- a/plugins/media-keys/acme.h +++ b/plugins/media-keys/acme.h @@ -21,7 +21,7 @@ #ifndef __ACME_H__ #define __ACME_H__ -#include "gsd-keygrab.h" +#include "msd-keygrab.h" #define MATECONF_BINDING_DIR "/apps/mate_settings_daemon/keybindings" #define MATECONF_MISC_DIR "/apps/mate_settings_daemon" diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c index 1110dd5..d7e1b04 100644 --- a/plugins/media-keys/gsd-media-keys-manager.c +++ b/plugins/media-keys/gsd-media-keys-manager.c @@ -42,13 +42,13 @@ #include <dbus/dbus-glib-lowlevel.h> #include "mate-settings-profile.h" -#include "gsd-marshal.h" -#include "gsd-media-keys-manager.h" -#include "gsd-media-keys-manager-glue.h" +#include "msd-marshal.h" +#include "msd-media-keys-manager.h" +#include "msd-media-keys-manager-glue.h" #include "eggaccelerators.h" #include "acme.h" -#include "gsd-media-keys-window.h" +#include "msd-media-keys-window.h" #ifdef HAVE_PULSE #include <canberra-gtk.h> @@ -57,24 +57,24 @@ #include "gvc-gstreamer-acme-vol.h" #endif /* HAVE_PULSE */ -#define GSD_DBUS_PATH "/org/mate/SettingsDaemon" -#define GSD_DBUS_NAME "org.mate.SettingsDaemon" -#define GSD_MEDIA_KEYS_DBUS_PATH GSD_DBUS_PATH "/MediaKeys" -#define GSD_MEDIA_KEYS_DBUS_NAME GSD_DBUS_NAME ".MediaKeys" +#define MSD_DBUS_PATH "/org/mate/SettingsDaemon" +#define MSD_DBUS_NAME "org.mate.SettingsDaemon" +#define MSD_MEDIA_KEYS_DBUS_PATH MSD_DBUS_PATH "/MediaKeys" +#define MSD_MEDIA_KEYS_DBUS_NAME MSD_DBUS_NAME ".MediaKeys" #define TOUCHPAD_ENABLED_KEY "/desktop/mate/peripherals/touchpad/touchpad_enabled" #define VOLUME_STEP 6 /* percents for one volume button press */ #define MAX_VOLUME 65536.0 -#define GSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MEDIA_KEYS_MANAGER, GsdMediaKeysManagerPrivate)) +#define MSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_MEDIA_KEYS_MANAGER, MsdMediaKeysManagerPrivate)) typedef struct { char *application; guint32 time; } MediaPlayer; -struct GsdMediaKeysManagerPrivate +struct MsdMediaKeysManagerPrivate { #ifdef HAVE_PULSE /* Volume bits */ @@ -104,17 +104,17 @@ enum { static guint signals[LAST_SIGNAL] = { 0 }; -static void gsd_media_keys_manager_class_init (GsdMediaKeysManagerClass *klass); -static void gsd_media_keys_manager_init (GsdMediaKeysManager *media_keys_manager); -static void gsd_media_keys_manager_finalize (GObject *object); +static void msd_media_keys_manager_class_init (MsdMediaKeysManagerClass *klass); +static void msd_media_keys_manager_init (MsdMediaKeysManager *media_keys_manager); +static void msd_media_keys_manager_finalize (GObject *object); -G_DEFINE_TYPE (GsdMediaKeysManager, gsd_media_keys_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdMediaKeysManager, msd_media_keys_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; static void -init_screens (GsdMediaKeysManager *manager) +init_screens (MsdMediaKeysManager *manager) { GdkDisplay *display; int i; @@ -154,7 +154,7 @@ acme_error (char * msg) } static char * -get_term_command (GsdMediaKeysManager *manager) +get_term_command (MsdMediaKeysManager *manager) { char *cmd_term; char *cmd = NULL; @@ -180,7 +180,7 @@ get_term_command (GsdMediaKeysManager *manager) } static void -execute (GsdMediaKeysManager *manager, +execute (MsdMediaKeysManager *manager, char *cmd, gboolean sync, gboolean need_term) @@ -247,16 +247,16 @@ execute (GsdMediaKeysManager *manager, } static void -dialog_init (GsdMediaKeysManager *manager) +dialog_init (MsdMediaKeysManager *manager) { if (manager->priv->dialog != NULL - && !gsd_osd_window_is_valid (GSD_OSD_WINDOW (manager->priv->dialog))) { + && !msd_osd_window_is_valid (MSD_OSD_WINDOW (manager->priv->dialog))) { gtk_widget_destroy (manager->priv->dialog); manager->priv->dialog = NULL; } if (manager->priv->dialog == NULL) { - manager->priv->dialog = gsd_media_keys_window_new (); + manager->priv->dialog = msd_media_keys_window_new (); } } @@ -277,7 +277,7 @@ static void update_kbd_cb (MateConfClient *client, guint id, MateConfEntry *entry, - GsdMediaKeysManager *manager) + MsdMediaKeysManager *manager) { int i; gboolean need_flush = TRUE; @@ -331,7 +331,7 @@ update_kbd_cb (MateConfClient *client, g_warning ("Grab failed for some keys, another application may already have access the them."); } -static void init_kbd(GsdMediaKeysManager* manager) +static void init_kbd(MsdMediaKeysManager* manager) { int i; gboolean need_flush = FALSE; @@ -395,7 +395,7 @@ static void init_kbd(GsdMediaKeysManager* manager) } static void -dialog_show (GsdMediaKeysManager *manager) +dialog_show (MsdMediaKeysManager *manager) { int orig_w; int orig_h; @@ -463,7 +463,7 @@ dialog_show (GsdMediaKeysManager *manager) } static void -do_unknown_action (GsdMediaKeysManager *manager, +do_unknown_action (MsdMediaKeysManager *manager, const char *url) { char *string; @@ -484,7 +484,7 @@ do_unknown_action (GsdMediaKeysManager *manager, } static void -do_help_action (GsdMediaKeysManager *manager) +do_help_action (MsdMediaKeysManager *manager) { char *string; @@ -505,7 +505,7 @@ do_help_action (GsdMediaKeysManager *manager) } static void -do_mail_action (GsdMediaKeysManager *manager) +do_mail_action (MsdMediaKeysManager *manager) { char *string; @@ -527,7 +527,7 @@ do_mail_action (GsdMediaKeysManager *manager) } static void -do_media_action (GsdMediaKeysManager *manager) +do_media_action (MsdMediaKeysManager *manager) { char *command; @@ -544,7 +544,7 @@ do_media_action (GsdMediaKeysManager *manager) } static void -do_www_action (GsdMediaKeysManager *manager, +do_www_action (MsdMediaKeysManager *manager, const char *url) { char *string; @@ -575,7 +575,7 @@ do_www_action (GsdMediaKeysManager *manager, } static void -do_exit_action (GsdMediaKeysManager *manager) +do_exit_action (MsdMediaKeysManager *manager) { execute (manager, "mate-session-save --shutdown-dialog", FALSE, FALSE); } @@ -583,7 +583,7 @@ do_exit_action (GsdMediaKeysManager *manager) static void do_eject_action_cb (GDrive *drive, GAsyncResult *res, - GsdMediaKeysManager *manager) + MsdMediaKeysManager *manager) { g_drive_eject_with_operation_finish (drive, res, NULL); } @@ -592,7 +592,7 @@ do_eject_action_cb (GDrive *drive, #define SCORE_CAN_EJECT 50 #define SCORE_HAS_MEDIA 100 static void -do_eject_action (GsdMediaKeysManager *manager) +do_eject_action (MsdMediaKeysManager *manager) { GList *drives, *l; GDrive *fav_drive; @@ -624,7 +624,7 @@ do_eject_action (GsdMediaKeysManager *manager) /* Show the dialogue */ dialog_init (manager); - gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), "media-eject", FALSE); dialog_show (manager); @@ -647,13 +647,13 @@ do_eject_action (GsdMediaKeysManager *manager) } static void -do_touchpad_action (GsdMediaKeysManager *manager) +do_touchpad_action (MsdMediaKeysManager *manager) { MateConfClient *client = manager->priv->conf_client; gboolean state = mateconf_client_get_bool (client, TOUCHPAD_ENABLED_KEY, NULL); dialog_init (manager); - gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), (!state) ? "touchpad-enabled" : "touchpad-disabled", FALSE); dialog_show (manager); @@ -663,7 +663,7 @@ do_touchpad_action (GsdMediaKeysManager *manager) #ifdef HAVE_PULSE static void -update_dialog (GsdMediaKeysManager *manager, +update_dialog (MsdMediaKeysManager *manager, guint vol, gboolean muted, gboolean sound_changed) @@ -672,11 +672,11 @@ update_dialog (GsdMediaKeysManager *manager, vol = CLAMP (vol, 0, 100); dialog_init (manager); - gsd_media_keys_window_set_volume_muted (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + msd_media_keys_window_set_volume_muted (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), muted); - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), vol); - gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), - GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), vol); + msd_media_keys_window_set_action (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); dialog_show (manager); if (sound_changed != FALSE && muted == FALSE) @@ -690,7 +690,7 @@ update_dialog (GsdMediaKeysManager *manager, #if defined(HAVE_PULSE) || defined(HAVE_GSTREAMER) static void -do_sound_action (GsdMediaKeysManager *manager, +do_sound_action (MsdMediaKeysManager *manager, int type) { gboolean muted; @@ -814,12 +814,12 @@ do_sound_action (GsdMediaKeysManager *manager, /* FIXME: AcmeVolume should probably emit signals instead of doing it like this */ dialog_init (manager); - gsd_media_keys_window_set_volume_muted (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + msd_media_keys_window_set_volume_muted (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), muted); - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), vol); - gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), - GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + msd_media_keys_window_set_action (MSD_MEDIA_KEYS_WINDOW (manager->priv->dialog), + MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); dialog_show (manager); #endif /* HAVE_PULSE */ } @@ -827,7 +827,7 @@ do_sound_action (GsdMediaKeysManager *manager, #ifdef HAVE_PULSE static void -update_default_sink (GsdMediaKeysManager *manager) +update_default_sink (MsdMediaKeysManager *manager) { GvcMixerStream *stream; @@ -849,7 +849,7 @@ update_default_sink (GsdMediaKeysManager *manager) static void on_control_ready (GvcMixerControl *control, - GsdMediaKeysManager *manager) + MsdMediaKeysManager *manager) { update_default_sink (manager); } @@ -857,7 +857,7 @@ on_control_ready (GvcMixerControl *control, static void on_control_default_sink_changed (GvcMixerControl *control, guint id, - GsdMediaKeysManager *manager) + MsdMediaKeysManager *manager) { update_default_sink (manager); } @@ -886,7 +886,7 @@ find_by_time (gconstpointer a, * events only nobody is interested. */ gboolean -gsd_media_keys_manager_grab_media_player_keys (GsdMediaKeysManager *manager, +msd_media_keys_manager_grab_media_player_keys (MsdMediaKeysManager *manager, const char *application, guint32 time, GError **error) @@ -928,7 +928,7 @@ gsd_media_keys_manager_grab_media_player_keys (GsdMediaKeysManager *manager, } gboolean -gsd_media_keys_manager_release_media_player_keys (GsdMediaKeysManager *manager, +msd_media_keys_manager_release_media_player_keys (MsdMediaKeysManager *manager, const char *application, GError **error) { @@ -949,7 +949,7 @@ gsd_media_keys_manager_release_media_player_keys (GsdMediaKeysManager *manager, } static gboolean -gsd_media_player_key_pressed (GsdMediaKeysManager *manager, +msd_media_player_key_pressed (MsdMediaKeysManager *manager, const char *key) { const char *application = NULL; @@ -967,14 +967,14 @@ gsd_media_player_key_pressed (GsdMediaKeysManager *manager, } static gboolean -do_multimedia_player_action (GsdMediaKeysManager *manager, +do_multimedia_player_action (MsdMediaKeysManager *manager, const char *key) { - return gsd_media_player_key_pressed (manager, key); + return msd_media_player_key_pressed (manager, key); } static gboolean -do_action (GsdMediaKeysManager *manager, +do_action (MsdMediaKeysManager *manager, int type) { char *cmd; @@ -1062,7 +1062,7 @@ do_action (GsdMediaKeysManager *manager, } static GdkScreen * -acme_get_screen_from_event (GsdMediaKeysManager *manager, +acme_get_screen_from_event (MsdMediaKeysManager *manager, XAnyEvent *xanyev) { GdkWindow *window; @@ -1085,7 +1085,7 @@ acme_get_screen_from_event (GsdMediaKeysManager *manager, static GdkFilterReturn acme_filter_events (GdkXEvent *xevent, GdkEvent *event, - GsdMediaKeysManager *manager) + MsdMediaKeysManager *manager) { XEvent *xev = (XEvent *) xevent; XAnyEvent *xany = (XAnyEvent *) xevent; @@ -1126,7 +1126,7 @@ acme_filter_events (GdkXEvent *xevent, } static gboolean -start_media_keys_idle_cb (GsdMediaKeysManager *manager) +start_media_keys_idle_cb (MsdMediaKeysManager *manager) { GSList *l; @@ -1162,7 +1162,7 @@ start_media_keys_idle_cb (GsdMediaKeysManager *manager) } gboolean -gsd_media_keys_manager_start (GsdMediaKeysManager *manager, +msd_media_keys_manager_start (MsdMediaKeysManager *manager, GError **error) { mate_settings_profile_start (NULL); @@ -1203,9 +1203,9 @@ gsd_media_keys_manager_start (GsdMediaKeysManager *manager, } void -gsd_media_keys_manager_stop (GsdMediaKeysManager *manager) +msd_media_keys_manager_stop (MsdMediaKeysManager *manager) { - GsdMediaKeysManagerPrivate *priv = manager->priv; + MsdMediaKeysManagerPrivate *priv = manager->priv; GSList *ls; GList *l; int i; @@ -1295,14 +1295,14 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager) } static void -gsd_media_keys_manager_set_property (GObject *object, +msd_media_keys_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdMediaKeysManager *self; + MsdMediaKeysManager *self; - self = GSD_MEDIA_KEYS_MANAGER (object); + self = MSD_MEDIA_KEYS_MANAGER (object); switch (prop_id) { default: @@ -1312,14 +1312,14 @@ gsd_media_keys_manager_set_property (GObject *object, } static void -gsd_media_keys_manager_get_property (GObject *object, +msd_media_keys_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdMediaKeysManager *self; + MsdMediaKeysManager *self; - self = GSD_MEDIA_KEYS_MANAGER (object); + self = MSD_MEDIA_KEYS_MANAGER (object); switch (prop_id) { default: @@ -1329,16 +1329,16 @@ gsd_media_keys_manager_get_property (GObject *object, } static GObject * -gsd_media_keys_manager_constructor (GType type, +msd_media_keys_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdMediaKeysManager *media_keys_manager; - GsdMediaKeysManagerClass *klass; + MsdMediaKeysManager *media_keys_manager; + MsdMediaKeysManagerClass *klass; - klass = GSD_MEDIA_KEYS_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_MEDIA_KEYS_MANAGER)); + klass = MSD_MEDIA_KEYS_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_MEDIA_KEYS_MANAGER)); - media_keys_manager = GSD_MEDIA_KEYS_MANAGER (G_OBJECT_CLASS (gsd_media_keys_manager_parent_class)->constructor (type, + media_keys_manager = MSD_MEDIA_KEYS_MANAGER (G_OBJECT_CLASS (msd_media_keys_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -1346,68 +1346,68 @@ gsd_media_keys_manager_constructor (GType type, } static void -gsd_media_keys_manager_dispose (GObject *object) +msd_media_keys_manager_dispose (GObject *object) { - GsdMediaKeysManager *media_keys_manager; + MsdMediaKeysManager *media_keys_manager; - media_keys_manager = GSD_MEDIA_KEYS_MANAGER (object); + media_keys_manager = MSD_MEDIA_KEYS_MANAGER (object); - G_OBJECT_CLASS (gsd_media_keys_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_media_keys_manager_parent_class)->dispose (object); } static void -gsd_media_keys_manager_class_init (GsdMediaKeysManagerClass *klass) +msd_media_keys_manager_class_init (MsdMediaKeysManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_media_keys_manager_get_property; - object_class->set_property = gsd_media_keys_manager_set_property; - object_class->constructor = gsd_media_keys_manager_constructor; - object_class->dispose = gsd_media_keys_manager_dispose; - object_class->finalize = gsd_media_keys_manager_finalize; + object_class->get_property = msd_media_keys_manager_get_property; + object_class->set_property = msd_media_keys_manager_set_property; + object_class->constructor = msd_media_keys_manager_constructor; + object_class->dispose = msd_media_keys_manager_dispose; + object_class->finalize = msd_media_keys_manager_finalize; signals[MEDIA_PLAYER_KEY_PRESSED] = g_signal_new ("media-player-key-pressed", G_OBJECT_CLASS_TYPE (klass), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdMediaKeysManagerClass, media_player_key_pressed), + G_STRUCT_OFFSET (MsdMediaKeysManagerClass, media_player_key_pressed), NULL, NULL, - gsd_marshal_VOID__STRING_STRING, + msd_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); - dbus_g_object_type_install_info (GSD_TYPE_MEDIA_KEYS_MANAGER, &dbus_glib_gsd_media_keys_manager_object_info); + dbus_g_object_type_install_info (MSD_TYPE_MEDIA_KEYS_MANAGER, &dbus_glib_msd_media_keys_manager_object_info); - g_type_class_add_private (klass, sizeof (GsdMediaKeysManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdMediaKeysManagerPrivate)); } static void -gsd_media_keys_manager_init (GsdMediaKeysManager *manager) +msd_media_keys_manager_init (MsdMediaKeysManager *manager) { - manager->priv = GSD_MEDIA_KEYS_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_MEDIA_KEYS_MANAGER_GET_PRIVATE (manager); } static void -gsd_media_keys_manager_finalize (GObject *object) +msd_media_keys_manager_finalize (GObject *object) { - GsdMediaKeysManager *media_keys_manager; + MsdMediaKeysManager *media_keys_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_MEDIA_KEYS_MANAGER (object)); + g_return_if_fail (MSD_IS_MEDIA_KEYS_MANAGER (object)); - media_keys_manager = GSD_MEDIA_KEYS_MANAGER (object); + media_keys_manager = MSD_MEDIA_KEYS_MANAGER (object); g_return_if_fail (media_keys_manager->priv != NULL); - G_OBJECT_CLASS (gsd_media_keys_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_media_keys_manager_parent_class)->finalize (object); } static gboolean -register_manager (GsdMediaKeysManager *manager) +register_manager (MsdMediaKeysManager *manager) { GError *error = NULL; @@ -1420,20 +1420,20 @@ register_manager (GsdMediaKeysManager *manager) return FALSE; } - dbus_g_connection_register_g_object (manager->priv->connection, GSD_MEDIA_KEYS_DBUS_PATH, G_OBJECT (manager)); + dbus_g_connection_register_g_object (manager->priv->connection, MSD_MEDIA_KEYS_DBUS_PATH, G_OBJECT (manager)); return TRUE; } -GsdMediaKeysManager * -gsd_media_keys_manager_new (void) +MsdMediaKeysManager * +msd_media_keys_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { gboolean res; - manager_object = g_object_new (GSD_TYPE_MEDIA_KEYS_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_MEDIA_KEYS_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); res = register_manager (manager_object); @@ -1443,5 +1443,5 @@ gsd_media_keys_manager_new (void) } } - return GSD_MEDIA_KEYS_MANAGER (manager_object); + return MSD_MEDIA_KEYS_MANAGER (manager_object); } diff --git a/plugins/media-keys/gsd-media-keys-manager.h b/plugins/media-keys/gsd-media-keys-manager.h index 19dafd5..96c135f 100644 --- a/plugins/media-keys/gsd-media-keys-manager.h +++ b/plugins/media-keys/gsd-media-keys-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_MEDIA_KEYS_MANAGER_H -#define __GSD_MEDIA_KEYS_MANAGER_H +#ifndef __MSD_MEDIA_KEYS_MANAGER_H +#define __MSD_MEDIA_KEYS_MANAGER_H #include <glib-object.h> @@ -27,41 +27,41 @@ extern "C" { #endif -#define GSD_TYPE_MEDIA_KEYS_MANAGER (gsd_media_keys_manager_get_type ()) -#define GSD_MEDIA_KEYS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_MEDIA_KEYS_MANAGER, GsdMediaKeysManager)) -#define GSD_MEDIA_KEYS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_MEDIA_KEYS_MANAGER, GsdMediaKeysManagerClass)) -#define GSD_IS_MEDIA_KEYS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_MEDIA_KEYS_MANAGER)) -#define GSD_IS_MEDIA_KEYS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_MEDIA_KEYS_MANAGER)) -#define GSD_MEDIA_KEYS_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_MEDIA_KEYS_MANAGER, GsdMediaKeysManagerClass)) +#define MSD_TYPE_MEDIA_KEYS_MANAGER (msd_media_keys_manager_get_type ()) +#define MSD_MEDIA_KEYS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_MEDIA_KEYS_MANAGER, MsdMediaKeysManager)) +#define MSD_MEDIA_KEYS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_MEDIA_KEYS_MANAGER, MsdMediaKeysManagerClass)) +#define MSD_IS_MEDIA_KEYS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_MEDIA_KEYS_MANAGER)) +#define MSD_IS_MEDIA_KEYS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_MEDIA_KEYS_MANAGER)) +#define MSD_MEDIA_KEYS_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_MEDIA_KEYS_MANAGER, MsdMediaKeysManagerClass)) -typedef struct GsdMediaKeysManagerPrivate GsdMediaKeysManagerPrivate; +typedef struct MsdMediaKeysManagerPrivate MsdMediaKeysManagerPrivate; typedef struct { GObject parent; - GsdMediaKeysManagerPrivate *priv; -} GsdMediaKeysManager; + MsdMediaKeysManagerPrivate *priv; +} MsdMediaKeysManager; typedef struct { GObjectClass parent_class; - void (* media_player_key_pressed) (GsdMediaKeysManager *manager, + void (* media_player_key_pressed) (MsdMediaKeysManager *manager, const char *application, const char *key); -} GsdMediaKeysManagerClass; +} MsdMediaKeysManagerClass; -GType gsd_media_keys_manager_get_type (void); +GType msd_media_keys_manager_get_type (void); -GsdMediaKeysManager * gsd_media_keys_manager_new (void); -gboolean gsd_media_keys_manager_start (GsdMediaKeysManager *manager, +MsdMediaKeysManager * msd_media_keys_manager_new (void); +gboolean msd_media_keys_manager_start (MsdMediaKeysManager *manager, GError **error); -void gsd_media_keys_manager_stop (GsdMediaKeysManager *manager); +void msd_media_keys_manager_stop (MsdMediaKeysManager *manager); -gboolean gsd_media_keys_manager_grab_media_player_keys (GsdMediaKeysManager *manager, +gboolean msd_media_keys_manager_grab_media_player_keys (MsdMediaKeysManager *manager, const char *application, guint32 time, GError **error); -gboolean gsd_media_keys_manager_release_media_player_keys (GsdMediaKeysManager *manager, +gboolean msd_media_keys_manager_release_media_player_keys (MsdMediaKeysManager *manager, const char *application, GError **error); @@ -69,4 +69,4 @@ gboolean gsd_media_keys_manager_release_media_player_keys (GsdMedia } #endif -#endif /* __GSD_MEDIA_KEYS_MANAGER_H */ +#endif /* __MSD_MEDIA_KEYS_MANAGER_H */ diff --git a/plugins/media-keys/gsd-media-keys-manager.xml b/plugins/media-keys/gsd-media-keys-manager.xml index 12cd03a..db0552e 100644 --- a/plugins/media-keys/gsd-media-keys-manager.xml +++ b/plugins/media-keys/gsd-media-keys-manager.xml @@ -1,7 +1,7 @@ <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> <interface name="org.mate.SettingsDaemon.MediaKeys"> - <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="gsd_media_keys_manager"/> + <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="msd_media_keys_manager"/> <method name="GrabMediaPlayerKeys"> <arg name="application" direction="in" type="s"/> <arg name="time" direction="in" type="u"/> diff --git a/plugins/media-keys/gsd-media-keys-plugin.c b/plugins/media-keys/gsd-media-keys-plugin.c index 319a42a..d76e233 100644 --- a/plugins/media-keys/gsd-media-keys-plugin.c +++ b/plugins/media-keys/gsd-media-keys-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-media-keys-plugin.h" -#include "gsd-media-keys-manager.h" +#include "msd-media-keys-plugin.h" +#include "msd-media-keys-manager.h" -struct GsdMediaKeysPluginPrivate { - GsdMediaKeysManager *manager; +struct MsdMediaKeysPluginPrivate { + MsdMediaKeysManager *manager; }; -#define GSD_MEDIA_KEYS_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPluginPrivate)) +#define MSD_MEDIA_KEYS_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_MEDIA_KEYS_PLUGIN, MsdMediaKeysPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdMediaKeysPlugin, gsd_media_keys_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdMediaKeysPlugin, msd_media_keys_plugin) static void -gsd_media_keys_plugin_init (GsdMediaKeysPlugin *plugin) +msd_media_keys_plugin_init (MsdMediaKeysPlugin *plugin) { - plugin->priv = GSD_MEDIA_KEYS_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_MEDIA_KEYS_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdMediaKeysPlugin initializing"); + g_debug ("MsdMediaKeysPlugin initializing"); - plugin->priv->manager = gsd_media_keys_manager_new (); + plugin->priv->manager = msd_media_keys_manager_new (); } static void -gsd_media_keys_plugin_finalize (GObject *object) +msd_media_keys_plugin_finalize (GObject *object) { - GsdMediaKeysPlugin *plugin; + MsdMediaKeysPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_MEDIA_KEYS_PLUGIN (object)); + g_return_if_fail (MSD_IS_MEDIA_KEYS_PLUGIN (object)); - g_debug ("GsdMediaKeysPlugin finalizing"); + g_debug ("MsdMediaKeysPlugin finalizing"); - plugin = GSD_MEDIA_KEYS_PLUGIN (object); + plugin = MSD_MEDIA_KEYS_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_media_keys_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_media_keys_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_media_keys_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating media_keys plugin"); error = NULL; - res = gsd_media_keys_manager_start (GSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager, &error); + res = msd_media_keys_manager_start (MSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start media_keys manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating media_keys plugin"); - gsd_media_keys_manager_stop (GSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager); + msd_media_keys_manager_stop (MSD_MEDIA_KEYS_PLUGIN (plugin)->priv->manager); } static void -gsd_media_keys_plugin_class_init (GsdMediaKeysPluginClass *klass) +msd_media_keys_plugin_class_init (MsdMediaKeysPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_media_keys_plugin_finalize; + object_class->finalize = msd_media_keys_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdMediaKeysPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdMediaKeysPluginPrivate)); } diff --git a/plugins/media-keys/gsd-media-keys-plugin.h b/plugins/media-keys/gsd-media-keys-plugin.h index fa092b5..c869d62 100644 --- a/plugins/media-keys/gsd-media-keys-plugin.h +++ b/plugins/media-keys/gsd-media-keys-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_MEDIA_KEYS_PLUGIN_H__ -#define __GSD_MEDIA_KEYS_PLUGIN_H__ +#ifndef __MSD_MEDIA_KEYS_PLUGIN_H__ +#define __MSD_MEDIA_KEYS_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_MEDIA_KEYS_PLUGIN (gsd_media_keys_plugin_get_type ()) -#define GSD_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPlugin)) -#define GSD_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPluginClass)) -#define GSD_IS_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_MEDIA_KEYS_PLUGIN)) -#define GSD_IS_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_MEDIA_KEYS_PLUGIN)) -#define GSD_MEDIA_KEYS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_MEDIA_KEYS_PLUGIN, GsdMediaKeysPluginClass)) +#define MSD_TYPE_MEDIA_KEYS_PLUGIN (msd_media_keys_plugin_get_type ()) +#define MSD_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_MEDIA_KEYS_PLUGIN, MsdMediaKeysPlugin)) +#define MSD_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_MEDIA_KEYS_PLUGIN, MsdMediaKeysPluginClass)) +#define MSD_IS_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_MEDIA_KEYS_PLUGIN)) +#define MSD_IS_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_MEDIA_KEYS_PLUGIN)) +#define MSD_MEDIA_KEYS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_MEDIA_KEYS_PLUGIN, MsdMediaKeysPluginClass)) -typedef struct GsdMediaKeysPluginPrivate GsdMediaKeysPluginPrivate; +typedef struct MsdMediaKeysPluginPrivate MsdMediaKeysPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdMediaKeysPluginPrivate *priv; -} GsdMediaKeysPlugin; + MsdMediaKeysPluginPrivate *priv; +} MsdMediaKeysPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdMediaKeysPluginClass; +} MsdMediaKeysPluginClass; -GType gsd_media_keys_plugin_get_type (void) G_GNUC_CONST; +GType msd_media_keys_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_MEDIA_KEYS_PLUGIN_H__ */ +#endif /* __MSD_MEDIA_KEYS_PLUGIN_H__ */ diff --git a/plugins/media-keys/gsd-media-keys-window.c b/plugins/media-keys/gsd-media-keys-window.c index 2547068..8bd6c33 100644 --- a/plugins/media-keys/gsd-media-keys-window.c +++ b/plugins/media-keys/gsd-media-keys-window.c @@ -30,13 +30,13 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include "gsd-media-keys-window.h" +#include "msd-media-keys-window.h" -#define GSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindowPrivate)) +#define MSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_MEDIA_KEYS_WINDOW, MsdMediaKeysWindowPrivate)) -struct GsdMediaKeysWindowPrivate +struct MsdMediaKeysWindowPrivate { - GsdMediaKeysWindowAction action; + MsdMediaKeysWindowAction action; char *icon_name; gboolean show_level; @@ -47,10 +47,10 @@ struct GsdMediaKeysWindowPrivate GtkWidget *progress; }; -G_DEFINE_TYPE (GsdMediaKeysWindow, gsd_media_keys_window, GSD_TYPE_OSD_WINDOW) +G_DEFINE_TYPE (MsdMediaKeysWindow, msd_media_keys_window, MSD_TYPE_OSD_WINDOW) static void -volume_controls_set_visible (GsdMediaKeysWindow *window, +volume_controls_set_visible (MsdMediaKeysWindow *window, gboolean visible) { if (window->priv->progress == NULL) @@ -64,7 +64,7 @@ volume_controls_set_visible (GsdMediaKeysWindow *window, } static void -window_set_icon_name (GsdMediaKeysWindow *window, +window_set_icon_name (MsdMediaKeysWindow *window, const char *name) { if (window->priv->image == NULL) @@ -75,11 +75,11 @@ window_set_icon_name (GsdMediaKeysWindow *window, } static void -action_changed (GsdMediaKeysWindow *window) +action_changed (MsdMediaKeysWindow *window) { - if (!gsd_osd_window_is_composited (GSD_OSD_WINDOW (window))) { + if (!msd_osd_window_is_composited (MSD_OSD_WINDOW (window))) { switch (window->priv->action) { - case GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME: + case MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME: volume_controls_set_visible (window, TRUE); if (window->priv->volume_muted) { @@ -89,7 +89,7 @@ action_changed (GsdMediaKeysWindow *window) } break; - case GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM: + case MSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM: volume_controls_set_visible (window, window->priv->show_level); window_set_icon_name (window, window->priv->icon_name); break; @@ -99,15 +99,15 @@ action_changed (GsdMediaKeysWindow *window) } } - gsd_osd_window_update_and_hide (GSD_OSD_WINDOW (window)); + msd_osd_window_update_and_hide (MSD_OSD_WINDOW (window)); } static void -volume_level_changed (GsdMediaKeysWindow *window) +volume_level_changed (MsdMediaKeysWindow *window) { - gsd_osd_window_update_and_hide (GSD_OSD_WINDOW (window)); + msd_osd_window_update_and_hide (MSD_OSD_WINDOW (window)); - if (!gsd_osd_window_is_composited (GSD_OSD_WINDOW (window)) && window->priv->progress != NULL) { + if (!msd_osd_window_is_composited (MSD_OSD_WINDOW (window)) && window->priv->progress != NULL) { double fraction; fraction = (double) window->priv->volume_level / 100.0; @@ -118,11 +118,11 @@ volume_level_changed (GsdMediaKeysWindow *window) } static void -volume_muted_changed (GsdMediaKeysWindow *window) +volume_muted_changed (MsdMediaKeysWindow *window) { - gsd_osd_window_update_and_hide (GSD_OSD_WINDOW (window)); + msd_osd_window_update_and_hide (MSD_OSD_WINDOW (window)); - if (!gsd_osd_window_is_composited (GSD_OSD_WINDOW (window))) { + if (!msd_osd_window_is_composited (MSD_OSD_WINDOW (window))) { if (window->priv->volume_muted) { window_set_icon_name (window, "audio-volume-muted"); } else { @@ -132,46 +132,46 @@ volume_muted_changed (GsdMediaKeysWindow *window) } void -gsd_media_keys_window_set_action (GsdMediaKeysWindow *window, - GsdMediaKeysWindowAction action) +msd_media_keys_window_set_action (MsdMediaKeysWindow *window, + MsdMediaKeysWindowAction action) { - g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window)); - g_return_if_fail (action == GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + g_return_if_fail (MSD_IS_MEDIA_KEYS_WINDOW (window)); + g_return_if_fail (action == MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); if (window->priv->action != action) { window->priv->action = action; action_changed (window); } else { - gsd_osd_window_update_and_hide (GSD_OSD_WINDOW (window)); + msd_osd_window_update_and_hide (MSD_OSD_WINDOW (window)); } } void -gsd_media_keys_window_set_action_custom (GsdMediaKeysWindow *window, +msd_media_keys_window_set_action_custom (MsdMediaKeysWindow *window, const char *icon_name, gboolean show_level) { - g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window)); + g_return_if_fail (MSD_IS_MEDIA_KEYS_WINDOW (window)); g_return_if_fail (icon_name != NULL); - if (window->priv->action != GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM || + if (window->priv->action != MSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM || g_strcmp0 (window->priv->icon_name, icon_name) != 0 || window->priv->show_level != show_level) { - window->priv->action = GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM; + window->priv->action = MSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM; g_free (window->priv->icon_name); window->priv->icon_name = g_strdup (icon_name); window->priv->show_level = show_level; action_changed (window); } else { - gsd_osd_window_update_and_hide (GSD_OSD_WINDOW (window)); + msd_osd_window_update_and_hide (MSD_OSD_WINDOW (window)); } } void -gsd_media_keys_window_set_volume_muted (GsdMediaKeysWindow *window, +msd_media_keys_window_set_volume_muted (MsdMediaKeysWindow *window, gboolean muted) { - g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window)); + g_return_if_fail (MSD_IS_MEDIA_KEYS_WINDOW (window)); if (window->priv->volume_muted != muted) { window->priv->volume_muted = muted; @@ -180,10 +180,10 @@ gsd_media_keys_window_set_volume_muted (GsdMediaKeysWindow *window, } void -gsd_media_keys_window_set_volume_level (GsdMediaKeysWindow *window, +msd_media_keys_window_set_volume_level (MsdMediaKeysWindow *window, int level) { - g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window)); + g_return_if_fail (MSD_IS_MEDIA_KEYS_WINDOW (window)); if (window->priv->volume_level != level) { window->priv->volume_level = level; @@ -192,7 +192,7 @@ gsd_media_keys_window_set_volume_level (GsdMediaKeysWindow *window, } static GdkPixbuf * -load_pixbuf (GsdMediaKeysWindow *window, +load_pixbuf (MsdMediaKeysWindow *window, const char *name, int icon_size) { @@ -236,10 +236,10 @@ draw_eject (cairo_t *cr, cairo_rel_line_to (cr, -width / 2, -tri_height); cairo_rel_line_to (cr, -width / 2, tri_height); cairo_close_path (cr); - cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, GSD_OSD_WINDOW_FG_ALPHA); + cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, MSD_OSD_WINDOW_FG_ALPHA); cairo_fill_preserve (cr); - cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, GSD_OSD_WINDOW_FG_ALPHA / 2); + cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, MSD_OSD_WINDOW_FG_ALPHA / 2); cairo_set_line_width (cr, 2); cairo_stroke (cr); } @@ -298,12 +298,12 @@ draw_cross (cairo_t *cr, cairo_move_to (cr, cx, cy + size/2.0); cairo_rel_line_to (cr, size, -size); - cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, GSD_OSD_WINDOW_FG_ALPHA / 2); + cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, MSD_OSD_WINDOW_FG_ALPHA / 2); cairo_set_line_width (cr, 14); cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); cairo_stroke_preserve (cr); - cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, GSD_OSD_WINDOW_FG_ALPHA); + cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, MSD_OSD_WINDOW_FG_ALPHA); cairo_set_line_width (cr, 10); cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND); cairo_stroke (cr); @@ -337,16 +337,16 @@ draw_speaker (cairo_t *cr, cairo_line_to (cr, _x0, _y0); cairo_close_path (cr); - cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, GSD_OSD_WINDOW_FG_ALPHA); + cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, MSD_OSD_WINDOW_FG_ALPHA); cairo_fill_preserve (cr); - cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, GSD_OSD_WINDOW_FG_ALPHA / 2); + cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, MSD_OSD_WINDOW_FG_ALPHA / 2); cairo_set_line_width (cr, 2); cairo_stroke (cr); } static gboolean -render_speaker (GsdMediaKeysWindow *window, +render_speaker (MsdMediaKeysWindow *window, cairo_t *cr, double _x0, double _y0, @@ -385,7 +385,7 @@ render_speaker (GsdMediaKeysWindow *window, } gdk_cairo_set_source_pixbuf (cr, pixbuf, _x0, _y0); - cairo_paint_with_alpha (cr, GSD_OSD_WINDOW_FG_ALPHA); + cairo_paint_with_alpha (cr, MSD_OSD_WINDOW_FG_ALPHA); g_object_unref (pixbuf); @@ -393,7 +393,7 @@ render_speaker (GsdMediaKeysWindow *window, } static void -draw_volume_boxes (GsdMediaKeysWindow *window, +draw_volume_boxes (MsdMediaKeysWindow *window, cairo_t *cr, double percentage, double _x0, @@ -414,20 +414,20 @@ draw_volume_boxes (GsdMediaKeysWindow *window, style = gtk_widget_get_style (GTK_WIDGET (window)); /* bar background */ - gsd_osd_window_color_reverse (&style->dark[GTK_STATE_NORMAL], &color); + msd_osd_window_color_reverse (&style->dark[GTK_STATE_NORMAL], &color); r = (float)color.red / 65535.0; g = (float)color.green / 65535.0; b = (float)color.blue / 65535.0; - gsd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0, _y0, height / 6, width, height); - cairo_set_source_rgba (cr, r, g, b, GSD_OSD_WINDOW_FG_ALPHA / 2); + msd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0, _y0, height / 6, width, height); + cairo_set_source_rgba (cr, r, g, b, MSD_OSD_WINDOW_FG_ALPHA / 2); cairo_fill_preserve (cr); /* bar border */ - gsd_osd_window_color_reverse (&style->light[GTK_STATE_NORMAL], &color); + msd_osd_window_color_reverse (&style->light[GTK_STATE_NORMAL], &color); r = (float)color.red / 65535.0; g = (float)color.green / 65535.0; b = (float)color.blue / 65535.0; - cairo_set_source_rgba (cr, r, g, b, GSD_OSD_WINDOW_FG_ALPHA / 2); + cairo_set_source_rgba (cr, r, g, b, MSD_OSD_WINDOW_FG_ALPHA / 2); cairo_set_line_width (cr, 1); cairo_stroke (cr); @@ -438,13 +438,13 @@ draw_volume_boxes (GsdMediaKeysWindow *window, r = (float)color.red / 65535.0; g = (float)color.green / 65535.0; b = (float)color.blue / 65535.0; - gsd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0 + 0.5, _y0 + 0.5, height / 6 - 0.5, x1, height - 1); - cairo_set_source_rgba (cr, r, g, b, GSD_OSD_WINDOW_FG_ALPHA); + msd_osd_window_draw_rounded_rectangle (cr, 1.0, _x0 + 0.5, _y0 + 0.5, height / 6 - 0.5, x1, height - 1); + cairo_set_source_rgba (cr, r, g, b, MSD_OSD_WINDOW_FG_ALPHA); cairo_fill (cr); } static void -draw_action_volume (GsdMediaKeysWindow *window, +draw_action_volume (MsdMediaKeysWindow *window, cairo_t *cr) { int window_width; @@ -546,7 +546,7 @@ draw_action_volume (GsdMediaKeysWindow *window, } static gboolean -render_custom (GsdMediaKeysWindow *window, +render_custom (MsdMediaKeysWindow *window, cairo_t *cr, double _x0, double _y0, @@ -573,7 +573,7 @@ render_custom (GsdMediaKeysWindow *window, } gdk_cairo_set_source_pixbuf (cr, pixbuf, _x0, _y0); - cairo_paint_with_alpha (cr, GSD_OSD_WINDOW_FG_ALPHA); + cairo_paint_with_alpha (cr, MSD_OSD_WINDOW_FG_ALPHA); g_object_unref (pixbuf); @@ -581,7 +581,7 @@ render_custom (GsdMediaKeysWindow *window, } static void -draw_action_custom (GsdMediaKeysWindow *window, +draw_action_custom (MsdMediaKeysWindow *window, cairo_t *cr) { int window_width; @@ -645,16 +645,16 @@ draw_action_custom (GsdMediaKeysWindow *window, } static void -gsd_media_keys_window_expose_when_composited (GsdOsdWindow *osd_window, +msd_media_keys_window_expose_when_composited (MsdOsdWindow *osd_window, cairo_t *cr) { - GsdMediaKeysWindow *window = GSD_MEDIA_KEYS_WINDOW (osd_window); + MsdMediaKeysWindow *window = MSD_MEDIA_KEYS_WINDOW (osd_window); switch (window->priv->action) { - case GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME: + case MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME: draw_action_volume (window, cr); break; - case GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM: + case MSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM: draw_action_custom (window, cr); break; default: @@ -663,25 +663,25 @@ gsd_media_keys_window_expose_when_composited (GsdOsdWindow *osd_window, } static void -gsd_media_keys_window_class_init (GsdMediaKeysWindowClass *klass) +msd_media_keys_window_class_init (MsdMediaKeysWindowClass *klass) { - GsdOsdWindowClass *osd_window_class = GSD_OSD_WINDOW_CLASS (klass); + MsdOsdWindowClass *osd_window_class = MSD_OSD_WINDOW_CLASS (klass); - osd_window_class->expose_when_composited = gsd_media_keys_window_expose_when_composited; + osd_window_class->expose_when_composited = msd_media_keys_window_expose_when_composited; - g_type_class_add_private (klass, sizeof (GsdMediaKeysWindowPrivate)); + g_type_class_add_private (klass, sizeof (MsdMediaKeysWindowPrivate)); } static void -gsd_media_keys_window_init (GsdMediaKeysWindow *window) +msd_media_keys_window_init (MsdMediaKeysWindow *window) { GdkScreen *screen; - window->priv = GSD_MEDIA_KEYS_WINDOW_GET_PRIVATE (window); + window->priv = MSD_MEDIA_KEYS_WINDOW_GET_PRIVATE (window); screen = gtk_widget_get_screen (GTK_WIDGET (window)); - if (!gsd_osd_window_is_composited (GSD_OSD_WINDOW (window))) { + if (!msd_osd_window_is_composited (MSD_OSD_WINDOW (window))) { GtkBuilder *builder; const gchar *objects[] = {"acme_box", NULL}; GtkWidget *box; @@ -708,7 +708,7 @@ gsd_media_keys_window_init (GsdMediaKeysWindow *window) } GtkWidget * -gsd_media_keys_window_new (void) +msd_media_keys_window_new (void) { - return g_object_new (GSD_TYPE_MEDIA_KEYS_WINDOW, NULL); + return g_object_new (MSD_TYPE_MEDIA_KEYS_WINDOW, NULL); } diff --git a/plugins/media-keys/gsd-media-keys-window.h b/plugins/media-keys/gsd-media-keys-window.h index 236d011..c0e5739 100644 --- a/plugins/media-keys/gsd-media-keys-window.h +++ b/plugins/media-keys/gsd-media-keys-window.h @@ -20,56 +20,56 @@ * */ -#ifndef GSD_MEDIA_KEYS_WINDOW_H -#define GSD_MEDIA_KEYS_WINDOW_H +#ifndef MSD_MEDIA_KEYS_WINDOW_H +#define MSD_MEDIA_KEYS_WINDOW_H #include <glib-object.h> #include <gtk/gtk.h> -#include "gsd-osd-window.h" +#include "msd-osd-window.h" #ifdef __cplusplus extern "C" { #endif -#define GSD_TYPE_MEDIA_KEYS_WINDOW (gsd_media_keys_window_get_type ()) -#define GSD_MEDIA_KEYS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindow)) -#define GSD_MEDIA_KEYS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindowClass)) -#define GSD_IS_MEDIA_KEYS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSD_TYPE_MEDIA_KEYS_WINDOW)) -#define GSD_IS_MEDIA_KEYS_WINDOW_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS ((klass), GSD_TYPE_MEDIA_KEYS_WINDOW)) +#define MSD_TYPE_MEDIA_KEYS_WINDOW (msd_media_keys_window_get_type ()) +#define MSD_MEDIA_KEYS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MSD_TYPE_MEDIA_KEYS_WINDOW, MsdMediaKeysWindow)) +#define MSD_MEDIA_KEYS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSD_TYPE_MEDIA_KEYS_WINDOW, MsdMediaKeysWindowClass)) +#define MSD_IS_MEDIA_KEYS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MSD_TYPE_MEDIA_KEYS_WINDOW)) +#define MSD_IS_MEDIA_KEYS_WINDOW_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS ((klass), MSD_TYPE_MEDIA_KEYS_WINDOW)) -typedef struct GsdMediaKeysWindow GsdMediaKeysWindow; -typedef struct GsdMediaKeysWindowClass GsdMediaKeysWindowClass; -typedef struct GsdMediaKeysWindowPrivate GsdMediaKeysWindowPrivate; +typedef struct MsdMediaKeysWindow MsdMediaKeysWindow; +typedef struct MsdMediaKeysWindowClass MsdMediaKeysWindowClass; +typedef struct MsdMediaKeysWindowPrivate MsdMediaKeysWindowPrivate; -struct GsdMediaKeysWindow { - GsdOsdWindow parent; +struct MsdMediaKeysWindow { + MsdOsdWindow parent; - GsdMediaKeysWindowPrivate *priv; + MsdMediaKeysWindowPrivate *priv; }; -struct GsdMediaKeysWindowClass { - GsdOsdWindowClass parent_class; +struct MsdMediaKeysWindowClass { + MsdOsdWindowClass parent_class; }; typedef enum { - GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME, - GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM -} GsdMediaKeysWindowAction; + MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME, + MSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM +} MsdMediaKeysWindowAction; -GType gsd_media_keys_window_get_type (void); +GType msd_media_keys_window_get_type (void); -GtkWidget * gsd_media_keys_window_new (void); -void gsd_media_keys_window_set_action (GsdMediaKeysWindow *window, - GsdMediaKeysWindowAction action); -void gsd_media_keys_window_set_action_custom (GsdMediaKeysWindow *window, +GtkWidget * msd_media_keys_window_new (void); +void msd_media_keys_window_set_action (MsdMediaKeysWindow *window, + MsdMediaKeysWindowAction action); +void msd_media_keys_window_set_action_custom (MsdMediaKeysWindow *window, const char *icon_name, gboolean show_level); -void gsd_media_keys_window_set_volume_muted (GsdMediaKeysWindow *window, +void msd_media_keys_window_set_volume_muted (MsdMediaKeysWindow *window, gboolean muted); -void gsd_media_keys_window_set_volume_level (GsdMediaKeysWindow *window, +void msd_media_keys_window_set_volume_level (MsdMediaKeysWindow *window, int level); -gboolean gsd_media_keys_window_is_valid (GsdMediaKeysWindow *window); +gboolean msd_media_keys_window_is_valid (MsdMediaKeysWindow *window); #ifdef __cplusplus } diff --git a/plugins/media-keys/test-media-keys.c b/plugins/media-keys/test-media-keys.c index e3345f9..6505550 100644 --- a/plugins/media-keys/test-media-keys.c +++ b/plugins/media-keys/test-media-keys.c @@ -27,9 +27,9 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include "gsd-media-keys-manager.h" +#include "msd-media-keys-manager.h" -static GsdMediaKeysManager *manager = NULL; +static MsdMediaKeysManager *manager = NULL; int main (int argc, @@ -53,10 +53,10 @@ main (int argc, exit (1); } - manager = gsd_media_keys_manager_new (); + manager = msd_media_keys_manager_new (); error = NULL; - res = gsd_media_keys_manager_start (manager, &error); + res = msd_media_keys_manager_start (manager, &error); gtk_main (); diff --git a/plugins/media-keys/test-media-window.c b/plugins/media-keys/test-media-window.c index c97f3d9..8860999 100644 --- a/plugins/media-keys/test-media-window.c +++ b/plugins/media-keys/test-media-window.c @@ -27,7 +27,7 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include "gsd-media-keys-window.h" +#include "msd-media-keys-window.h" static gboolean update_state (GtkWidget *window) @@ -38,58 +38,58 @@ update_state (GtkWidget *window) switch (count) { case 1: - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (window), 50); - gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (window), - GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + msd_media_keys_window_set_action (MSD_MEDIA_KEYS_WINDOW (window), + MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); gtk_widget_show (window); break; case 2: - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (window), 100); - gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (window), - GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + msd_media_keys_window_set_action (MSD_MEDIA_KEYS_WINDOW (window), + MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); gtk_widget_show (window); break; case 3: - gsd_media_keys_window_set_volume_muted (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_volume_muted (MSD_MEDIA_KEYS_WINDOW (window), TRUE); - gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (window), - GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + msd_media_keys_window_set_action (MSD_MEDIA_KEYS_WINDOW (window), + MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); gtk_widget_show (window); break; case 4: - gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (window), "media-eject", FALSE); gtk_widget_show (window); break; case 5: - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (window), 0); - gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (window), "gpm-brightness-lcd", TRUE); gtk_widget_show (window); break; case 6: - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (window), 50); - gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (window), "gpm-brightness-lcd", TRUE); gtk_widget_show (window); break; case 7: - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (window), 100); - gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_action_custom (MSD_MEDIA_KEYS_WINDOW (window), "gpm-brightness-lcd", TRUE); @@ -108,13 +108,13 @@ test_window (void) { GtkWidget *window; - window = gsd_media_keys_window_new (); + window = msd_media_keys_window_new (); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER_ALWAYS); - gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (window), + msd_media_keys_window_set_volume_level (MSD_MEDIA_KEYS_WINDOW (window), 0); - gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (window), - GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); + msd_media_keys_window_set_action (MSD_MEDIA_KEYS_WINDOW (window), + MSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME); gtk_widget_show (window); diff --git a/plugins/mouse/Makefile.am b/plugins/mouse/Makefile.am index f99aefc..8e1ab77 100644 --- a/plugins/mouse/Makefile.am +++ b/plugins/mouse/Makefile.am @@ -1,10 +1,10 @@ plugin_LTLIBRARIES = libmouse.la libmouse_la_SOURCES = \ - gsd-mouse-plugin.h \ - gsd-mouse-plugin.c \ - gsd-mouse-manager.h \ - gsd-mouse-manager.c + msd-mouse-plugin.h \ + msd-mouse-plugin.c \ + msd-mouse-manager.h \ + msd-mouse-manager.c libmouse_la_CPPFLAGS = \ -I$(top_srcdir)/mate-settings-daemon \ @@ -17,7 +17,7 @@ libmouse_la_CFLAGS = \ $(AM_CFLAGS) libmouse_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) + $(MSD_PLUGIN_LDFLAGS) libmouse_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) \ @@ -28,19 +28,19 @@ plugin_in_files = mouse.mate-settings-plugin.in plugin_DATA = $(plugin_in_files:.mate-settings-plugin.in=.mate-settings-plugin) -libexec_PROGRAMS = gsd-locate-pointer +libexec_PROGRAMS = msd-locate-pointer -gsd_locate_pointer_SOURCES = \ - gsd-locate-pointer.h \ - gsd-locate-pointer.c \ - gsd-timeline.h \ - gsd-timeline.c +msd_locate_pointer_SOURCES = \ + msd-locate-pointer.h \ + msd-locate-pointer.c \ + msd-timeline.h \ + msd-timeline.c -gsd_locate_pointer_CFLAGS = \ +msd_locate_pointer_CFLAGS = \ $(SETTINGS_PLUGIN_CFLAGS) \ $(AM_CFLAGS) -gsd_locate_pointer_LDADD = \ +msd_locate_pointer_LDADD = \ $(SETTINGS_PLUGIN_LIBS) \ $(X11_LIBS) \ -lm @@ -49,4 +49,4 @@ EXTRA_DIST = $(plugin_in_files) CLEANFILES = $(plugin_DATA) DISTCLEANFILES = $(plugin_DATA) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/mouse/gsd-locate-pointer.c b/plugins/mouse/gsd-locate-pointer.c index acb2445..8582074 100644 --- a/plugins/mouse/gsd-locate-pointer.c +++ b/plugins/mouse/gsd-locate-pointer.c @@ -1,4 +1,4 @@ -/* gsd-locate-pointer.c +/* msd-locate-pointer.c * * Copyright (C) 2008 Carlos Garnacho <[email protected]> * @@ -18,8 +18,8 @@ */ #include <gtk/gtk.h> -#include "gsd-timeline.h" -#include "gsd-locate-pointer.h" +#include "msd-timeline.h" +#include "msd-locate-pointer.h" #include <gdk/gdkkeysyms.h> #include <gdk/gdkx.h> @@ -37,21 +37,21 @@ #define CIRCLES_PROGRESS_INTERVAL (0.5 / N_CIRCLES) #define CIRCLE_PROGRESS(p) (MIN (1., ((gdouble) (p) * 2.))) -typedef struct GsdLocatePointerData GsdLocatePointerData; +typedef struct MsdLocatePointerData MsdLocatePointerData; -struct GsdLocatePointerData +struct MsdLocatePointerData { - GsdTimeline *timeline; + MsdTimeline *timeline; GtkWidget *widget; GdkWindow *window; gdouble progress; }; -static GsdLocatePointerData *data = NULL; +static MsdLocatePointerData *data = NULL; static void -locate_pointer_paint (GsdLocatePointerData *data, +locate_pointer_paint (MsdLocatePointerData *data, cairo_t *cr, gboolean composite) { @@ -131,7 +131,7 @@ locate_pointer_expose (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { - GsdLocatePointerData *data = (GsdLocatePointerData *) user_data; + MsdLocatePointerData *data = (MsdLocatePointerData *) user_data; cairo_t *cr; if (event->window != data->window) @@ -145,7 +145,7 @@ locate_pointer_expose (GtkWidget *widget, } static void -update_shape (GsdLocatePointerData *data) +update_shape (MsdLocatePointerData *data) { cairo_t *cr; GdkBitmap *mask; @@ -159,11 +159,11 @@ update_shape (GsdLocatePointerData *data) } static void -timeline_frame_cb (GsdTimeline *timeline, +timeline_frame_cb (MsdTimeline *timeline, gdouble progress, gpointer user_data) { - GsdLocatePointerData *data = (GsdLocatePointerData *) user_data; + MsdLocatePointerData *data = (MsdLocatePointerData *) user_data; GdkScreen *screen; gint cursor_x, cursor_y; @@ -214,7 +214,7 @@ unset_transparent_shape (GdkWindow *window) static void composited_changed (GtkWidget *widget, - GsdLocatePointerData *data) + MsdLocatePointerData *data) { if (!gtk_widget_is_composited (widget)) set_transparent_shape (data->window); @@ -223,10 +223,10 @@ composited_changed (GtkWidget *widget, } static void -timeline_finished_cb (GsdTimeline *timeline, +timeline_finished_cb (MsdTimeline *timeline, gpointer user_data) { - GsdLocatePointerData *data = (GsdLocatePointerData *) user_data; + MsdLocatePointerData *data = (MsdLocatePointerData *) user_data; /* set transparent shape and hide window */ if (!gtk_widget_is_composited (data->widget)) @@ -236,7 +236,7 @@ timeline_finished_cb (GsdTimeline *timeline, } static void -create_window (GsdLocatePointerData *data, +create_window (MsdLocatePointerData *data, GdkScreen *screen) { GdkColormap *colormap; @@ -267,12 +267,12 @@ create_window (GsdLocatePointerData *data, gdk_window_set_user_data (data->window, data->widget); } -static GsdLocatePointerData * -gsd_locate_pointer_data_new (GdkScreen *screen) +static MsdLocatePointerData * +msd_locate_pointer_data_new (GdkScreen *screen) { - GsdLocatePointerData *data; + MsdLocatePointerData *data; - data = g_new0 (GsdLocatePointerData, 1); + data = g_new0 (MsdLocatePointerData, 1); /* this widget will never be shown, it's * mainly used to get signals/events from @@ -284,7 +284,7 @@ gsd_locate_pointer_data_new (GdkScreen *screen) G_CALLBACK (locate_pointer_expose), data); - data->timeline = gsd_timeline_new (ANIMATION_LENGTH); + data->timeline = msd_timeline_new (ANIMATION_LENGTH); g_signal_connect (data->timeline, "frame", G_CALLBACK (timeline_frame_cb), data); g_signal_connect (data->timeline, "finished", @@ -296,7 +296,7 @@ gsd_locate_pointer_data_new (GdkScreen *screen) } static void -move_locate_pointer_window (GsdLocatePointerData *data, +move_locate_pointer_window (MsdLocatePointerData *data, GdkScreen *screen) { gint cursor_x, cursor_y; @@ -326,13 +326,13 @@ move_locate_pointer_window (GsdLocatePointerData *data, } void -gsd_locate_pointer (GdkScreen *screen) +msd_locate_pointer (GdkScreen *screen) { if (!data) - data = gsd_locate_pointer_data_new (screen); + data = msd_locate_pointer_data_new (screen); - gsd_timeline_pause (data->timeline); - gsd_timeline_rewind (data->timeline); + msd_timeline_pause (data->timeline); + msd_timeline_rewind (data->timeline); /* Create again the window if it is not for the current screen */ if (gdk_screen_get_number (screen) != gdk_screen_get_number (gdk_drawable_get_screen (data->window))) @@ -352,7 +352,7 @@ gsd_locate_pointer (GdkScreen *screen) composited_changed (data->widget, data); gdk_window_show (data->window); - gsd_timeline_start (data->timeline); + msd_timeline_start (data->timeline); } @@ -394,7 +394,7 @@ filter (GdkXEvent *xevent, XAllowEvents (xev->xkey.display, AsyncKeyboard, xev->xkey.time); - gsd_locate_pointer (screen); + msd_locate_pointer (screen); } } else diff --git a/plugins/mouse/gsd-locate-pointer.h b/plugins/mouse/gsd-locate-pointer.h index 3b261a5..c21da43 100644 --- a/plugins/mouse/gsd-locate-pointer.h +++ b/plugins/mouse/gsd-locate-pointer.h @@ -19,6 +19,6 @@ #include <gdk/gdk.h> -void gsd_locate_pointer (GdkScreen *screen); +void msd_locate_pointer (GdkScreen *screen); #endif diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c index d843314..d7cb8e4 100644 --- a/plugins/mouse/gsd-mouse-manager.c +++ b/plugins/mouse/gsd-mouse-manager.c @@ -48,9 +48,9 @@ #include <mateconf/mateconf-client.h> #include "mate-settings-profile.h" -#include "gsd-mouse-manager.h" +#include "msd-mouse-manager.h" -#define GSD_MOUSE_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MOUSE_MANAGER, GsdMouseManagerPrivate)) +#define MSD_MOUSE_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_MOUSE_MANAGER, MsdMouseManagerPrivate)) #define MATECONF_MOUSE_DIR "/desktop/mate/peripherals/mouse" #define MATECONF_MOUSE_A11Y_DIR "/desktop/mate/accessibility/mouse" @@ -70,7 +70,7 @@ #define KEY_TOUCHPAD_ENABLED MATECONF_TOUCHPAD_DIR "/touchpad_enabled" #endif -struct GsdMouseManagerPrivate +struct MsdMouseManagerPrivate { guint notify; guint notify_a11y; @@ -83,28 +83,28 @@ struct GsdMouseManagerPrivate GPid locate_pointer_pid; }; -static void gsd_mouse_manager_class_init (GsdMouseManagerClass *klass); -static void gsd_mouse_manager_init (GsdMouseManager *mouse_manager); -static void gsd_mouse_manager_finalize (GObject *object); -static void set_mouse_settings (GsdMouseManager *manager); +static void msd_mouse_manager_class_init (MsdMouseManagerClass *klass); +static void msd_mouse_manager_init (MsdMouseManager *mouse_manager); +static void msd_mouse_manager_finalize (GObject *object); +static void set_mouse_settings (MsdMouseManager *manager); #ifdef HAVE_X11_EXTENSIONS_XINPUT_H static int set_tap_to_click (gboolean state, gboolean left_handed); static XDevice* device_is_touchpad (XDeviceInfo deviceinfo); #endif -G_DEFINE_TYPE (GsdMouseManager, gsd_mouse_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdMouseManager, msd_mouse_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; static void -gsd_mouse_manager_set_property (GObject *object, +msd_mouse_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdMouseManager *self; + MsdMouseManager *self; - self = GSD_MOUSE_MANAGER (object); + self = MSD_MOUSE_MANAGER (object); switch (prop_id) { default: @@ -114,14 +114,14 @@ gsd_mouse_manager_set_property (GObject *object, } static void -gsd_mouse_manager_get_property (GObject *object, +msd_mouse_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdMouseManager *self; + MsdMouseManager *self; - self = GSD_MOUSE_MANAGER (object); + self = MSD_MOUSE_MANAGER (object); switch (prop_id) { default: @@ -131,16 +131,16 @@ gsd_mouse_manager_get_property (GObject *object, } static GObject * -gsd_mouse_manager_constructor (GType type, +msd_mouse_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdMouseManager *mouse_manager; - GsdMouseManagerClass *klass; + MsdMouseManager *mouse_manager; + MsdMouseManagerClass *klass; - klass = GSD_MOUSE_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_MOUSE_MANAGER)); + klass = MSD_MOUSE_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_MOUSE_MANAGER)); - mouse_manager = GSD_MOUSE_MANAGER (G_OBJECT_CLASS (gsd_mouse_manager_parent_class)->constructor (type, + mouse_manager = MSD_MOUSE_MANAGER (G_OBJECT_CLASS (msd_mouse_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -148,27 +148,27 @@ gsd_mouse_manager_constructor (GType type, } static void -gsd_mouse_manager_dispose (GObject *object) +msd_mouse_manager_dispose (GObject *object) { - GsdMouseManager *mouse_manager; + MsdMouseManager *mouse_manager; - mouse_manager = GSD_MOUSE_MANAGER (object); + mouse_manager = MSD_MOUSE_MANAGER (object); - G_OBJECT_CLASS (gsd_mouse_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_mouse_manager_parent_class)->dispose (object); } static void -gsd_mouse_manager_class_init (GsdMouseManagerClass *klass) +msd_mouse_manager_class_init (MsdMouseManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_mouse_manager_get_property; - object_class->set_property = gsd_mouse_manager_set_property; - object_class->constructor = gsd_mouse_manager_constructor; - object_class->dispose = gsd_mouse_manager_dispose; - object_class->finalize = gsd_mouse_manager_finalize; + object_class->get_property = msd_mouse_manager_get_property; + object_class->set_property = msd_mouse_manager_set_property; + object_class->constructor = msd_mouse_manager_constructor; + object_class->dispose = msd_mouse_manager_dispose; + object_class->finalize = msd_mouse_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdMouseManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdMouseManagerPrivate)); } @@ -386,13 +386,13 @@ devicepresence_filter (GdkXEvent *xevent, { XDevicePresenceNotifyEvent *dpn = (XDevicePresenceNotifyEvent *) xev; if (dpn->devchange == DeviceEnabled) - set_mouse_settings ((GsdMouseManager *) data); + set_mouse_settings ((MsdMouseManager *) data); } return GDK_FILTER_CONTINUE; } static void -set_devicepresence_handler (GsdMouseManager *manager) +set_devicepresence_handler (MsdMouseManager *manager) { Display *display; XEventClass class_presence; @@ -416,7 +416,7 @@ set_devicepresence_handler (GsdMouseManager *manager) #endif static void -set_left_handed (GsdMouseManager *manager, +set_left_handed (MsdMouseManager *manager, gboolean left_handed) { guchar *buttons ; @@ -462,7 +462,7 @@ set_left_handed (GsdMouseManager *manager, } static void -set_motion_acceleration (GsdMouseManager *manager, +set_motion_acceleration (MsdMouseManager *manager, gfloat motion_acceleration) { gint numerator, denominator; @@ -498,7 +498,7 @@ set_motion_acceleration (GsdMouseManager *manager, } static void -set_motion_threshold (GsdMouseManager *manager, +set_motion_threshold (MsdMouseManager *manager, int motion_threshold) { XChangePointerControl (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), False, True, @@ -543,7 +543,7 @@ device_is_touchpad (XDeviceInfo deviceinfo) #endif static int -set_disable_w_typing (GsdMouseManager *manager, gboolean state) +set_disable_w_typing (MsdMouseManager *manager, gboolean state) { if (state) { @@ -805,7 +805,7 @@ set_touchpad_enabled (gboolean state) #endif static void -set_locate_pointer (GsdMouseManager *manager, +set_locate_pointer (MsdMouseManager *manager, gboolean state) { if (state) { @@ -815,7 +815,7 @@ set_locate_pointer (GsdMouseManager *manager, if (manager->priv->locate_pointer_spawned) return; - args[0] = LIBEXECDIR "/gsd-locate-pointer"; + args[0] = LIBEXECDIR "/msd-locate-pointer"; args[1] = NULL; g_spawn_async (NULL, args, NULL, @@ -841,7 +841,7 @@ set_locate_pointer (GsdMouseManager *manager, } static void -set_mousetweaks_daemon (GsdMouseManager *manager, +set_mousetweaks_daemon (MsdMouseManager *manager, gboolean dwell_enable, gboolean delay_enable) { @@ -896,7 +896,7 @@ set_mousetweaks_daemon (GsdMouseManager *manager, } static void -set_mouse_settings (GsdMouseManager *manager) +set_mouse_settings (MsdMouseManager *manager) { MateConfClient *client = mateconf_client_get_default (); gboolean left_handed = mateconf_client_get_bool (client, KEY_LEFT_HANDED, NULL); @@ -920,7 +920,7 @@ static void mouse_callback (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdMouseManager *manager) + MsdMouseManager *manager) { if (! strcmp (entry->key, KEY_LEFT_HANDED)) { if (entry->value->type == MATECONF_VALUE_BOOL) { @@ -978,7 +978,7 @@ mouse_callback (MateConfClient *client, } static guint -register_config_callback (GsdMouseManager *manager, +register_config_callback (MsdMouseManager *manager, MateConfClient *client, const char *path, MateConfClientNotifyFunc func) @@ -988,13 +988,13 @@ register_config_callback (GsdMouseManager *manager, } static void -gsd_mouse_manager_init (GsdMouseManager *manager) +msd_mouse_manager_init (MsdMouseManager *manager) { - manager->priv = GSD_MOUSE_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_MOUSE_MANAGER_GET_PRIVATE (manager); } static gboolean -gsd_mouse_manager_idle_cb (GsdMouseManager *manager) +msd_mouse_manager_idle_cb (MsdMouseManager *manager) { MateConfClient *client; @@ -1045,12 +1045,12 @@ gsd_mouse_manager_idle_cb (GsdMouseManager *manager) } gboolean -gsd_mouse_manager_start (GsdMouseManager *manager, +msd_mouse_manager_start (MsdMouseManager *manager, GError **error) { mate_settings_profile_start (NULL); - g_idle_add ((GSourceFunc) gsd_mouse_manager_idle_cb, manager); + g_idle_add ((GSourceFunc) msd_mouse_manager_idle_cb, manager); mate_settings_profile_end (NULL); @@ -1058,9 +1058,9 @@ gsd_mouse_manager_start (GsdMouseManager *manager, } void -gsd_mouse_manager_stop (GsdMouseManager *manager) +msd_mouse_manager_stop (MsdMouseManager *manager) { - GsdMouseManagerPrivate *p = manager->priv; + MsdMouseManagerPrivate *p = manager->priv; MateConfClient *client; g_debug ("Stopping mouse manager"); @@ -1095,30 +1095,30 @@ gsd_mouse_manager_stop (GsdMouseManager *manager) } static void -gsd_mouse_manager_finalize (GObject *object) +msd_mouse_manager_finalize (GObject *object) { - GsdMouseManager *mouse_manager; + MsdMouseManager *mouse_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_MOUSE_MANAGER (object)); + g_return_if_fail (MSD_IS_MOUSE_MANAGER (object)); - mouse_manager = GSD_MOUSE_MANAGER (object); + mouse_manager = MSD_MOUSE_MANAGER (object); g_return_if_fail (mouse_manager->priv != NULL); - G_OBJECT_CLASS (gsd_mouse_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_mouse_manager_parent_class)->finalize (object); } -GsdMouseManager * -gsd_mouse_manager_new (void) +MsdMouseManager * +msd_mouse_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_MOUSE_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_MOUSE_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_MOUSE_MANAGER (manager_object); + return MSD_MOUSE_MANAGER (manager_object); } diff --git a/plugins/mouse/gsd-mouse-manager.h b/plugins/mouse/gsd-mouse-manager.h index f8f513c..e691d7b 100644 --- a/plugins/mouse/gsd-mouse-manager.h +++ b/plugins/mouse/gsd-mouse-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_MOUSE_MANAGER_H -#define __GSD_MOUSE_MANAGER_H +#ifndef __MSD_MOUSE_MANAGER_H +#define __MSD_MOUSE_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_MOUSE_MANAGER (gsd_mouse_manager_get_type ()) -#define GSD_MOUSE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_MOUSE_MANAGER, GsdMouseManager)) -#define GSD_MOUSE_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_MOUSE_MANAGER, GsdMouseManagerClass)) -#define GSD_IS_MOUSE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_MOUSE_MANAGER)) -#define GSD_IS_MOUSE_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_MOUSE_MANAGER)) -#define GSD_MOUSE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_MOUSE_MANAGER, GsdMouseManagerClass)) +#define MSD_TYPE_MOUSE_MANAGER (msd_mouse_manager_get_type ()) +#define MSD_MOUSE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_MOUSE_MANAGER, MsdMouseManager)) +#define MSD_MOUSE_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_MOUSE_MANAGER, MsdMouseManagerClass)) +#define MSD_IS_MOUSE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_MOUSE_MANAGER)) +#define MSD_IS_MOUSE_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_MOUSE_MANAGER)) +#define MSD_MOUSE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_MOUSE_MANAGER, MsdMouseManagerClass)) -typedef struct GsdMouseManagerPrivate GsdMouseManagerPrivate; +typedef struct MsdMouseManagerPrivate MsdMouseManagerPrivate; typedef struct { GObject parent; - GsdMouseManagerPrivate *priv; -} GsdMouseManager; + MsdMouseManagerPrivate *priv; +} MsdMouseManager; typedef struct { GObjectClass parent_class; -} GsdMouseManagerClass; +} MsdMouseManagerClass; -GType gsd_mouse_manager_get_type (void); +GType msd_mouse_manager_get_type (void); -GsdMouseManager * gsd_mouse_manager_new (void); -gboolean gsd_mouse_manager_start (GsdMouseManager *manager, +MsdMouseManager * msd_mouse_manager_new (void); +gboolean msd_mouse_manager_start (MsdMouseManager *manager, GError **error); -void gsd_mouse_manager_stop (GsdMouseManager *manager); +void msd_mouse_manager_stop (MsdMouseManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_MOUSE_MANAGER_H */ +#endif /* __MSD_MOUSE_MANAGER_H */ diff --git a/plugins/mouse/gsd-mouse-plugin.c b/plugins/mouse/gsd-mouse-plugin.c index 900a6d5..7203002 100644 --- a/plugins/mouse/gsd-mouse-plugin.c +++ b/plugins/mouse/gsd-mouse-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-mouse-plugin.h" -#include "gsd-mouse-manager.h" +#include "msd-mouse-plugin.h" +#include "msd-mouse-manager.h" -struct GsdMousePluginPrivate { - GsdMouseManager *manager; +struct MsdMousePluginPrivate { + MsdMouseManager *manager; }; -#define GSD_MOUSE_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_MOUSE_PLUGIN, GsdMousePluginPrivate)) +#define MSD_MOUSE_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_MOUSE_PLUGIN, MsdMousePluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdMousePlugin, gsd_mouse_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdMousePlugin, msd_mouse_plugin) static void -gsd_mouse_plugin_init (GsdMousePlugin *plugin) +msd_mouse_plugin_init (MsdMousePlugin *plugin) { - plugin->priv = GSD_MOUSE_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_MOUSE_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdMousePlugin initializing"); + g_debug ("MsdMousePlugin initializing"); - plugin->priv->manager = gsd_mouse_manager_new (); + plugin->priv->manager = msd_mouse_manager_new (); } static void -gsd_mouse_plugin_finalize (GObject *object) +msd_mouse_plugin_finalize (GObject *object) { - GsdMousePlugin *plugin; + MsdMousePlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_MOUSE_PLUGIN (object)); + g_return_if_fail (MSD_IS_MOUSE_PLUGIN (object)); - g_debug ("GsdMousePlugin finalizing"); + g_debug ("MsdMousePlugin finalizing"); - plugin = GSD_MOUSE_PLUGIN (object); + plugin = MSD_MOUSE_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_mouse_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_mouse_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_mouse_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating mouse plugin"); error = NULL; - res = gsd_mouse_manager_start (GSD_MOUSE_PLUGIN (plugin)->priv->manager, &error); + res = msd_mouse_manager_start (MSD_MOUSE_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start mouse manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating mouse plugin"); - gsd_mouse_manager_stop (GSD_MOUSE_PLUGIN (plugin)->priv->manager); + msd_mouse_manager_stop (MSD_MOUSE_PLUGIN (plugin)->priv->manager); } static void -gsd_mouse_plugin_class_init (GsdMousePluginClass *klass) +msd_mouse_plugin_class_init (MsdMousePluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_mouse_plugin_finalize; + object_class->finalize = msd_mouse_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdMousePluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdMousePluginPrivate)); } diff --git a/plugins/mouse/gsd-mouse-plugin.h b/plugins/mouse/gsd-mouse-plugin.h index e442450..2c2da6c 100644 --- a/plugins/mouse/gsd-mouse-plugin.h +++ b/plugins/mouse/gsd-mouse-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_MOUSE_PLUGIN_H__ -#define __GSD_MOUSE_PLUGIN_H__ +#ifndef __MSD_MOUSE_PLUGIN_H__ +#define __MSD_MOUSE_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_MOUSE_PLUGIN (gsd_mouse_plugin_get_type ()) -#define GSD_MOUSE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_MOUSE_PLUGIN, GsdMousePlugin)) -#define GSD_MOUSE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_MOUSE_PLUGIN, GsdMousePluginClass)) -#define GSD_IS_MOUSE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_MOUSE_PLUGIN)) -#define GSD_IS_MOUSE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_MOUSE_PLUGIN)) -#define GSD_MOUSE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_MOUSE_PLUGIN, GsdMousePluginClass)) +#define MSD_TYPE_MOUSE_PLUGIN (msd_mouse_plugin_get_type ()) +#define MSD_MOUSE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_MOUSE_PLUGIN, MsdMousePlugin)) +#define MSD_MOUSE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_MOUSE_PLUGIN, MsdMousePluginClass)) +#define MSD_IS_MOUSE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_MOUSE_PLUGIN)) +#define MSD_IS_MOUSE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_MOUSE_PLUGIN)) +#define MSD_MOUSE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_MOUSE_PLUGIN, MsdMousePluginClass)) -typedef struct GsdMousePluginPrivate GsdMousePluginPrivate; +typedef struct MsdMousePluginPrivate MsdMousePluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdMousePluginPrivate *priv; -} GsdMousePlugin; + MsdMousePluginPrivate *priv; +} MsdMousePlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdMousePluginClass; +} MsdMousePluginClass; -GType gsd_mouse_plugin_get_type (void) G_GNUC_CONST; +GType msd_mouse_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_MOUSE_PLUGIN_H__ */ +#endif /* __MSD_MOUSE_PLUGIN_H__ */ diff --git a/plugins/mouse/gsd-timeline.c b/plugins/mouse/gsd-timeline.c index 748a0ad..9bcfd2f 100644 --- a/plugins/mouse/gsd-timeline.c +++ b/plugins/mouse/gsd-timeline.c @@ -1,4 +1,4 @@ -/* gsd-timeline.c +/* msd-timeline.c * * Copyright (C) 2008 Carlos Garnacho <[email protected]> * @@ -20,16 +20,16 @@ #include <glib.h> #include <gtk/gtk.h> #include <math.h> -#include "gsd-timeline.h" +#include "msd-timeline.h" -#define GSD_TIMELINE_GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GSD_TYPE_TIMELINE, GsdTimelinePriv)) +#define MSD_TIMELINE_GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MSD_TYPE_TIMELINE, MsdTimelinePriv)) #define MSECS_PER_SEC 1000 #define FRAME_INTERVAL(nframes) (MSECS_PER_SEC / nframes) #define DEFAULT_FPS 30 -typedef struct GsdTimelinePriv GsdTimelinePriv; +typedef struct MsdTimelinePriv MsdTimelinePriv; -struct GsdTimelinePriv +struct MsdTimelinePriv { guint duration; guint fps; @@ -38,8 +38,8 @@ struct GsdTimelinePriv GTimer *timer; GdkScreen *screen; - GsdTimelineProgressType progress_type; - GsdTimelineProgressFunc progress_func; + MsdTimelineProgressType progress_type; + MsdTimelineProgressFunc progress_func; guint loop : 1; guint direction : 1; @@ -66,67 +66,67 @@ enum { static guint signals [LAST_SIGNAL] = { 0, }; -static void gsd_timeline_set_property (GObject *object, +static void msd_timeline_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void gsd_timeline_get_property (GObject *object, +static void msd_timeline_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gsd_timeline_finalize (GObject *object); +static void msd_timeline_finalize (GObject *object); -G_DEFINE_TYPE (GsdTimeline, gsd_timeline, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdTimeline, msd_timeline, G_TYPE_OBJECT) GType -gsd_timeline_direction_get_type (void) +msd_timeline_direction_get_type (void) { static GType type = 0; if (G_UNLIKELY (type == 0)) { static const GEnumValue values[] = { - { GSD_TIMELINE_DIRECTION_FORWARD, "GSD_TIMELINE_DIRECTION_FORWARD", "forward" }, - { GSD_TIMELINE_DIRECTION_BACKWARD, "GSD_TIMELINE_DIRECTION_BACKWARD", "backward" }, + { MSD_TIMELINE_DIRECTION_FORWARD, "MSD_TIMELINE_DIRECTION_FORWARD", "forward" }, + { MSD_TIMELINE_DIRECTION_BACKWARD, "MSD_TIMELINE_DIRECTION_BACKWARD", "backward" }, { 0, NULL, NULL } }; - type = g_enum_register_static (g_intern_static_string ("GsdTimelineDirection"), values); + type = g_enum_register_static (g_intern_static_string ("MsdTimelineDirection"), values); } return type; } GType -gsd_timeline_progress_type_get_type (void) +msd_timeline_progress_type_get_type (void) { static GType type = 0; if (G_UNLIKELY (type == 0)) { static const GEnumValue values[] = { - { GSD_TIMELINE_PROGRESS_LINEAR, "GSD_TIMELINE_PROGRESS_LINEAR", "linear" }, - { GSD_TIMELINE_PROGRESS_SINUSOIDAL, "GSD_TIMELINE_PROGRESS_SINUSOIDAL", "sinusoidal" }, - { GSD_TIMELINE_PROGRESS_EXPONENTIAL, "GSD_TIMELINE_PROGRESS_EXPONENTIAL", "exponential" }, + { MSD_TIMELINE_PROGRESS_LINEAR, "MSD_TIMELINE_PROGRESS_LINEAR", "linear" }, + { MSD_TIMELINE_PROGRESS_SINUSOIDAL, "MSD_TIMELINE_PROGRESS_SINUSOIDAL", "sinusoidal" }, + { MSD_TIMELINE_PROGRESS_EXPONENTIAL, "MSD_TIMELINE_PROGRESS_EXPONENTIAL", "exponential" }, { 0, NULL, NULL } }; - type = g_enum_register_static (g_intern_static_string ("GsdTimelineProgressType"), values); + type = g_enum_register_static (g_intern_static_string ("MsdTimelineProgressType"), values); } return type; } static void -gsd_timeline_class_init (GsdTimelineClass *class) +msd_timeline_class_init (MsdTimelineClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); - object_class->set_property = gsd_timeline_set_property; - object_class->get_property = gsd_timeline_get_property; - object_class->finalize = gsd_timeline_finalize; + object_class->set_property = msd_timeline_set_property; + object_class->get_property = msd_timeline_get_property; + object_class->finalize = msd_timeline_finalize; g_object_class_install_property (object_class, PROP_FPS, @@ -158,16 +158,16 @@ gsd_timeline_class_init (GsdTimelineClass *class) g_param_spec_enum ("direction", "Direction", "Whether the timeline moves forward or backward in time", - GSD_TYPE_TIMELINE_DIRECTION, - GSD_TIMELINE_DIRECTION_FORWARD, + MSD_TYPE_TIMELINE_DIRECTION, + MSD_TIMELINE_DIRECTION_FORWARD, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_DIRECTION, g_param_spec_enum ("progress-type", "Progress type", "Type of progress through the timeline", - GSD_TYPE_TIMELINE_PROGRESS_TYPE, - GSD_TIMELINE_PROGRESS_LINEAR, + MSD_TYPE_TIMELINE_PROGRESS_TYPE, + MSD_TIMELINE_PROGRESS_LINEAR, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SCREEN, @@ -181,7 +181,7 @@ gsd_timeline_class_init (GsdTimelineClass *class) g_signal_new ("started", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdTimelineClass, started), + G_STRUCT_OFFSET (MsdTimelineClass, started), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -190,7 +190,7 @@ gsd_timeline_class_init (GsdTimelineClass *class) g_signal_new ("paused", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdTimelineClass, paused), + G_STRUCT_OFFSET (MsdTimelineClass, paused), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -199,7 +199,7 @@ gsd_timeline_class_init (GsdTimelineClass *class) g_signal_new ("finished", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdTimelineClass, finished), + G_STRUCT_OFFSET (MsdTimelineClass, finished), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -208,60 +208,60 @@ gsd_timeline_class_init (GsdTimelineClass *class) g_signal_new ("frame", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdTimelineClass, frame), + G_STRUCT_OFFSET (MsdTimelineClass, frame), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); - g_type_class_add_private (class, sizeof (GsdTimelinePriv)); + g_type_class_add_private (class, sizeof (MsdTimelinePriv)); } static void -gsd_timeline_init (GsdTimeline *timeline) +msd_timeline_init (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); priv->fps = DEFAULT_FPS; priv->duration = 0; - priv->direction = GSD_TIMELINE_DIRECTION_FORWARD; + priv->direction = MSD_TIMELINE_DIRECTION_FORWARD; priv->screen = gdk_screen_get_default (); } static void -gsd_timeline_set_property (GObject *object, +msd_timeline_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdTimeline *timeline; - GsdTimelinePriv *priv; + MsdTimeline *timeline; + MsdTimelinePriv *priv; - timeline = GSD_TIMELINE (object); - priv = GSD_TIMELINE_GET_PRIV (timeline); + timeline = MSD_TIMELINE (object); + priv = MSD_TIMELINE_GET_PRIV (timeline); switch (prop_id) { case PROP_FPS: - gsd_timeline_set_fps (timeline, g_value_get_uint (value)); + msd_timeline_set_fps (timeline, g_value_get_uint (value)); break; case PROP_DURATION: - gsd_timeline_set_duration (timeline, g_value_get_uint (value)); + msd_timeline_set_duration (timeline, g_value_get_uint (value)); break; case PROP_LOOP: - gsd_timeline_set_loop (timeline, g_value_get_boolean (value)); + msd_timeline_set_loop (timeline, g_value_get_boolean (value)); break; case PROP_DIRECTION: - gsd_timeline_set_direction (timeline, g_value_get_enum (value)); + msd_timeline_set_direction (timeline, g_value_get_enum (value)); break; case PROP_SCREEN: - gsd_timeline_set_screen (timeline, + msd_timeline_set_screen (timeline, GDK_SCREEN (g_value_get_object (value))); break; case PROP_PROGRESS_TYPE: - gsd_timeline_set_progress_type (timeline, g_value_get_enum (value)); + msd_timeline_set_progress_type (timeline, g_value_get_enum (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -269,16 +269,16 @@ gsd_timeline_set_property (GObject *object, } static void -gsd_timeline_get_property (GObject *object, +msd_timeline_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdTimeline *timeline; - GsdTimelinePriv *priv; + MsdTimeline *timeline; + MsdTimelinePriv *priv; - timeline = GSD_TIMELINE (object); - priv = GSD_TIMELINE_GET_PRIV (timeline); + timeline = MSD_TIMELINE (object); + priv = MSD_TIMELINE_GET_PRIV (timeline); switch (prop_id) { @@ -306,11 +306,11 @@ gsd_timeline_get_property (GObject *object, } static void -gsd_timeline_finalize (GObject *object) +msd_timeline_finalize (GObject *object) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - priv = GSD_TIMELINE_GET_PRIV (object); + priv = MSD_TIMELINE_GET_PRIV (object); if (priv->source_id) { @@ -321,7 +321,7 @@ gsd_timeline_finalize (GObject *object) if (priv->timer) g_timer_destroy (priv->timer); - G_OBJECT_CLASS (gsd_timeline_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_timeline_parent_class)->finalize (object); } /* Sinusoidal progress */ @@ -337,27 +337,27 @@ exponential_progress (gdouble progress) return progress * progress; } -static GsdTimelineProgressFunc -progress_type_to_func (GsdTimelineProgressType type) +static MsdTimelineProgressFunc +progress_type_to_func (MsdTimelineProgressType type) { - if (type == GSD_TIMELINE_PROGRESS_SINUSOIDAL) + if (type == MSD_TIMELINE_PROGRESS_SINUSOIDAL) return sinusoidal_progress; - else if (type == GSD_TIMELINE_PROGRESS_EXPONENTIAL) + else if (type == MSD_TIMELINE_PROGRESS_EXPONENTIAL) return exponential_progress; return NULL; } static gboolean -gsd_timeline_run_frame (GsdTimeline *timeline, +msd_timeline_run_frame (MsdTimeline *timeline, gboolean enable_animations) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; gdouble linear_progress, progress; guint elapsed_time; - GsdTimelineProgressFunc progress_func = NULL; + MsdTimelineProgressFunc progress_func = NULL; - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); if (enable_animations) { @@ -365,7 +365,7 @@ gsd_timeline_run_frame (GsdTimeline *timeline, linear_progress = (gdouble) elapsed_time / priv->duration; - if (priv->direction == GSD_TIMELINE_DIRECTION_BACKWARD) + if (priv->direction == MSD_TIMELINE_DIRECTION_BACKWARD) linear_progress = 1 - linear_progress; linear_progress = CLAMP (linear_progress, 0., 1.); @@ -381,13 +381,13 @@ gsd_timeline_run_frame (GsdTimeline *timeline, progress = linear_progress; } else - progress = (priv->direction == GSD_TIMELINE_DIRECTION_FORWARD) ? 1.0 : 0.0; + progress = (priv->direction == MSD_TIMELINE_DIRECTION_FORWARD) ? 1.0 : 0.0; g_signal_emit (timeline, signals [FRAME], 0, CLAMP (progress, 0.0, 1.0)); - if ((priv->direction == GSD_TIMELINE_DIRECTION_FORWARD && progress >= 1.0) || - (priv->direction == GSD_TIMELINE_DIRECTION_BACKWARD && progress <= 0.0)) + if ((priv->direction == MSD_TIMELINE_DIRECTION_FORWARD && progress >= 1.0) || + (priv->direction == MSD_TIMELINE_DIRECTION_BACKWARD && progress <= 0.0)) { if (!priv->loop) { @@ -401,60 +401,60 @@ gsd_timeline_run_frame (GsdTimeline *timeline, return FALSE; } else - gsd_timeline_rewind (timeline); + msd_timeline_rewind (timeline); } return TRUE; } static gboolean -gsd_timeline_frame_idle_func (GsdTimeline *timeline) +msd_timeline_frame_idle_func (MsdTimeline *timeline) { - return gsd_timeline_run_frame (timeline, TRUE); + return msd_timeline_run_frame (timeline, TRUE); } /** - * gsd_timeline_new: + * msd_timeline_new: * @duration: duration in milliseconds for the timeline * - * Creates a new #GsdTimeline with the specified number of frames. + * Creates a new #MsdTimeline with the specified number of frames. * - * Return Value: the newly created #GsdTimeline + * Return Value: the newly created #MsdTimeline **/ -GsdTimeline * -gsd_timeline_new (guint duration) +MsdTimeline * +msd_timeline_new (guint duration) { - return g_object_new (GSD_TYPE_TIMELINE, + return g_object_new (MSD_TYPE_TIMELINE, "duration", duration, NULL); } -GsdTimeline * -gsd_timeline_new_for_screen (guint duration, +MsdTimeline * +msd_timeline_new_for_screen (guint duration, GdkScreen *screen) { - return g_object_new (GSD_TYPE_TIMELINE, + return g_object_new (MSD_TYPE_TIMELINE, "duration", duration, "screen", screen, NULL); } /** - * gsd_timeline_start: - * @timeline: A #GsdTimeline + * msd_timeline_start: + * @timeline: A #MsdTimeline * * Runs the timeline from the current frame. **/ void -gsd_timeline_start (GsdTimeline *timeline) +msd_timeline_start (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; GtkSettings *settings; gboolean enable_animations = FALSE; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); if (priv->screen) { @@ -477,7 +477,7 @@ gsd_timeline_start (GsdTimeline *timeline) g_signal_emit (timeline, signals [STARTED], 0); priv->source_id = gdk_threads_add_timeout (FRAME_INTERVAL (priv->fps), - (GSourceFunc) gsd_timeline_frame_idle_func, + (GSourceFunc) msd_timeline_frame_idle_func, timeline); } } @@ -490,24 +490,24 @@ gsd_timeline_start (GsdTimeline *timeline) * loop into this animation again. */ g_signal_emit (timeline, signals [STARTED], 0); - gsd_timeline_run_frame (timeline, FALSE); + msd_timeline_run_frame (timeline, FALSE); } } /** - * gsd_timeline_pause: - * @timeline: A #GsdTimeline + * msd_timeline_pause: + * @timeline: A #MsdTimeline * * Pauses the timeline. **/ void -gsd_timeline_pause (GsdTimeline *timeline) +msd_timeline_pause (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); if (priv->source_id) { @@ -519,26 +519,26 @@ gsd_timeline_pause (GsdTimeline *timeline) } /** - * gsd_timeline_rewind: - * @timeline: A #GsdTimeline + * msd_timeline_rewind: + * @timeline: A #MsdTimeline * * Rewinds the timeline. **/ void -gsd_timeline_rewind (GsdTimeline *timeline) +msd_timeline_rewind (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); /* destroy and re-create timer if neccesary */ if (priv->timer) { g_timer_destroy (priv->timer); - if (gsd_timeline_is_running (timeline)) + if (msd_timeline_is_running (timeline)) priv->timer = g_timer_new (); else priv->timer = NULL; @@ -546,70 +546,70 @@ gsd_timeline_rewind (GsdTimeline *timeline) } /** - * gsd_timeline_is_running: - * @timeline: A #GsdTimeline + * msd_timeline_is_running: + * @timeline: A #MsdTimeline * * Returns whether the timeline is running or not. * * Return Value: %TRUE if the timeline is running **/ gboolean -gsd_timeline_is_running (GsdTimeline *timeline) +msd_timeline_is_running (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), FALSE); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), FALSE); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); return (priv->source_id != 0); } /** - * gsd_timeline_get_fps: - * @timeline: A #GsdTimeline + * msd_timeline_get_fps: + * @timeline: A #MsdTimeline * * Returns the number of frames per second. * * Return Value: frames per second **/ guint -gsd_timeline_get_fps (GsdTimeline *timeline) +msd_timeline_get_fps (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), 1); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), 1); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); return priv->fps; } /** - * gsd_timeline_set_fps: - * @timeline: A #GsdTimeline + * msd_timeline_set_fps: + * @timeline: A #MsdTimeline * @fps: frames per second * * Sets the number of frames per second that * the timeline will play. **/ void -gsd_timeline_set_fps (GsdTimeline *timeline, +msd_timeline_set_fps (MsdTimeline *timeline, guint fps) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); g_return_if_fail (fps > 0); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); priv->fps = fps; - if (gsd_timeline_is_running (timeline)) + if (msd_timeline_is_running (timeline)) { g_source_remove (priv->source_id); priv->source_id = gdk_threads_add_timeout (FRAME_INTERVAL (priv->fps), - (GSourceFunc) gsd_timeline_run_frame, + (GSourceFunc) msd_timeline_run_frame, timeline); } @@ -617,8 +617,8 @@ gsd_timeline_set_fps (GsdTimeline *timeline, } /** - * gsd_timeline_get_loop: - * @timeline: A #GsdTimeline + * msd_timeline_get_loop: + * @timeline: A #MsdTimeline * * Returns whether the timeline loops to the * beginning when it has reached the end. @@ -626,47 +626,47 @@ gsd_timeline_set_fps (GsdTimeline *timeline, * Return Value: %TRUE if the timeline loops **/ gboolean -gsd_timeline_get_loop (GsdTimeline *timeline) +msd_timeline_get_loop (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), FALSE); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), FALSE); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); return priv->loop; } /** - * gsd_timeline_set_loop: - * @timeline: A #GsdTimeline + * msd_timeline_set_loop: + * @timeline: A #MsdTimeline * @loop: %TRUE to make the timeline loop * * Sets whether the timeline loops to the beginning * when it has reached the end. **/ void -gsd_timeline_set_loop (GsdTimeline *timeline, +msd_timeline_set_loop (MsdTimeline *timeline, gboolean loop) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); priv->loop = loop; g_object_notify (G_OBJECT (timeline), "loop"); } void -gsd_timeline_set_duration (GsdTimeline *timeline, +msd_timeline_set_duration (MsdTimeline *timeline, guint duration) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); priv->duration = duration; @@ -674,78 +674,78 @@ gsd_timeline_set_duration (GsdTimeline *timeline, } guint -gsd_timeline_get_duration (GsdTimeline *timeline) +msd_timeline_get_duration (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), 0); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), 0); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); return priv->duration; } /** - * gsd_timeline_get_direction: - * @timeline: A #GsdTimeline + * msd_timeline_get_direction: + * @timeline: A #MsdTimeline * * Returns the direction of the timeline. * * Return Value: direction **/ -GsdTimelineDirection -gsd_timeline_get_direction (GsdTimeline *timeline) +MsdTimelineDirection +msd_timeline_get_direction (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), GSD_TIMELINE_DIRECTION_FORWARD); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), MSD_TIMELINE_DIRECTION_FORWARD); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); return priv->direction; } /** - * gsd_timeline_set_direction: - * @timeline: A #GsdTimeline + * msd_timeline_set_direction: + * @timeline: A #MsdTimeline * @direction: direction * * Sets the direction of the timeline. **/ void -gsd_timeline_set_direction (GsdTimeline *timeline, - GsdTimelineDirection direction) +msd_timeline_set_direction (MsdTimeline *timeline, + MsdTimelineDirection direction) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); priv->direction = direction; g_object_notify (G_OBJECT (timeline), "direction"); } GdkScreen * -gsd_timeline_get_screen (GsdTimeline *timeline) +msd_timeline_get_screen (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), NULL); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), NULL); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); return priv->screen; } void -gsd_timeline_set_screen (GsdTimeline *timeline, +msd_timeline_set_screen (MsdTimeline *timeline, GdkScreen *screen) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); g_return_if_fail (GDK_IS_SCREEN (screen)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); if (priv->screen) g_object_unref (priv->screen); @@ -756,38 +756,38 @@ gsd_timeline_set_screen (GsdTimeline *timeline, } void -gsd_timeline_set_progress_type (GsdTimeline *timeline, - GsdTimelineProgressType type) +msd_timeline_set_progress_type (MsdTimeline *timeline, + MsdTimelineProgressType type) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); priv->progress_type = type; g_object_notify (G_OBJECT (timeline), "progress-type"); } -GsdTimelineProgressType -gsd_timeline_get_progress_type (GsdTimeline *timeline) +MsdTimelineProgressType +msd_timeline_get_progress_type (MsdTimeline *timeline) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), GSD_TIMELINE_PROGRESS_LINEAR); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), MSD_TIMELINE_PROGRESS_LINEAR); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); if (priv->progress_func) - return GSD_TIMELINE_PROGRESS_LINEAR; + return MSD_TIMELINE_PROGRESS_LINEAR; return priv->progress_type; } /** - * gsd_timeline_set_progress_func: - * @timeline: A #GsdTimeline + * msd_timeline_set_progress_func: + * @timeline: A #MsdTimeline * @progress_func: progress function * * Sets the progress function. This function will be used to calculate @@ -799,28 +799,28 @@ gsd_timeline_get_progress_type (GsdTimeline *timeline) * All progresses are in the [0.0, 1.0] range. **/ void -gsd_timeline_set_progress_func (GsdTimeline *timeline, - GsdTimelineProgressFunc progress_func) +msd_timeline_set_progress_func (MsdTimeline *timeline, + MsdTimelineProgressFunc progress_func) { - GsdTimelinePriv *priv; + MsdTimelinePriv *priv; - g_return_if_fail (GSD_IS_TIMELINE (timeline)); + g_return_if_fail (MSD_IS_TIMELINE (timeline)); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); priv->progress_func = progress_func; } gdouble -gsd_timeline_get_progress (GsdTimeline *timeline) +msd_timeline_get_progress (MsdTimeline *timeline) { - GsdTimelinePriv *priv; - GsdTimelineProgressFunc progress_func = NULL; + MsdTimelinePriv *priv; + MsdTimelineProgressFunc progress_func = NULL; gdouble linear_progress, progress; guint elapsed_time; - g_return_val_if_fail (GSD_IS_TIMELINE (timeline), 0.0); + g_return_val_if_fail (MSD_IS_TIMELINE (timeline), 0.0); - priv = GSD_TIMELINE_GET_PRIV (timeline); + priv = MSD_TIMELINE_GET_PRIV (timeline); if (!priv->timer) return 0.; @@ -829,7 +829,7 @@ gsd_timeline_get_progress (GsdTimeline *timeline) linear_progress = (gdouble) elapsed_time / priv->duration; - if (priv->direction == GSD_TIMELINE_DIRECTION_BACKWARD) + if (priv->direction == MSD_TIMELINE_DIRECTION_BACKWARD) linear_progress = 1 - linear_progress; linear_progress = CLAMP (linear_progress, 0., 1.); diff --git a/plugins/mouse/gsd-timeline.h b/plugins/mouse/gsd-timeline.h index d4ecbcc..b8d40ca 100644 --- a/plugins/mouse/gsd-timeline.h +++ b/plugins/mouse/gsd-timeline.h @@ -1,4 +1,4 @@ -/* gsdtimeline.c +/* msdtimeline.c * * Copyright (C) 2008 Carlos Garnacho <[email protected]> * @@ -17,8 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __GSD_TIMELINE_H__ -#define __GSD_TIMELINE_H__ +#ifndef __MSD_TIMELINE_H__ +#define __MSD_TIMELINE_H__ #include <glib-object.h> #include <gdk/gdk.h> @@ -27,101 +27,101 @@ extern "C" { #endif -#define GSD_TYPE_TIMELINE_DIRECTION (gsd_timeline_direction_get_type ()) -#define GSD_TYPE_TIMELINE_PROGRESS_TYPE (gsd_timeline_progress_type_get_type ()) -#define GSD_TYPE_TIMELINE (gsd_timeline_get_type ()) -#define GSD_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_TIMELINE, GsdTimeline)) -#define GSD_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_TIMELINE, GsdTimelineClass)) -#define GSD_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSD_TYPE_TIMELINE)) -#define GSD_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSD_TYPE_TIMELINE)) -#define GSD_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSD_TYPE_TIMELINE, GsdTimelineClass)) +#define MSD_TYPE_TIMELINE_DIRECTION (msd_timeline_direction_get_type ()) +#define MSD_TYPE_TIMELINE_PROGRESS_TYPE (msd_timeline_progress_type_get_type ()) +#define MSD_TYPE_TIMELINE (msd_timeline_get_type ()) +#define MSD_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MSD_TYPE_TIMELINE, MsdTimeline)) +#define MSD_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSD_TYPE_TIMELINE, MsdTimelineClass)) +#define MSD_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MSD_TYPE_TIMELINE)) +#define MSD_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MSD_TYPE_TIMELINE)) +#define MSD_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MSD_TYPE_TIMELINE, MsdTimelineClass)) typedef enum { - GSD_TIMELINE_DIRECTION_FORWARD, - GSD_TIMELINE_DIRECTION_BACKWARD -} GsdTimelineDirection; + MSD_TIMELINE_DIRECTION_FORWARD, + MSD_TIMELINE_DIRECTION_BACKWARD +} MsdTimelineDirection; typedef enum { - GSD_TIMELINE_PROGRESS_LINEAR, - GSD_TIMELINE_PROGRESS_SINUSOIDAL, - GSD_TIMELINE_PROGRESS_EXPONENTIAL -} GsdTimelineProgressType; + MSD_TIMELINE_PROGRESS_LINEAR, + MSD_TIMELINE_PROGRESS_SINUSOIDAL, + MSD_TIMELINE_PROGRESS_EXPONENTIAL +} MsdTimelineProgressType; -typedef struct GsdTimeline GsdTimeline; -typedef struct GsdTimelineClass GsdTimelineClass; +typedef struct MsdTimeline MsdTimeline; +typedef struct MsdTimelineClass MsdTimelineClass; -struct GsdTimeline +struct MsdTimeline { GObject parent_instance; }; -struct GsdTimelineClass +struct MsdTimelineClass { GObjectClass parent_class; - void (* started) (GsdTimeline *timeline); - void (* finished) (GsdTimeline *timeline); - void (* paused) (GsdTimeline *timeline); + void (* started) (MsdTimeline *timeline); + void (* finished) (MsdTimeline *timeline); + void (* paused) (MsdTimeline *timeline); - void (* frame) (GsdTimeline *timeline, + void (* frame) (MsdTimeline *timeline, gdouble progress); - void (* __gsd_reserved1) (void); - void (* __gsd_reserved2) (void); - void (* __gsd_reserved3) (void); - void (* __gsd_reserved4) (void); + void (* __msd_reserved1) (void); + void (* __msd_reserved2) (void); + void (* __msd_reserved3) (void); + void (* __msd_reserved4) (void); }; -typedef gdouble (*GsdTimelineProgressFunc) (gdouble progress); +typedef gdouble (*MsdTimelineProgressFunc) (gdouble progress); -GType gsd_timeline_get_type (void) G_GNUC_CONST; -GType gsd_timeline_direction_get_type (void) G_GNUC_CONST; -GType gsd_timeline_progress_type_get_type (void) G_GNUC_CONST; +GType msd_timeline_get_type (void) G_GNUC_CONST; +GType msd_timeline_direction_get_type (void) G_GNUC_CONST; +GType msd_timeline_progress_type_get_type (void) G_GNUC_CONST; -GsdTimeline *gsd_timeline_new (guint duration); -GsdTimeline *gsd_timeline_new_for_screen (guint duration, +MsdTimeline *msd_timeline_new (guint duration); +MsdTimeline *msd_timeline_new_for_screen (guint duration, GdkScreen *screen); -void gsd_timeline_start (GsdTimeline *timeline); -void gsd_timeline_pause (GsdTimeline *timeline); -void gsd_timeline_rewind (GsdTimeline *timeline); +void msd_timeline_start (MsdTimeline *timeline); +void msd_timeline_pause (MsdTimeline *timeline); +void msd_timeline_rewind (MsdTimeline *timeline); -gboolean gsd_timeline_is_running (GsdTimeline *timeline); +gboolean msd_timeline_is_running (MsdTimeline *timeline); -guint gsd_timeline_get_fps (GsdTimeline *timeline); -void gsd_timeline_set_fps (GsdTimeline *timeline, +guint msd_timeline_get_fps (MsdTimeline *timeline); +void msd_timeline_set_fps (MsdTimeline *timeline, guint fps); -gboolean gsd_timeline_get_loop (GsdTimeline *timeline); -void gsd_timeline_set_loop (GsdTimeline *timeline, +gboolean msd_timeline_get_loop (MsdTimeline *timeline); +void msd_timeline_set_loop (MsdTimeline *timeline, gboolean loop); -guint gsd_timeline_get_duration (GsdTimeline *timeline); -void gsd_timeline_set_duration (GsdTimeline *timeline, +guint msd_timeline_get_duration (MsdTimeline *timeline); +void msd_timeline_set_duration (MsdTimeline *timeline, guint duration); -GdkScreen *gsd_timeline_get_screen (GsdTimeline *timeline); -void gsd_timeline_set_screen (GsdTimeline *timeline, +GdkScreen *msd_timeline_get_screen (MsdTimeline *timeline); +void msd_timeline_set_screen (MsdTimeline *timeline, GdkScreen *screen); -GsdTimelineDirection gsd_timeline_get_direction (GsdTimeline *timeline); -void gsd_timeline_set_direction (GsdTimeline *timeline, - GsdTimelineDirection direction); +MsdTimelineDirection msd_timeline_get_direction (MsdTimeline *timeline); +void msd_timeline_set_direction (MsdTimeline *timeline, + MsdTimelineDirection direction); -GsdTimelineProgressType gsd_timeline_get_progress_type (GsdTimeline *timeline); -void gsd_timeline_set_progress_type (GsdTimeline *timeline, - GsdTimelineProgressType type); -void gsd_timeline_get_progress_func (GsdTimeline *timeline); +MsdTimelineProgressType msd_timeline_get_progress_type (MsdTimeline *timeline); +void msd_timeline_set_progress_type (MsdTimeline *timeline, + MsdTimelineProgressType type); +void msd_timeline_get_progress_func (MsdTimeline *timeline); -void gsd_timeline_set_progress_func (GsdTimeline *timeline, - GsdTimelineProgressFunc progress_func); +void msd_timeline_set_progress_func (MsdTimeline *timeline, + MsdTimelineProgressFunc progress_func); -gdouble gsd_timeline_get_progress (GsdTimeline *timeline); +gdouble msd_timeline_get_progress (MsdTimeline *timeline); #ifdef __cplusplus } #endif -#endif /* __GSD_TIMELINE_H__ */ +#endif /* __MSD_TIMELINE_H__ */ diff --git a/plugins/smartcard/Makefile.am b/plugins/smartcard/Makefile.am index a70e0a0..4e01be4 100644 --- a/plugins/smartcard/Makefile.am +++ b/plugins/smartcard/Makefile.am @@ -2,19 +2,19 @@ plugin_LTLIBRARIES = \ libsmartcard.la libsmartcard_la_SOURCES = \ - gsd-smartcard-plugin.h \ - gsd-smartcard-plugin.c \ - gsd-smartcard.h \ - gsd-smartcard.c \ - gsd-smartcard-manager.h \ - gsd-smartcard-manager.c + msd-smartcard-plugin.h \ + msd-smartcard-plugin.c \ + msd-smartcard.h \ + msd-smartcard.c \ + msd-smartcard-manager.h \ + msd-smartcard-manager.c libsmartcard_la_CPPFLAGS = \ -I$(top_srcdir)/mate-settings-daemon \ -DMATE_SETTINGS_LOCALEDIR=\""$(datadir)/locale"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DLIBDIR=\""$(libdir)"\" \ - -DGSD_SMARTCARD_MANAGER_NSS_DB=\""$(NSS_DATABASE)"\" \ + -DMSD_SMARTCARD_MANAGER_NSS_DB=\""$(NSS_DATABASE)"\" \ $(AM_CPPFLAGS) libsmartcard_la_CFLAGS = \ @@ -24,13 +24,13 @@ libsmartcard_la_CFLAGS = \ $(AM_CFLAGS) libsmartcard_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) + $(MSD_PLUGIN_LDFLAGS) libsmartcard_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) \ $(NSS_LIBS) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ plugin_in_files = \ smartcard.mate-settings-plugin.in diff --git a/plugins/smartcard/gsd-smartcard-manager.c b/plugins/smartcard/gsd-smartcard-manager.c index a231e20..ed823f4 100644 --- a/plugins/smartcard/gsd-smartcard-manager.c +++ b/plugins/smartcard/gsd-smartcard-manager.c @@ -1,4 +1,4 @@ -/* gsd-smartcard-manager.c - object for monitoring smartcard insertion and +/* msd-smartcard-manager.c - object for monitoring smartcard insertion and * removal events * * Copyright (C) 2006, 2009 Red Hat, Inc. @@ -22,10 +22,10 @@ */ #include "config.h" -#include "gsd-smartcard-manager.h" +#include "msd-smartcard-manager.h" #define SMARTCARD_ENABLE_INTERNAL_API -#include "gsd-smartcard.h" +#include "msd-smartcard.h" #include <dirent.h> #include <errno.h> @@ -49,22 +49,22 @@ #include <secmod.h> #include <secerr.h> -#ifndef GSD_SMARTCARD_MANAGER_NSS_DB -#define GSD_SMARTCARD_MANAGER_NSS_DB SYSCONFDIR"/pki/nssdb" +#ifndef MSD_SMARTCARD_MANAGER_NSS_DB +#define MSD_SMARTCARD_MANAGER_NSS_DB SYSCONFDIR"/pki/nssdb" #endif -typedef enum _GsdSmartcardManagerState GsdSmartcardManagerState; -typedef struct _GsdSmartcardManagerWorker GsdSmartcardManagerWorker; +typedef enum _MsdSmartcardManagerState MsdSmartcardManagerState; +typedef struct _MsdSmartcardManagerWorker MsdSmartcardManagerWorker; -enum _GsdSmartcardManagerState { - GSD_SMARTCARD_MANAGER_STATE_STOPPED = 0, - GSD_SMARTCARD_MANAGER_STATE_STARTING, - GSD_SMARTCARD_MANAGER_STATE_STARTED, - GSD_SMARTCARD_MANAGER_STATE_STOPPING, +enum _MsdSmartcardManagerState { + MSD_SMARTCARD_MANAGER_STATE_STOPPED = 0, + MSD_SMARTCARD_MANAGER_STATE_STARTING, + MSD_SMARTCARD_MANAGER_STATE_STARTED, + MSD_SMARTCARD_MANAGER_STATE_STOPPING, }; -struct _GsdSmartcardManagerPrivate { - GsdSmartcardManagerState state; +struct _MsdSmartcardManagerPrivate { + MsdSmartcardManagerState state; SECMODModule *module; char *module_path; @@ -80,7 +80,7 @@ struct _GsdSmartcardManagerPrivate { guint32 nss_is_loaded : 1; }; -struct _GsdSmartcardManagerWorker { +struct _MsdSmartcardManagerWorker { SECMODModule *module; GHashTable *smartcards; int write_fd; @@ -88,36 +88,36 @@ struct _GsdSmartcardManagerWorker { guint32 nss_is_loaded : 1; }; -static void gsd_smartcard_manager_finalize (GObject *object); -static void gsd_smartcard_manager_class_install_signals (GsdSmartcardManagerClass *service_class); -static void gsd_smartcard_manager_class_install_properties (GsdSmartcardManagerClass *service_class); -static void gsd_smartcard_manager_set_property (GObject *object, +static void msd_smartcard_manager_finalize (GObject *object); +static void msd_smartcard_manager_class_install_signals (MsdSmartcardManagerClass *service_class); +static void msd_smartcard_manager_class_install_properties (MsdSmartcardManagerClass *service_class); +static void msd_smartcard_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void gsd_smartcard_manager_get_property (GObject *object, +static void msd_smartcard_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gsd_smartcard_manager_set_module_path (GsdSmartcardManager *manager, +static void msd_smartcard_manager_set_module_path (MsdSmartcardManager *manager, const char *module_path); -static void gsd_smartcard_manager_card_removed_handler (GsdSmartcardManager *manager, - GsdSmartcard *card); -static void gsd_smartcard_manager_card_inserted_handler (GsdSmartcardManager *manager_class, - GsdSmartcard *card); -static gboolean gsd_smartcard_manager_stop_now (GsdSmartcardManager *manager); -static void gsd_smartcard_manager_queue_stop (GsdSmartcardManager *manager); - -static gboolean gsd_smartcard_manager_create_worker (GsdSmartcardManager *manager, +static void msd_smartcard_manager_card_removed_handler (MsdSmartcardManager *manager, + MsdSmartcard *card); +static void msd_smartcard_manager_card_inserted_handler (MsdSmartcardManager *manager_class, + MsdSmartcard *card); +static gboolean msd_smartcard_manager_stop_now (MsdSmartcardManager *manager); +static void msd_smartcard_manager_queue_stop (MsdSmartcardManager *manager); + +static gboolean msd_smartcard_manager_create_worker (MsdSmartcardManager *manager, int *worker_fd, GThread **worker_thread); -static GsdSmartcardManagerWorker * gsd_smartcard_manager_worker_new (int write_fd); -static void gsd_smartcard_manager_worker_free (GsdSmartcardManagerWorker *worker); +static MsdSmartcardManagerWorker * msd_smartcard_manager_worker_new (int write_fd); +static void msd_smartcard_manager_worker_free (MsdSmartcardManagerWorker *worker); static gboolean open_pipe (int *write_fd, int *read_fd); static gboolean read_bytes (int fd, gpointer bytes, gsize num_bytes); static gboolean write_bytes (int fd, gconstpointer bytes, gsize num_bytes); -static GsdSmartcard *read_smartcard (int fd, SECMODModule *module); -static gboolean write_smartcard (int fd, GsdSmartcard *card); +static MsdSmartcard *read_smartcard (int fd, SECMODModule *module); +static gboolean write_smartcard (int fd, MsdSmartcard *card); enum { PROP_0 = 0, @@ -132,37 +132,37 @@ enum { NUMBER_OF_SIGNALS }; -static guint gsd_smartcard_manager_signals[NUMBER_OF_SIGNALS]; +static guint msd_smartcard_manager_signals[NUMBER_OF_SIGNALS]; -G_DEFINE_TYPE (GsdSmartcardManager, - gsd_smartcard_manager, +G_DEFINE_TYPE (MsdSmartcardManager, + msd_smartcard_manager, G_TYPE_OBJECT); static void -gsd_smartcard_manager_class_init (GsdSmartcardManagerClass *manager_class) +msd_smartcard_manager_class_init (MsdSmartcardManagerClass *manager_class) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (manager_class); - gobject_class->finalize = gsd_smartcard_manager_finalize; + gobject_class->finalize = msd_smartcard_manager_finalize; - gsd_smartcard_manager_class_install_signals (manager_class); - gsd_smartcard_manager_class_install_properties (manager_class); + msd_smartcard_manager_class_install_signals (manager_class); + msd_smartcard_manager_class_install_properties (manager_class); g_type_class_add_private (manager_class, - sizeof (GsdSmartcardManagerPrivate)); + sizeof (MsdSmartcardManagerPrivate)); } static void -gsd_smartcard_manager_class_install_properties (GsdSmartcardManagerClass *card_class) +msd_smartcard_manager_class_install_properties (MsdSmartcardManagerClass *card_class) { GObjectClass *object_class; GParamSpec *param_spec; object_class = G_OBJECT_CLASS (card_class); - object_class->set_property = gsd_smartcard_manager_set_property; - object_class->get_property = gsd_smartcard_manager_get_property; + object_class->set_property = msd_smartcard_manager_set_property; + object_class->get_property = msd_smartcard_manager_get_property; param_spec = g_param_spec_string ("module-path", _("Module Path"), _("path to smartcard PKCS #11 driver"), @@ -171,16 +171,16 @@ gsd_smartcard_manager_class_install_properties (GsdSmartcardManagerClass *card_c } static void -gsd_smartcard_manager_set_property (GObject *object, +msd_smartcard_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdSmartcardManager *manager = GSD_SMARTCARD_MANAGER (object); + MsdSmartcardManager *manager = MSD_SMARTCARD_MANAGER (object); switch (prop_id) { case PROP_MODULE_PATH: - gsd_smartcard_manager_set_module_path (manager, + msd_smartcard_manager_set_module_path (manager, g_value_get_string (value)); break; @@ -191,17 +191,17 @@ gsd_smartcard_manager_set_property (GObject *object, } static void -gsd_smartcard_manager_get_property (GObject *object, +msd_smartcard_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdSmartcardManager *manager = GSD_SMARTCARD_MANAGER (object); + MsdSmartcardManager *manager = MSD_SMARTCARD_MANAGER (object); char *module_path; switch (prop_id) { case PROP_MODULE_PATH: - module_path = gsd_smartcard_manager_get_module_path (manager); + module_path = msd_smartcard_manager_get_module_path (manager); g_value_set_string (value, module_path); g_free (module_path); break; @@ -213,13 +213,13 @@ gsd_smartcard_manager_get_property (GObject *object, } char * -gsd_smartcard_manager_get_module_path (GsdSmartcardManager *manager) +msd_smartcard_manager_get_module_path (MsdSmartcardManager *manager) { return manager->priv->module_path; } static void -gsd_smartcard_manager_set_module_path (GsdSmartcardManager *manager, +msd_smartcard_manager_set_module_path (MsdSmartcardManager *manager, const char *module_path) { if ((manager->priv->module_path == NULL) && (module_path == NULL)) { @@ -236,57 +236,57 @@ gsd_smartcard_manager_set_module_path (GsdSmartcardManager *manager, } static void -gsd_smartcard_manager_card_removed_handler (GsdSmartcardManager *manager, - GsdSmartcard *card) +msd_smartcard_manager_card_removed_handler (MsdSmartcardManager *manager, + MsdSmartcard *card) { g_debug ("informing smartcard of its removal"); - _gsd_smartcard_set_state (card, GSD_SMARTCARD_STATE_REMOVED); + _msd_smartcard_set_state (card, MSD_SMARTCARD_STATE_REMOVED); g_debug ("done"); } static void -gsd_smartcard_manager_card_inserted_handler (GsdSmartcardManager *manager, - GsdSmartcard *card) +msd_smartcard_manager_card_inserted_handler (MsdSmartcardManager *manager, + MsdSmartcard *card) { g_debug ("informing smartcard of its insertion"); - _gsd_smartcard_set_state (card, GSD_SMARTCARD_STATE_INSERTED); + _msd_smartcard_set_state (card, MSD_SMARTCARD_STATE_INSERTED); g_debug ("done"); } static void -gsd_smartcard_manager_class_install_signals (GsdSmartcardManagerClass *manager_class) +msd_smartcard_manager_class_install_signals (MsdSmartcardManagerClass *manager_class) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (manager_class); - gsd_smartcard_manager_signals[SMARTCARD_INSERTED] = + msd_smartcard_manager_signals[SMARTCARD_INSERTED] = g_signal_new ("smartcard-inserted", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (GsdSmartcardManagerClass, + G_STRUCT_OFFSET (MsdSmartcardManagerClass, smartcard_inserted), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); - manager_class->smartcard_inserted = gsd_smartcard_manager_card_inserted_handler; + manager_class->smartcard_inserted = msd_smartcard_manager_card_inserted_handler; - gsd_smartcard_manager_signals[SMARTCARD_REMOVED] = + msd_smartcard_manager_signals[SMARTCARD_REMOVED] = g_signal_new ("smartcard-removed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (GsdSmartcardManagerClass, + G_STRUCT_OFFSET (MsdSmartcardManagerClass, smartcard_removed), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); - manager_class->smartcard_removed = gsd_smartcard_manager_card_removed_handler; + manager_class->smartcard_removed = msd_smartcard_manager_card_removed_handler; - gsd_smartcard_manager_signals[ERROR] = + msd_smartcard_manager_signals[ERROR] = g_signal_new ("error", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdSmartcardManagerClass, error), + G_STRUCT_OFFSET (MsdSmartcardManagerClass, error), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); manager_class->error = NULL; @@ -324,13 +324,13 @@ slot_id_hash (CK_SLOT_ID *slot_id) } static void -gsd_smartcard_manager_init (GsdSmartcardManager *manager) +msd_smartcard_manager_init (MsdSmartcardManager *manager) { g_debug ("initializing smartcard manager"); manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, - GSD_TYPE_SMARTCARD_MANAGER, - GsdSmartcardManagerPrivate); + MSD_TYPE_SMARTCARD_MANAGER, + MsdSmartcardManagerPrivate); manager->priv->poll_timeout_id = 0; manager->priv->is_unstoppable = FALSE; manager->priv->module = NULL; @@ -348,16 +348,16 @@ gsd_smartcard_manager_init (GsdSmartcardManager *manager) } static void -gsd_smartcard_manager_finalize (GObject *object) +msd_smartcard_manager_finalize (GObject *object) { - GsdSmartcardManager *manager; + MsdSmartcardManager *manager; GObjectClass *gobject_class; - manager = GSD_SMARTCARD_MANAGER (object); + manager = MSD_SMARTCARD_MANAGER (object); gobject_class = - G_OBJECT_CLASS (gsd_smartcard_manager_parent_class); + G_OBJECT_CLASS (msd_smartcard_manager_parent_class); - gsd_smartcard_manager_stop_now (manager); + msd_smartcard_manager_stop_now (manager); g_hash_table_destroy (manager->priv->smartcards); manager->priv->smartcards = NULL; @@ -366,23 +366,23 @@ gsd_smartcard_manager_finalize (GObject *object) } GQuark -gsd_smartcard_manager_error_quark (void) +msd_smartcard_manager_error_quark (void) { static GQuark error_quark = 0; if (error_quark == 0) { - error_quark = g_quark_from_static_string ("gsd-smartcard-manager-error-quark"); + error_quark = g_quark_from_static_string ("msd-smartcard-manager-error-quark"); } return error_quark; } -GsdSmartcardManager * -gsd_smartcard_manager_new (const char *module_path) +MsdSmartcardManager * +msd_smartcard_manager_new (const char *module_path) { - GsdSmartcardManager *instance; + MsdSmartcardManager *instance; - instance = GSD_SMARTCARD_MANAGER (g_object_new (GSD_TYPE_SMARTCARD_MANAGER, + instance = MSD_SMARTCARD_MANAGER (g_object_new (MSD_TYPE_SMARTCARD_MANAGER, "module-path", module_path, NULL)); @@ -390,44 +390,44 @@ gsd_smartcard_manager_new (const char *module_path) } static void -gsd_smartcard_manager_emit_error (GsdSmartcardManager *manager, +msd_smartcard_manager_emit_error (MsdSmartcardManager *manager, GError *error) { manager->priv->is_unstoppable = TRUE; - g_signal_emit (manager, gsd_smartcard_manager_signals[ERROR], 0, + g_signal_emit (manager, msd_smartcard_manager_signals[ERROR], 0, error); manager->priv->is_unstoppable = FALSE; } static void -gsd_smartcard_manager_emit_smartcard_inserted (GsdSmartcardManager *manager, - GsdSmartcard *card) +msd_smartcard_manager_emit_smartcard_inserted (MsdSmartcardManager *manager, + MsdSmartcard *card) { manager->priv->is_unstoppable = TRUE; - g_signal_emit (manager, gsd_smartcard_manager_signals[SMARTCARD_INSERTED], 0, + g_signal_emit (manager, msd_smartcard_manager_signals[SMARTCARD_INSERTED], 0, card); manager->priv->is_unstoppable = FALSE; } static void -gsd_smartcard_manager_emit_smartcard_removed (GsdSmartcardManager *manager, - GsdSmartcard *card) +msd_smartcard_manager_emit_smartcard_removed (MsdSmartcardManager *manager, + MsdSmartcard *card) { - GsdSmartcardManagerState old_state; + MsdSmartcardManagerState old_state; old_state = manager->priv->state; manager->priv->is_unstoppable = TRUE; - g_signal_emit (manager, gsd_smartcard_manager_signals[SMARTCARD_REMOVED], 0, + g_signal_emit (manager, msd_smartcard_manager_signals[SMARTCARD_REMOVED], 0, card); manager->priv->is_unstoppable = FALSE; } static gboolean -gsd_smartcard_manager_check_for_and_process_events (GIOChannel *io_channel, +msd_smartcard_manager_check_for_and_process_events (GIOChannel *io_channel, GIOCondition condition, - GsdSmartcardManager *manager) + MsdSmartcardManager *manager) { - GsdSmartcard *card; + MsdSmartcard *card; gboolean should_stop; gchar event_type; char *card_name; @@ -464,7 +464,7 @@ gsd_smartcard_manager_check_for_and_process_events (GIOChannel *io_chan goto out; } - card_name = gsd_smartcard_get_name (card); + card_name = msd_smartcard_get_name (card); switch (event_type) { case 'I': @@ -472,12 +472,12 @@ gsd_smartcard_manager_check_for_and_process_events (GIOChannel *io_chan card_name, card); card_name = NULL; - gsd_smartcard_manager_emit_smartcard_inserted (manager, card); + msd_smartcard_manager_emit_smartcard_inserted (manager, card); card = NULL; break; case 'R': - gsd_smartcard_manager_emit_smartcard_removed (manager, card); + msd_smartcard_manager_emit_smartcard_removed (manager, card); if (!g_hash_table_remove (manager->priv->smartcards, card_name)) { g_debug ("got removal event of unknown card!"); } @@ -499,13 +499,13 @@ out: if (should_stop) { GError *error; - error = g_error_new (GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_WATCHING_FOR_EVENTS, + error = g_error_new (MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_WATCHING_FOR_EVENTS, "%s", (condition & G_IO_IN) ? g_strerror (errno) : _("received error or hang up from event source")); - gsd_smartcard_manager_emit_error (manager, error); + msd_smartcard_manager_emit_error (manager, error); g_error_free (error); - gsd_smartcard_manager_stop_now (manager); + msd_smartcard_manager_stop_now (manager); return FALSE; } @@ -513,10 +513,10 @@ out: } static void -gsd_smartcard_manager_event_processing_stopped_handler (GsdSmartcardManager *manager) +msd_smartcard_manager_event_processing_stopped_handler (MsdSmartcardManager *manager) { manager->priv->smartcard_event_source = NULL; - gsd_smartcard_manager_stop_now (manager); + msd_smartcard_manager_stop_now (manager); } static gboolean @@ -551,7 +551,7 @@ open_pipe (int *write_fd, } static void -gsd_smartcard_manager_stop_watching_for_events (GsdSmartcardManager *manager) +msd_smartcard_manager_stop_watching_for_events (MsdSmartcardManager *manager) { if (manager->priv->smartcard_event_source != NULL) { g_source_destroy (manager->priv->smartcard_event_source); @@ -574,9 +574,9 @@ load_nss (GError **error) NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD; g_debug ("attempting to load NSS database '%s'", - GSD_SMARTCARD_MANAGER_NSS_DB); + MSD_SMARTCARD_MANAGER_NSS_DB); - status = NSS_Initialize (GSD_SMARTCARD_MANAGER_NSS_DB, + status = NSS_Initialize (MSD_SMARTCARD_MANAGER_NSS_DB, "", "", SECMOD_DB, flags); if (status != SECSuccess) { @@ -588,8 +588,8 @@ load_nss (GError **error) if (error_message_size == 0) { g_debug ("NSS security system could not be initialized"); g_set_error (error, - GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, + MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, _("NSS security system could not be initialized")); goto out; } @@ -598,8 +598,8 @@ load_nss (GError **error) PR_GetErrorText (error_message); g_set_error (error, - GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, + MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, "%s", error_message); g_debug ("NSS security system could not be initialized - %s", error_message); @@ -657,8 +657,8 @@ load_driver (char *module_path, if (!module_explicitly_specified && module == NULL) { g_set_error (error, - GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, + MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, _("no suitable smartcard driver could be found")); } else if (module == NULL || !module->loaded) { @@ -677,8 +677,8 @@ load_driver (char *module_path, g_debug ("smartcard driver '%s' could not be loaded", module_path); g_set_error (error, - GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, + MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, _("smartcard driver '%s' could not be " "loaded"), module_path); goto out; @@ -688,8 +688,8 @@ load_driver (char *module_path, PR_GetErrorText (error_message); g_set_error (error, - GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, + MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, "%s", error_message); g_debug ("smartcard driver '%s' could not be loaded - %s", @@ -702,12 +702,12 @@ out: } static void -gsd_smartcard_manager_get_all_cards (GsdSmartcardManager *manager) +msd_smartcard_manager_get_all_cards (MsdSmartcardManager *manager) { int i; for (i = 0; i < manager->priv->module->slotCount; i++) { - GsdSmartcard *card; + MsdSmartcard *card; CK_SLOT_ID slot_id; int slot_series; char *card_name; @@ -715,10 +715,10 @@ gsd_smartcard_manager_get_all_cards (GsdSmartcardManager *manager) slot_id = PK11_GetSlotID (manager->priv->module->slots[i]); slot_series = PK11_GetSlotSeries (manager->priv->module->slots[i]); - card = _gsd_smartcard_new (manager->priv->module, + card = _msd_smartcard_new (manager->priv->module, slot_id, slot_series); - card_name = gsd_smartcard_get_name (card); + card_name = msd_smartcard_get_name (card); g_hash_table_replace (manager->priv->smartcards, card_name, card); @@ -726,7 +726,7 @@ gsd_smartcard_manager_get_all_cards (GsdSmartcardManager *manager) } gboolean -gsd_smartcard_manager_start (GsdSmartcardManager *manager, +msd_smartcard_manager_start (MsdSmartcardManager *manager, GError **error) { GError *watching_error; @@ -737,12 +737,12 @@ gsd_smartcard_manager_start (GsdSmartcardManager *manager, GIOFlags channel_flags; GError *nss_error; - if (manager->priv->state == GSD_SMARTCARD_MANAGER_STATE_STARTED) { + if (manager->priv->state == MSD_SMARTCARD_MANAGER_STATE_STARTED) { g_debug ("smartcard manager already started"); return TRUE; } - manager->priv->state = GSD_SMARTCARD_MANAGER_STATE_STARTING; + manager->priv->state = MSD_SMARTCARD_MANAGER_STATE_STARTING; worker_fd = -1; worker_pid = 0; @@ -763,11 +763,11 @@ gsd_smartcard_manager_start (GsdSmartcardManager *manager, goto out; } - if (!gsd_smartcard_manager_create_worker (manager, &worker_fd, &manager->priv->worker_thread)) { + if (!msd_smartcard_manager_create_worker (manager, &worker_fd, &manager->priv->worker_thread)) { g_set_error (error, - GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_WATCHING_FOR_EVENTS, + MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_WATCHING_FOR_EVENTS, _("could not watch for incoming card events - %s"), g_strerror (errno)); @@ -787,41 +787,41 @@ gsd_smartcard_manager_start (GsdSmartcardManager *manager, g_source_set_callback (manager->priv->smartcard_event_source, (GSourceFunc) (GIOFunc) - gsd_smartcard_manager_check_for_and_process_events, + msd_smartcard_manager_check_for_and_process_events, manager, (GDestroyNotify) - gsd_smartcard_manager_event_processing_stopped_handler); + msd_smartcard_manager_event_processing_stopped_handler); g_source_attach (manager->priv->smartcard_event_source, NULL); g_source_unref (manager->priv->smartcard_event_source); /* populate the hash with cards that are already inserted */ - gsd_smartcard_manager_get_all_cards (manager); + msd_smartcard_manager_get_all_cards (manager); - manager->priv->state = GSD_SMARTCARD_MANAGER_STATE_STARTED; + manager->priv->state = MSD_SMARTCARD_MANAGER_STATE_STARTED; out: /* don't leave it in a half started state */ - if (manager->priv->state != GSD_SMARTCARD_MANAGER_STATE_STARTED) { + if (manager->priv->state != MSD_SMARTCARD_MANAGER_STATE_STARTED) { g_debug ("smartcard manager could not be completely started"); - gsd_smartcard_manager_stop (manager); + msd_smartcard_manager_stop (manager); } else { g_debug ("smartcard manager started"); } - return manager->priv->state == GSD_SMARTCARD_MANAGER_STATE_STARTED; + return manager->priv->state == MSD_SMARTCARD_MANAGER_STATE_STARTED; } static gboolean -gsd_smartcard_manager_stop_now (GsdSmartcardManager *manager) +msd_smartcard_manager_stop_now (MsdSmartcardManager *manager) { - if (manager->priv->state == GSD_SMARTCARD_MANAGER_STATE_STOPPED) { + if (manager->priv->state == MSD_SMARTCARD_MANAGER_STATE_STOPPED) { return FALSE; } - manager->priv->state = GSD_SMARTCARD_MANAGER_STATE_STOPPED; - gsd_smartcard_manager_stop_watching_for_events (manager); + manager->priv->state = MSD_SMARTCARD_MANAGER_STATE_STOPPED; + msd_smartcard_manager_stop_watching_for_events (manager); if (manager->priv->module != NULL) { SECMOD_DestroyModule (manager->priv->module); @@ -839,44 +839,44 @@ gsd_smartcard_manager_stop_now (GsdSmartcardManager *manager) } static void -gsd_smartcard_manager_queue_stop (GsdSmartcardManager *manager) +msd_smartcard_manager_queue_stop (MsdSmartcardManager *manager) { - manager->priv->state = GSD_SMARTCARD_MANAGER_STATE_STOPPING; + manager->priv->state = MSD_SMARTCARD_MANAGER_STATE_STOPPING; - g_idle_add ((GSourceFunc) gsd_smartcard_manager_stop_now, manager); + g_idle_add ((GSourceFunc) msd_smartcard_manager_stop_now, manager); } void -gsd_smartcard_manager_stop (GsdSmartcardManager *manager) +msd_smartcard_manager_stop (MsdSmartcardManager *manager) { - if (manager->priv->state == GSD_SMARTCARD_MANAGER_STATE_STOPPED) { + if (manager->priv->state == MSD_SMARTCARD_MANAGER_STATE_STOPPED) { return; } if (manager->priv->is_unstoppable) { - gsd_smartcard_manager_queue_stop (manager); + msd_smartcard_manager_queue_stop (manager); return; } - gsd_smartcard_manager_stop_now (manager); + msd_smartcard_manager_stop_now (manager); } static void -gsd_smartcard_manager_check_for_login_card (CK_SLOT_ID slot_id, - GsdSmartcard *card, +msd_smartcard_manager_check_for_login_card (CK_SLOT_ID slot_id, + MsdSmartcard *card, gboolean *is_inserted) { g_assert (is_inserted != NULL); - if (gsd_smartcard_is_login_card (card)) { + if (msd_smartcard_is_login_card (card)) { *is_inserted = TRUE; } } gboolean -gsd_smartcard_manager_login_card_is_inserted (GsdSmartcardManager *manager) +msd_smartcard_manager_login_card_is_inserted (MsdSmartcardManager *manager) { gboolean is_inserted; @@ -884,17 +884,17 @@ gsd_smartcard_manager_login_card_is_inserted (GsdSmartcardManager *manager) is_inserted = FALSE; g_hash_table_foreach (manager->priv->smartcards, (GHFunc) - gsd_smartcard_manager_check_for_login_card, + msd_smartcard_manager_check_for_login_card, &is_inserted); return is_inserted; } -static GsdSmartcardManagerWorker * -gsd_smartcard_manager_worker_new (int write_fd) +static MsdSmartcardManagerWorker * +msd_smartcard_manager_worker_new (int write_fd) { - GsdSmartcardManagerWorker *worker; + MsdSmartcardManagerWorker *worker; - worker = g_slice_new0 (GsdSmartcardManagerWorker); + worker = g_slice_new0 (MsdSmartcardManagerWorker); worker->write_fd = write_fd; worker->module = NULL; @@ -908,14 +908,14 @@ gsd_smartcard_manager_worker_new (int write_fd) } static void -gsd_smartcard_manager_worker_free (GsdSmartcardManagerWorker *worker) +msd_smartcard_manager_worker_free (MsdSmartcardManagerWorker *worker) { if (worker->smartcards != NULL) { g_hash_table_destroy (worker->smartcards); worker->smartcards = NULL; } - g_slice_free (GsdSmartcardManagerWorker, worker); + g_slice_free (MsdSmartcardManagerWorker, worker); } static gboolean @@ -992,11 +992,11 @@ write_bytes (int fd, return TRUE; } -static GsdSmartcard * +static MsdSmartcard * read_smartcard (int fd, SECMODModule *module) { - GsdSmartcard *card; + MsdSmartcard *card; char *card_name; gsize card_name_size; @@ -1010,7 +1010,7 @@ read_smartcard (int fd, g_slice_free1 (card_name_size, card_name); return NULL; } - card = _gsd_smartcard_new_from_name (module, card_name); + card = _msd_smartcard_new_from_name (module, card_name); g_slice_free1 (card_name_size, card_name); return card; @@ -1018,12 +1018,12 @@ read_smartcard (int fd, static gboolean write_smartcard (int fd, - GsdSmartcard *card) + MsdSmartcard *card) { gsize card_name_size; char *card_name; - card_name = gsd_smartcard_get_name (card); + card_name = msd_smartcard_get_name (card); card_name_size = strlen (card_name) + 1; if (!write_bytes (fd, &card_name_size, sizeof (card_name_size))) { @@ -1041,11 +1041,11 @@ write_smartcard (int fd, } static gboolean -gsd_smartcard_manager_worker_emit_smartcard_removed (GsdSmartcardManagerWorker *worker, - GsdSmartcard *card, +msd_smartcard_manager_worker_emit_smartcard_removed (MsdSmartcardManagerWorker *worker, + MsdSmartcard *card, GError **error) { - g_debug ("card '%s' removed!", gsd_smartcard_get_name (card)); + g_debug ("card '%s' removed!", msd_smartcard_get_name (card)); if (!write_bytes (worker->write_fd, "R", 1)) { goto error_out; @@ -1058,21 +1058,21 @@ gsd_smartcard_manager_worker_emit_smartcard_removed (GsdSmartcardManagerWorker return TRUE; error_out: - g_set_error (error, GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_REPORTING_EVENTS, + g_set_error (error, MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_REPORTING_EVENTS, "%s", g_strerror (errno)); return FALSE; } static gboolean -gsd_smartcard_manager_worker_emit_smartcard_inserted (GsdSmartcardManagerWorker *worker, - GsdSmartcard *card, +msd_smartcard_manager_worker_emit_smartcard_inserted (MsdSmartcardManagerWorker *worker, + MsdSmartcard *card, GError **error) { GError *write_error; write_error = NULL; - g_debug ("card '%s' inserted!", gsd_smartcard_get_name (card)); + g_debug ("card '%s' inserted!", msd_smartcard_get_name (card)); if (!write_bytes (worker->write_fd, "I", 1)) { goto error_out; } @@ -1084,20 +1084,20 @@ gsd_smartcard_manager_worker_emit_smartcard_inserted (GsdSmartcardManagerWorker return TRUE; error_out: - g_set_error (error, GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_REPORTING_EVENTS, + g_set_error (error, MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_REPORTING_EVENTS, "%s", g_strerror (errno)); return FALSE; } static gboolean -gsd_smartcard_manager_worker_watch_for_and_process_event (GsdSmartcardManagerWorker *worker, +msd_smartcard_manager_worker_watch_for_and_process_event (MsdSmartcardManagerWorker *worker, GError **error) { PK11SlotInfo *slot; CK_SLOT_ID slot_id, *key; int slot_series, card_slot_series; - GsdSmartcard *card; + MsdSmartcard *card; GError *processing_error; gboolean ret; @@ -1119,8 +1119,8 @@ gsd_smartcard_manager_worker_watch_for_and_process_event (GsdSmartcardManagerWor /* FIXME: is there a function to convert from a PORT error * code to a translated string? */ - g_set_error (error, GSD_SMARTCARD_MANAGER_ERROR, - GSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, + g_set_error (error, MSD_SMARTCARD_MANAGER_ERROR, + MSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, _("encountered unexpected error while " "waiting for smartcard events")); goto out; @@ -1141,7 +1141,7 @@ gsd_smartcard_manager_worker_watch_for_and_process_event (GsdSmartcardManagerWor card = g_hash_table_lookup (worker->smartcards, key); if (card != NULL) { - card_slot_series = gsd_smartcard_get_slot_series (card); + card_slot_series = msd_smartcard_get_slot_series (card); } else { card_slot_series = -1; } @@ -1154,20 +1154,20 @@ gsd_smartcard_manager_worker_watch_for_and_process_event (GsdSmartcardManagerWor */ if ((card != NULL) && card_slot_series != slot_series) { - if (!gsd_smartcard_manager_worker_emit_smartcard_removed (worker, card, &processing_error)) { + if (!msd_smartcard_manager_worker_emit_smartcard_removed (worker, card, &processing_error)) { g_propagate_error (error, processing_error); goto out; } } - card = _gsd_smartcard_new (worker->module, + card = _msd_smartcard_new (worker->module, slot_id, slot_series); g_hash_table_replace (worker->smartcards, key, card); key = NULL; - if (!gsd_smartcard_manager_worker_emit_smartcard_inserted (worker, + if (!msd_smartcard_manager_worker_emit_smartcard_inserted (worker, card, &processing_error)) { g_propagate_error (error, processing_error); @@ -1188,24 +1188,24 @@ gsd_smartcard_manager_worker_watch_for_and_process_event (GsdSmartcardManagerWor */ if ((slot_series - card_slot_series) > 1) { - if (!gsd_smartcard_manager_worker_emit_smartcard_removed (worker, card, &processing_error)) { + if (!msd_smartcard_manager_worker_emit_smartcard_removed (worker, card, &processing_error)) { g_propagate_error (error, processing_error); goto out; } g_hash_table_remove (worker->smartcards, key); - card = _gsd_smartcard_new (worker->module, + card = _msd_smartcard_new (worker->module, slot_id, slot_series); g_hash_table_replace (worker->smartcards, key, card); key = NULL; - if (!gsd_smartcard_manager_worker_emit_smartcard_inserted (worker, card, &processing_error)) { + if (!msd_smartcard_manager_worker_emit_smartcard_inserted (worker, card, &processing_error)) { g_propagate_error (error, processing_error); goto out; } } - if (!gsd_smartcard_manager_worker_emit_smartcard_removed (worker, card, &processing_error)) { + if (!msd_smartcard_manager_worker_emit_smartcard_removed (worker, card, &processing_error)) { g_propagate_error (error, processing_error); goto out; } @@ -1227,29 +1227,29 @@ out: } static void -gsd_smartcard_manager_worker_run (GsdSmartcardManagerWorker *worker) +msd_smartcard_manager_worker_run (MsdSmartcardManagerWorker *worker) { GError *error; error = NULL; - while (gsd_smartcard_manager_worker_watch_for_and_process_event (worker, &error)); + while (msd_smartcard_manager_worker_watch_for_and_process_event (worker, &error)); if (error != NULL) { g_debug ("could not process card event - %s", error->message); g_error_free (error); } - gsd_smartcard_manager_worker_free (worker); + msd_smartcard_manager_worker_free (worker); } static gboolean -gsd_smartcard_manager_create_worker (GsdSmartcardManager *manager, +msd_smartcard_manager_create_worker (MsdSmartcardManager *manager, int *worker_fd, GThread **worker_thread) { - GsdSmartcardManagerWorker *worker; + MsdSmartcardManagerWorker *worker; int write_fd, read_fd; write_fd = -1; @@ -1258,15 +1258,15 @@ gsd_smartcard_manager_create_worker (GsdSmartcardManager *manager, return FALSE; } - worker = gsd_smartcard_manager_worker_new (write_fd); + worker = msd_smartcard_manager_worker_new (write_fd); worker->module = manager->priv->module; *worker_thread = g_thread_create ((GThreadFunc) - gsd_smartcard_manager_worker_run, + msd_smartcard_manager_worker_run, worker, FALSE, NULL); if (*worker_thread == NULL) { - gsd_smartcard_manager_worker_free (worker); + msd_smartcard_manager_worker_free (worker); return FALSE; } @@ -1277,19 +1277,19 @@ gsd_smartcard_manager_create_worker (GsdSmartcardManager *manager, return TRUE; } -#ifdef GSD_SMARTCARD_MANAGER_ENABLE_TEST +#ifdef MSD_SMARTCARD_MANAGER_ENABLE_TEST #include <glib.h> static GMainLoop *event_loop; static gboolean should_exit_on_next_remove = FALSE; static gboolean -on_timeout (GsdSmartcardManager *manager) +on_timeout (MsdSmartcardManager *manager) { GError *error; g_print ("Re-enabling manager.\n"); - if (!gsd_smartcard_manager_start (manager, &error)) { + if (!msd_smartcard_manager_start (manager, &error)) { g_warning ("could not start smartcard manager - %s", error->message); g_error_free (error); @@ -1303,16 +1303,16 @@ on_timeout (GsdSmartcardManager *manager) } static void -on_device_inserted (GsdSmartcardManager *manager, - GsdSmartcard *card) +on_device_inserted (MsdSmartcardManager *manager, + MsdSmartcard *card) { g_print ("smartcard inserted!\n"); g_print ("Please remove it.\n"); } static void -on_device_removed (GsdSmartcardManager *manager, - GsdSmartcard *card) +on_device_removed (MsdSmartcardManager *manager, + MsdSmartcard *card) { g_print ("smartcard removed!\n"); @@ -1320,7 +1320,7 @@ on_device_removed (GsdSmartcardManager *manager, g_main_loop_quit (event_loop); } else { g_print ("disabling manager for 2 seconds\n"); - gsd_smartcard_manager_stop (manager); + msd_smartcard_manager_stop (manager); g_timeout_add (2000, (GSourceFunc) on_timeout, manager); } } @@ -1329,7 +1329,7 @@ int main (int argc, char *argv[]) { - GsdSmartcardManager *manager; + MsdSmartcardManager *manager; GError *error; g_log_set_always_fatal (G_LOG_LEVEL_ERROR @@ -1338,7 +1338,7 @@ main (int argc, g_type_init (); g_message ("creating instance of 'smartcard manager' object..."); - manager = gsd_smartcard_manager_new (NULL); + manager = msd_smartcard_manager_new (NULL); g_message ("'smartcard manager' object created successfully"); g_signal_connect (manager, "smartcard-inserted", @@ -1350,7 +1350,7 @@ main (int argc, g_message ("starting listener..."); error = NULL; - if (!gsd_smartcard_manager_start (manager, &error)) { + if (!msd_smartcard_manager_start (manager, &error)) { g_warning ("could not start smartcard manager - %s", error->message); g_error_free (error); diff --git a/plugins/smartcard/gsd-smartcard-manager.h b/plugins/smartcard/gsd-smartcard-manager.h index 9663124..269e1da 100644 --- a/plugins/smartcard/gsd-smartcard-manager.h +++ b/plugins/smartcard/gsd-smartcard-manager.h @@ -1,4 +1,4 @@ -/* gsd-smartcard-manager.h - object for monitoring smartcard insertion and +/* msd-smartcard-manager.h - object for monitoring smartcard insertion and * removal events * * Copyright (C) 2006, 2009 Red Hat, Inc. @@ -20,11 +20,11 @@ * * Written by: Ray Strode */ -#ifndef GSD_SMARTCARD_MANAGER_H -#define GSD_SMARTCARD_MANAGER_H +#ifndef MSD_SMARTCARD_MANAGER_H +#define MSD_SMARTCARD_MANAGER_H -#define GSD_SMARTCARD_ENABLE_INTERNAL_API -#include "gsd-smartcard.h" +#define MSD_SMARTCARD_ENABLE_INTERNAL_API +#include "msd-smartcard.h" #include <glib.h> #include <glib-object.h> @@ -32,59 +32,59 @@ #ifdef __cplusplus extern "C" { #endif -#define GSD_TYPE_SMARTCARD_MANAGER (gsd_smartcard_manager_get_type ()) -#define GSD_SMARTCARD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_SMARTCARD_MANAGER, GsdSmartcardManager)) -#define GSD_SMARTCARD_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_SMARTCARD_MANAGER, GsdSmartcardManagerClass)) -#define GSD_IS_SMARTCARD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SC_TYPE_SMARTCARD_MANAGER)) -#define GSD_IS_SMARTCARD_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SC_TYPE_SMARTCARD_MANAGER)) -#define GSD_SMARTCARD_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GSD_TYPE_SMARTCARD_MANAGER, GsdSmartcardManagerClass)) -#define GSD_SMARTCARD_MANAGER_ERROR (gsd_smartcard_manager_error_quark ()) -typedef struct _GsdSmartcardManager GsdSmartcardManager; -typedef struct _GsdSmartcardManagerClass GsdSmartcardManagerClass; -typedef struct _GsdSmartcardManagerPrivate GsdSmartcardManagerPrivate; -typedef enum _GsdSmartcardManagerError GsdSmartcardManagerError; +#define MSD_TYPE_SMARTCARD_MANAGER (msd_smartcard_manager_get_type ()) +#define MSD_SMARTCARD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MSD_TYPE_SMARTCARD_MANAGER, MsdSmartcardManager)) +#define MSD_SMARTCARD_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSD_TYPE_SMARTCARD_MANAGER, MsdSmartcardManagerClass)) +#define MSD_IS_SMARTCARD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SC_TYPE_SMARTCARD_MANAGER)) +#define MSD_IS_SMARTCARD_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SC_TYPE_SMARTCARD_MANAGER)) +#define MSD_SMARTCARD_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MSD_TYPE_SMARTCARD_MANAGER, MsdSmartcardManagerClass)) +#define MSD_SMARTCARD_MANAGER_ERROR (msd_smartcard_manager_error_quark ()) +typedef struct _MsdSmartcardManager MsdSmartcardManager; +typedef struct _MsdSmartcardManagerClass MsdSmartcardManagerClass; +typedef struct _MsdSmartcardManagerPrivate MsdSmartcardManagerPrivate; +typedef enum _MsdSmartcardManagerError MsdSmartcardManagerError; -struct _GsdSmartcardManager { +struct _MsdSmartcardManager { GObject parent; /*< private > */ - GsdSmartcardManagerPrivate *priv; + MsdSmartcardManagerPrivate *priv; }; -struct _GsdSmartcardManagerClass { +struct _MsdSmartcardManagerClass { GObjectClass parent_class; /* Signals */ - void (*smartcard_inserted) (GsdSmartcardManager *manager, - GsdSmartcard *token); - void (*smartcard_removed) (GsdSmartcardManager *manager, - GsdSmartcard *token); - void (*error) (GsdSmartcardManager *manager, + void (*smartcard_inserted) (MsdSmartcardManager *manager, + MsdSmartcard *token); + void (*smartcard_removed) (MsdSmartcardManager *manager, + MsdSmartcard *token); + void (*error) (MsdSmartcardManager *manager, GError *error); }; -enum _GsdSmartcardManagerError { - GSD_SMARTCARD_MANAGER_ERROR_GENERIC = 0, - GSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, - GSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, - GSD_SMARTCARD_MANAGER_ERROR_WATCHING_FOR_EVENTS, - GSD_SMARTCARD_MANAGER_ERROR_REPORTING_EVENTS +enum _MsdSmartcardManagerError { + MSD_SMARTCARD_MANAGER_ERROR_GENERIC = 0, + MSD_SMARTCARD_MANAGER_ERROR_WITH_NSS, + MSD_SMARTCARD_MANAGER_ERROR_LOADING_DRIVER, + MSD_SMARTCARD_MANAGER_ERROR_WATCHING_FOR_EVENTS, + MSD_SMARTCARD_MANAGER_ERROR_REPORTING_EVENTS }; -GType gsd_smartcard_manager_get_type (void) G_GNUC_CONST; -GQuark gsd_smartcard_manager_error_quark (void) G_GNUC_CONST; +GType msd_smartcard_manager_get_type (void) G_GNUC_CONST; +GQuark msd_smartcard_manager_error_quark (void) G_GNUC_CONST; -GsdSmartcardManager *gsd_smartcard_manager_new (const char *module); +MsdSmartcardManager *msd_smartcard_manager_new (const char *module); -gboolean gsd_smartcard_manager_start (GsdSmartcardManager *manager, +gboolean msd_smartcard_manager_start (MsdSmartcardManager *manager, GError **error); -void gsd_smartcard_manager_stop (GsdSmartcardManager *manager); +void msd_smartcard_manager_stop (MsdSmartcardManager *manager); -char *gsd_smartcard_manager_get_module_path (GsdSmartcardManager *manager); -gboolean gsd_smartcard_manager_login_card_is_inserted (GsdSmartcardManager *manager); +char *msd_smartcard_manager_get_module_path (MsdSmartcardManager *manager); +gboolean msd_smartcard_manager_login_card_is_inserted (MsdSmartcardManager *manager); #ifdef __cplusplus } #endif -#endif /* GSD_SMARTCARD_MANAGER_H */ +#endif /* MSD_SMARTCARD_MANAGER_H */ diff --git a/plugins/smartcard/gsd-smartcard-plugin.c b/plugins/smartcard/gsd-smartcard-plugin.c index 9e3b4f2..dc4cb8f 100644 --- a/plugins/smartcard/gsd-smartcard-plugin.c +++ b/plugins/smartcard/gsd-smartcard-plugin.c @@ -31,11 +31,11 @@ #include <mateconf/mateconf-client.h> #include "mate-settings-plugin.h" -#include "gsd-smartcard-plugin.h" -#include "gsd-smartcard-manager.h" +#include "msd-smartcard-plugin.h" +#include "msd-smartcard-manager.h" -struct GsdSmartcardPluginPrivate { - GsdSmartcardManager *manager; +struct MsdSmartcardPluginPrivate { + MsdSmartcardManager *manager; DBusGConnection *bus_connection; guint32 is_active : 1; @@ -43,10 +43,10 @@ struct GsdSmartcardPluginPrivate { typedef enum { - GSD_SMARTCARD_REMOVE_ACTION_NONE, - GSD_SMARTCARD_REMOVE_ACTION_LOCK_SCREEN, - GSD_SMARTCARD_REMOVE_ACTION_FORCE_LOGOUT, -} GsdSmartcardRemoveAction; + MSD_SMARTCARD_REMOVE_ACTION_NONE, + MSD_SMARTCARD_REMOVE_ACTION_LOCK_SCREEN, + MSD_SMARTCARD_REMOVE_ACTION_FORCE_LOGOUT, +} MsdSmartcardRemoveAction; #define SCREENSAVER_DBUS_NAME "org.mate.ScreenSaver" #define SCREENSAVER_DBUS_PATH "/" @@ -57,19 +57,19 @@ typedef enum #define SM_DBUS_INTERFACE "org.mate.SessionManager" #define SM_LOGOUT_MODE_FORCE 2 -#define GSD_SMARTCARD_KEY "/desktop/mate/peripherals/smartcard" -#define KEY_REMOVE_ACTION GSD_SMARTCARD_KEY "/removal_action" +#define MSD_SMARTCARD_KEY "/desktop/mate/peripherals/smartcard" +#define KEY_REMOVE_ACTION MSD_SMARTCARD_KEY "/removal_action" -#define GSD_SMARTCARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_SMARTCARD_PLUGIN, GsdSmartcardPluginPrivate)) +#define MSD_SMARTCARD_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_SMARTCARD_PLUGIN, MsdSmartcardPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdSmartcardPlugin, gsd_smartcard_plugin); +MATE_SETTINGS_PLUGIN_REGISTER (MsdSmartcardPlugin, msd_smartcard_plugin); static void -simulate_user_activity (GsdSmartcardPlugin *plugin) +simulate_user_activity (MsdSmartcardPlugin *plugin) { DBusGProxy *screensaver_proxy; - g_debug ("GsdSmartcardPlugin telling screensaver about smart card insertion"); + g_debug ("MsdSmartcardPlugin telling screensaver about smart card insertion"); screensaver_proxy = dbus_g_proxy_new_for_name (plugin->priv->bus_connection, SCREENSAVER_DBUS_NAME, SCREENSAVER_DBUS_PATH, @@ -83,11 +83,11 @@ simulate_user_activity (GsdSmartcardPlugin *plugin) } static void -lock_screen (GsdSmartcardPlugin *plugin) +lock_screen (MsdSmartcardPlugin *plugin) { DBusGProxy *screensaver_proxy; - g_debug ("GsdSmartcardPlugin telling screensaver to lock screen"); + g_debug ("MsdSmartcardPlugin telling screensaver to lock screen"); screensaver_proxy = dbus_g_proxy_new_for_name (plugin->priv->bus_connection, SCREENSAVER_DBUS_NAME, SCREENSAVER_DBUS_PATH, @@ -101,13 +101,13 @@ lock_screen (GsdSmartcardPlugin *plugin) } static void -force_logout (GsdSmartcardPlugin *plugin) +force_logout (MsdSmartcardPlugin *plugin) { DBusGProxy *sm_proxy; GError *error; gboolean res; - g_debug ("GsdSmartcardPlugin telling session manager to force logout"); + g_debug ("MsdSmartcardPlugin telling session manager to force logout"); sm_proxy = dbus_g_proxy_new_for_name (plugin->priv->bus_connection, SM_DBUS_NAME, SM_DBUS_PATH, @@ -121,7 +121,7 @@ force_logout (GsdSmartcardPlugin *plugin) G_TYPE_INVALID, G_TYPE_INVALID); if (! res) { - g_warning ("GsdSmartcardPlugin Unable to force logout: %s", error->message); + g_warning ("MsdSmartcardPlugin Unable to force logout: %s", error->message); g_error_free (error); } @@ -129,26 +129,26 @@ force_logout (GsdSmartcardPlugin *plugin) } static void -gsd_smartcard_plugin_init (GsdSmartcardPlugin *plugin) +msd_smartcard_plugin_init (MsdSmartcardPlugin *plugin) { - plugin->priv = GSD_SMARTCARD_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_SMARTCARD_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdSmartcardPlugin initializing"); + g_debug ("MsdSmartcardPlugin initializing"); - plugin->priv->manager = gsd_smartcard_manager_new (NULL); + plugin->priv->manager = msd_smartcard_manager_new (NULL); } static void -gsd_smartcard_plugin_finalize (GObject *object) +msd_smartcard_plugin_finalize (GObject *object) { - GsdSmartcardPlugin *plugin; + MsdSmartcardPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_SMARTCARD_PLUGIN (object)); + g_return_if_fail (MSD_IS_SMARTCARD_PLUGIN (object)); - g_debug ("GsdSmartcardPlugin finalizing"); + g_debug ("MsdSmartcardPlugin finalizing"); - plugin = GSD_SMARTCARD_PLUGIN (object); + plugin = MSD_SMARTCARD_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -156,18 +156,18 @@ gsd_smartcard_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_smartcard_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_smartcard_plugin_parent_class)->finalize (object); } static void -smartcard_inserted_cb (GsdSmartcardManager *card_monitor, - GsdSmartcard *card, - GsdSmartcardPlugin *plugin) +smartcard_inserted_cb (MsdSmartcardManager *card_monitor, + MsdSmartcard *card, + MsdSmartcardPlugin *plugin) { char *name; - name = gsd_smartcard_get_name (card); - g_debug ("GsdSmartcardPlugin smart card '%s' inserted", name); + name = msd_smartcard_get_name (card); + g_debug ("MsdSmartcardPlugin smart card '%s' inserted", name); g_free (name); simulate_user_activity (plugin); @@ -179,29 +179,29 @@ user_logged_in_with_smartcard (void) return g_getenv ("PKCS11_LOGIN_TOKEN_NAME") != NULL; } -static GsdSmartcardRemoveAction -get_configured_remove_action (GsdSmartcardPlugin *plugin) +static MsdSmartcardRemoveAction +get_configured_remove_action (MsdSmartcardPlugin *plugin) { MateConfClient *client; char *remove_action_string; - GsdSmartcardRemoveAction remove_action; + MsdSmartcardRemoveAction remove_action; client = mateconf_client_get_default (); remove_action_string = mateconf_client_get_string (client, KEY_REMOVE_ACTION, NULL); if (remove_action_string == NULL) { - g_warning ("GsdSmartcardPlugin unable to get smartcard remove action"); - remove_action = GSD_SMARTCARD_REMOVE_ACTION_NONE; + g_warning ("MsdSmartcardPlugin unable to get smartcard remove action"); + remove_action = MSD_SMARTCARD_REMOVE_ACTION_NONE; } else if (strcmp (remove_action_string, "none") == 0) { - remove_action = GSD_SMARTCARD_REMOVE_ACTION_NONE; + remove_action = MSD_SMARTCARD_REMOVE_ACTION_NONE; } else if (strcmp (remove_action_string, "lock_screen") == 0) { - remove_action = GSD_SMARTCARD_REMOVE_ACTION_LOCK_SCREEN; + remove_action = MSD_SMARTCARD_REMOVE_ACTION_LOCK_SCREEN; } else if (strcmp (remove_action_string, "force_logout") == 0) { - remove_action = GSD_SMARTCARD_REMOVE_ACTION_FORCE_LOGOUT; + remove_action = MSD_SMARTCARD_REMOVE_ACTION_FORCE_LOGOUT; } else { - g_warning ("GsdSmartcardPlugin unknown smartcard remove action"); - remove_action = GSD_SMARTCARD_REMOVE_ACTION_NONE; + g_warning ("MsdSmartcardPlugin unknown smartcard remove action"); + remove_action = MSD_SMARTCARD_REMOVE_ACTION_NONE; } g_object_unref (client); @@ -210,40 +210,40 @@ get_configured_remove_action (GsdSmartcardPlugin *plugin) } static void -process_smartcard_removal (GsdSmartcardPlugin *plugin) +process_smartcard_removal (MsdSmartcardPlugin *plugin) { - GsdSmartcardRemoveAction remove_action; + MsdSmartcardRemoveAction remove_action; - g_debug ("GsdSmartcardPlugin processing smartcard removal"); + g_debug ("MsdSmartcardPlugin processing smartcard removal"); remove_action = get_configured_remove_action (plugin); switch (remove_action) { - case GSD_SMARTCARD_REMOVE_ACTION_NONE: + case MSD_SMARTCARD_REMOVE_ACTION_NONE: return; - case GSD_SMARTCARD_REMOVE_ACTION_LOCK_SCREEN: + case MSD_SMARTCARD_REMOVE_ACTION_LOCK_SCREEN: lock_screen (plugin); break; - case GSD_SMARTCARD_REMOVE_ACTION_FORCE_LOGOUT: + case MSD_SMARTCARD_REMOVE_ACTION_FORCE_LOGOUT: force_logout (plugin); break; } } static void -smartcard_removed_cb (GsdSmartcardManager *card_monitor, - GsdSmartcard *card, - GsdSmartcardPlugin *plugin) +smartcard_removed_cb (MsdSmartcardManager *card_monitor, + MsdSmartcard *card, + MsdSmartcardPlugin *plugin) { char *name; - name = gsd_smartcard_get_name (card); - g_debug ("GsdSmartcardPlugin smart card '%s' removed", name); + name = msd_smartcard_get_name (card); + g_debug ("MsdSmartcardPlugin smart card '%s' removed", name); g_free (name); - if (!gsd_smartcard_is_login_card (card)) { - g_debug ("GsdSmartcardPlugin removed smart card was not used to login"); + if (!msd_smartcard_is_login_card (card)) { + g_debug ("MsdSmartcardPlugin removed smart card was not used to login"); return; } @@ -254,33 +254,33 @@ static void impl_activate (MateSettingsPlugin *plugin) { GError *error; - GsdSmartcardPlugin *smartcard_plugin = GSD_SMARTCARD_PLUGIN (plugin); + MsdSmartcardPlugin *smartcard_plugin = MSD_SMARTCARD_PLUGIN (plugin); if (smartcard_plugin->priv->is_active) { - g_debug ("GsdSmartcardPlugin Not activating smartcard plugin, because it's " + g_debug ("MsdSmartcardPlugin Not activating smartcard plugin, because it's " "already active"); return; } if (!user_logged_in_with_smartcard ()) { - g_debug ("GsdSmartcardPlugin Not activating smartcard plugin, because user didn't use " + g_debug ("MsdSmartcardPlugin Not activating smartcard plugin, because user didn't use " " smartcard to log in"); smartcard_plugin->priv->is_active = FALSE; return; } - g_debug ("GsdSmartcardPlugin Activating smartcard plugin"); + g_debug ("MsdSmartcardPlugin Activating smartcard plugin"); error = NULL; smartcard_plugin->priv->bus_connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); if (smartcard_plugin->priv->bus_connection == NULL) { - g_warning ("GsdSmartcardPlugin Unable to connect to session bus: %s", error->message); + g_warning ("MsdSmartcardPlugin Unable to connect to session bus: %s", error->message); return; } - if (!gsd_smartcard_manager_start (smartcard_plugin->priv->manager, &error)) { - g_warning ("GsdSmartcardPlugin Unable to start smartcard manager: %s", error->message); + if (!msd_smartcard_manager_start (smartcard_plugin->priv->manager, &error)) { + g_warning ("MsdSmartcardPlugin Unable to start smartcard manager: %s", error->message); g_error_free (error); } @@ -292,8 +292,8 @@ impl_activate (MateSettingsPlugin *plugin) "smartcard-inserted", G_CALLBACK (smartcard_inserted_cb), smartcard_plugin); - if (!gsd_smartcard_manager_login_card_is_inserted (smartcard_plugin->priv->manager)) { - g_debug ("GsdSmartcardPlugin processing smartcard removal immediately user logged in with smartcard " + if (!msd_smartcard_manager_login_card_is_inserted (smartcard_plugin->priv->manager)) { + g_debug ("MsdSmartcardPlugin processing smartcard removal immediately user logged in with smartcard " "and it's not inserted"); process_smartcard_removal (smartcard_plugin); } @@ -304,17 +304,17 @@ impl_activate (MateSettingsPlugin *plugin) static void impl_deactivate (MateSettingsPlugin *plugin) { - GsdSmartcardPlugin *smartcard_plugin = GSD_SMARTCARD_PLUGIN (plugin); + MsdSmartcardPlugin *smartcard_plugin = MSD_SMARTCARD_PLUGIN (plugin); if (!smartcard_plugin->priv->is_active) { - g_debug ("GsdSmartcardPlugin Not deactivating smartcard plugin, " + g_debug ("MsdSmartcardPlugin Not deactivating smartcard plugin, " "because it's already inactive"); return; } - g_debug ("GsdSmartcardPlugin Deactivating smartcard plugin"); + g_debug ("MsdSmartcardPlugin Deactivating smartcard plugin"); - gsd_smartcard_manager_stop (smartcard_plugin->priv->manager); + msd_smartcard_manager_stop (smartcard_plugin->priv->manager); g_signal_handlers_disconnect_by_func (smartcard_plugin->priv->manager, smartcard_removed_cb, smartcard_plugin); @@ -326,15 +326,15 @@ impl_deactivate (MateSettingsPlugin *plugin) } static void -gsd_smartcard_plugin_class_init (GsdSmartcardPluginClass *klass) +msd_smartcard_plugin_class_init (MsdSmartcardPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_smartcard_plugin_finalize; + object_class->finalize = msd_smartcard_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdSmartcardPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdSmartcardPluginPrivate)); } diff --git a/plugins/smartcard/gsd-smartcard-plugin.h b/plugins/smartcard/gsd-smartcard-plugin.h index 4c61686..206e58d 100644 --- a/plugins/smartcard/gsd-smartcard-plugin.h +++ b/plugins/smartcard/gsd-smartcard-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_SMARTCARD_PLUGIN_H__ -#define __GSD_SMARTCARD_PLUGIN_H__ +#ifndef __MSD_SMARTCARD_PLUGIN_H__ +#define __MSD_SMARTCARD_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_SMARTCARD_PLUGIN (gsd_smartcard_plugin_get_type ()) -#define GSD_SMARTCARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_SMARTCARD_PLUGIN, GsdSmartcardPlugin)) -#define GSD_SMARTCARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSD_TYPE_SMARTCARD_PLUGIN, GsdSmartcardPluginClass)) -#define GSD_IS_SMARTCARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_SMARTCARD_PLUGIN)) -#define GSD_IS_SMARTCARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_SMARTCARD_PLUGIN)) -#define GSD_SMARTCARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_SMARTCARD_PLUGIN, GsdSmartcardPluginClass)) +#define MSD_TYPE_SMARTCARD_PLUGIN (msd_smartcard_plugin_get_type ()) +#define MSD_SMARTCARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_SMARTCARD_PLUGIN, MsdSmartcardPlugin)) +#define MSD_SMARTCARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MSD_TYPE_SMARTCARD_PLUGIN, MsdSmartcardPluginClass)) +#define MSD_IS_SMARTCARD_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_SMARTCARD_PLUGIN)) +#define MSD_IS_SMARTCARD_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_SMARTCARD_PLUGIN)) +#define MSD_SMARTCARD_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_SMARTCARD_PLUGIN, MsdSmartcardPluginClass)) -typedef struct GsdSmartcardPluginPrivate GsdSmartcardPluginPrivate; +typedef struct MsdSmartcardPluginPrivate MsdSmartcardPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdSmartcardPluginPrivate *priv; -} GsdSmartcardPlugin; + MsdSmartcardPluginPrivate *priv; +} MsdSmartcardPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdSmartcardPluginClass; +} MsdSmartcardPluginClass; -GType gsd_smartcard_plugin_get_type (void) G_GNUC_CONST; +GType msd_smartcard_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_SMARTCARD_PLUGIN_H__ */ +#endif /* __MSD_SMARTCARD_PLUGIN_H__ */ diff --git a/plugins/smartcard/gsd-smartcard.c b/plugins/smartcard/gsd-smartcard.c index 22f4e12..9154200 100644 --- a/plugins/smartcard/gsd-smartcard.c +++ b/plugins/smartcard/gsd-smartcard.c @@ -1,4 +1,4 @@ -/* gsd-smartcard.c - smartcard object +/* msd-smartcard.c - smartcard object * * Copyright (C) 2006 Ray Strode <[email protected]> * @@ -17,8 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ -#define GSD_SMARTCARD_ENABLE_INTERNAL_API -#include "gsd-smartcard.h" +#define MSD_SMARTCARD_ENABLE_INTERNAL_API +#include "msd-smartcard.h" #include <errno.h> #include <string.h> @@ -34,9 +34,9 @@ #include <secmod.h> #include <secerr.h> -struct _GsdSmartcardPrivate { +struct _MsdSmartcardPrivate { SECMODModule *module; - GsdSmartcardState state; + MsdSmartcardState state; CK_SLOT_ID slot_id; int slot_series; @@ -48,36 +48,36 @@ struct _GsdSmartcardPrivate { CERTCertificate *encryption_certificate; }; -static void gsd_smartcard_finalize (GObject *object); -static void gsd_smartcard_class_install_signals (GsdSmartcardClass *card_class); -static void gsd_smartcard_class_install_properties (GsdSmartcardClass *card_class); -static void gsd_smartcard_set_property (GObject *object, +static void msd_smartcard_finalize (GObject *object); +static void msd_smartcard_class_install_signals (MsdSmartcardClass *card_class); +static void msd_smartcard_class_install_properties (MsdSmartcardClass *card_class); +static void msd_smartcard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void gsd_smartcard_get_property (GObject *object, +static void msd_smartcard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void gsd_smartcard_set_name (GsdSmartcard *card, const char *name); -static void gsd_smartcard_set_slot_id (GsdSmartcard *card, +static void msd_smartcard_set_name (MsdSmartcard *card, const char *name); +static void msd_smartcard_set_slot_id (MsdSmartcard *card, int slot_id); -static void gsd_smartcard_set_slot_series (GsdSmartcard *card, +static void msd_smartcard_set_slot_series (MsdSmartcard *card, int slot_series); -static void gsd_smartcard_set_module (GsdSmartcard *card, +static void msd_smartcard_set_module (MsdSmartcard *card, SECMODModule *module); -static PK11SlotInfo *gsd_smartcard_find_slot_from_id (GsdSmartcard *card, +static PK11SlotInfo *msd_smartcard_find_slot_from_id (MsdSmartcard *card, int slot_id); -static PK11SlotInfo *gsd_smartcard_find_slot_from_card_name (GsdSmartcard *card, +static PK11SlotInfo *msd_smartcard_find_slot_from_card_name (MsdSmartcard *card, const char *card_name); -#ifndef GSD_SMARTCARD_DEFAULT_SLOT_ID -#define GSD_SMARTCARD_DEFAULT_SLOT_ID ((gulong) -1) +#ifndef MSD_SMARTCARD_DEFAULT_SLOT_ID +#define MSD_SMARTCARD_DEFAULT_SLOT_ID ((gulong) -1) #endif -#ifndef GSD_SMARTCARD_DEFAULT_SLOT_SERIES -#define GSD_SMARTCARD_DEFAULT_SLOT_SERIES -1 +#ifndef MSD_SMARTCARD_DEFAULT_SLOT_SERIES +#define MSD_SMARTCARD_DEFAULT_SLOT_SERIES -1 #endif enum { @@ -95,73 +95,73 @@ enum { NUMBER_OF_SIGNALS }; -static guint gsd_smartcard_signals[NUMBER_OF_SIGNALS]; +static guint msd_smartcard_signals[NUMBER_OF_SIGNALS]; -G_DEFINE_TYPE (GsdSmartcard, gsd_smartcard, G_TYPE_OBJECT); +G_DEFINE_TYPE (MsdSmartcard, msd_smartcard, G_TYPE_OBJECT); static void -gsd_smartcard_class_init (GsdSmartcardClass *card_class) +msd_smartcard_class_init (MsdSmartcardClass *card_class) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (card_class); - gobject_class->finalize = gsd_smartcard_finalize; + gobject_class->finalize = msd_smartcard_finalize; - gsd_smartcard_class_install_signals (card_class); - gsd_smartcard_class_install_properties (card_class); + msd_smartcard_class_install_signals (card_class); + msd_smartcard_class_install_properties (card_class); g_type_class_add_private (card_class, - sizeof (GsdSmartcardPrivate)); + sizeof (MsdSmartcardPrivate)); } static void -gsd_smartcard_class_install_signals (GsdSmartcardClass *card_class) +msd_smartcard_class_install_signals (MsdSmartcardClass *card_class) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (card_class); - gsd_smartcard_signals[INSERTED] = + msd_smartcard_signals[INSERTED] = g_signal_new ("inserted", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdSmartcardClass, + G_STRUCT_OFFSET (MsdSmartcardClass, inserted), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - gsd_smartcard_signals[REMOVED] = + msd_smartcard_signals[REMOVED] = g_signal_new ("removed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GsdSmartcardClass, + G_STRUCT_OFFSET (MsdSmartcardClass, removed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void -gsd_smartcard_class_install_properties (GsdSmartcardClass *card_class) +msd_smartcard_class_install_properties (MsdSmartcardClass *card_class) { GObjectClass *object_class; GParamSpec *param_spec; object_class = G_OBJECT_CLASS (card_class); - object_class->set_property = gsd_smartcard_set_property; - object_class->get_property = gsd_smartcard_get_property; + object_class->set_property = msd_smartcard_set_property; + object_class->get_property = msd_smartcard_get_property; param_spec = g_param_spec_ulong ("slot-id", _("Slot ID"), _("The slot the card is in"), 1, G_MAXULONG, - GSD_SMARTCARD_DEFAULT_SLOT_ID, + MSD_SMARTCARD_DEFAULT_SLOT_ID, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_SLOT_ID, param_spec); param_spec = g_param_spec_int ("slot-series", _("Slot Series"), _("per-slot card identifier"), -1, G_MAXINT, - GSD_SMARTCARD_DEFAULT_SLOT_SERIES, + MSD_SMARTCARD_DEFAULT_SLOT_SERIES, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_SLOT_SERIES, param_spec); @@ -177,30 +177,30 @@ gsd_smartcard_class_install_properties (GsdSmartcardClass *card_class) } static void -gsd_smartcard_set_property (GObject *object, +msd_smartcard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdSmartcard *card = GSD_SMARTCARD (object); + MsdSmartcard *card = MSD_SMARTCARD (object); switch (prop_id) { case PROP_NAME: - gsd_smartcard_set_name (card, g_value_get_string (value)); + msd_smartcard_set_name (card, g_value_get_string (value)); break; case PROP_SLOT_ID: - gsd_smartcard_set_slot_id (card, + msd_smartcard_set_slot_id (card, g_value_get_ulong (value)); break; case PROP_SLOT_SERIES: - gsd_smartcard_set_slot_series (card, + msd_smartcard_set_slot_series (card, g_value_get_int (value)); break; case PROP_MODULE: - gsd_smartcard_set_module (card, + msd_smartcard_set_module (card, (SECMODModule *) g_value_get_pointer (value)); break; @@ -211,25 +211,25 @@ gsd_smartcard_set_property (GObject *object, } CK_SLOT_ID -gsd_smartcard_get_slot_id (GsdSmartcard *card) +msd_smartcard_get_slot_id (MsdSmartcard *card) { return card->priv->slot_id; } -GsdSmartcardState -gsd_smartcard_get_state (GsdSmartcard *card) +MsdSmartcardState +msd_smartcard_get_state (MsdSmartcard *card) { return card->priv->state; } char * -gsd_smartcard_get_name (GsdSmartcard *card) +msd_smartcard_get_name (MsdSmartcard *card) { return g_strdup (card->priv->name); } gboolean -gsd_smartcard_is_login_card (GsdSmartcard *card) +msd_smartcard_is_login_card (MsdSmartcard *card) { const char *login_card_name; login_card_name = g_getenv ("PKCS11_LOGIN_TOKEN_NAME"); @@ -246,27 +246,27 @@ gsd_smartcard_is_login_card (GsdSmartcard *card) } static void -gsd_smartcard_get_property (GObject *object, +msd_smartcard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdSmartcard *card = GSD_SMARTCARD (object); + MsdSmartcard *card = MSD_SMARTCARD (object); switch (prop_id) { case PROP_NAME: g_value_take_string (value, - gsd_smartcard_get_name (card)); + msd_smartcard_get_name (card)); break; case PROP_SLOT_ID: g_value_set_ulong (value, - (gulong) gsd_smartcard_get_slot_id (card)); + (gulong) msd_smartcard_get_slot_id (card)); break; case PROP_SLOT_SERIES: g_value_set_int (value, - gsd_smartcard_get_slot_series (card)); + msd_smartcard_get_slot_series (card)); break; default: @@ -275,7 +275,7 @@ gsd_smartcard_get_property (GObject *object, } static void -gsd_smartcard_set_name (GsdSmartcard *card, +msd_smartcard_set_name (MsdSmartcard *card, const char *name) { if (name == NULL) { @@ -288,7 +288,7 @@ gsd_smartcard_set_name (GsdSmartcard *card, card->priv->name = g_strdup (name); if (card->priv->slot == NULL) { - card->priv->slot = gsd_smartcard_find_slot_from_card_name (card, + card->priv->slot = msd_smartcard_find_slot_from_card_name (card, card->priv->name); if (card->priv->slot != NULL) { @@ -296,17 +296,17 @@ gsd_smartcard_set_name (GsdSmartcard *card, slot_id = PK11_GetSlotID (card->priv->slot); if (slot_id != card->priv->slot_id) { - gsd_smartcard_set_slot_id (card, slot_id); + msd_smartcard_set_slot_id (card, slot_id); } slot_series = PK11_GetSlotSeries (card->priv->slot); if (slot_series != card->priv->slot_series) { - gsd_smartcard_set_slot_series (card, slot_series); + msd_smartcard_set_slot_series (card, slot_series); } - _gsd_smartcard_set_state (card, GSD_SMARTCARD_STATE_INSERTED); + _msd_smartcard_set_state (card, MSD_SMARTCARD_STATE_INSERTED); } else { - _gsd_smartcard_set_state (card, GSD_SMARTCARD_STATE_REMOVED); + _msd_smartcard_set_state (card, MSD_SMARTCARD_STATE_REMOVED); } } @@ -315,14 +315,14 @@ gsd_smartcard_set_name (GsdSmartcard *card, } static void -gsd_smartcard_set_slot_id (GsdSmartcard *card, +msd_smartcard_set_slot_id (MsdSmartcard *card, int slot_id) { if (card->priv->slot_id != slot_id) { card->priv->slot_id = slot_id; if (card->priv->slot == NULL) { - card->priv->slot = gsd_smartcard_find_slot_from_id (card, + card->priv->slot = msd_smartcard_find_slot_from_id (card, card->priv->slot_id); if (card->priv->slot != NULL) { @@ -332,12 +332,12 @@ gsd_smartcard_set_slot_id (GsdSmartcard *card, if ((card->priv->name == NULL) || ((card_name != NULL) && (strcmp (card_name, card->priv->name) != 0))) { - gsd_smartcard_set_name (card, card_name); + msd_smartcard_set_name (card, card_name); } - _gsd_smartcard_set_state (card, GSD_SMARTCARD_STATE_INSERTED); + _msd_smartcard_set_state (card, MSD_SMARTCARD_STATE_INSERTED); } else { - _gsd_smartcard_set_state (card, GSD_SMARTCARD_STATE_REMOVED); + _msd_smartcard_set_state (card, MSD_SMARTCARD_STATE_REMOVED); } } @@ -346,7 +346,7 @@ gsd_smartcard_set_slot_id (GsdSmartcard *card, } static void -gsd_smartcard_set_slot_series (GsdSmartcard *card, +msd_smartcard_set_slot_series (MsdSmartcard *card, int slot_series) { if (card->priv->slot_series != slot_series) { @@ -356,7 +356,7 @@ gsd_smartcard_set_slot_series (GsdSmartcard *card, } static void -gsd_smartcard_set_module (GsdSmartcard *card, +msd_smartcard_set_module (MsdSmartcard *card, SECMODModule *module) { gboolean should_notify; @@ -382,66 +382,66 @@ gsd_smartcard_set_module (GsdSmartcard *card, } int -gsd_smartcard_get_slot_series (GsdSmartcard *card) +msd_smartcard_get_slot_series (MsdSmartcard *card) { return card->priv->slot_series; } static void -gsd_smartcard_init (GsdSmartcard *card) +msd_smartcard_init (MsdSmartcard *card) { g_debug ("initializing smartcard "); card->priv = G_TYPE_INSTANCE_GET_PRIVATE (card, - GSD_TYPE_SMARTCARD, - GsdSmartcardPrivate); + MSD_TYPE_SMARTCARD, + MsdSmartcardPrivate); if (card->priv->slot != NULL) { card->priv->name = g_strdup (PK11_GetTokenName (card->priv->slot)); } } -static void gsd_smartcard_finalize (GObject *object) +static void msd_smartcard_finalize (GObject *object) { - GsdSmartcard *card; + MsdSmartcard *card; GObjectClass *gobject_class; - card = GSD_SMARTCARD (object); + card = MSD_SMARTCARD (object); g_free (card->priv->name); - gsd_smartcard_set_module (card, NULL); + msd_smartcard_set_module (card, NULL); - gobject_class = G_OBJECT_CLASS (gsd_smartcard_parent_class); + gobject_class = G_OBJECT_CLASS (msd_smartcard_parent_class); gobject_class->finalize (object); } -GQuark gsd_smartcard_error_quark (void) +GQuark msd_smartcard_error_quark (void) { static GQuark error_quark = 0; if (error_quark == 0) { - error_quark = g_quark_from_static_string ("gsd-smartcard-error-quark"); + error_quark = g_quark_from_static_string ("msd-smartcard-error-quark"); } return error_quark; } -GsdSmartcard * -_gsd_smartcard_new (SECMODModule *module, +MsdSmartcard * +_msd_smartcard_new (SECMODModule *module, CK_SLOT_ID slot_id, int slot_series) { - GsdSmartcard *card; + MsdSmartcard *card; g_return_val_if_fail (module != NULL, NULL); g_return_val_if_fail (slot_id >= 1, NULL); g_return_val_if_fail (slot_series > 0, NULL); g_return_val_if_fail (sizeof (gulong) == sizeof (slot_id), NULL); - card = GSD_SMARTCARD (g_object_new (GSD_TYPE_SMARTCARD, + card = MSD_SMARTCARD (g_object_new (MSD_TYPE_SMARTCARD, "module", module, "slot-id", (gulong) slot_id, "slot-series", slot_series, @@ -449,16 +449,16 @@ _gsd_smartcard_new (SECMODModule *module, return card; } -GsdSmartcard * -_gsd_smartcard_new_from_name (SECMODModule *module, +MsdSmartcard * +_msd_smartcard_new_from_name (SECMODModule *module, const char *name) { - GsdSmartcard *card; + MsdSmartcard *card; g_return_val_if_fail (module != NULL, NULL); g_return_val_if_fail (name != NULL, NULL); - card = GSD_SMARTCARD (g_object_new (GSD_TYPE_SMARTCARD, + card = MSD_SMARTCARD (g_object_new (MSD_TYPE_SMARTCARD, "module", module, "name", name, NULL)); @@ -466,16 +466,16 @@ _gsd_smartcard_new_from_name (SECMODModule *module, } void -_gsd_smartcard_set_state (GsdSmartcard *card, - GsdSmartcardState state) +_msd_smartcard_set_state (MsdSmartcard *card, + MsdSmartcardState state) { if (card->priv->state != state) { card->priv->state = state; - if (state == GSD_SMARTCARD_STATE_INSERTED) { - g_signal_emit (card, gsd_smartcard_signals[INSERTED], 0); - } else if (state == GSD_SMARTCARD_STATE_REMOVED) { - g_signal_emit (card, gsd_smartcard_signals[REMOVED], 0); + if (state == MSD_SMARTCARD_STATE_INSERTED) { + g_signal_emit (card, msd_smartcard_signals[INSERTED], 0); + } else if (state == MSD_SMARTCARD_STATE_REMOVED) { + g_signal_emit (card, msd_smartcard_signals[REMOVED], 0); } else { g_assert_not_reached (); } @@ -489,7 +489,7 @@ _gsd_smartcard_set_state (GsdSmartcard *card, * and strdup it using NSPR's memory allocation routines. */ static char * -gsd_smartcard_password_handler (PK11SlotInfo *slot, +msd_smartcard_password_handler (PK11SlotInfo *slot, PRBool is_retrying, const char *password) { @@ -501,12 +501,12 @@ gsd_smartcard_password_handler (PK11SlotInfo *slot, } gboolean -gsd_smartcard_unlock (GsdSmartcard *card, +msd_smartcard_unlock (MsdSmartcard *card, const char *password) { SECStatus status; - PK11_SetPasswordFunc ((PK11PasswordFunc) gsd_smartcard_password_handler); + PK11_SetPasswordFunc ((PK11PasswordFunc) msd_smartcard_password_handler); /* we pass PR_TRUE to load certificates */ @@ -520,7 +520,7 @@ gsd_smartcard_unlock (GsdSmartcard *card, } static PK11SlotInfo * -gsd_smartcard_find_slot_from_card_name (GsdSmartcard *card, +msd_smartcard_find_slot_from_card_name (MsdSmartcard *card, const char *card_name) { int i; @@ -540,7 +540,7 @@ gsd_smartcard_find_slot_from_card_name (GsdSmartcard *card, } static PK11SlotInfo * -gsd_smartcard_find_slot_from_id (GsdSmartcard *card, +msd_smartcard_find_slot_from_id (MsdSmartcard *card, int slot_id) { int i; diff --git a/plugins/smartcard/gsd-smartcard.h b/plugins/smartcard/gsd-smartcard.h index c8c1ea7..d00b8af 100644 --- a/plugins/smartcard/gsd-smartcard.h +++ b/plugins/smartcard/gsd-smartcard.h @@ -17,8 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ -#ifndef GSD_SMARTCARD_H -#define GSD_SMARTCARD_H +#ifndef MSD_SMARTCARD_H +#define MSD_SMARTCARD_H #include <glib.h> #include <glib-object.h> @@ -28,71 +28,71 @@ #ifdef __cplusplus extern "C" { #endif -#define GSD_TYPE_SMARTCARD (gsd_smartcard_get_type ()) -#define GSD_SMARTCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSD_TYPE_SMARTCARD, GsdSmartcard)) -#define GSD_SMARTCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSD_TYPE_SMARTCARD, GsdSmartcardClass)) -#define GSD_IS_SMARTCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSD_TYPE_SMARTCARD)) -#define GSD_IS_SMARTCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSD_TYPE_SMARTCARD)) -#define GSD_SMARTCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GSD_TYPE_SMARTCARD, GsdSmartcardClass)) -#define GSD_SMARTCARD_ERROR (gsd_smartcard_error_quark ()) -typedef struct _GsdSmartcardClass GsdSmartcardClass; -typedef struct _GsdSmartcard GsdSmartcard; -typedef struct _GsdSmartcardPrivate GsdSmartcardPrivate; -typedef enum _GsdSmartcardError GsdSmartcardError; -typedef enum _GsdSmartcardState GsdSmartcardState; - -typedef struct _GsdSmartcardRequest GsdSmartcardRequest; - -struct _GsdSmartcard { +#define MSD_TYPE_SMARTCARD (msd_smartcard_get_type ()) +#define MSD_SMARTCARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MSD_TYPE_SMARTCARD, MsdSmartcard)) +#define MSD_SMARTCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MSD_TYPE_SMARTCARD, MsdSmartcardClass)) +#define MSD_IS_SMARTCARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MSD_TYPE_SMARTCARD)) +#define MSD_IS_SMARTCARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MSD_TYPE_SMARTCARD)) +#define MSD_SMARTCARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MSD_TYPE_SMARTCARD, MsdSmartcardClass)) +#define MSD_SMARTCARD_ERROR (msd_smartcard_error_quark ()) +typedef struct _MsdSmartcardClass MsdSmartcardClass; +typedef struct _MsdSmartcard MsdSmartcard; +typedef struct _MsdSmartcardPrivate MsdSmartcardPrivate; +typedef enum _MsdSmartcardError MsdSmartcardError; +typedef enum _MsdSmartcardState MsdSmartcardState; + +typedef struct _MsdSmartcardRequest MsdSmartcardRequest; + +struct _MsdSmartcard { GObject parent; /*< private > */ - GsdSmartcardPrivate *priv; + MsdSmartcardPrivate *priv; }; -struct _GsdSmartcardClass { +struct _MsdSmartcardClass { GObjectClass parent_class; - void (* inserted) (GsdSmartcard *card); - void (* removed) (GsdSmartcard *card); + void (* inserted) (MsdSmartcard *card); + void (* removed) (MsdSmartcard *card); }; -enum _GsdSmartcardError { - GSD_SMARTCARD_ERROR_GENERIC = 0, +enum _MsdSmartcardError { + MSD_SMARTCARD_ERROR_GENERIC = 0, }; -enum _GsdSmartcardState { - GSD_SMARTCARD_STATE_INSERTED = 0, - GSD_SMARTCARD_STATE_REMOVED, +enum _MsdSmartcardState { + MSD_SMARTCARD_STATE_INSERTED = 0, + MSD_SMARTCARD_STATE_REMOVED, }; -GType gsd_smartcard_get_type (void) G_GNUC_CONST; -GQuark gsd_smartcard_error_quark (void) G_GNUC_CONST; +GType msd_smartcard_get_type (void) G_GNUC_CONST; +GQuark msd_smartcard_error_quark (void) G_GNUC_CONST; -CK_SLOT_ID gsd_smartcard_get_slot_id (GsdSmartcard *card); -gint gsd_smartcard_get_slot_series (GsdSmartcard *card); -GsdSmartcardState gsd_smartcard_get_state (GsdSmartcard *card); +CK_SLOT_ID msd_smartcard_get_slot_id (MsdSmartcard *card); +gint msd_smartcard_get_slot_series (MsdSmartcard *card); +MsdSmartcardState msd_smartcard_get_state (MsdSmartcard *card); -char *gsd_smartcard_get_name (GsdSmartcard *card); -gboolean gsd_smartcard_is_login_card (GsdSmartcard *card); +char *msd_smartcard_get_name (MsdSmartcard *card); +gboolean msd_smartcard_is_login_card (MsdSmartcard *card); -gboolean gsd_smartcard_unlock (GsdSmartcard *card, +gboolean msd_smartcard_unlock (MsdSmartcard *card, const char *password); /* don't under any circumstances call these functions */ -#ifdef GSD_SMARTCARD_ENABLE_INTERNAL_API +#ifdef MSD_SMARTCARD_ENABLE_INTERNAL_API -GsdSmartcard *_gsd_smartcard_new (SECMODModule *module, +MsdSmartcard *_msd_smartcard_new (SECMODModule *module, CK_SLOT_ID slot_id, gint slot_series); -GsdSmartcard *_gsd_smartcard_new_from_name (SECMODModule *module, +MsdSmartcard *_msd_smartcard_new_from_name (SECMODModule *module, const char *name); -void _gsd_smartcard_set_state (GsdSmartcard *card, - GsdSmartcardState state); +void _msd_smartcard_set_state (MsdSmartcard *card, + MsdSmartcardState state); #endif #ifdef __cplusplus } #endif -#endif /* GSD_SMARTCARD_H */ +#endif /* MSD_SMARTCARD_H */ diff --git a/plugins/sound/Makefile.am b/plugins/sound/Makefile.am index 7caf2ac..3e93c7c 100644 --- a/plugins/sound/Makefile.am +++ b/plugins/sound/Makefile.am @@ -2,10 +2,10 @@ plugin_LTLIBRARIES = \ libsound.la libsound_la_SOURCES = \ - gsd-sound-plugin.h \ - gsd-sound-plugin.c \ - gsd-sound-manager.h \ - gsd-sound-manager.c + msd-sound-plugin.h \ + msd-sound-plugin.c \ + msd-sound-manager.h \ + msd-sound-manager.c libsound_la_CPPFLAGS = \ -I$(top_srcdir)/mate-settings-daemon \ @@ -19,7 +19,7 @@ libsound_la_CFLAGS = \ $(AM_CFLAGS) libsound_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) + $(MSD_PLUGIN_LDFLAGS) libsound_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) \ @@ -39,4 +39,4 @@ CLEANFILES = \ DISTCLEANFILES = \ $(plugin_DATA) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/sound/gsd-sound-manager.c b/plugins/sound/gsd-sound-manager.c index 4b32130..23fb240 100644 --- a/plugins/sound/gsd-sound-manager.c +++ b/plugins/sound/gsd-sound-manager.c @@ -40,12 +40,12 @@ #include <pulse/pulseaudio.h> #endif -#include "gsd-sound-manager.h" +#include "msd-sound-manager.h" #include "mate-settings-profile.h" -#define GSD_SOUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_SOUND_MANAGER, GsdSoundManagerPrivate)) +#define MSD_SOUND_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_SOUND_MANAGER, MsdSoundManagerPrivate)) -struct GsdSoundManagerPrivate +struct MsdSoundManagerPrivate { guint mateconf_notify; GList* monitors; @@ -54,11 +54,11 @@ struct GsdSoundManagerPrivate #define MATECONF_SOUND_DIR "/desktop/mate/sound" -static void gsd_sound_manager_class_init (GsdSoundManagerClass *klass); -static void gsd_sound_manager_init (GsdSoundManager *sound_manager); -static void gsd_sound_manager_finalize (GObject *object); +static void msd_sound_manager_class_init (MsdSoundManagerClass *klass); +static void msd_sound_manager_init (MsdSoundManager *sound_manager); +static void msd_sound_manager_finalize (GObject *object); -G_DEFINE_TYPE (GsdSoundManager, gsd_sound_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdSoundManager, msd_sound_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -185,7 +185,7 @@ fail: } static gboolean -flush_cb (GsdSoundManager *manager) +flush_cb (MsdSoundManager *manager) { flush_cache (); manager->priv->timeout = 0; @@ -193,7 +193,7 @@ flush_cb (GsdSoundManager *manager) } static void -trigger_flush (GsdSoundManager *manager) +trigger_flush (MsdSoundManager *manager) { if (manager->priv->timeout) @@ -208,13 +208,13 @@ static void mateconf_client_notify_cb (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdSoundManager *manager) + MsdSoundManager *manager) { trigger_flush (manager); } static gboolean -register_config_callback (GsdSoundManager *manager, GError **error) +register_config_callback (MsdSoundManager *manager, GError **error) { MateConfClient *client; gboolean succ; @@ -239,14 +239,14 @@ file_monitor_changed_cb (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event, - GsdSoundManager *manager) + MsdSoundManager *manager) { g_debug ("Theme dir changed"); trigger_flush (manager); } static gboolean -register_directory_callback (GsdSoundManager *manager, +register_directory_callback (MsdSoundManager *manager, const char *path, GError **error) { @@ -276,7 +276,7 @@ register_directory_callback (GsdSoundManager *manager, #endif gboolean -gsd_sound_manager_start (GsdSoundManager *manager, +msd_sound_manager_start (MsdSoundManager *manager, GError **error) { @@ -326,7 +326,7 @@ gsd_sound_manager_start (GsdSoundManager *manager, } void -gsd_sound_manager_stop (GsdSoundManager *manager) +msd_sound_manager_stop (MsdSoundManager *manager) { g_debug ("Stopping sound manager"); @@ -356,17 +356,17 @@ gsd_sound_manager_stop (GsdSoundManager *manager) } static GObject * -gsd_sound_manager_constructor ( +msd_sound_manager_constructor ( GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdSoundManager *m; - GsdSoundManagerClass *klass; + MsdSoundManager *m; + MsdSoundManagerClass *klass; - klass = GSD_SOUND_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_SOUND_MANAGER)); + klass = MSD_SOUND_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_SOUND_MANAGER)); - m = GSD_SOUND_MANAGER (G_OBJECT_CLASS (gsd_sound_manager_parent_class)->constructor ( + m = MSD_SOUND_MANAGER (G_OBJECT_CLASS (msd_sound_manager_parent_class)->constructor ( type, n_construct_properties, construct_properties)); @@ -375,59 +375,59 @@ gsd_sound_manager_constructor ( } static void -gsd_sound_manager_dispose (GObject *object) +msd_sound_manager_dispose (GObject *object) { - GsdSoundManager *manager; + MsdSoundManager *manager; - manager = GSD_SOUND_MANAGER (object); + manager = MSD_SOUND_MANAGER (object); - gsd_sound_manager_stop (manager); + msd_sound_manager_stop (manager); - G_OBJECT_CLASS (gsd_sound_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_sound_manager_parent_class)->dispose (object); } static void -gsd_sound_manager_class_init (GsdSoundManagerClass *klass) +msd_sound_manager_class_init (MsdSoundManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->constructor = gsd_sound_manager_constructor; - object_class->dispose = gsd_sound_manager_dispose; - object_class->finalize = gsd_sound_manager_finalize; + object_class->constructor = msd_sound_manager_constructor; + object_class->dispose = msd_sound_manager_dispose; + object_class->finalize = msd_sound_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdSoundManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdSoundManagerPrivate)); } static void -gsd_sound_manager_init (GsdSoundManager *manager) +msd_sound_manager_init (MsdSoundManager *manager) { - manager->priv = GSD_SOUND_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_SOUND_MANAGER_GET_PRIVATE (manager); } static void -gsd_sound_manager_finalize (GObject *object) +msd_sound_manager_finalize (GObject *object) { - GsdSoundManager *sound_manager; + MsdSoundManager *sound_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_SOUND_MANAGER (object)); + g_return_if_fail (MSD_IS_SOUND_MANAGER (object)); - sound_manager = GSD_SOUND_MANAGER (object); + sound_manager = MSD_SOUND_MANAGER (object); g_return_if_fail (sound_manager->priv); - G_OBJECT_CLASS (gsd_sound_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_sound_manager_parent_class)->finalize (object); } -GsdSoundManager * -gsd_sound_manager_new (void) +MsdSoundManager * +msd_sound_manager_new (void) { if (manager_object) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_SOUND_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_SOUND_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_SOUND_MANAGER (manager_object); + return MSD_SOUND_MANAGER (manager_object); } diff --git a/plugins/sound/gsd-sound-manager.h b/plugins/sound/gsd-sound-manager.h index e640f09..ee4f6f5 100644 --- a/plugins/sound/gsd-sound-manager.h +++ b/plugins/sound/gsd-sound-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_SOUND_MANAGER_H -#define __GSD_SOUND_MANAGER_H +#ifndef __MSD_SOUND_MANAGER_H +#define __MSD_SOUND_MANAGER_H #include <glib.h> #include <glib-object.h> @@ -28,34 +28,34 @@ extern "C" { #endif -#define GSD_TYPE_SOUND_MANAGER (gsd_sound_manager_get_type ()) -#define GSD_SOUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_SOUND_MANAGER, GsdSoundManager)) -#define GSD_SOUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSD_TYPE_SOUND_MANAGER, GsdSoundManagerClass)) -#define GSD_IS_SOUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_SOUND_MANAGER)) -#define GSD_IS_SOUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_SOUND_MANAGER)) -#define GSD_SOUND_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_SOUND_MANAGER, GsdSoundManagerClass)) +#define MSD_TYPE_SOUND_MANAGER (msd_sound_manager_get_type ()) +#define MSD_SOUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_SOUND_MANAGER, MsdSoundManager)) +#define MSD_SOUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MSD_TYPE_SOUND_MANAGER, MsdSoundManagerClass)) +#define MSD_IS_SOUND_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_SOUND_MANAGER)) +#define MSD_IS_SOUND_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_SOUND_MANAGER)) +#define MSD_SOUND_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_SOUND_MANAGER, MsdSoundManagerClass)) -typedef struct GsdSoundManagerPrivate GsdSoundManagerPrivate; +typedef struct MsdSoundManagerPrivate MsdSoundManagerPrivate; typedef struct { GObject parent; - GsdSoundManagerPrivate *priv; -} GsdSoundManager; + MsdSoundManagerPrivate *priv; +} MsdSoundManager; typedef struct { GObjectClass parent_class; -} GsdSoundManagerClass; +} MsdSoundManagerClass; -GType gsd_sound_manager_get_type (void) G_GNUC_CONST; +GType msd_sound_manager_get_type (void) G_GNUC_CONST; -GsdSoundManager *gsd_sound_manager_new (void); -gboolean gsd_sound_manager_start (GsdSoundManager *manager, GError **error); -void gsd_sound_manager_stop (GsdSoundManager *manager); +MsdSoundManager *msd_sound_manager_new (void); +gboolean msd_sound_manager_start (MsdSoundManager *manager, GError **error); +void msd_sound_manager_stop (MsdSoundManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_SOUND_MANAGER_H */ +#endif /* __MSD_SOUND_MANAGER_H */ diff --git a/plugins/sound/gsd-sound-plugin.c b/plugins/sound/gsd-sound-plugin.c index 88168bf..28a2c85 100644 --- a/plugins/sound/gsd-sound-plugin.c +++ b/plugins/sound/gsd-sound-plugin.c @@ -24,45 +24,45 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-sound-plugin.h" -#include "gsd-sound-manager.h" +#include "msd-sound-plugin.h" +#include "msd-sound-manager.h" -struct GsdSoundPluginPrivate { - GsdSoundManager *manager; +struct MsdSoundPluginPrivate { + MsdSoundManager *manager; }; -#define GSD_SOUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_SOUND_PLUGIN, GsdSoundPluginPrivate)) +#define MSD_SOUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_SOUND_PLUGIN, MsdSoundPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdSoundPlugin, gsd_sound_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdSoundPlugin, msd_sound_plugin) static void -gsd_sound_plugin_init (GsdSoundPlugin *plugin) +msd_sound_plugin_init (MsdSoundPlugin *plugin) { - plugin->priv = GSD_SOUND_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_SOUND_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdSoundPlugin initializing"); + g_debug ("MsdSoundPlugin initializing"); - plugin->priv->manager = gsd_sound_manager_new (); + plugin->priv->manager = msd_sound_manager_new (); } static void -gsd_sound_plugin_finalize (GObject *object) +msd_sound_plugin_finalize (GObject *object) { - GsdSoundPlugin *plugin; + MsdSoundPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_SOUND_PLUGIN (object)); + g_return_if_fail (MSD_IS_SOUND_PLUGIN (object)); - g_debug ("GsdSoundPlugin finalizing"); + g_debug ("MsdSoundPlugin finalizing"); - plugin = GSD_SOUND_PLUGIN (object); + plugin = MSD_SOUND_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); if (plugin->priv->manager != NULL) g_object_unref (plugin->priv->manager); - G_OBJECT_CLASS (gsd_sound_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_sound_plugin_parent_class)->finalize (object); } static void @@ -72,7 +72,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating sound plugin"); - if (!gsd_sound_manager_start (GSD_SOUND_PLUGIN (plugin)->priv->manager, &error)) { + if (!msd_sound_manager_start (MSD_SOUND_PLUGIN (plugin)->priv->manager, &error)) { g_warning ("Unable to start sound manager: %s", error->message); g_error_free (error); } @@ -82,19 +82,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating sound plugin"); - gsd_sound_manager_stop (GSD_SOUND_PLUGIN (plugin)->priv->manager); + msd_sound_manager_stop (MSD_SOUND_PLUGIN (plugin)->priv->manager); } static void -gsd_sound_plugin_class_init (GsdSoundPluginClass *klass) +msd_sound_plugin_class_init (MsdSoundPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_sound_plugin_finalize; + object_class->finalize = msd_sound_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdSoundPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdSoundPluginPrivate)); } diff --git a/plugins/sound/gsd-sound-plugin.h b/plugins/sound/gsd-sound-plugin.h index 660e159..b1dac8a 100644 --- a/plugins/sound/gsd-sound-plugin.h +++ b/plugins/sound/gsd-sound-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_SOUND_PLUGIN_H__ -#define __GSD_SOUND_PLUGIN_H__ +#ifndef __MSD_SOUND_PLUGIN_H__ +#define __MSD_SOUND_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_SOUND_PLUGIN (gsd_sound_plugin_get_type ()) -#define GSD_SOUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_SOUND_PLUGIN, GsdSoundPlugin)) -#define GSD_SOUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GSD_TYPE_SOUND_PLUGIN, GsdSoundPluginClass)) -#define GSD_IS_SOUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_SOUND_PLUGIN)) -#define GSD_IS_SOUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_SOUND_PLUGIN)) -#define GSD_SOUND_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_SOUND_PLUGIN, GsdSoundPluginClass)) +#define MSD_TYPE_SOUND_PLUGIN (msd_sound_plugin_get_type ()) +#define MSD_SOUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_SOUND_PLUGIN, MsdSoundPlugin)) +#define MSD_SOUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MSD_TYPE_SOUND_PLUGIN, MsdSoundPluginClass)) +#define MSD_IS_SOUND_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_SOUND_PLUGIN)) +#define MSD_IS_SOUND_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_SOUND_PLUGIN)) +#define MSD_SOUND_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_SOUND_PLUGIN, MsdSoundPluginClass)) -typedef struct GsdSoundPluginPrivate GsdSoundPluginPrivate; +typedef struct MsdSoundPluginPrivate MsdSoundPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdSoundPluginPrivate *priv; -} GsdSoundPlugin; + MsdSoundPluginPrivate *priv; +} MsdSoundPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdSoundPluginClass; +} MsdSoundPluginClass; -GType gsd_sound_plugin_get_type (void) G_GNUC_CONST; +GType msd_sound_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_SOUND_PLUGIN_H__ */ +#endif /* __MSD_SOUND_PLUGIN_H__ */ diff --git a/plugins/typing-break/Makefile.am b/plugins/typing-break/Makefile.am index 0648007..334d03c 100644 --- a/plugins/typing-break/Makefile.am +++ b/plugins/typing-break/Makefile.am @@ -5,10 +5,10 @@ plugin_LTLIBRARIES = \ $(NULL) libtyping_break_la_SOURCES = \ - gsd-typing-break-plugin.h \ - gsd-typing-break-plugin.c \ - gsd-typing-break-manager.h \ - gsd-typing-break-manager.c \ + msd-typing-break-plugin.h \ + msd-typing-break-plugin.c \ + msd-typing-break-manager.h \ + msd-typing-break-manager.c \ $(NULL) libtyping_break_la_CPPFLAGS = \ @@ -21,7 +21,7 @@ libtyping_break_la_CFLAGS = \ $(AM_CFLAGS) libtyping_break_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libtyping_break_la_LIBADD = \ @@ -46,4 +46,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/typing-break/gsd-typing-break-manager.c b/plugins/typing-break/gsd-typing-break-manager.c index d157964..113f6be 100644 --- a/plugins/typing-break/gsd-typing-break-manager.c +++ b/plugins/typing-break/gsd-typing-break-manager.c @@ -39,13 +39,13 @@ #include <mateconf/mateconf-client.h> #include "mate-settings-profile.h" -#include "gsd-typing-break-manager.h" +#include "msd-typing-break-manager.h" -#define GSD_TYPING_BREAK_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_TYPING_BREAK_MANAGER, GsdTypingBreakManagerPrivate)) +#define MSD_TYPING_BREAK_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_TYPING_BREAK_MANAGER, MsdTypingBreakManagerPrivate)) #define MATECONF_BREAK_DIR "/desktop/mate/typing_break" -struct GsdTypingBreakManagerPrivate +struct MsdTypingBreakManagerPrivate { GPid typing_monitor_pid; guint typing_monitor_idle_id; @@ -54,16 +54,16 @@ struct GsdTypingBreakManagerPrivate guint notify; }; -static void gsd_typing_break_manager_class_init (GsdTypingBreakManagerClass *klass); -static void gsd_typing_break_manager_init (GsdTypingBreakManager *typing_break_manager); -static void gsd_typing_break_manager_finalize (GObject *object); +static void msd_typing_break_manager_class_init (MsdTypingBreakManagerClass *klass); +static void msd_typing_break_manager_init (MsdTypingBreakManager *typing_break_manager); +static void msd_typing_break_manager_finalize (GObject *object); -G_DEFINE_TYPE (GsdTypingBreakManager, gsd_typing_break_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdTypingBreakManager, msd_typing_break_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; static gboolean -typing_break_timeout (GsdTypingBreakManager *manager) +typing_break_timeout (MsdTypingBreakManager *manager) { if (manager->priv->typing_monitor_pid > 0) { kill (manager->priv->typing_monitor_pid, SIGKILL); @@ -77,7 +77,7 @@ typing_break_timeout (GsdTypingBreakManager *manager) static void child_watch (GPid pid, int status, - GsdTypingBreakManager *manager) + MsdTypingBreakManager *manager) { if (pid == manager->priv->typing_monitor_pid) { manager->priv->typing_monitor_pid = 0; @@ -86,7 +86,7 @@ child_watch (GPid pid, } static void -setup_typing_break (GsdTypingBreakManager *manager, +setup_typing_break (MsdTypingBreakManager *manager, gboolean enabled) { mate_settings_profile_start (NULL); @@ -140,7 +140,7 @@ static void typing_break_callback (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdTypingBreakManager *manager) + MsdTypingBreakManager *manager) { if (! strcmp (entry->key, "/desktop/mate/typing_break/enabled")) { if (entry->value->type == MATECONF_VALUE_BOOL) { @@ -150,7 +150,7 @@ typing_break_callback (MateConfClient *client, } static gboolean -really_setup_typing_break (GsdTypingBreakManager *manager) +really_setup_typing_break (MsdTypingBreakManager *manager) { setup_typing_break (manager, TRUE); manager->priv->setup_id = 0; @@ -158,7 +158,7 @@ really_setup_typing_break (GsdTypingBreakManager *manager) } gboolean -gsd_typing_break_manager_start (GsdTypingBreakManager *manager, +msd_typing_break_manager_start (MsdTypingBreakManager *manager, GError **error) { MateConfClient *client; @@ -191,9 +191,9 @@ gsd_typing_break_manager_start (GsdTypingBreakManager *manager, } void -gsd_typing_break_manager_stop (GsdTypingBreakManager *manager) +msd_typing_break_manager_stop (MsdTypingBreakManager *manager) { - GsdTypingBreakManagerPrivate *p = manager->priv; + MsdTypingBreakManagerPrivate *p = manager->priv; g_debug ("Stopping typing_break manager"); @@ -228,14 +228,14 @@ gsd_typing_break_manager_stop (GsdTypingBreakManager *manager) } static void -gsd_typing_break_manager_set_property (GObject *object, +msd_typing_break_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdTypingBreakManager *self; + MsdTypingBreakManager *self; - self = GSD_TYPING_BREAK_MANAGER (object); + self = MSD_TYPING_BREAK_MANAGER (object); switch (prop_id) { default: @@ -245,14 +245,14 @@ gsd_typing_break_manager_set_property (GObject *object, } static void -gsd_typing_break_manager_get_property (GObject *object, +msd_typing_break_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdTypingBreakManager *self; + MsdTypingBreakManager *self; - self = GSD_TYPING_BREAK_MANAGER (object); + self = MSD_TYPING_BREAK_MANAGER (object); switch (prop_id) { default: @@ -262,16 +262,16 @@ gsd_typing_break_manager_get_property (GObject *object, } static GObject * -gsd_typing_break_manager_constructor (GType type, +msd_typing_break_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdTypingBreakManager *typing_break_manager; - GsdTypingBreakManagerClass *klass; + MsdTypingBreakManager *typing_break_manager; + MsdTypingBreakManagerClass *klass; - klass = GSD_TYPING_BREAK_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_TYPING_BREAK_MANAGER)); + klass = MSD_TYPING_BREAK_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_TYPING_BREAK_MANAGER)); - typing_break_manager = GSD_TYPING_BREAK_MANAGER (G_OBJECT_CLASS (gsd_typing_break_manager_parent_class)->constructor (type, + typing_break_manager = MSD_TYPING_BREAK_MANAGER (G_OBJECT_CLASS (msd_typing_break_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -279,61 +279,61 @@ gsd_typing_break_manager_constructor (GType type, } static void -gsd_typing_break_manager_dispose (GObject *object) +msd_typing_break_manager_dispose (GObject *object) { - GsdTypingBreakManager *typing_break_manager; + MsdTypingBreakManager *typing_break_manager; - typing_break_manager = GSD_TYPING_BREAK_MANAGER (object); + typing_break_manager = MSD_TYPING_BREAK_MANAGER (object); - G_OBJECT_CLASS (gsd_typing_break_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_typing_break_manager_parent_class)->dispose (object); } static void -gsd_typing_break_manager_class_init (GsdTypingBreakManagerClass *klass) +msd_typing_break_manager_class_init (MsdTypingBreakManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_typing_break_manager_get_property; - object_class->set_property = gsd_typing_break_manager_set_property; - object_class->constructor = gsd_typing_break_manager_constructor; - object_class->dispose = gsd_typing_break_manager_dispose; - object_class->finalize = gsd_typing_break_manager_finalize; + object_class->get_property = msd_typing_break_manager_get_property; + object_class->set_property = msd_typing_break_manager_set_property; + object_class->constructor = msd_typing_break_manager_constructor; + object_class->dispose = msd_typing_break_manager_dispose; + object_class->finalize = msd_typing_break_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdTypingBreakManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdTypingBreakManagerPrivate)); } static void -gsd_typing_break_manager_init (GsdTypingBreakManager *manager) +msd_typing_break_manager_init (MsdTypingBreakManager *manager) { - manager->priv = GSD_TYPING_BREAK_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_TYPING_BREAK_MANAGER_GET_PRIVATE (manager); } static void -gsd_typing_break_manager_finalize (GObject *object) +msd_typing_break_manager_finalize (GObject *object) { - GsdTypingBreakManager *typing_break_manager; + MsdTypingBreakManager *typing_break_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_TYPING_BREAK_MANAGER (object)); + g_return_if_fail (MSD_IS_TYPING_BREAK_MANAGER (object)); - typing_break_manager = GSD_TYPING_BREAK_MANAGER (object); + typing_break_manager = MSD_TYPING_BREAK_MANAGER (object); g_return_if_fail (typing_break_manager->priv != NULL); - G_OBJECT_CLASS (gsd_typing_break_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_typing_break_manager_parent_class)->finalize (object); } -GsdTypingBreakManager * -gsd_typing_break_manager_new (void) +MsdTypingBreakManager * +msd_typing_break_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_TYPING_BREAK_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_TYPING_BREAK_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_TYPING_BREAK_MANAGER (manager_object); + return MSD_TYPING_BREAK_MANAGER (manager_object); } diff --git a/plugins/typing-break/gsd-typing-break-manager.h b/plugins/typing-break/gsd-typing-break-manager.h index e4ac24d..d490a0e 100644 --- a/plugins/typing-break/gsd-typing-break-manager.h +++ b/plugins/typing-break/gsd-typing-break-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_TYPING_BREAK_MANAGER_H -#define __GSD_TYPING_BREAK_MANAGER_H +#ifndef __MSD_TYPING_BREAK_MANAGER_H +#define __MSD_TYPING_BREAK_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_TYPING_BREAK_MANAGER (gsd_typing_break_manager_get_type ()) -#define GSD_TYPING_BREAK_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_TYPING_BREAK_MANAGER, GsdTypingBreakManager)) -#define GSD_TYPING_BREAK_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_TYPING_BREAK_MANAGER, GsdTypingBreakManagerClass)) -#define GSD_IS_TYPING_BREAK_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_TYPING_BREAK_MANAGER)) -#define GSD_IS_TYPING_BREAK_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_TYPING_BREAK_MANAGER)) -#define GSD_TYPING_BREAK_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_TYPING_BREAK_MANAGER, GsdTypingBreakManagerClass)) +#define MSD_TYPE_TYPING_BREAK_MANAGER (msd_typing_break_manager_get_type ()) +#define MSD_TYPING_BREAK_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_TYPING_BREAK_MANAGER, MsdTypingBreakManager)) +#define MSD_TYPING_BREAK_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_TYPING_BREAK_MANAGER, MsdTypingBreakManagerClass)) +#define MSD_IS_TYPING_BREAK_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_TYPING_BREAK_MANAGER)) +#define MSD_IS_TYPING_BREAK_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_TYPING_BREAK_MANAGER)) +#define MSD_TYPING_BREAK_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_TYPING_BREAK_MANAGER, MsdTypingBreakManagerClass)) -typedef struct GsdTypingBreakManagerPrivate GsdTypingBreakManagerPrivate; +typedef struct MsdTypingBreakManagerPrivate MsdTypingBreakManagerPrivate; typedef struct { GObject parent; - GsdTypingBreakManagerPrivate *priv; -} GsdTypingBreakManager; + MsdTypingBreakManagerPrivate *priv; +} MsdTypingBreakManager; typedef struct { GObjectClass parent_class; -} GsdTypingBreakManagerClass; +} MsdTypingBreakManagerClass; -GType gsd_typing_break_manager_get_type (void); +GType msd_typing_break_manager_get_type (void); -GsdTypingBreakManager * gsd_typing_break_manager_new (void); -gboolean gsd_typing_break_manager_start (GsdTypingBreakManager *manager, +MsdTypingBreakManager * msd_typing_break_manager_new (void); +gboolean msd_typing_break_manager_start (MsdTypingBreakManager *manager, GError **error); -void gsd_typing_break_manager_stop (GsdTypingBreakManager *manager); +void msd_typing_break_manager_stop (MsdTypingBreakManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_TYPING_BREAK_MANAGER_H */ +#endif /* __MSD_TYPING_BREAK_MANAGER_H */ diff --git a/plugins/typing-break/gsd-typing-break-plugin.c b/plugins/typing-break/gsd-typing-break-plugin.c index 0f0535d..dcf3326 100644 --- a/plugins/typing-break/gsd-typing-break-plugin.c +++ b/plugins/typing-break/gsd-typing-break-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-typing-break-plugin.h" -#include "gsd-typing-break-manager.h" +#include "msd-typing-break-plugin.h" +#include "msd-typing-break-manager.h" -struct GsdTypingBreakPluginPrivate { - GsdTypingBreakManager *manager; +struct MsdTypingBreakPluginPrivate { + MsdTypingBreakManager *manager; }; -#define GSD_TYPING_BREAK_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_TYPING_BREAK_PLUGIN, GsdTypingBreakPluginPrivate)) +#define MSD_TYPING_BREAK_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_TYPING_BREAK_PLUGIN, MsdTypingBreakPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdTypingBreakPlugin, gsd_typing_break_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdTypingBreakPlugin, msd_typing_break_plugin) static void -gsd_typing_break_plugin_init (GsdTypingBreakPlugin *plugin) +msd_typing_break_plugin_init (MsdTypingBreakPlugin *plugin) { - plugin->priv = GSD_TYPING_BREAK_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_TYPING_BREAK_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdTypingBreakPlugin initializing"); + g_debug ("MsdTypingBreakPlugin initializing"); - plugin->priv->manager = gsd_typing_break_manager_new (); + plugin->priv->manager = msd_typing_break_manager_new (); } static void -gsd_typing_break_plugin_finalize (GObject *object) +msd_typing_break_plugin_finalize (GObject *object) { - GsdTypingBreakPlugin *plugin; + MsdTypingBreakPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_TYPING_BREAK_PLUGIN (object)); + g_return_if_fail (MSD_IS_TYPING_BREAK_PLUGIN (object)); - g_debug ("GsdTypingBreakPlugin finalizing"); + g_debug ("MsdTypingBreakPlugin finalizing"); - plugin = GSD_TYPING_BREAK_PLUGIN (object); + plugin = MSD_TYPING_BREAK_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_typing_break_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_typing_break_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_typing_break_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating typing_break plugin"); error = NULL; - res = gsd_typing_break_manager_start (GSD_TYPING_BREAK_PLUGIN (plugin)->priv->manager, &error); + res = msd_typing_break_manager_start (MSD_TYPING_BREAK_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start typing_break manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating typing_break plugin"); - gsd_typing_break_manager_stop (GSD_TYPING_BREAK_PLUGIN (plugin)->priv->manager); + msd_typing_break_manager_stop (MSD_TYPING_BREAK_PLUGIN (plugin)->priv->manager); } static void -gsd_typing_break_plugin_class_init (GsdTypingBreakPluginClass *klass) +msd_typing_break_plugin_class_init (MsdTypingBreakPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_typing_break_plugin_finalize; + object_class->finalize = msd_typing_break_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdTypingBreakPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdTypingBreakPluginPrivate)); } diff --git a/plugins/typing-break/gsd-typing-break-plugin.h b/plugins/typing-break/gsd-typing-break-plugin.h index b7bbf16..54bde6e 100644 --- a/plugins/typing-break/gsd-typing-break-plugin.h +++ b/plugins/typing-break/gsd-typing-break-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_TYPING_BREAK_PLUGIN_H__ -#define __GSD_TYPING_BREAK_PLUGIN_H__ +#ifndef __MSD_TYPING_BREAK_PLUGIN_H__ +#define __MSD_TYPING_BREAK_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_TYPING_BREAK_PLUGIN (gsd_typing_break_plugin_get_type ()) -#define GSD_TYPING_BREAK_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_TYPING_BREAK_PLUGIN, GsdTypingBreakPlugin)) -#define GSD_TYPING_BREAK_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_TYPING_BREAK_PLUGIN, GsdTypingBreakPluginClass)) -#define GSD_IS_TYPING_BREAK_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_TYPING_BREAK_PLUGIN)) -#define GSD_IS_TYPING_BREAK_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_TYPING_BREAK_PLUGIN)) -#define GSD_TYPING_BREAK_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_TYPING_BREAK_PLUGIN, GsdTypingBreakPluginClass)) +#define MSD_TYPE_TYPING_BREAK_PLUGIN (msd_typing_break_plugin_get_type ()) +#define MSD_TYPING_BREAK_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_TYPING_BREAK_PLUGIN, MsdTypingBreakPlugin)) +#define MSD_TYPING_BREAK_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_TYPING_BREAK_PLUGIN, MsdTypingBreakPluginClass)) +#define MSD_IS_TYPING_BREAK_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_TYPING_BREAK_PLUGIN)) +#define MSD_IS_TYPING_BREAK_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_TYPING_BREAK_PLUGIN)) +#define MSD_TYPING_BREAK_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_TYPING_BREAK_PLUGIN, MsdTypingBreakPluginClass)) -typedef struct GsdTypingBreakPluginPrivate GsdTypingBreakPluginPrivate; +typedef struct MsdTypingBreakPluginPrivate MsdTypingBreakPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdTypingBreakPluginPrivate *priv; -} GsdTypingBreakPlugin; + MsdTypingBreakPluginPrivate *priv; +} MsdTypingBreakPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdTypingBreakPluginClass; +} MsdTypingBreakPluginClass; -GType gsd_typing_break_plugin_get_type (void) G_GNUC_CONST; +GType msd_typing_break_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_TYPING_BREAK_PLUGIN_H__ */ +#endif /* __MSD_TYPING_BREAK_PLUGIN_H__ */ diff --git a/plugins/xrandr/Makefile.am b/plugins/xrandr/Makefile.am index b7d8684..1a398d7 100644 --- a/plugins/xrandr/Makefile.am +++ b/plugins/xrandr/Makefile.am @@ -2,14 +2,14 @@ icondir = $(datadir)/icons/mate context = apps BUILT_SOURCES = \ - gsd-xrandr-manager-glue.h + msd-xrandr-manager-glue.h ICON_FILES = \ - gsd-xrandr-16.png \ - gsd-xrandr-22.png \ - gsd-xrandr-24.png \ - gsd-xrandr-32.png \ - gsd-xrandr.svg + msd-xrandr-16.png \ + msd-xrandr-22.png \ + msd-xrandr-24.png \ + msd-xrandr-32.png \ + msd-xrandr.svg install-data-local: $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/mate-settings-daemon/xrandr @@ -18,33 +18,33 @@ install-data-local: $(mkinstalldirs) $(DESTDIR)$(icondir)/24x24/$(context) $(mkinstalldirs) $(DESTDIR)$(icondir)/32x32/$(context) $(mkinstalldirs) $(DESTDIR)$(icondir)/scalable/$(context) - $(INSTALL_DATA) $(srcdir)/gsd-xrandr-16.png $(DESTDIR)$(icondir)/16x16/$(context)/gsd-xrandr.png - $(INSTALL_DATA) $(srcdir)/gsd-xrandr-22.png $(DESTDIR)$(icondir)/22x22/$(context)/gsd-xrandr.png - $(INSTALL_DATA) $(srcdir)/gsd-xrandr-24.png $(DESTDIR)$(icondir)/24x24/$(context)/gsd-xrandr.png - $(INSTALL_DATA) $(srcdir)/gsd-xrandr-32.png $(DESTDIR)$(icondir)/32x32/$(context)/gsd-xrandr.png - $(INSTALL_DATA) $(srcdir)/gsd-xrandr.svg $(DESTDIR)$(icondir)/scalable/$(context)/gsd-xrandr.svg + $(INSTALL_DATA) $(srcdir)/msd-xrandr-16.png $(DESTDIR)$(icondir)/16x16/$(context)/msd-xrandr.png + $(INSTALL_DATA) $(srcdir)/msd-xrandr-22.png $(DESTDIR)$(icondir)/22x22/$(context)/msd-xrandr.png + $(INSTALL_DATA) $(srcdir)/msd-xrandr-24.png $(DESTDIR)$(icondir)/24x24/$(context)/msd-xrandr.png + $(INSTALL_DATA) $(srcdir)/msd-xrandr-32.png $(DESTDIR)$(icondir)/32x32/$(context)/msd-xrandr.png + $(INSTALL_DATA) $(srcdir)/msd-xrandr.svg $(DESTDIR)$(icondir)/scalable/$(context)/msd-xrandr.svg uninstall-local: - rm -f $(DESTDIR)$(icondir)/16x16/$(context)/gsd-xrandr.png - rm -f $(DESTDIR)$(icondir)/22x22/$(context)/gsd-xrandr.png - rm -f $(DESTDIR)$(icondir)/24x24/$(context)/gsd-xrandr.png - rm -f $(DESTDIR)$(icondir)/32x32/$(context)/gsd-xrandr.png - rm -f $(DESTDIR)$(icondir)/scalable/$(context)/gsd-xrandr.svg + rm -f $(DESTDIR)$(icondir)/16x16/$(context)/msd-xrandr.png + rm -f $(DESTDIR)$(icondir)/22x22/$(context)/msd-xrandr.png + rm -f $(DESTDIR)$(icondir)/24x24/$(context)/msd-xrandr.png + rm -f $(DESTDIR)$(icondir)/32x32/$(context)/msd-xrandr.png + rm -f $(DESTDIR)$(icondir)/scalable/$(context)/msd-xrandr.svg plugin_LTLIBRARIES = \ libxrandr.la -gsd-xrandr-manager-glue.h: gsd-xrandr-manager.xml Makefile - dbus-binding-tool --prefix=gsd_xrandr_manager --mode=glib-server $< > xgen-$(@F) \ +msd-xrandr-manager-glue.h: msd-xrandr-manager.xml Makefile + dbus-binding-tool --prefix=msd_xrandr_manager --mode=glib-server $< > xgen-$(@F) \ && ( cmp -s xgen-$(@F) $@ || cp xgen-$(@F) $@ ) \ && rm -f xgen-$(@F) libxrandr_la_SOURCES = \ $(BUILT_SOURCES) \ - gsd-xrandr-plugin.h \ - gsd-xrandr-plugin.c \ - gsd-xrandr-manager.h \ - gsd-xrandr-manager.c + msd-xrandr-plugin.h \ + msd-xrandr-plugin.c \ + msd-xrandr-manager.h \ + msd-xrandr-manager.c libxrandr_la_CPPFLAGS = \ -I$(top_srcdir)/mate-settings-daemon \ @@ -58,7 +58,7 @@ libxrandr_la_CFLAGS = \ $(AM_CFLAGS) libxrandr_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) + $(MSD_PLUGIN_LDFLAGS) libxrandr_la_LIBADD = \ $(SETTINGS_PLUGIN_LIBS) \ @@ -69,8 +69,8 @@ plugin_in_files = \ plugin_DATA = $(plugin_in_files:.mate-settings-plugin.in=.mate-settings-plugin) -EXTRA_DIST = $(plugin_in_files) $(ICON_FILES) gsd-xrandr-manager.xml +EXTRA_DIST = $(plugin_in_files) $(ICON_FILES) msd-xrandr-manager.xml CLEANFILES = $(plugin_DATA) $(BUILT_SOURCES) DISTCLEANFILES = $(plugin_DATA) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c index b8d9c66..dc00be1 100644 --- a/plugins/xrandr/gsd-xrandr-manager.c +++ b/plugins/xrandr/gsd-xrandr-manager.c @@ -51,13 +51,13 @@ #endif #include "mate-settings-profile.h" -#include "gsd-xrandr-manager.h" +#include "msd-xrandr-manager.h" #ifndef HOST_NAME_MAX #define HOST_NAME_MAX 255 #endif -#define GSD_XRANDR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_XRANDR_MANAGER, GsdXrandrManagerPrivate)) +#define MSD_XRANDR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_XRANDR_MANAGER, MsdXrandrManagerPrivate)) #define CONF_DIR "/apps/mate_settings_daemon/xrandr" #define CONF_KEY_SHOW_NOTIFICATION_ICON (CONF_DIR "/show_notification_icon") @@ -73,18 +73,18 @@ */ #define CONFIRMATION_DIALOG_SECONDS 30 -/* name of the icon files (gsd-xrandr.svg, etc.) */ -#define GSD_XRANDR_ICON_NAME "gsd-xrandr" +/* name of the icon files (msd-xrandr.svg, etc.) */ +#define MSD_XRANDR_ICON_NAME "msd-xrandr" /* executable of the control center's display configuration capplet */ -#define GSD_XRANDR_DISPLAY_CAPPLET "mate-control-center display" +#define MSD_XRANDR_DISPLAY_CAPPLET "mate-control-center display" -#define GSD_DBUS_PATH "/org/mate/SettingsDaemon" -#define GSD_DBUS_NAME "org.mate.SettingsDaemon" -#define GSD_XRANDR_DBUS_PATH GSD_DBUS_PATH "/XRANDR" -#define GSD_XRANDR_DBUS_NAME GSD_DBUS_NAME ".XRANDR" +#define MSD_DBUS_PATH "/org/mate/SettingsDaemon" +#define MSD_DBUS_NAME "org.mate.SettingsDaemon" +#define MSD_XRANDR_DBUS_PATH MSD_DBUS_PATH "/XRANDR" +#define MSD_XRANDR_DBUS_NAME MSD_DBUS_NAME ".XRANDR" -struct GsdXrandrManagerPrivate +struct MsdXrandrManagerPrivate { DBusGConnection *dbus_connection; @@ -120,13 +120,13 @@ static const MateRRRotation possible_rotations[] = { /* We don't allow REFLECT_X or REFLECT_Y for now, as mate-display-properties doesn't allow them, either */ }; -static void gsd_xrandr_manager_class_init (GsdXrandrManagerClass *klass); -static void gsd_xrandr_manager_init (GsdXrandrManager *xrandr_manager); -static void gsd_xrandr_manager_finalize (GObject *object); +static void msd_xrandr_manager_class_init (MsdXrandrManagerClass *klass); +static void msd_xrandr_manager_init (MsdXrandrManager *xrandr_manager); +static void msd_xrandr_manager_finalize (GObject *object); -static void error_message (GsdXrandrManager *mgr, const char *primary_text, GError *error_to_display, const char *secondary_text); +static void error_message (MsdXrandrManager *mgr, const char *primary_text, GError *error_to_display, const char *secondary_text); -static void status_icon_popup_menu (GsdXrandrManager *manager, guint button, guint32 timestamp); +static void status_icon_popup_menu (MsdXrandrManager *manager, guint button, guint32 timestamp); static void run_display_capplet (GtkWidget *widget); static void get_allowed_rotations_for_output (MateRRConfig *config, MateRRScreen *rr_screen, @@ -134,7 +134,7 @@ static void get_allowed_rotations_for_output (MateRRConfig *config, int *out_num_rotations, MateRRRotation *out_rotations); -G_DEFINE_TYPE (GsdXrandrManager, gsd_xrandr_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdXrandrManager, msd_xrandr_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; @@ -150,8 +150,8 @@ log_open (void) if (log_file) return; - toggle_filename = g_build_filename (g_get_home_dir (), "gsd-debug-randr", NULL); - log_filename = g_build_filename (g_get_home_dir (), "gsd-debug-randr.log", NULL); + toggle_filename = g_build_filename (g_get_home_dir (), "msd-debug-randr", NULL); + log_filename = g_build_filename (g_get_home_dir (), "msd-debug-randr.log", NULL); if (stat (toggle_filename, &st) != 0) goto out; @@ -159,7 +159,7 @@ log_open (void) log_file = fopen (log_filename, "a"); if (log_file && ftell (log_file) == 0) - fprintf (log_file, "To keep this log from being created, please rm ~/gsd-debug-randr\n"); + fprintf (log_file, "To keep this log from being created, please rm ~/msd-debug-randr\n"); out: g_free (toggle_filename); @@ -282,12 +282,12 @@ log_configurations (MateRRConfig **configs) } static void -show_timestamps_dialog (GsdXrandrManager *manager, const char *msg) +show_timestamps_dialog (MsdXrandrManager *manager, const char *msg) { #if 1 return; #else - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; GtkWidget *dialog; guint32 change_timestamp, config_timestamp; static int serial; @@ -315,13 +315,13 @@ show_timestamps_dialog (GsdXrandrManager *manager, const char *msg) * mate_rr_config_apply_from_filename_with_time(), since that is not usually an error. */ static gboolean -apply_configuration_from_filename (GsdXrandrManager *manager, +apply_configuration_from_filename (MsdXrandrManager *manager, const char *filename, gboolean no_matching_config_is_an_error, guint32 timestamp, GError **error) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; GError *my_error; gboolean success; char *str; @@ -357,9 +357,9 @@ fail: * We just return whether setting the configuration succeeded. */ static gboolean -apply_configuration_and_display_error (GsdXrandrManager *manager, MateRRConfig *config, guint32 timestamp) +apply_configuration_and_display_error (MsdXrandrManager *manager, MateRRConfig *config, guint32 timestamp) { - GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManagerPrivate *priv = manager->priv; GError *error; gboolean success; @@ -383,7 +383,7 @@ restore_backup_configuration_without_messages (const char *backup_filename, cons } static void -restore_backup_configuration (GsdXrandrManager *manager, const char *backup_filename, const char *intended_filename, guint32 timestamp) +restore_backup_configuration (MsdXrandrManager *manager, const char *backup_filename, const char *intended_filename, guint32 timestamp) { int saved_errno; @@ -427,7 +427,7 @@ restore_backup_configuration (GsdXrandrManager *manager, const char *backup_file } typedef struct { - GsdXrandrManager *manager; + MsdXrandrManager *manager; GtkWidget *dialog; int countdown; @@ -476,7 +476,7 @@ timeout_response_cb (GtkDialog *dialog, int response_id, gpointer data) } static gboolean -user_says_things_are_ok (GsdXrandrManager *manager, GdkWindow *parent_window) +user_says_things_are_ok (MsdXrandrManager *manager, GdkWindow *parent_window) { TimeoutDialog timeout; guint timeout_id; @@ -523,7 +523,7 @@ user_says_things_are_ok (GsdXrandrManager *manager, GdkWindow *parent_window) } struct confirmation { - GsdXrandrManager *manager; + MsdXrandrManager *manager; GdkWindow *parent_window; guint32 timestamp; }; @@ -549,7 +549,7 @@ confirm_with_user_idle_cb (gpointer data) } static void -queue_confirmation_by_user (GsdXrandrManager *manager, GdkWindow *parent_window, guint32 timestamp) +queue_confirmation_by_user (MsdXrandrManager *manager, GdkWindow *parent_window, guint32 timestamp) { struct confirmation *confirmation; @@ -562,7 +562,7 @@ queue_confirmation_by_user (GsdXrandrManager *manager, GdkWindow *parent_window, } static gboolean -try_to_apply_intended_configuration (GsdXrandrManager *manager, GdkWindow *parent_window, guint32 timestamp, GError **error) +try_to_apply_intended_configuration (MsdXrandrManager *manager, GdkWindow *parent_window, guint32 timestamp, GError **error) { char *backup_filename; char *intended_filename; @@ -595,17 +595,17 @@ out: return result; } -/* DBus method for org.mate.SettingsDaemon.XRANDR ApplyConfiguration; see gsd-xrandr-manager.xml for the interface definition */ +/* DBus method for org.mate.SettingsDaemon.XRANDR ApplyConfiguration; see msd-xrandr-manager.xml for the interface definition */ static gboolean -gsd_xrandr_manager_apply_configuration (GsdXrandrManager *manager, +msd_xrandr_manager_apply_configuration (MsdXrandrManager *manager, GError **error) { return try_to_apply_intended_configuration (manager, NULL, GDK_CURRENT_TIME, error); } -/* DBus method for org.mate.SettingsDaemon.XRANDR_2 ApplyConfiguration; see gsd-xrandr-manager.xml for the interface definition */ +/* DBus method for org.mate.SettingsDaemon.XRANDR_2 ApplyConfiguration; see msd-xrandr-manager.xml for the interface definition */ static gboolean -gsd_xrandr_manager_2_apply_configuration (GsdXrandrManager *manager, +msd_xrandr_manager_2_apply_configuration (MsdXrandrManager *manager, gint64 parent_window_id, gint64 timestamp, GError **error) @@ -626,8 +626,8 @@ gsd_xrandr_manager_2_apply_configuration (GsdXrandrManager *manager, return result; } -/* We include this after the definition of gsd_xrandr_manager_apply_configuration() so the prototype will already exist */ -#include "gsd-xrandr-manager-glue.h" +/* We include this after the definition of msd_xrandr_manager_apply_configuration() so the prototype will already exist */ +#include "msd-xrandr-manager-glue.h" static gboolean is_laptop (MateRRScreen *screen, MateOutputInfo *output) @@ -956,7 +956,7 @@ make_other_setup (MateRRScreen *screen) } static GPtrArray * -sanitize (GsdXrandrManager *manager, GPtrArray *array) +sanitize (MsdXrandrManager *manager, GPtrArray *array) { int i; GPtrArray *new; @@ -1043,7 +1043,7 @@ sanitize (GsdXrandrManager *manager, GPtrArray *array) } static void -generate_fn_f7_configs (GsdXrandrManager *mgr) +generate_fn_f7_configs (MsdXrandrManager *mgr) { GPtrArray *array = g_ptr_array_new (); MateRRScreen *screen = mgr->priv->rw_screen; @@ -1077,10 +1077,10 @@ generate_fn_f7_configs (GsdXrandrManager *mgr) } static void -error_message (GsdXrandrManager *mgr, const char *primary_text, GError *error_to_display, const char *secondary_text) +error_message (MsdXrandrManager *mgr, const char *primary_text, GError *error_to_display, const char *secondary_text) { #ifdef HAVE_LIBMATENOTIFY - GsdXrandrManagerPrivate *priv = mgr->priv; + MsdXrandrManagerPrivate *priv = mgr->priv; NotifyNotification *notification; g_assert (error_to_display == NULL || secondary_text == NULL); @@ -1088,12 +1088,12 @@ error_message (GsdXrandrManager *mgr, const char *primary_text, GError *error_to if (priv->status_icon) notification = notify_notification_new_with_status_icon (primary_text, error_to_display ? error_to_display->message : secondary_text, - GSD_XRANDR_ICON_NAME, + MSD_XRANDR_ICON_NAME, priv->status_icon); else notification = notify_notification_new (primary_text, error_to_display ? error_to_display->message : secondary_text, - GSD_XRANDR_ICON_NAME, + MSD_XRANDR_ICON_NAME, NULL); notify_notification_show (notification, NULL); /* NULL-GError */ @@ -1111,9 +1111,9 @@ error_message (GsdXrandrManager *mgr, const char *primary_text, GError *error_to } static void -handle_fn_f7 (GsdXrandrManager *mgr, guint32 timestamp) +handle_fn_f7 (MsdXrandrManager *mgr, guint32 timestamp) { - GsdXrandrManagerPrivate *priv = mgr->priv; + MsdXrandrManagerPrivate *priv = mgr->priv; MateRRScreen *screen = priv->rw_screen; MateRRConfig *current; GError *error; @@ -1280,9 +1280,9 @@ get_next_rotation (MateRRRotation allowed_rotations, MateRRRotation current_rota * easily. */ static void -handle_rotate_windows (GsdXrandrManager *mgr, guint32 timestamp) +handle_rotate_windows (MsdXrandrManager *mgr, guint32 timestamp) { - GsdXrandrManagerPrivate *priv = mgr->priv; + MsdXrandrManagerPrivate *priv = mgr->priv; MateRRScreen *screen = priv->rw_screen; MateRRConfig *current; MateOutputInfo *rotatable_output_info; @@ -1327,7 +1327,7 @@ event_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data) { - GsdXrandrManager *manager = data; + MsdXrandrManager *manager = data; XEvent *xev = (XEvent *) xevent; if (!manager->priv->running) @@ -1350,9 +1350,9 @@ event_filter (GdkXEvent *xevent, } static void -refresh_tray_icon_menu_if_active (GsdXrandrManager *manager, guint32 timestamp) +refresh_tray_icon_menu_if_active (MsdXrandrManager *manager, guint32 timestamp) { - GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManagerPrivate *priv = manager->priv; if (priv->popup_menu) { gtk_menu_shell_cancel (GTK_MENU_SHELL (priv->popup_menu)); /* status_icon_popup_menu_selection_done_cb() will free everything */ @@ -1361,9 +1361,9 @@ refresh_tray_icon_menu_if_active (GsdXrandrManager *manager, guint32 timestamp) } static void -auto_configure_outputs (GsdXrandrManager *manager, guint32 timestamp) +auto_configure_outputs (MsdXrandrManager *manager, guint32 timestamp) { - GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManagerPrivate *priv = manager->priv; MateRRConfig *config; int i; GList *just_turned_on; @@ -1528,8 +1528,8 @@ apply_color_profiles (void) static void on_randr_event (MateRRScreen *screen, gpointer data) { - GsdXrandrManager *manager = GSD_XRANDR_MANAGER (data); - GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManager *manager = MSD_XRANDR_MANAGER (data); + MsdXrandrManagerPrivate *priv = manager->priv; guint32 change_timestamp, config_timestamp; if (!priv->running) @@ -1621,7 +1621,7 @@ run_display_capplet (GtkWidget *widget) screen = gdk_screen_get_default (); error = NULL; - if (!gdk_spawn_command_line_on_screen (screen, GSD_XRANDR_DISPLAY_CAPPLET, &error)) { + if (!gdk_spawn_command_line_on_screen (screen, MSD_XRANDR_DISPLAY_CAPPLET, &error)) { GtkWidget *dialog; dialog = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, @@ -1645,8 +1645,8 @@ popup_menu_configure_display_cb (GtkMenuItem *item, gpointer data) static void status_icon_popup_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) { - GsdXrandrManager *manager = GSD_XRANDR_MANAGER (data); - struct GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManager *manager = MSD_XRANDR_MANAGER (data); + struct MsdXrandrManagerPrivate *priv = manager->priv; gtk_widget_destroy (priv->popup_menu); priv->popup_menu = NULL; @@ -1671,8 +1671,8 @@ status_icon_popup_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer dat static gboolean output_title_label_expose_event_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) { - GsdXrandrManager *manager = GSD_XRANDR_MANAGER (data); - struct GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManager *manager = MSD_XRANDR_MANAGER (data); + struct MsdXrandrManagerPrivate *priv = manager->priv; MateOutputInfo *output; GdkColor color; cairo_t *cr; @@ -1776,7 +1776,7 @@ title_item_size_allocate_cb (GtkWidget *widget, GtkAllocation *allocation, gpoin } static GtkWidget * -make_menu_item_for_output_title (GsdXrandrManager *manager, MateOutputInfo *output) +make_menu_item_for_output_title (MsdXrandrManager *manager, MateOutputInfo *output) { GtkWidget *item; GtkWidget *label; @@ -1864,9 +1864,9 @@ get_allowed_rotations_for_output (MateRRConfig *config, } static void -add_unsupported_rotation_item (GsdXrandrManager *manager) +add_unsupported_rotation_item (MsdXrandrManager *manager) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; GtkWidget *item; GtkWidget *label; gchar *markup; @@ -1911,8 +1911,8 @@ ensure_current_configuration_is_saved (void) static void output_rotation_item_activate_cb (GtkCheckMenuItem *item, gpointer data) { - GsdXrandrManager *manager = GSD_XRANDR_MANAGER (data); - struct GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManager *manager = MSD_XRANDR_MANAGER (data); + struct MsdXrandrManagerPrivate *priv = manager->priv; MateOutputInfo *output; MateRRRotation rotation; GError *error; @@ -1941,7 +1941,7 @@ output_rotation_item_activate_cb (GtkCheckMenuItem *item, gpointer data) } static void -add_items_for_rotations (GsdXrandrManager *manager, MateOutputInfo *output, MateRRRotation allowed_rotations) +add_items_for_rotations (MsdXrandrManager *manager, MateOutputInfo *output, MateRRRotation allowed_rotations) { typedef struct { MateRRRotation rotation; @@ -1955,7 +1955,7 @@ add_items_for_rotations (GsdXrandrManager *manager, MateOutputInfo *output, Mate /* We don't allow REFLECT_X or REFLECT_Y for now, as mate-display-properties doesn't allow them, either */ }; - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; int i; GSList *group; GtkWidget *active_item; @@ -2012,9 +2012,9 @@ add_items_for_rotations (GsdXrandrManager *manager, MateOutputInfo *output, Mate } static void -add_rotation_items_for_output (GsdXrandrManager *manager, MateOutputInfo *output) +add_rotation_items_for_output (MsdXrandrManager *manager, MateOutputInfo *output) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; int num_rotations; MateRRRotation rotations; @@ -2027,9 +2027,9 @@ add_rotation_items_for_output (GsdXrandrManager *manager, MateOutputInfo *output } static void -add_menu_items_for_output (GsdXrandrManager *manager, MateOutputInfo *output) +add_menu_items_for_output (MsdXrandrManager *manager, MateOutputInfo *output) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; GtkWidget *item; item = make_menu_item_for_output_title (manager, output); @@ -2039,9 +2039,9 @@ add_menu_items_for_output (GsdXrandrManager *manager, MateOutputInfo *output) } static void -add_menu_items_for_outputs (GsdXrandrManager *manager) +add_menu_items_for_outputs (MsdXrandrManager *manager) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; int i; for (i = 0; priv->configuration->outputs[i] != NULL; i++) { @@ -2051,9 +2051,9 @@ add_menu_items_for_outputs (GsdXrandrManager *manager) } static void -status_icon_popup_menu (GsdXrandrManager *manager, guint button, guint32 timestamp) +status_icon_popup_menu (MsdXrandrManager *manager, guint button, guint32 timestamp) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; GtkWidget *item; g_assert (priv->configuration == NULL); @@ -2088,7 +2088,7 @@ status_icon_popup_menu (GsdXrandrManager *manager, guint button, guint32 timesta static void status_icon_activate_cb (GtkStatusIcon *status_icon, gpointer data) { - GsdXrandrManager *manager = GSD_XRANDR_MANAGER (data); + MsdXrandrManager *manager = MSD_XRANDR_MANAGER (data); /* Suck; we don't get a proper button/timestamp */ status_icon_popup_menu (manager, 0, gtk_get_current_event_time ()); @@ -2097,21 +2097,21 @@ status_icon_activate_cb (GtkStatusIcon *status_icon, gpointer data) static void status_icon_popup_menu_cb (GtkStatusIcon *status_icon, guint button, guint32 timestamp, gpointer data) { - GsdXrandrManager *manager = GSD_XRANDR_MANAGER (data); + MsdXrandrManager *manager = MSD_XRANDR_MANAGER (data); status_icon_popup_menu (manager, button, timestamp); } static void -status_icon_start (GsdXrandrManager *manager) +status_icon_start (MsdXrandrManager *manager) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; /* Ideally, we should detect if we are on a tablet and only display * the icon in that case. */ if (!priv->status_icon) { - priv->status_icon = gtk_status_icon_new_from_icon_name (GSD_XRANDR_ICON_NAME); + priv->status_icon = gtk_status_icon_new_from_icon_name (MSD_XRANDR_ICON_NAME); gtk_status_icon_set_tooltip_text (priv->status_icon, _("Configure display settings")); g_signal_connect (priv->status_icon, "activate", @@ -2122,9 +2122,9 @@ status_icon_start (GsdXrandrManager *manager) } static void -status_icon_stop (GsdXrandrManager *manager) +status_icon_stop (MsdXrandrManager *manager) { - struct GsdXrandrManagerPrivate *priv = manager->priv; + struct MsdXrandrManagerPrivate *priv = manager->priv; if (priv->status_icon) { g_signal_handlers_disconnect_by_func ( @@ -2141,7 +2141,7 @@ status_icon_stop (GsdXrandrManager *manager) } static void -start_or_stop_icon (GsdXrandrManager *manager) +start_or_stop_icon (MsdXrandrManager *manager) { if (mateconf_client_get_bool (manager->priv->client, CONF_KEY_SHOW_NOTIFICATION_ICON, NULL)) { status_icon_start (manager); @@ -2155,14 +2155,14 @@ static void on_config_changed (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, - GsdXrandrManager *manager) + MsdXrandrManager *manager) { if (strcmp (entry->key, CONF_KEY_SHOW_NOTIFICATION_ICON) == 0) start_or_stop_icon (manager); } static gboolean -apply_intended_configuration (GsdXrandrManager *manager, const char *intended_filename, guint32 timestamp) +apply_intended_configuration (MsdXrandrManager *manager, const char *intended_filename, guint32 timestamp) { GError *my_error; gboolean result; @@ -2182,9 +2182,9 @@ apply_intended_configuration (GsdXrandrManager *manager, const char *intended_fi } static void -apply_default_boot_configuration (GsdXrandrManager *mgr, guint32 timestamp) +apply_default_boot_configuration (MsdXrandrManager *mgr, guint32 timestamp) { - GsdXrandrManagerPrivate *priv = mgr->priv; + MsdXrandrManagerPrivate *priv = mgr->priv; MateRRScreen *screen = priv->rw_screen; MateRRConfig *config; gboolean turn_on_external, turn_on_laptop; @@ -2210,7 +2210,7 @@ apply_default_boot_configuration (GsdXrandrManager *mgr, guint32 timestamp) } static gboolean -apply_stored_configuration_at_startup (GsdXrandrManager *manager, guint32 timestamp) +apply_stored_configuration_at_startup (MsdXrandrManager *manager, guint32 timestamp) { GError *my_error; gboolean success; @@ -2267,9 +2267,9 @@ out: } static gboolean -apply_default_configuration_from_file (GsdXrandrManager *manager, guint32 timestamp) +apply_default_configuration_from_file (MsdXrandrManager *manager, guint32 timestamp) { - GsdXrandrManagerPrivate *priv = manager->priv; + MsdXrandrManagerPrivate *priv = manager->priv; char *default_config_filename; gboolean result; @@ -2284,7 +2284,7 @@ apply_default_configuration_from_file (GsdXrandrManager *manager, guint32 timest } gboolean -gsd_xrandr_manager_start (GsdXrandrManager *manager, +msd_xrandr_manager_start (MsdXrandrManager *manager, GError **error) { g_debug ("Starting xrandr manager"); @@ -2368,7 +2368,7 @@ gsd_xrandr_manager_start (GsdXrandrManager *manager, } void -gsd_xrandr_manager_stop (GsdXrandrManager *manager) +msd_xrandr_manager_stop (MsdXrandrManager *manager) { g_debug ("Stopping xrandr manager"); @@ -2429,14 +2429,14 @@ gsd_xrandr_manager_stop (GsdXrandrManager *manager) } static void -gsd_xrandr_manager_set_property (GObject *object, +msd_xrandr_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdXrandrManager *self; + MsdXrandrManager *self; - self = GSD_XRANDR_MANAGER (object); + self = MSD_XRANDR_MANAGER (object); switch (prop_id) { default: @@ -2446,14 +2446,14 @@ gsd_xrandr_manager_set_property (GObject *object, } static void -gsd_xrandr_manager_get_property (GObject *object, +msd_xrandr_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdXrandrManager *self; + MsdXrandrManager *self; - self = GSD_XRANDR_MANAGER (object); + self = MSD_XRANDR_MANAGER (object); switch (prop_id) { default: @@ -2463,16 +2463,16 @@ gsd_xrandr_manager_get_property (GObject *object, } static GObject * -gsd_xrandr_manager_constructor (GType type, +msd_xrandr_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdXrandrManager *xrandr_manager; - GsdXrandrManagerClass *klass; + MsdXrandrManager *xrandr_manager; + MsdXrandrManagerClass *klass; - klass = GSD_XRANDR_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_XRANDR_MANAGER)); + klass = MSD_XRANDR_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_XRANDR_MANAGER)); - xrandr_manager = GSD_XRANDR_MANAGER (G_OBJECT_CLASS (gsd_xrandr_manager_parent_class)->constructor (type, + xrandr_manager = MSD_XRANDR_MANAGER (G_OBJECT_CLASS (msd_xrandr_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -2480,29 +2480,29 @@ gsd_xrandr_manager_constructor (GType type, } static void -gsd_xrandr_manager_dispose (GObject *object) +msd_xrandr_manager_dispose (GObject *object) { - GsdXrandrManager *xrandr_manager; + MsdXrandrManager *xrandr_manager; - xrandr_manager = GSD_XRANDR_MANAGER (object); + xrandr_manager = MSD_XRANDR_MANAGER (object); - G_OBJECT_CLASS (gsd_xrandr_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_xrandr_manager_parent_class)->dispose (object); } static void -gsd_xrandr_manager_class_init (GsdXrandrManagerClass *klass) +msd_xrandr_manager_class_init (MsdXrandrManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_xrandr_manager_get_property; - object_class->set_property = gsd_xrandr_manager_set_property; - object_class->constructor = gsd_xrandr_manager_constructor; - object_class->dispose = gsd_xrandr_manager_dispose; - object_class->finalize = gsd_xrandr_manager_finalize; + object_class->get_property = msd_xrandr_manager_get_property; + object_class->set_property = msd_xrandr_manager_set_property; + object_class->constructor = msd_xrandr_manager_constructor; + object_class->dispose = msd_xrandr_manager_dispose; + object_class->finalize = msd_xrandr_manager_finalize; - dbus_g_object_type_install_info (GSD_TYPE_XRANDR_MANAGER, &dbus_glib_gsd_xrandr_manager_object_info); + dbus_g_object_type_install_info (MSD_TYPE_XRANDR_MANAGER, &dbus_glib_msd_xrandr_manager_object_info); - g_type_class_add_private (klass, sizeof (GsdXrandrManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdXrandrManagerPrivate)); } static guint @@ -2518,9 +2518,9 @@ get_keycode_for_keysym_name (const char *name) } static void -gsd_xrandr_manager_init (GsdXrandrManager *manager) +msd_xrandr_manager_init (MsdXrandrManager *manager) { - manager->priv = GSD_XRANDR_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_XRANDR_MANAGER_GET_PRIVATE (manager); manager->priv->switch_video_mode_keycode = get_keycode_for_keysym_name (VIDEO_KEYSYM); manager->priv->rotate_windows_keycode = get_keycode_for_keysym_name (ROTATE_KEYSYM); @@ -2530,22 +2530,22 @@ gsd_xrandr_manager_init (GsdXrandrManager *manager) } static void -gsd_xrandr_manager_finalize (GObject *object) +msd_xrandr_manager_finalize (GObject *object) { - GsdXrandrManager *xrandr_manager; + MsdXrandrManager *xrandr_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_XRANDR_MANAGER (object)); + g_return_if_fail (MSD_IS_XRANDR_MANAGER (object)); - xrandr_manager = GSD_XRANDR_MANAGER (object); + xrandr_manager = MSD_XRANDR_MANAGER (object); g_return_if_fail (xrandr_manager->priv != NULL); - G_OBJECT_CLASS (gsd_xrandr_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_xrandr_manager_parent_class)->finalize (object); } static gboolean -register_manager_dbus (GsdXrandrManager *manager) +register_manager_dbus (MsdXrandrManager *manager) { GError *error = NULL; @@ -2558,19 +2558,19 @@ register_manager_dbus (GsdXrandrManager *manager) return FALSE; } - /* Hmm, should we do this in gsd_xrandr_manager_start()? */ - dbus_g_connection_register_g_object (manager->priv->dbus_connection, GSD_XRANDR_DBUS_PATH, G_OBJECT (manager)); + /* Hmm, should we do this in msd_xrandr_manager_start()? */ + dbus_g_connection_register_g_object (manager->priv->dbus_connection, MSD_XRANDR_DBUS_PATH, G_OBJECT (manager)); return TRUE; } -GsdXrandrManager * -gsd_xrandr_manager_new (void) +MsdXrandrManager * +msd_xrandr_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_XRANDR_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_XRANDR_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); @@ -2580,5 +2580,5 @@ gsd_xrandr_manager_new (void) } } - return GSD_XRANDR_MANAGER (manager_object); + return MSD_XRANDR_MANAGER (manager_object); } diff --git a/plugins/xrandr/gsd-xrandr-manager.h b/plugins/xrandr/gsd-xrandr-manager.h index c404bfe..dbb5dff 100644 --- a/plugins/xrandr/gsd-xrandr-manager.h +++ b/plugins/xrandr/gsd-xrandr-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_XRANDR_MANAGER_H -#define __GSD_XRANDR_MANAGER_H +#ifndef __MSD_XRANDR_MANAGER_H +#define __MSD_XRANDR_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_XRANDR_MANAGER (gsd_xrandr_manager_get_type ()) -#define GSD_XRANDR_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_XRANDR_MANAGER, GsdXrandrManager)) -#define GSD_XRANDR_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_XRANDR_MANAGER, GsdXrandrManagerClass)) -#define GSD_IS_XRANDR_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_XRANDR_MANAGER)) -#define GSD_IS_XRANDR_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_XRANDR_MANAGER)) -#define GSD_XRANDR_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_XRANDR_MANAGER, GsdXrandrManagerClass)) +#define MSD_TYPE_XRANDR_MANAGER (msd_xrandr_manager_get_type ()) +#define MSD_XRANDR_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_XRANDR_MANAGER, MsdXrandrManager)) +#define MSD_XRANDR_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_XRANDR_MANAGER, MsdXrandrManagerClass)) +#define MSD_IS_XRANDR_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_XRANDR_MANAGER)) +#define MSD_IS_XRANDR_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_XRANDR_MANAGER)) +#define MSD_XRANDR_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_XRANDR_MANAGER, MsdXrandrManagerClass)) -typedef struct GsdXrandrManagerPrivate GsdXrandrManagerPrivate; +typedef struct MsdXrandrManagerPrivate MsdXrandrManagerPrivate; typedef struct { GObject parent; - GsdXrandrManagerPrivate *priv; -} GsdXrandrManager; + MsdXrandrManagerPrivate *priv; +} MsdXrandrManager; typedef struct { GObjectClass parent_class; -} GsdXrandrManagerClass; +} MsdXrandrManagerClass; -GType gsd_xrandr_manager_get_type (void); +GType msd_xrandr_manager_get_type (void); -GsdXrandrManager * gsd_xrandr_manager_new (void); -gboolean gsd_xrandr_manager_start (GsdXrandrManager *manager, +MsdXrandrManager * msd_xrandr_manager_new (void); +gboolean msd_xrandr_manager_start (MsdXrandrManager *manager, GError **error); -void gsd_xrandr_manager_stop (GsdXrandrManager *manager); +void msd_xrandr_manager_stop (MsdXrandrManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_XRANDR_MANAGER_H */ +#endif /* __MSD_XRANDR_MANAGER_H */ diff --git a/plugins/xrandr/gsd-xrandr-manager.xml b/plugins/xrandr/gsd-xrandr-manager.xml index e8dde7c..c82a594 100644 --- a/plugins/xrandr/gsd-xrandr-manager.xml +++ b/plugins/xrandr/gsd-xrandr-manager.xml @@ -1,7 +1,7 @@ <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> <interface name="org.mate.SettingsDaemon.XRANDR"> - <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="gsd_xrandr_manager"/> + <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="msd_xrandr_manager"/> <method name="ApplyConfiguration"> <!-- This method is implemented, but deprecated in favor of the same method in the XRANDR-2 interface defined below. --> @@ -9,7 +9,7 @@ </interface> <interface name="org.mate.SettingsDaemon.XRANDR_2"> - <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="gsd_xrandr_manager_2"/> + <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="msd_xrandr_manager_2"/> <method name="ApplyConfiguration"> <!-- transient-parent window for the confirmation dialog; use 0 for no parent --> diff --git a/plugins/xrandr/gsd-xrandr-plugin.c b/plugins/xrandr/gsd-xrandr-plugin.c index e765124..9e78124 100644 --- a/plugins/xrandr/gsd-xrandr-plugin.c +++ b/plugins/xrandr/gsd-xrandr-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-xrandr-plugin.h" -#include "gsd-xrandr-manager.h" +#include "msd-xrandr-plugin.h" +#include "msd-xrandr-manager.h" -struct GsdXrandrPluginPrivate { - GsdXrandrManager *manager; +struct MsdXrandrPluginPrivate { + MsdXrandrManager *manager; }; -#define GSD_XRANDR_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_XRANDR_PLUGIN, GsdXrandrPluginPrivate)) +#define MSD_XRANDR_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_XRANDR_PLUGIN, MsdXrandrPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdXrandrPlugin, gsd_xrandr_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdXrandrPlugin, msd_xrandr_plugin) static void -gsd_xrandr_plugin_init (GsdXrandrPlugin *plugin) +msd_xrandr_plugin_init (MsdXrandrPlugin *plugin) { - plugin->priv = GSD_XRANDR_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_XRANDR_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdXrandrPlugin initializing"); + g_debug ("MsdXrandrPlugin initializing"); - plugin->priv->manager = gsd_xrandr_manager_new (); + plugin->priv->manager = msd_xrandr_manager_new (); } static void -gsd_xrandr_plugin_finalize (GObject *object) +msd_xrandr_plugin_finalize (GObject *object) { - GsdXrandrPlugin *plugin; + MsdXrandrPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_XRANDR_PLUGIN (object)); + g_return_if_fail (MSD_IS_XRANDR_PLUGIN (object)); - g_debug ("GsdXrandrPlugin finalizing"); + g_debug ("MsdXrandrPlugin finalizing"); - plugin = GSD_XRANDR_PLUGIN (object); + plugin = MSD_XRANDR_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_xrandr_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_xrandr_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_xrandr_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating xrandr plugin"); error = NULL; - res = gsd_xrandr_manager_start (GSD_XRANDR_PLUGIN (plugin)->priv->manager, &error); + res = msd_xrandr_manager_start (MSD_XRANDR_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start xrandr manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating xrandr plugin"); - gsd_xrandr_manager_stop (GSD_XRANDR_PLUGIN (plugin)->priv->manager); + msd_xrandr_manager_stop (MSD_XRANDR_PLUGIN (plugin)->priv->manager); } static void -gsd_xrandr_plugin_class_init (GsdXrandrPluginClass *klass) +msd_xrandr_plugin_class_init (MsdXrandrPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_xrandr_plugin_finalize; + object_class->finalize = msd_xrandr_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdXrandrPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdXrandrPluginPrivate)); } diff --git a/plugins/xrandr/gsd-xrandr-plugin.h b/plugins/xrandr/gsd-xrandr-plugin.h index 18bb79a..62e742e 100644 --- a/plugins/xrandr/gsd-xrandr-plugin.h +++ b/plugins/xrandr/gsd-xrandr-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_XRANDR_PLUGIN_H__ -#define __GSD_XRANDR_PLUGIN_H__ +#ifndef __MSD_XRANDR_PLUGIN_H__ +#define __MSD_XRANDR_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_XRANDR_PLUGIN (gsd_xrandr_plugin_get_type ()) -#define GSD_XRANDR_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_XRANDR_PLUGIN, GsdXrandrPlugin)) -#define GSD_XRANDR_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_XRANDR_PLUGIN, GsdXrandrPluginClass)) -#define GSD_IS_XRANDR_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_XRANDR_PLUGIN)) -#define GSD_IS_XRANDR_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_XRANDR_PLUGIN)) -#define GSD_XRANDR_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_XRANDR_PLUGIN, GsdXrandrPluginClass)) +#define MSD_TYPE_XRANDR_PLUGIN (msd_xrandr_plugin_get_type ()) +#define MSD_XRANDR_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_XRANDR_PLUGIN, MsdXrandrPlugin)) +#define MSD_XRANDR_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_XRANDR_PLUGIN, MsdXrandrPluginClass)) +#define MSD_IS_XRANDR_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_XRANDR_PLUGIN)) +#define MSD_IS_XRANDR_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_XRANDR_PLUGIN)) +#define MSD_XRANDR_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_XRANDR_PLUGIN, MsdXrandrPluginClass)) -typedef struct GsdXrandrPluginPrivate GsdXrandrPluginPrivate; +typedef struct MsdXrandrPluginPrivate MsdXrandrPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdXrandrPluginPrivate *priv; -} GsdXrandrPlugin; + MsdXrandrPluginPrivate *priv; +} MsdXrandrPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdXrandrPluginClass; +} MsdXrandrPluginClass; -GType gsd_xrandr_plugin_get_type (void) G_GNUC_CONST; +GType msd_xrandr_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_XRANDR_PLUGIN_H__ */ +#endif /* __MSD_XRANDR_PLUGIN_H__ */ diff --git a/plugins/xrdb/Makefile.am b/plugins/xrdb/Makefile.am index 1b8e82b..04946c8 100644 --- a/plugins/xrdb/Makefile.am +++ b/plugins/xrdb/Makefile.am @@ -9,10 +9,10 @@ plugin_LTLIBRARIES = \ $(NULL) libxrdb_la_SOURCES = \ - gsd-xrdb-plugin.h \ - gsd-xrdb-plugin.c \ - gsd-xrdb-manager.h \ - gsd-xrdb-manager.c \ + msd-xrdb-plugin.h \ + msd-xrdb-plugin.c \ + msd-xrdb-manager.h \ + msd-xrdb-manager.c \ $(NULL) libxrdb_la_CPPFLAGS = \ @@ -26,7 +26,7 @@ libxrdb_la_CFLAGS = \ $(AM_CFLAGS) libxrdb_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libxrdb_la_LIBADD = \ @@ -51,4 +51,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/xrdb/gsd-xrdb-manager.c b/plugins/xrdb/gsd-xrdb-manager.c index 5a53842..776d1e7 100644 --- a/plugins/xrdb/gsd-xrdb-manager.c +++ b/plugins/xrdb/gsd-xrdb-manager.c @@ -38,9 +38,9 @@ #include <gtk/gtk.h> #include "mate-settings-profile.h" -#include "gsd-xrdb-manager.h" +#include "msd-xrdb-manager.h" -#define GSD_XRDB_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_XRDB_MANAGER, GsdXrdbManagerPrivate)) +#define MSD_XRDB_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_XRDB_MANAGER, MsdXrdbManagerPrivate)) #define SYSTEM_AD_DIR DATADIR "/xrdb" #define GENERAL_AD SYSTEM_AD_DIR "/General.ad" @@ -50,15 +50,15 @@ #define GTK_THEME_KEY "/desktop/mate/interface/gtk_theme" -struct GsdXrdbManagerPrivate { +struct MsdXrdbManagerPrivate { GtkWidget* widget; }; -static void gsd_xrdb_manager_class_init (GsdXrdbManagerClass *klass); -static void gsd_xrdb_manager_init (GsdXrdbManager *xrdb_manager); -static void gsd_xrdb_manager_finalize (GObject *object); +static void msd_xrdb_manager_class_init (MsdXrdbManagerClass *klass); +static void msd_xrdb_manager_init (MsdXrdbManager *xrdb_manager); +static void msd_xrdb_manager_finalize (GObject *object); -G_DEFINE_TYPE (GsdXrdbManager, gsd_xrdb_manager, G_TYPE_OBJECT) +G_DEFINE_TYPE (MsdXrdbManager, msd_xrdb_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; static void @@ -207,7 +207,7 @@ compare_basenames (gconstpointer a, * right order for processing. */ static GSList* -scan_for_files (GsdXrdbManager *manager, +scan_for_files (MsdXrdbManager *manager, GError **error) { const char *home_dir; @@ -420,7 +420,7 @@ spawn_with_input (const char *command, } static void -apply_settings (GsdXrdbManager *manager, +apply_settings (MsdXrdbManager *manager, GtkStyle *style) { const char *command; @@ -480,13 +480,13 @@ apply_settings (GsdXrdbManager *manager, static void theme_changed (GtkSettings *settings, GParamSpec *pspec, - GsdXrdbManager *manager) + MsdXrdbManager *manager) { apply_settings (manager, gtk_widget_get_style (manager->priv->widget)); } gboolean -gsd_xrdb_manager_start (GsdXrdbManager *manager, +msd_xrdb_manager_start (MsdXrdbManager *manager, GError **error) { mate_settings_profile_start (NULL); @@ -509,9 +509,9 @@ gsd_xrdb_manager_start (GsdXrdbManager *manager, } void -gsd_xrdb_manager_stop (GsdXrdbManager *manager) +msd_xrdb_manager_stop (MsdXrdbManager *manager) { - GsdXrdbManagerPrivate *p = manager->priv; + MsdXrdbManagerPrivate *p = manager->priv; g_debug ("Stopping xrdb manager"); @@ -526,14 +526,14 @@ gsd_xrdb_manager_stop (GsdXrdbManager *manager) } static void -gsd_xrdb_manager_set_property (GObject *object, +msd_xrdb_manager_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - GsdXrdbManager *self; + MsdXrdbManager *self; - self = GSD_XRDB_MANAGER (object); + self = MSD_XRDB_MANAGER (object); switch (prop_id) { default: @@ -543,14 +543,14 @@ gsd_xrdb_manager_set_property (GObject *object, } static void -gsd_xrdb_manager_get_property (GObject *object, +msd_xrdb_manager_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - GsdXrdbManager *self; + MsdXrdbManager *self; - self = GSD_XRDB_MANAGER (object); + self = MSD_XRDB_MANAGER (object); switch (prop_id) { default: @@ -560,16 +560,16 @@ gsd_xrdb_manager_get_property (GObject *object, } static GObject * -gsd_xrdb_manager_constructor (GType type, +msd_xrdb_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { - GsdXrdbManager *xrdb_manager; - GsdXrdbManagerClass *klass; + MsdXrdbManager *xrdb_manager; + MsdXrdbManagerClass *klass; - klass = GSD_XRDB_MANAGER_CLASS (g_type_class_peek (GSD_TYPE_XRDB_MANAGER)); + klass = MSD_XRDB_MANAGER_CLASS (g_type_class_peek (MSD_TYPE_XRDB_MANAGER)); - xrdb_manager = GSD_XRDB_MANAGER (G_OBJECT_CLASS (gsd_xrdb_manager_parent_class)->constructor (type, + xrdb_manager = MSD_XRDB_MANAGER (G_OBJECT_CLASS (msd_xrdb_manager_parent_class)->constructor (type, n_construct_properties, construct_properties)); @@ -577,61 +577,61 @@ gsd_xrdb_manager_constructor (GType type, } static void -gsd_xrdb_manager_dispose (GObject *object) +msd_xrdb_manager_dispose (GObject *object) { - GsdXrdbManager *xrdb_manager; + MsdXrdbManager *xrdb_manager; - xrdb_manager = GSD_XRDB_MANAGER (object); + xrdb_manager = MSD_XRDB_MANAGER (object); - G_OBJECT_CLASS (gsd_xrdb_manager_parent_class)->dispose (object); + G_OBJECT_CLASS (msd_xrdb_manager_parent_class)->dispose (object); } static void -gsd_xrdb_manager_class_init (GsdXrdbManagerClass *klass) +msd_xrdb_manager_class_init (MsdXrdbManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->get_property = gsd_xrdb_manager_get_property; - object_class->set_property = gsd_xrdb_manager_set_property; - object_class->constructor = gsd_xrdb_manager_constructor; - object_class->dispose = gsd_xrdb_manager_dispose; - object_class->finalize = gsd_xrdb_manager_finalize; + object_class->get_property = msd_xrdb_manager_get_property; + object_class->set_property = msd_xrdb_manager_set_property; + object_class->constructor = msd_xrdb_manager_constructor; + object_class->dispose = msd_xrdb_manager_dispose; + object_class->finalize = msd_xrdb_manager_finalize; - g_type_class_add_private (klass, sizeof (GsdXrdbManagerPrivate)); + g_type_class_add_private (klass, sizeof (MsdXrdbManagerPrivate)); } static void -gsd_xrdb_manager_init (GsdXrdbManager *manager) +msd_xrdb_manager_init (MsdXrdbManager *manager) { - manager->priv = GSD_XRDB_MANAGER_GET_PRIVATE (manager); + manager->priv = MSD_XRDB_MANAGER_GET_PRIVATE (manager); } static void -gsd_xrdb_manager_finalize (GObject *object) +msd_xrdb_manager_finalize (GObject *object) { - GsdXrdbManager *xrdb_manager; + MsdXrdbManager *xrdb_manager; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_XRDB_MANAGER (object)); + g_return_if_fail (MSD_IS_XRDB_MANAGER (object)); - xrdb_manager = GSD_XRDB_MANAGER (object); + xrdb_manager = MSD_XRDB_MANAGER (object); g_return_if_fail (xrdb_manager->priv != NULL); - G_OBJECT_CLASS (gsd_xrdb_manager_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_xrdb_manager_parent_class)->finalize (object); } -GsdXrdbManager * -gsd_xrdb_manager_new (void) +MsdXrdbManager * +msd_xrdb_manager_new (void) { if (manager_object != NULL) { g_object_ref (manager_object); } else { - manager_object = g_object_new (GSD_TYPE_XRDB_MANAGER, NULL); + manager_object = g_object_new (MSD_TYPE_XRDB_MANAGER, NULL); g_object_add_weak_pointer (manager_object, (gpointer *) &manager_object); } - return GSD_XRDB_MANAGER (manager_object); + return MSD_XRDB_MANAGER (manager_object); } diff --git a/plugins/xrdb/gsd-xrdb-manager.h b/plugins/xrdb/gsd-xrdb-manager.h index 4588e69..cb83d24 100644 --- a/plugins/xrdb/gsd-xrdb-manager.h +++ b/plugins/xrdb/gsd-xrdb-manager.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_XRDB_MANAGER_H -#define __GSD_XRDB_MANAGER_H +#ifndef __MSD_XRDB_MANAGER_H +#define __MSD_XRDB_MANAGER_H #include <glib-object.h> @@ -27,35 +27,35 @@ extern "C" { #endif -#define GSD_TYPE_XRDB_MANAGER (gsd_xrdb_manager_get_type ()) -#define GSD_XRDB_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_XRDB_MANAGER, GsdXrdbManager)) -#define GSD_XRDB_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_XRDB_MANAGER, GsdXrdbManagerClass)) -#define GSD_IS_XRDB_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_XRDB_MANAGER)) -#define GSD_IS_XRDB_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_XRDB_MANAGER)) -#define GSD_XRDB_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_XRDB_MANAGER, GsdXrdbManagerClass)) +#define MSD_TYPE_XRDB_MANAGER (msd_xrdb_manager_get_type ()) +#define MSD_XRDB_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_XRDB_MANAGER, MsdXrdbManager)) +#define MSD_XRDB_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_XRDB_MANAGER, MsdXrdbManagerClass)) +#define MSD_IS_XRDB_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_XRDB_MANAGER)) +#define MSD_IS_XRDB_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_XRDB_MANAGER)) +#define MSD_XRDB_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_XRDB_MANAGER, MsdXrdbManagerClass)) -typedef struct GsdXrdbManagerPrivate GsdXrdbManagerPrivate; +typedef struct MsdXrdbManagerPrivate MsdXrdbManagerPrivate; typedef struct { GObject parent; - GsdXrdbManagerPrivate *priv; -} GsdXrdbManager; + MsdXrdbManagerPrivate *priv; +} MsdXrdbManager; typedef struct { GObjectClass parent_class; -} GsdXrdbManagerClass; +} MsdXrdbManagerClass; -GType gsd_xrdb_manager_get_type (void); +GType msd_xrdb_manager_get_type (void); -GsdXrdbManager * gsd_xrdb_manager_new (void); -gboolean gsd_xrdb_manager_start (GsdXrdbManager *manager, +MsdXrdbManager * msd_xrdb_manager_new (void); +gboolean msd_xrdb_manager_start (MsdXrdbManager *manager, GError **error); -void gsd_xrdb_manager_stop (GsdXrdbManager *manager); +void msd_xrdb_manager_stop (MsdXrdbManager *manager); #ifdef __cplusplus } #endif -#endif /* __GSD_XRDB_MANAGER_H */ +#endif /* __MSD_XRDB_MANAGER_H */ diff --git a/plugins/xrdb/gsd-xrdb-plugin.c b/plugins/xrdb/gsd-xrdb-plugin.c index 870eb56..1efe570 100644 --- a/plugins/xrdb/gsd-xrdb-plugin.c +++ b/plugins/xrdb/gsd-xrdb-plugin.c @@ -24,38 +24,38 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-xrdb-plugin.h" -#include "gsd-xrdb-manager.h" +#include "msd-xrdb-plugin.h" +#include "msd-xrdb-manager.h" -struct GsdXrdbPluginPrivate { - GsdXrdbManager *manager; +struct MsdXrdbPluginPrivate { + MsdXrdbManager *manager; }; -#define GSD_XRDB_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), GSD_TYPE_XRDB_PLUGIN, GsdXrdbPluginPrivate)) +#define MSD_XRDB_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), MSD_TYPE_XRDB_PLUGIN, MsdXrdbPluginPrivate)) -MATE_SETTINGS_PLUGIN_REGISTER (GsdXrdbPlugin, gsd_xrdb_plugin) +MATE_SETTINGS_PLUGIN_REGISTER (MsdXrdbPlugin, msd_xrdb_plugin) static void -gsd_xrdb_plugin_init (GsdXrdbPlugin *plugin) +msd_xrdb_plugin_init (MsdXrdbPlugin *plugin) { - plugin->priv = GSD_XRDB_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = MSD_XRDB_PLUGIN_GET_PRIVATE (plugin); - g_debug ("GsdXrdbPlugin initializing"); + g_debug ("MsdXrdbPlugin initializing"); - plugin->priv->manager = gsd_xrdb_manager_new (); + plugin->priv->manager = msd_xrdb_manager_new (); } static void -gsd_xrdb_plugin_finalize (GObject *object) +msd_xrdb_plugin_finalize (GObject *object) { - GsdXrdbPlugin *plugin; + MsdXrdbPlugin *plugin; g_return_if_fail (object != NULL); - g_return_if_fail (GSD_IS_XRDB_PLUGIN (object)); + g_return_if_fail (MSD_IS_XRDB_PLUGIN (object)); - g_debug ("GsdXrdbPlugin finalizing"); + g_debug ("MsdXrdbPlugin finalizing"); - plugin = GSD_XRDB_PLUGIN (object); + plugin = MSD_XRDB_PLUGIN (object); g_return_if_fail (plugin->priv != NULL); @@ -63,7 +63,7 @@ gsd_xrdb_plugin_finalize (GObject *object) g_object_unref (plugin->priv->manager); } - G_OBJECT_CLASS (gsd_xrdb_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_xrdb_plugin_parent_class)->finalize (object); } static void @@ -75,7 +75,7 @@ impl_activate (MateSettingsPlugin *plugin) g_debug ("Activating xrdb plugin"); error = NULL; - res = gsd_xrdb_manager_start (GSD_XRDB_PLUGIN (plugin)->priv->manager, &error); + res = msd_xrdb_manager_start (MSD_XRDB_PLUGIN (plugin)->priv->manager, &error); if (! res) { g_warning ("Unable to start xrdb manager: %s", error->message); g_error_free (error); @@ -86,19 +86,19 @@ static void impl_deactivate (MateSettingsPlugin *plugin) { g_debug ("Deactivating xrdb plugin"); - gsd_xrdb_manager_stop (GSD_XRDB_PLUGIN (plugin)->priv->manager); + msd_xrdb_manager_stop (MSD_XRDB_PLUGIN (plugin)->priv->manager); } static void -gsd_xrdb_plugin_class_init (GsdXrdbPluginClass *klass) +msd_xrdb_plugin_class_init (MsdXrdbPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); MateSettingsPluginClass *plugin_class = MATE_SETTINGS_PLUGIN_CLASS (klass); - object_class->finalize = gsd_xrdb_plugin_finalize; + object_class->finalize = msd_xrdb_plugin_finalize; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; - g_type_class_add_private (klass, sizeof (GsdXrdbPluginPrivate)); + g_type_class_add_private (klass, sizeof (MsdXrdbPluginPrivate)); } diff --git a/plugins/xrdb/gsd-xrdb-plugin.h b/plugins/xrdb/gsd-xrdb-plugin.h index 9baa26a..893835b 100644 --- a/plugins/xrdb/gsd-xrdb-plugin.h +++ b/plugins/xrdb/gsd-xrdb-plugin.h @@ -18,8 +18,8 @@ * */ -#ifndef __GSD_XRDB_PLUGIN_H__ -#define __GSD_XRDB_PLUGIN_H__ +#ifndef __MSD_XRDB_PLUGIN_H__ +#define __MSD_XRDB_PLUGIN_H__ #include <glib.h> #include <glib-object.h> @@ -31,27 +31,27 @@ extern "C" { #endif -#define GSD_TYPE_XRDB_PLUGIN (gsd_xrdb_plugin_get_type ()) -#define GSD_XRDB_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_XRDB_PLUGIN, GsdXrdbPlugin)) -#define GSD_XRDB_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_XRDB_PLUGIN, GsdXrdbPluginClass)) -#define GSD_IS_XRDB_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_XRDB_PLUGIN)) -#define GSD_IS_XRDB_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_XRDB_PLUGIN)) -#define GSD_XRDB_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_XRDB_PLUGIN, GsdXrdbPluginClass)) +#define MSD_TYPE_XRDB_PLUGIN (msd_xrdb_plugin_get_type ()) +#define MSD_XRDB_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MSD_TYPE_XRDB_PLUGIN, MsdXrdbPlugin)) +#define MSD_XRDB_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MSD_TYPE_XRDB_PLUGIN, MsdXrdbPluginClass)) +#define MSD_IS_XRDB_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MSD_TYPE_XRDB_PLUGIN)) +#define MSD_IS_XRDB_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MSD_TYPE_XRDB_PLUGIN)) +#define MSD_XRDB_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MSD_TYPE_XRDB_PLUGIN, MsdXrdbPluginClass)) -typedef struct GsdXrdbPluginPrivate GsdXrdbPluginPrivate; +typedef struct MsdXrdbPluginPrivate MsdXrdbPluginPrivate; typedef struct { MateSettingsPlugin parent; - GsdXrdbPluginPrivate *priv; -} GsdXrdbPlugin; + MsdXrdbPluginPrivate *priv; +} MsdXrdbPlugin; typedef struct { MateSettingsPluginClass parent_class; -} GsdXrdbPluginClass; +} MsdXrdbPluginClass; -GType gsd_xrdb_plugin_get_type (void) G_GNUC_CONST; +GType msd_xrdb_plugin_get_type (void) G_GNUC_CONST; /* All the plugins must implement this function */ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); @@ -60,4 +60,4 @@ G_MODULE_EXPORT GType register_mate_settings_plugin (GTypeModule *module); } #endif -#endif /* __GSD_XRDB_PLUGIN_H__ */ +#endif /* __MSD_XRDB_PLUGIN_H__ */ diff --git a/plugins/xsettings/Makefile.am b/plugins/xsettings/Makefile.am index 8b861b9..87f0eab 100644 --- a/plugins/xsettings/Makefile.am +++ b/plugins/xsettings/Makefile.am @@ -5,10 +5,10 @@ plugin_LTLIBRARIES = \ $(NULL) libxsettings_la_SOURCES = \ - gsd-xsettings-plugin.h \ - gsd-xsettings-plugin.c \ - gsd-xsettings-manager.h \ - gsd-xsettings-manager.c \ + msd-xsettings-plugin.h \ + msd-xsettings-plugin.c \ + msd-xsettings-manager.h \ + msd-xsettings-manager.c \ xsettings-common.h \ xsettings-common.c \ xsettings-manager.h \ @@ -25,7 +25,7 @@ libxsettings_la_CFLAGS = \ $(AM_CFLAGS) libxsettings_la_LDFLAGS = \ - $(GSD_PLUGIN_LDFLAGS) \ + $(MSD_PLUGIN_LDFLAGS) \ $(NULL) libxsettings_la_LIBADD = \ @@ -62,4 +62,4 @@ DISTCLEANFILES = \ $(plugin_DATA) \ $(NULL) -@GSD_INTLTOOL_PLUGIN_RULE@ +@MSD_INTLTOOL_PLUGIN_RULE@ diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c index e7b4f9a..9df8f61 100644 --- a/plugins/xsettings/gsd-xsettings-manager.c +++ b/plugins/xsettings/gsd-xsettings-manager.c @@ -41,7 +41,7 @@ #include <mateconf/mateconf-client.h> #include "mate-settings-profile.h" -#include "gsd-xsettings-manager.h" +#include "msd-xsettings-manager.h" #include "xsettings-manager.h" #ifdef HAVE_FONTCONFIG #include "fontconfig-monitor.h" @@ -100,10 +100,10 @@ struct MateXSettingsManagerPrivate #endif /* HAVE_FONTCONFIG */ }; -#define GSD_XSETTINGS_ERROR gsd_xsettings_error_quark () +#define MSD_XSETTINGS_ERROR msd_xsettings_error_quark () enum { - GSD_XSETTINGS_ERROR_INIT + MSD_XSETTINGS_ERROR_INIT }; static void mate_xsettings_manager_class_init (MateXSettingsManagerClass *klass); @@ -115,9 +115,9 @@ G_DEFINE_TYPE (MateXSettingsManager, mate_xsettings_manager, G_TYPE_OBJECT) static gpointer manager_object = NULL; static GQuark -gsd_xsettings_error_quark (void) +msd_xsettings_error_quark (void) { - return g_quark_from_static_string ("gsd-xsettings-error-quark"); + return g_quark_from_static_string ("msd-xsettings-error-quark"); } static void @@ -802,8 +802,8 @@ mate_xsettings_manager_start (MateXSettingsManager *manager, mate_settings_profile_start (NULL); if (!setup_xsettings_managers (manager)) { - g_set_error (error, GSD_XSETTINGS_ERROR, - GSD_XSETTINGS_ERROR_INIT, + g_set_error (error, MSD_XSETTINGS_ERROR, + MSD_XSETTINGS_ERROR_INIT, "Could not initialize xsettings manager."); return FALSE; } diff --git a/plugins/xsettings/gsd-xsettings-plugin.c b/plugins/xsettings/gsd-xsettings-plugin.c index 2280589..50af53a 100644 --- a/plugins/xsettings/gsd-xsettings-plugin.c +++ b/plugins/xsettings/gsd-xsettings-plugin.c @@ -24,8 +24,8 @@ #include <gmodule.h> #include "mate-settings-plugin.h" -#include "gsd-xsettings-plugin.h" -#include "gsd-xsettings-manager.h" +#include "msd-xsettings-plugin.h" +#include "msd-xsettings-manager.h" struct MateXSettingsPluginPrivate { MateXSettingsManager *manager; |