[gnome-settings-daemon] plugins: add class_finalize to REGISTER macro



commit 84f19818060f25a47aa52fa156d38677183bf8d8
Author: Ray Strode <rstrode redhat com>
Date:   Tue Aug 21 14:09:06 2012 -0400

    plugins: add class_finalize to REGISTER macro
    
    We already have a convenience macro for plugins to use to
    define their types.
    
    This commit augments and leverages that macro to remove
    class_finalize function definition boilerplate.

 gnome-settings-daemon/gnome-settings-plugin.h      |    7 ++++++-
 plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c   |    5 -----
 plugins/a11y-settings/gsd-a11y-settings-plugin.c   |    6 ------
 plugins/background/gsd-background-plugin.c         |    6 ------
 plugins/clipboard/gsd-clipboard-plugin.c           |    6 ------
 plugins/color/gsd-color-plugin.c                   |    6 ------
 plugins/cursor/gsd-cursor-plugin.c                 |    6 ------
 plugins/dummy/gsd-dummy-plugin.c                   |    6 ------
 plugins/housekeeping/gsd-housekeeping-plugin.c     |    6 ------
 plugins/keyboard/gsd-keyboard-plugin.c             |    6 ------
 plugins/media-keys/gsd-media-keys-plugin.c         |    6 ------
 plugins/mouse/gsd-mouse-plugin.c                   |    6 ------
 plugins/orientation/gsd-orientation-plugin.c       |    6 ------
 plugins/power/gsd-power-plugin.c                   |    6 ------
 .../gsd-print-notifications-plugin.c               |    6 ------
 plugins/smartcard/gsd-smartcard-plugin.c           |    6 ------
 plugins/sound/gsd-sound-plugin.c                   |    6 ------
 plugins/updates/gsd-updates-plugin.c               |    6 ------
 plugins/wacom/gsd-wacom-plugin.c                   |    6 ------
 plugins/xrandr/gsd-xrandr-plugin.c                 |    6 ------
 plugins/xsettings/gsd-xsettings-plugin.c           |    6 ------
 21 files changed, 6 insertions(+), 120 deletions(-)
---
diff --git a/gnome-settings-daemon/gnome-settings-plugin.h b/gnome-settings-daemon/gnome-settings-plugin.h
index 9186a1f..03a272a 100644
--- a/gnome-settings-daemon/gnome-settings-plugin.h
+++ b/gnome-settings-daemon/gnome-settings-plugin.h
@@ -68,7 +68,12 @@ register_gnome_settings_plugin (GTypeModule *type_module)                      \
         plugin_name##_register_type (type_module);                             \
                                                                                \
         return plugin_name##_get_type();                                       \
-}
+}                                                                              \
+                                                                               \
+static void                                                                    \
+plugin_name##_class_finalize (PluginName##Class *plugin_name##_class)          \
+{                                                                              \
+}                                                                              \
 
 G_END_DECLS
 
diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c
index d6e22bc..bb2f80b 100644
--- a/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c
+++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c
@@ -103,8 +103,3 @@ gsd_a11y_keyboard_plugin_class_init (GsdA11yKeyboardPluginClass *klass)
         g_type_class_add_private (klass, sizeof (GsdA11yKeyboardPluginPrivate));
 }
 
-static void
-gsd_a11y_keyboard_plugin_class_finalize (GsdA11yKeyboardPluginClass *klass)
-{
-}
-
diff --git a/plugins/a11y-settings/gsd-a11y-settings-plugin.c b/plugins/a11y-settings/gsd-a11y-settings-plugin.c
index 18370ae..cb1391d 100644
--- a/plugins/a11y-settings/gsd-a11y-settings-plugin.c
+++ b/plugins/a11y-settings/gsd-a11y-settings-plugin.c
@@ -102,9 +102,3 @@ gsd_a11y_settings_plugin_class_init (GsdA11ySettingsPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdA11ySettingsPluginPrivate));
 }
-
-static void
-gsd_a11y_settings_plugin_class_finalize (GsdA11ySettingsPluginClass *klass)
-{
-}
-
diff --git a/plugins/background/gsd-background-plugin.c b/plugins/background/gsd-background-plugin.c
index ed434e6..46e98be 100644
--- a/plugins/background/gsd-background-plugin.c
+++ b/plugins/background/gsd-background-plugin.c
@@ -102,9 +102,3 @@ gsd_background_plugin_class_init (GsdBackgroundPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdBackgroundPluginPrivate));
 }
-
-static void
-gsd_background_plugin_class_finalize (GsdBackgroundPluginClass *klass)
-{
-}
-
diff --git a/plugins/clipboard/gsd-clipboard-plugin.c b/plugins/clipboard/gsd-clipboard-plugin.c
index f4bfc19..9b3b05c 100644
--- a/plugins/clipboard/gsd-clipboard-plugin.c
+++ b/plugins/clipboard/gsd-clipboard-plugin.c
@@ -102,9 +102,3 @@ gsd_clipboard_plugin_class_init (GsdClipboardPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdClipboardPluginPrivate));
 }
-
-static void
-gsd_clipboard_plugin_class_finalize (GsdClipboardPluginClass *klass)
-{
-}
-
diff --git a/plugins/color/gsd-color-plugin.c b/plugins/color/gsd-color-plugin.c
index e5c2392..8c11546 100644
--- a/plugins/color/gsd-color-plugin.c
+++ b/plugins/color/gsd-color-plugin.c
@@ -103,9 +103,3 @@ gsd_color_plugin_class_init (GsdColorPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdColorPluginPrivate));
 }
-
-static void
-gsd_color_plugin_class_finalize (GsdColorPluginClass *klass)
-{
-}
-
diff --git a/plugins/cursor/gsd-cursor-plugin.c b/plugins/cursor/gsd-cursor-plugin.c
index 79a236d..b903dcf 100644
--- a/plugins/cursor/gsd-cursor-plugin.c
+++ b/plugins/cursor/gsd-cursor-plugin.c
@@ -102,9 +102,3 @@ gsd_cursor_plugin_class_init (GsdCursorPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdCursorPluginPrivate));
 }
-
-static void
-gsd_cursor_plugin_class_finalize (GsdCursorPluginClass *klass)
-{
-}
-
diff --git a/plugins/dummy/gsd-dummy-plugin.c b/plugins/dummy/gsd-dummy-plugin.c
index 1bb01d9..78342d7 100644
--- a/plugins/dummy/gsd-dummy-plugin.c
+++ b/plugins/dummy/gsd-dummy-plugin.c
@@ -102,9 +102,3 @@ gsd_dummy_plugin_class_init (GsdDummyPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdDummyPluginPrivate));
 }
-
-static void
-gsd_dummy_plugin_class_finalize (GsdDummyPluginClass *klass)
-{
-}
-
diff --git a/plugins/housekeeping/gsd-housekeeping-plugin.c b/plugins/housekeeping/gsd-housekeeping-plugin.c
index 6532223..5e7a965 100644
--- a/plugins/housekeeping/gsd-housekeeping-plugin.c
+++ b/plugins/housekeeping/gsd-housekeeping-plugin.c
@@ -102,9 +102,3 @@ gsd_housekeeping_plugin_class_init (GsdHousekeepingPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdHousekeepingPluginPrivate));
 }
-
-static void
-gsd_housekeeping_plugin_class_finalize (GsdHousekeepingPluginClass *klass)
-{
-}
-
diff --git a/plugins/keyboard/gsd-keyboard-plugin.c b/plugins/keyboard/gsd-keyboard-plugin.c
index 72549a8..456d37d 100644
--- a/plugins/keyboard/gsd-keyboard-plugin.c
+++ b/plugins/keyboard/gsd-keyboard-plugin.c
@@ -102,9 +102,3 @@ gsd_keyboard_plugin_class_init (GsdKeyboardPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdKeyboardPluginPrivate));
 }
-
-static void
-gsd_keyboard_plugin_class_finalize (GsdKeyboardPluginClass *klass)
-{
-}
-
diff --git a/plugins/media-keys/gsd-media-keys-plugin.c b/plugins/media-keys/gsd-media-keys-plugin.c
index 8ae38e7..3fe36e4 100644
--- a/plugins/media-keys/gsd-media-keys-plugin.c
+++ b/plugins/media-keys/gsd-media-keys-plugin.c
@@ -102,9 +102,3 @@ gsd_media_keys_plugin_class_init (GsdMediaKeysPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdMediaKeysPluginPrivate));
 }
-
-static void
-gsd_media_keys_plugin_class_finalize (GsdMediaKeysPluginClass *klass)
-{
-}
-
diff --git a/plugins/mouse/gsd-mouse-plugin.c b/plugins/mouse/gsd-mouse-plugin.c
index 80f2679..3eca07e 100644
--- a/plugins/mouse/gsd-mouse-plugin.c
+++ b/plugins/mouse/gsd-mouse-plugin.c
@@ -102,9 +102,3 @@ gsd_mouse_plugin_class_init (GsdMousePluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdMousePluginPrivate));
 }
-
-static void
-gsd_mouse_plugin_class_finalize (GsdMousePluginClass *klass)
-{
-}
-
diff --git a/plugins/orientation/gsd-orientation-plugin.c b/plugins/orientation/gsd-orientation-plugin.c
index 5fffa57..506302e 100644
--- a/plugins/orientation/gsd-orientation-plugin.c
+++ b/plugins/orientation/gsd-orientation-plugin.c
@@ -103,9 +103,3 @@ gsd_orientation_plugin_class_init (GsdOrientationPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdOrientationPluginPrivate));
 }
-
-static void
-gsd_orientation_plugin_class_finalize (GsdOrientationPluginClass *klass)
-{
-}
-
diff --git a/plugins/power/gsd-power-plugin.c b/plugins/power/gsd-power-plugin.c
index e7976b6..6626087 100644
--- a/plugins/power/gsd-power-plugin.c
+++ b/plugins/power/gsd-power-plugin.c
@@ -102,9 +102,3 @@ gsd_power_plugin_class_init (GsdPowerPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdPowerPluginPrivate));
 }
-
-static void
-gsd_power_plugin_class_finalize (GsdPowerPluginClass *klass)
-{
-}
-
diff --git a/plugins/print-notifications/gsd-print-notifications-plugin.c b/plugins/print-notifications/gsd-print-notifications-plugin.c
index 2b9055b..0a78806 100644
--- a/plugins/print-notifications/gsd-print-notifications-plugin.c
+++ b/plugins/print-notifications/gsd-print-notifications-plugin.c
@@ -100,9 +100,3 @@ gsd_print_notifications_plugin_class_init (GsdPrintNotificationsPluginClass *kla
 
         g_type_class_add_private (klass, sizeof (GsdPrintNotificationsPluginPrivate));
 }
-
-static void
-gsd_print_notifications_plugin_class_finalize (GsdPrintNotificationsPluginClass *klass)
-{
-}
-
diff --git a/plugins/smartcard/gsd-smartcard-plugin.c b/plugins/smartcard/gsd-smartcard-plugin.c
index fa105e7..928ec28 100644
--- a/plugins/smartcard/gsd-smartcard-plugin.c
+++ b/plugins/smartcard/gsd-smartcard-plugin.c
@@ -342,9 +342,3 @@ gsd_smartcard_plugin_class_init (GsdSmartcardPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdSmartcardPluginPrivate));
 }
-
-static void
-gsd_smartcard_plugin_class_finalize (GsdSmartcardPluginClass *klass)
-{
-}
-
diff --git a/plugins/sound/gsd-sound-plugin.c b/plugins/sound/gsd-sound-plugin.c
index 54652c3..941dc90 100644
--- a/plugins/sound/gsd-sound-plugin.c
+++ b/plugins/sound/gsd-sound-plugin.c
@@ -98,9 +98,3 @@ gsd_sound_plugin_class_init (GsdSoundPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdSoundPluginPrivate));
 }
-
-static void
-gsd_sound_plugin_class_finalize (GsdSoundPluginClass *klass)
-{
-}
-
diff --git a/plugins/updates/gsd-updates-plugin.c b/plugins/updates/gsd-updates-plugin.c
index 2252f72..368b1d6 100644
--- a/plugins/updates/gsd-updates-plugin.c
+++ b/plugins/updates/gsd-updates-plugin.c
@@ -98,9 +98,3 @@ gsd_updates_plugin_class_init (GsdUpdatesPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdUpdatesPluginPrivate));
 }
-
-static void
-gsd_updates_plugin_class_finalize (GsdUpdatesPluginClass *klass)
-{
-}
-
diff --git a/plugins/wacom/gsd-wacom-plugin.c b/plugins/wacom/gsd-wacom-plugin.c
index 835c6cd..a9ec227 100644
--- a/plugins/wacom/gsd-wacom-plugin.c
+++ b/plugins/wacom/gsd-wacom-plugin.c
@@ -103,9 +103,3 @@ gsd_wacom_plugin_class_init (GsdWacomPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdWacomPluginPrivate));
 }
-
-static void
-gsd_wacom_plugin_class_finalize (GsdWacomPluginClass *klass)
-{
-}
-
diff --git a/plugins/xrandr/gsd-xrandr-plugin.c b/plugins/xrandr/gsd-xrandr-plugin.c
index a08652b..23177e5 100644
--- a/plugins/xrandr/gsd-xrandr-plugin.c
+++ b/plugins/xrandr/gsd-xrandr-plugin.c
@@ -102,9 +102,3 @@ gsd_xrandr_plugin_class_init (GsdXrandrPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GsdXrandrPluginPrivate));
 }
-
-static void
-gsd_xrandr_plugin_class_finalize (GsdXrandrPluginClass *klass)
-{
-}
-
diff --git a/plugins/xsettings/gsd-xsettings-plugin.c b/plugins/xsettings/gsd-xsettings-plugin.c
index 0a31906..36a09dd 100644
--- a/plugins/xsettings/gsd-xsettings-plugin.c
+++ b/plugins/xsettings/gsd-xsettings-plugin.c
@@ -102,9 +102,3 @@ gnome_xsettings_plugin_class_init (GnomeXSettingsPluginClass *klass)
 
         g_type_class_add_private (klass, sizeof (GnomeXSettingsPluginPrivate));
 }
-
-static void
-gnome_xsettings_plugin_class_finalize (GnomeXSettingsPluginClass *klass)
-{
-}
-



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