diff options
author | Jasmine Hassan <[email protected]> | 2012-12-05 02:55:27 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-12-06 18:48:25 +0200 |
commit | 6e182dc5cdb3451a4ec4bd443b1159df318541c8 (patch) | |
tree | 049d7a8d3c8e466ce9824c34faf4a7d33c5824ed /plugins | |
parent | 4006c217f458e936d77683b5974600070a253bac (diff) | |
download | mate-settings-daemon-6e182dc5cdb3451a4ec4bd443b1159df318541c8.tar.bz2 mate-settings-daemon-6e182dc5cdb3451a4ec4bd443b1159df318541c8.tar.xz |
[plugins] cleanup macro magic in plugin.h
And instead, use glib macros (since 2.14)
http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=0dda56c4462e070dabdab68092b6574b5e894181
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c | 5 | ||||
-rw-r--r-- | plugins/background/msd-background-plugin.c | 121 | ||||
-rw-r--r-- | plugins/clipboard/msd-clipboard-plugin.c | 6 | ||||
-rw-r--r-- | plugins/dummy/msd-dummy-plugin.c | 5 | ||||
-rw-r--r-- | plugins/font/msd-font-plugin.c | 5 | ||||
-rw-r--r-- | plugins/housekeeping/msd-housekeeping-plugin.c | 6 | ||||
-rw-r--r-- | plugins/keyboard/msd-keyboard-plugin.c | 6 | ||||
-rw-r--r-- | plugins/media-keys/msd-media-keys-plugin.c | 6 | ||||
-rw-r--r-- | plugins/mouse/msd-mouse-plugin.c | 6 | ||||
-rw-r--r-- | plugins/smartcard/msd-smartcard-plugin.c | 6 | ||||
-rw-r--r-- | plugins/sound/msd-sound-plugin.c | 6 | ||||
-rw-r--r-- | plugins/typing-break/msd-typing-break-plugin.c | 5 | ||||
-rw-r--r-- | plugins/xrandr/msd-xrandr-plugin.c | 6 | ||||
-rw-r--r-- | plugins/xrdb/msd-xrdb-plugin.c | 6 | ||||
-rw-r--r-- | plugins/xsettings/msd-xsettings-plugin.c | 5 |
15 files changed, 141 insertions, 59 deletions
diff --git a/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c b/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c index d905336..57ac653 100644 --- a/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c +++ b/plugins/a11y-keyboard/msd-a11y-keyboard-plugin.c @@ -102,3 +102,8 @@ msd_a11y_keyboard_plugin_class_init (MsdA11yKeyboardPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdA11yKeyboardPluginPrivate)); } + +static void +msd_a11y_keyboard_plugin_class_finalize (MsdA11yKeyboardPluginClass *klass) +{ +} diff --git a/plugins/background/msd-background-plugin.c b/plugins/background/msd-background-plugin.c index f5cb0d1..ee6b49c 100644 --- a/plugins/background/msd-background-plugin.c +++ b/plugins/background/msd-background-plugin.c @@ -27,85 +27,88 @@ #include "msd-background-plugin.h" #include "msd-background-manager.h" -//class MsdBackgroundPlugin -//{ - struct MsdBackgroundPluginPrivate { - MsdBackgroundManager* manager; - }; +struct MsdBackgroundPluginPrivate { + MsdBackgroundManager* manager; +}; - #define MSD_BACKGROUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE((object), MSD_TYPE_BACKGROUND_PLUGIN, MsdBackgroundPluginPrivate)) +#define MSD_BACKGROUND_PLUGIN_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE((object), MSD_TYPE_BACKGROUND_PLUGIN, MsdBackgroundPluginPrivate)) - MATE_SETTINGS_PLUGIN_REGISTER(MsdBackgroundPlugin, msd_background_plugin) +MATE_SETTINGS_PLUGIN_REGISTER(MsdBackgroundPlugin, msd_background_plugin) - static void - msd_background_plugin_init (MsdBackgroundPlugin* plugin) - { - plugin->priv = MSD_BACKGROUND_PLUGIN_GET_PRIVATE(plugin); - - g_debug("MsdBackgroundPlugin initializing"); +static void +msd_background_plugin_init (MsdBackgroundPlugin* plugin) +{ + plugin->priv = MSD_BACKGROUND_PLUGIN_GET_PRIVATE(plugin); - plugin->priv->manager = msd_background_manager_new(); - } + g_debug("MsdBackgroundPlugin initializing"); - static void - msd_background_plugin_finalize (GObject* object) - { - MsdBackgroundPlugin* plugin; + plugin->priv->manager = msd_background_manager_new(); +} - g_return_if_fail(object != NULL); - g_return_if_fail(MSD_IS_BACKGROUND_PLUGIN(object)); +static void +msd_background_plugin_finalize (GObject* object) +{ + MsdBackgroundPlugin* plugin; - g_debug("MsdBackgroundPlugin finalizing"); + g_return_if_fail(object != NULL); + g_return_if_fail(MSD_IS_BACKGROUND_PLUGIN(object)); - plugin = MSD_BACKGROUND_PLUGIN(object); + g_debug("MsdBackgroundPlugin finalizing"); - g_return_if_fail(plugin->priv != NULL); + plugin = MSD_BACKGROUND_PLUGIN(object); - if (plugin->priv->manager != NULL) - { - g_object_unref (plugin->priv->manager); - } + g_return_if_fail(plugin->priv != NULL); - G_OBJECT_CLASS(msd_background_plugin_parent_class)->finalize(object); + if (plugin->priv->manager != NULL) + { + g_object_unref (plugin->priv->manager); } - static void - impl_activate (MateSettingsPlugin* plugin) - { - gboolean res; - GError* error; + G_OBJECT_CLASS(msd_background_plugin_parent_class)->finalize(object); +} - g_debug("Activating background plugin"); +static void +impl_activate (MateSettingsPlugin* plugin) +{ + gboolean res; + GError* error; - error = NULL; - res = msd_background_manager_start(MSD_BACKGROUND_PLUGIN(plugin)->priv->manager, &error); + g_debug("Activating background plugin"); - if (!res) - { - g_warning("Unable to start background manager: %s", error->message); - g_error_free(error); - } - } + error = NULL; + res = msd_background_manager_start(MSD_BACKGROUND_PLUGIN(plugin)->priv->manager, &error); - static void - impl_deactivate (MateSettingsPlugin* plugin) + if (!res) { - g_debug("Deactivating background plugin"); - - msd_background_manager_stop(MSD_BACKGROUND_PLUGIN(plugin)->priv->manager); + g_warning("Unable to start background manager: %s", error->message); + g_error_free(error); } +} - static void - msd_background_plugin_class_init (MsdBackgroundPluginClass* klass) - { - GObjectClass* object_class = G_OBJECT_CLASS(klass); - MateSettingsPluginClass* plugin_class = MATE_SETTINGS_PLUGIN_CLASS(klass); +static void +impl_deactivate (MateSettingsPlugin* plugin) +{ + g_debug("Deactivating background plugin"); - object_class->finalize = msd_background_plugin_finalize; + msd_background_manager_stop(MSD_BACKGROUND_PLUGIN(plugin)->priv->manager); +} - plugin_class->activate = impl_activate; - plugin_class->deactivate = impl_deactivate; +static void +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 = msd_background_plugin_finalize; + + plugin_class->activate = impl_activate; + plugin_class->deactivate = impl_deactivate; + + g_type_class_add_private(klass, sizeof(MsdBackgroundPluginPrivate)); +} + +static void +msd_background_plugin_class_finalize (MsdBackgroundPluginClass *klass) +{ +} - g_type_class_add_private(klass, sizeof(MsdBackgroundPluginPrivate)); - } -//}
\ No newline at end of file diff --git a/plugins/clipboard/msd-clipboard-plugin.c b/plugins/clipboard/msd-clipboard-plugin.c index a7e4d86..da00eda 100644 --- a/plugins/clipboard/msd-clipboard-plugin.c +++ b/plugins/clipboard/msd-clipboard-plugin.c @@ -102,3 +102,9 @@ msd_clipboard_plugin_class_init (MsdClipboardPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdClipboardPluginPrivate)); } + +static void +msd_clipboard_plugin_class_finalize (MsdClipboardPluginClass *klass) +{ +} + diff --git a/plugins/dummy/msd-dummy-plugin.c b/plugins/dummy/msd-dummy-plugin.c index 5fbbc0b..ff4046d 100644 --- a/plugins/dummy/msd-dummy-plugin.c +++ b/plugins/dummy/msd-dummy-plugin.c @@ -102,3 +102,8 @@ msd_dummy_plugin_class_init (MsdDummyPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdDummyPluginPrivate)); } + +static void +msd_dummy_plugin_class_finalize (MsdDummyPluginClass *klass) +{ +} diff --git a/plugins/font/msd-font-plugin.c b/plugins/font/msd-font-plugin.c index b6a4452..d76aabb 100644 --- a/plugins/font/msd-font-plugin.c +++ b/plugins/font/msd-font-plugin.c @@ -102,3 +102,8 @@ msd_font_plugin_class_init (MsdFontPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdFontPluginPrivate)); } + +static void +msd_font_plugin_class_finalize (MsdFontPluginClass *klass) +{ +} diff --git a/plugins/housekeeping/msd-housekeeping-plugin.c b/plugins/housekeeping/msd-housekeeping-plugin.c index 9d5c407..40cd547 100644 --- a/plugins/housekeeping/msd-housekeeping-plugin.c +++ b/plugins/housekeeping/msd-housekeeping-plugin.c @@ -102,3 +102,9 @@ msd_housekeeping_plugin_class_init (MsdHousekeepingPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdHousekeepingPluginPrivate)); } + +static void +msd_housekeeping_plugin_class_finalize (MsdHousekeepingPluginClass *klass) +{ +} + diff --git a/plugins/keyboard/msd-keyboard-plugin.c b/plugins/keyboard/msd-keyboard-plugin.c index 310c74c..97ad9ef 100644 --- a/plugins/keyboard/msd-keyboard-plugin.c +++ b/plugins/keyboard/msd-keyboard-plugin.c @@ -102,3 +102,9 @@ msd_keyboard_plugin_class_init (MsdKeyboardPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdKeyboardPluginPrivate)); } + +static void +msd_keyboard_plugin_class_finalize (MsdKeyboardPluginClass *klass) +{ +} + diff --git a/plugins/media-keys/msd-media-keys-plugin.c b/plugins/media-keys/msd-media-keys-plugin.c index 4d297bb..93a805f 100644 --- a/plugins/media-keys/msd-media-keys-plugin.c +++ b/plugins/media-keys/msd-media-keys-plugin.c @@ -102,3 +102,9 @@ msd_media_keys_plugin_class_init (MsdMediaKeysPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdMediaKeysPluginPrivate)); } + +static void +msd_media_keys_plugin_class_finalize (MsdMediaKeysPluginClass *klass) +{ +} + diff --git a/plugins/mouse/msd-mouse-plugin.c b/plugins/mouse/msd-mouse-plugin.c index 9bd3d1b..19b96d7 100644 --- a/plugins/mouse/msd-mouse-plugin.c +++ b/plugins/mouse/msd-mouse-plugin.c @@ -102,3 +102,9 @@ msd_mouse_plugin_class_init (MsdMousePluginClass *klass) g_type_class_add_private (klass, sizeof (MsdMousePluginPrivate)); } + +static void +msd_mouse_plugin_class_finalize (MsdMousePluginClass *klass) +{ +} + diff --git a/plugins/smartcard/msd-smartcard-plugin.c b/plugins/smartcard/msd-smartcard-plugin.c index 08f6e6c..ae1b264 100644 --- a/plugins/smartcard/msd-smartcard-plugin.c +++ b/plugins/smartcard/msd-smartcard-plugin.c @@ -338,3 +338,9 @@ msd_smartcard_plugin_class_init (MsdSmartcardPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdSmartcardPluginPrivate)); } + +static void +msd_smartcard_plugin_class_finalize (MsdSmartcardPluginClass *klass) +{ +} + diff --git a/plugins/sound/msd-sound-plugin.c b/plugins/sound/msd-sound-plugin.c index ac31450..f0e0a1e 100644 --- a/plugins/sound/msd-sound-plugin.c +++ b/plugins/sound/msd-sound-plugin.c @@ -98,3 +98,9 @@ msd_sound_plugin_class_init (MsdSoundPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdSoundPluginPrivate)); } + +static void +msd_sound_plugin_class_finalize (MsdSoundPluginClass *klass) +{ +} + diff --git a/plugins/typing-break/msd-typing-break-plugin.c b/plugins/typing-break/msd-typing-break-plugin.c index f0d3580..3b5770b 100644 --- a/plugins/typing-break/msd-typing-break-plugin.c +++ b/plugins/typing-break/msd-typing-break-plugin.c @@ -102,3 +102,8 @@ msd_typing_break_plugin_class_init (MsdTypingBreakPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdTypingBreakPluginPrivate)); } + +static void +msd_typing_break_plugin_class_finalize (MsdTypingBreakPluginClass *klass) +{ +} diff --git a/plugins/xrandr/msd-xrandr-plugin.c b/plugins/xrandr/msd-xrandr-plugin.c index e87baea..7680a0a 100644 --- a/plugins/xrandr/msd-xrandr-plugin.c +++ b/plugins/xrandr/msd-xrandr-plugin.c @@ -102,3 +102,9 @@ msd_xrandr_plugin_class_init (MsdXrandrPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdXrandrPluginPrivate)); } + +static void +msd_xrandr_plugin_class_finalize (MsdXrandrPluginClass *klass) +{ +} + diff --git a/plugins/xrdb/msd-xrdb-plugin.c b/plugins/xrdb/msd-xrdb-plugin.c index 1506523..6c79c57 100644 --- a/plugins/xrdb/msd-xrdb-plugin.c +++ b/plugins/xrdb/msd-xrdb-plugin.c @@ -102,3 +102,9 @@ msd_xrdb_plugin_class_init (MsdXrdbPluginClass *klass) g_type_class_add_private (klass, sizeof (MsdXrdbPluginPrivate)); } + +static void +msd_xrdb_plugin_class_finalize (MsdXrdbPluginClass *klass) +{ +} + diff --git a/plugins/xsettings/msd-xsettings-plugin.c b/plugins/xsettings/msd-xsettings-plugin.c index 6449264..faa7068 100644 --- a/plugins/xsettings/msd-xsettings-plugin.c +++ b/plugins/xsettings/msd-xsettings-plugin.c @@ -102,3 +102,8 @@ mate_xsettings_plugin_class_init (MateXSettingsPluginClass *klass) g_type_class_add_private (klass, sizeof (MateXSettingsPluginPrivate)); } + +static void +mate_xsettings_plugin_class_finalize (MateXSettingsPluginClass *klass) +{ +} |