summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-29 19:52:13 +0100
committerZenWalker <[email protected]>2019-01-30 20:18:56 +0100
commitbba427d88909fab793ad95189f7fb1341acdf699 (patch)
treed1e500e9a28258d2cba6446ed25a35f205d548b0
parent2c4aba1d817c77ba44903bedcc477d815873e2ed (diff)
downloadmate-calc-bba427d88909fab793ad95189f7fb1341acdf699.tar.bz2
mate-calc-bba427d88909fab793ad95189f7fb1341acdf699.tar.xz
currency-manager: avoid deprecated 'g_type_class_add_private'
-rw-r--r--src/currency-manager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/currency-manager.c b/src/currency-manager.c
index cd57ab6..c29eede 100644
--- a/src/currency-manager.c
+++ b/src/currency-manager.c
@@ -99,7 +99,7 @@ struct CurrencyManagerPrivate
GList *currencies;
};
-G_DEFINE_TYPE (CurrencyManager, currency_manager, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (CurrencyManager, currency_manager, G_TYPE_OBJECT);
enum {
@@ -606,8 +606,6 @@ currency_manager_get_value(CurrencyManager *manager, const gchar *currency)
static void
currency_manager_class_init(CurrencyManagerClass *klass)
{
- g_type_class_add_private(klass, sizeof(CurrencyManagerPrivate));
-
signals[UPDATED] =
g_signal_new("updated",
G_TYPE_FROM_CLASS (klass),
@@ -622,5 +620,5 @@ currency_manager_class_init(CurrencyManagerClass *klass)
static void
currency_manager_init(CurrencyManager *manager)
{
- manager->priv = G_TYPE_INSTANCE_GET_PRIVATE(manager, currency_manager_get_type(), CurrencyManagerPrivate);
+ manager->priv = currency_manager_get_instance_private (manager);
}