diff options
author | Michal Ratajsky <[email protected]> | 2014-07-05 02:16:45 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-10-09 16:51:29 +0200 |
commit | 1eadf051aed2cbf103e2e9653107339be01a5740 (patch) | |
tree | 1e3d0763437792f1e0cad37c2c68c47a396c25e6 /plugins/media-keys/msd-media-keys-plugin.c | |
parent | 8481ebdc843ec212e59f98c8ff5f718485f864c0 (diff) | |
download | mate-settings-daemon-1eadf051aed2cbf103e2e9653107339be01a5740.tar.bz2 mate-settings-daemon-1eadf051aed2cbf103e2e9653107339be01a5740.tar.xz |
Clean things up a bit, update copyright, remove unused code, fix NEWS and compiler warnings
Diffstat (limited to 'plugins/media-keys/msd-media-keys-plugin.c')
-rw-r--r-- | plugins/media-keys/msd-media-keys-plugin.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/plugins/media-keys/msd-media-keys-plugin.c b/plugins/media-keys/msd-media-keys-plugin.c index 0b40418..28134b2 100644 --- a/plugins/media-keys/msd-media-keys-plugin.c +++ b/plugins/media-keys/msd-media-keys-plugin.c @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2007 William Jon McCann <[email protected]> + * Copyright (C) 2014 Michal Ratajsky <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,7 +33,8 @@ #include "msd-media-keys-plugin.h" #include "msd-media-keys-manager.h" -struct MsdMediaKeysPluginPrivate { +struct _MsdMediaKeysPluginPrivate +{ MsdMediaKeysManager *manager; }; @@ -51,24 +53,17 @@ msd_media_keys_plugin_init (MsdMediaKeysPlugin *plugin) } static void -msd_media_keys_plugin_finalize (GObject *object) +msd_media_keys_plugin_dispose (GObject *object) { MsdMediaKeysPlugin *plugin; - g_return_if_fail (object != NULL); - g_return_if_fail (MSD_IS_MEDIA_KEYS_PLUGIN (object)); - - g_debug ("MsdMediaKeysPlugin finalizing"); + g_debug ("MsdMediaKeysPlugin disposing"); plugin = MSD_MEDIA_KEYS_PLUGIN (object); - g_return_if_fail (plugin->priv != NULL); - - if (plugin->priv->manager != NULL) { - g_object_unref (plugin->priv->manager); - } + g_clear_object (&plugin->priv->manager); - G_OBJECT_CLASS (msd_media_keys_plugin_parent_class)->finalize (object); + G_OBJECT_CLASS (msd_media_keys_plugin_parent_class)->dispose (object); } static void @@ -106,7 +101,7 @@ 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 = msd_media_keys_plugin_finalize; + object_class->dispose = msd_media_keys_plugin_dispose; plugin_class->activate = impl_activate; plugin_class->deactivate = impl_deactivate; |