Skip to content
Permalink
Browse files

currency-manager: avoid deprecated 'g_type_class_add_private'

  • Loading branch information...
sc0w committed Jan 29, 2019
1 parent 2c4aba1 commit bba427d88909fab793ad95189f7fb1341acdf699
Showing with 2 additions and 4 deletions.
  1. +2 −4 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);
}

0 comments on commit bba427d

Please sign in to comment.
You can’t perform that action at this time.