Skip to content

Commit

Permalink
currency-manager: avoid deprecated 'g_type_class_add_private'
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0w committed Jan 30, 2019
1 parent 2c4aba1 commit bba427d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/currency-manager.c
Expand Up @@ -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 {
Expand Down Expand Up @@ -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),
Expand All @@ -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.