mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private -
replace objects ..._get_type method by that provided by G_DEFINE_TYPE_WITH_PRIVATE
This commit is contained in:
parent
2ab6650e9a
commit
ddda853074
@ -75,46 +75,14 @@ struct _GNCGeneralSearchPrivate
|
||||
gint component_id;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCGeneralSearch, gnc_general_search, GTK_TYPE_BOX)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_GENERAL_SEARCH, GNCGeneralSearchPrivate))
|
||||
|
||||
static GtkBoxClass *parent_class;
|
||||
static guint general_search_signals[LAST_SIGNAL];
|
||||
|
||||
|
||||
/**
|
||||
* gnc_general_search_get_type:
|
||||
*
|
||||
* Returns the GType for the GNCGeneralSearch widget
|
||||
*/
|
||||
GType
|
||||
gnc_general_search_get_type (void)
|
||||
{
|
||||
static GType general_search_type = 0;
|
||||
|
||||
if (!general_search_type)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GNCGeneralSearchClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_general_search_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GNCGeneralSearch), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_general_search_init,
|
||||
};
|
||||
|
||||
general_search_type = g_type_register_static (GTK_TYPE_BOX,
|
||||
"GNCGeneralSearch",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return general_search_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_general_search_class_init (GNCGeneralSearchClass *klass)
|
||||
{
|
||||
@ -134,8 +102,6 @@ gnc_general_search_class_init (GNCGeneralSearchClass *klass)
|
||||
object_class->destroy = gnc_general_search_destroy;
|
||||
|
||||
klass->changed = NULL;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCGeneralSearchPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -58,40 +58,13 @@ struct _GNCSearchAccountPrivate
|
||||
GtkWindow *parent;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchAccount, gnc_search_account, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_ACCOUNT, GNCSearchAccountPrivate))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
|
||||
GType
|
||||
gnc_search_account_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchAccountClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_account_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchAccount), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_account_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchAccount",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_account_class_init (GNCSearchAccountClass *klass)
|
||||
{
|
||||
@ -109,8 +82,6 @@ gnc_search_account_class_init (GNCSearchAccountClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchAccountPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -53,39 +53,13 @@ struct _GNCSearchBooleanPrivate
|
||||
gpointer dummy;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchBoolean, gnc_search_boolean, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_BOOLEAN, GNCSearchBooleanPrivate))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_boolean_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchBooleanClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_boolean_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchBoolean), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_boolean_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchBoolean",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_boolean_class_init (GNCSearchBooleanClass *klass)
|
||||
{
|
||||
@ -103,8 +77,6 @@ gnc_search_boolean_class_init (GNCSearchBooleanClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchBooleanPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -55,6 +55,8 @@ struct _GNCSearchCoreTypePrivate
|
||||
gpointer dummy;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchCoreType, gnc_search_core_type, G_TYPE_OBJECT)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_CORE_TYPE, GNCSearchCoreTypePrivate))
|
||||
|
||||
@ -62,32 +64,6 @@ static GObjectClass *parent_class;
|
||||
|
||||
static GHashTable *typeTable = NULL;
|
||||
|
||||
GType
|
||||
gnc_search_core_type_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (type == 0)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof (GNCSearchCoreTypeClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc)gnc_search_core_type_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GNCSearchCoreType),
|
||||
0,
|
||||
(GInstanceInitFunc)gnc_search_core_type_init
|
||||
};
|
||||
|
||||
type = g_type_register_static (G_TYPE_OBJECT, "GNCSearchCoreType", &type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_core_type_class_init (GNCSearchCoreTypeClass *klass)
|
||||
{
|
||||
@ -102,8 +78,6 @@ gnc_search_core_type_class_init (GNCSearchCoreTypeClass *klass)
|
||||
klass->validate = validate;
|
||||
klass->grab_focus = grab_focus;
|
||||
klass->editable_enters = editable_enters;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchCoreTypePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -57,39 +57,13 @@ struct _GNCSearchDatePrivate
|
||||
GtkWindow *parent;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchDate, gnc_search_date, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_DATE, GNCSearchDatePrivate))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_date_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchDateClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_date_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchDate), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_date_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchDate",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_date_class_init (GNCSearchDateClass *klass)
|
||||
{
|
||||
@ -109,8 +83,6 @@ gnc_search_date_class_init (GNCSearchDateClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchDatePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -57,39 +57,13 @@ struct _GNCSearchDoublePrivate
|
||||
GtkWindow *parent;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchDouble, gnc_search_double, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_DOUBLE, GNCSearchDoublePrivate))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_double_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchDoubleClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_double_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchDouble), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_double_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchDouble",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_double_class_init (GNCSearchDoubleClass *klass)
|
||||
{
|
||||
@ -109,8 +83,6 @@ gnc_search_double_class_init (GNCSearchDoubleClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchDoublePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -58,39 +58,13 @@ struct _GNCSearchInt64Private
|
||||
GtkWindow *parent;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchInt64, gnc_search_int64, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_INT64, GNCSearchInt64Private))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_int64_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchInt64Class), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_int64_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchInt64), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_int64_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchInt64",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_int64_class_init (GNCSearchInt64Class *klass)
|
||||
{
|
||||
@ -110,8 +84,6 @@ gnc_search_int64_class_init (GNCSearchInt64Class *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchInt64Private));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -58,39 +58,13 @@ struct _GNCSearchNumericPrivate
|
||||
GtkWindow *parent;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchNumeric, gnc_search_numeric, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_NUMERIC, GNCSearchNumericPrivate))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_numeric_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchNumericClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_numeric_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchNumeric), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_numeric_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchNumeric",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_numeric_class_init (GNCSearchNumericClass *klass)
|
||||
{
|
||||
@ -110,8 +84,6 @@ gnc_search_numeric_class_init (GNCSearchNumericClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchNumericPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -54,39 +54,13 @@ struct _GNCSearchReconciledPrivate
|
||||
gpointer dummy;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchReconciled, gnc_search_reconciled, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_RECONCILED, GNCSearchReconciledPrivate))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_reconciled_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchReconciledClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_reconciled_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchReconciled), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_reconciled_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchReconciled",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_reconciled_class_init (GNCSearchReconciledClass *klass)
|
||||
{
|
||||
@ -104,8 +78,6 @@ gnc_search_reconciled_class_init (GNCSearchReconciledClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchReconciledPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -57,39 +57,13 @@ struct _GNCSearchStringPrivate
|
||||
GtkWindow *parent;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchString, gnc_search_string, GNC_TYPE_SEARCH_CORE_TYPE)
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_STRING, GNCSearchStringPrivate))
|
||||
|
||||
static GNCSearchCoreTypeClass *parent_class;
|
||||
|
||||
GType
|
||||
gnc_search_string_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchStringClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_string_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchString), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_string_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchString",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_string_class_init (GNCSearchStringClass *klass)
|
||||
{
|
||||
@ -109,8 +83,6 @@ gnc_search_string_class_init (GNCSearchStringClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchStringPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -170,11 +170,11 @@ struct GncBudgetViewPrivate
|
||||
Account* rootAcct;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncBudgetView, gnc_budget_view, GTK_TYPE_BOX)
|
||||
|
||||
#define GNC_BUDGET_VIEW_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE((o), GNC_TYPE_BUDGET_VIEW, GncBudgetViewPrivate))
|
||||
|
||||
G_DEFINE_TYPE(GncBudgetView, gnc_budget_view, GTK_TYPE_BOX)
|
||||
|
||||
/** \brief Create new gnc budget view.
|
||||
|
||||
As the name suggests, this creates a new gnc budget view.
|
||||
@ -212,8 +212,6 @@ gnc_budget_view_class_init(GncBudgetViewClass *klass)
|
||||
|
||||
g_signal_new("account-activated", GNC_TYPE_BUDGET_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, GNC_TYPE_ACCOUNT);
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncBudgetViewPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -73,43 +73,14 @@ typedef struct GncPluginAccountTreePrivate
|
||||
gpointer dummy;
|
||||
} GncPluginAccountTreePrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginAccountTree, gnc_plugin_account_tree, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_ACCOUNT_TREE_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_ACCOUNT_TREE, GncPluginAccountTreePrivate))
|
||||
|
||||
/** A pointer to the parent class of a plugin page. */
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
/* Get the type of the account tree menu plugin. */
|
||||
GType
|
||||
gnc_plugin_account_tree_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_account_tree_type = 0;
|
||||
|
||||
if (gnc_plugin_account_tree_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginAccountTreeClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_account_tree_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginAccountTree),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_account_tree_init
|
||||
};
|
||||
|
||||
gnc_plugin_account_tree_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginAccountTree",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_account_tree_type;
|
||||
}
|
||||
|
||||
|
||||
/* Create a new account tree menu plugin. */
|
||||
GncPlugin *
|
||||
gnc_plugin_account_tree_new (void)
|
||||
@ -126,7 +97,6 @@ gnc_plugin_account_tree_new (void)
|
||||
return GNC_PLUGIN (plugin);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_plugin_account_tree_main_window_page_changed (GncMainWindow *window,
|
||||
GncPluginPage *plugin_page, gpointer user_data)
|
||||
@ -148,7 +118,6 @@ gnc_plugin_account_tree_main_window_page_changed (GncMainWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Initialize the class for a new account tree plugin. This will set
|
||||
* up any function pointers that override functions in the parent
|
||||
* class, and also configure the private data storage for this
|
||||
@ -177,8 +146,6 @@ gnc_plugin_account_tree_class_init (GncPluginAccountTreeClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginAccountTreePrivate));
|
||||
}
|
||||
|
||||
|
||||
|
@ -206,41 +206,13 @@ typedef struct GncPluginPageBudgetPrivate
|
||||
gint sigFigs;
|
||||
} GncPluginPageBudgetPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginPageBudget, gnc_plugin_page_budget, GNC_TYPE_PLUGIN_PAGE)
|
||||
|
||||
#define GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_PAGE_BUDGET, GncPluginPageBudgetPrivate))
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gnc_plugin_page_budget_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_page_budget_type = 0;
|
||||
|
||||
if (gnc_plugin_page_budget_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginPageBudgetClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gnc_plugin_page_budget_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GncPluginPageBudget),
|
||||
0,
|
||||
(GInstanceInitFunc) gnc_plugin_page_budget_init
|
||||
};
|
||||
|
||||
gnc_plugin_page_budget_type =
|
||||
g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
|
||||
"GncPluginPageBudget", &our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_page_budget_type;
|
||||
}
|
||||
|
||||
|
||||
GncPluginPage *
|
||||
gnc_plugin_page_budget_new (GncBudget *budget)
|
||||
{
|
||||
@ -295,8 +267,6 @@ gnc_plugin_page_budget_class_init (GncPluginPageBudgetClass *klass)
|
||||
gnc_plugin_class->destroy_widget = gnc_plugin_page_budget_destroy_widget;
|
||||
gnc_plugin_class->save_page = gnc_plugin_page_budget_save_page;
|
||||
gnc_plugin_class->recreate_page = gnc_plugin_page_budget_recreate_page;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginPageBudgetPrivate));
|
||||
}
|
||||
|
||||
|
||||
|
@ -283,6 +283,8 @@ typedef struct GncPluginPageInvoicePrivate
|
||||
gint component_manager_id;
|
||||
} GncPluginPageInvoicePrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginPageInvoice, gnc_plugin_page_invoice, GNC_TYPE_PLUGIN_PAGE)
|
||||
|
||||
#define GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_PAGE_INVOICE, GncPluginPageInvoicePrivate))
|
||||
|
||||
@ -292,34 +294,6 @@ static GObjectClass *parent_class = NULL;
|
||||
/* Implementation */
|
||||
/************************************************************/
|
||||
|
||||
GType
|
||||
gnc_plugin_page_invoice_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_page_invoice_type = 0;
|
||||
|
||||
if (gnc_plugin_page_invoice_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginPageInvoiceClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gnc_plugin_page_invoice_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GncPluginPageInvoice),
|
||||
0,
|
||||
(GInstanceInitFunc) gnc_plugin_page_invoice_init
|
||||
};
|
||||
|
||||
gnc_plugin_page_invoice_type = g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
|
||||
"GncPluginPageInvoice",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_page_invoice_type;
|
||||
}
|
||||
|
||||
GncPluginPage *
|
||||
gnc_plugin_page_invoice_new (InvoiceWindow *iw)
|
||||
{
|
||||
@ -367,8 +341,6 @@ gnc_plugin_page_invoice_class_init (GncPluginPageInvoiceClass *klass)
|
||||
gnc_plugin_class->save_page = gnc_plugin_page_invoice_save_page;
|
||||
gnc_plugin_class->recreate_page = gnc_plugin_page_invoice_recreate_page;
|
||||
gnc_plugin_class->window_changed = gnc_plugin_page_invoice_window_changed;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginPageInvoicePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -588,6 +588,8 @@ typedef struct GncPluginPageRegisterPrivate
|
||||
} fd;
|
||||
} GncPluginPageRegisterPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginPageRegister, gnc_plugin_page_register, GNC_TYPE_PLUGIN_PAGE)
|
||||
|
||||
#define GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_PAGE_REGISTER, GncPluginPageRegisterPrivate))
|
||||
|
||||
@ -597,34 +599,6 @@ static GObjectClass *parent_class = NULL;
|
||||
/* Implementation */
|
||||
/************************************************************/
|
||||
|
||||
GType
|
||||
gnc_plugin_page_register_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_page_register_type = 0;
|
||||
|
||||
if (gnc_plugin_page_register_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginPageRegisterClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gnc_plugin_page_register_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GncPluginPageRegister),
|
||||
0,
|
||||
(GInstanceInitFunc) gnc_plugin_page_register_init
|
||||
};
|
||||
|
||||
gnc_plugin_page_register_type = g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
|
||||
GNC_PLUGIN_PAGE_REGISTER_NAME,
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_page_register_type;
|
||||
}
|
||||
|
||||
static GncPluginPage *
|
||||
gnc_plugin_page_register_new_common (GNCLedgerDisplay *ledger)
|
||||
{
|
||||
@ -762,8 +736,6 @@ gnc_plugin_page_register_class_init (GncPluginPageRegisterClass *klass)
|
||||
gnc_plugin_class->update_edit_menu_actions = gnc_plugin_page_register_update_edit_menu;
|
||||
gnc_plugin_class->finish_pending = gnc_plugin_page_register_finish_pending;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginPageRegisterPrivate));
|
||||
|
||||
gnc_ui_register_account_destroy_callback (gppr_account_destroy_cb);
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,8 @@ typedef struct GncPluginRegisterPrivate
|
||||
gpointer dummy;
|
||||
} GncPluginRegisterPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginRegister, gnc_plugin_register, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_REGISTER_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_REGISTER, GncPluginRegisterPrivate))
|
||||
|
||||
@ -103,34 +105,6 @@ gnc_plugin_register_pref_changed (gpointer prefs, gchar *pref,
|
||||
* Object Implementation *
|
||||
************************************************************/
|
||||
|
||||
GType
|
||||
gnc_plugin_register_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_register_type = 0;
|
||||
|
||||
if (gnc_plugin_register_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginRegisterClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_register_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginRegister),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_register_init
|
||||
};
|
||||
|
||||
gnc_plugin_register_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginRegister",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_register_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_register_new (void)
|
||||
{
|
||||
@ -190,8 +164,6 @@ gnc_plugin_register_class_init (GncPluginRegisterClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginRegisterPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -75,6 +75,8 @@ typedef struct GncPluginRegister2Private
|
||||
gpointer dummy;
|
||||
} GncPluginRegister2Private;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginRegister2, gnc_plugin_register2, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_REGISTER2_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_REGISTER2, GncPluginRegister2Private))
|
||||
|
||||
@ -110,34 +112,6 @@ gnc_plugin_register2_pref_changed (gpointer prefs, gchar *pref,
|
||||
* Object Implementation *
|
||||
************************************************************/
|
||||
|
||||
GType
|
||||
gnc_plugin_register2_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_register2_type = 0;
|
||||
|
||||
if (gnc_plugin_register2_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginRegister2Class),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_register2_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginRegister2),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_register2_init
|
||||
};
|
||||
|
||||
gnc_plugin_register2_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginRegister2",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_register2_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_register2_new (void)
|
||||
{
|
||||
@ -176,8 +150,6 @@ gnc_plugin_register2_class_init (GncPluginRegister2Class *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginRegister2Private));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -59,6 +59,8 @@ typedef struct _GNCSearchOwnerPrivate
|
||||
GtkWidget * owner_choice;
|
||||
} GNCSearchOwnerPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GNCSearchOwner, gnc_search_owner, GNC_TYPE_SEARCH_CORE_TYPE);
|
||||
|
||||
#define _PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_SEARCH_OWNER, GNCSearchOwnerPrivate))
|
||||
|
||||
@ -73,34 +75,6 @@ enum
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
#endif
|
||||
|
||||
GType
|
||||
gnc_search_owner_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (!type)
|
||||
{
|
||||
GTypeInfo type_info =
|
||||
{
|
||||
sizeof(GNCSearchOwnerClass), /* class_size */
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)gnc_search_owner_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(GNCSearchOwner), /* */
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)gnc_search_owner_init,
|
||||
};
|
||||
|
||||
type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
|
||||
"GNCSearchOwner",
|
||||
&type_info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_search_owner_class_init (GNCSearchOwnerClass *klass)
|
||||
{
|
||||
@ -118,8 +92,6 @@ gnc_search_owner_class_init (GNCSearchOwnerClass *klass)
|
||||
gnc_search_core_type->get_widget = gncs_get_widget;
|
||||
gnc_search_core_type->get_predicate = gncs_get_predicate;
|
||||
gnc_search_core_type->clone = gncs_clone;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GNCSearchOwnerPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -73,39 +73,13 @@ typedef struct GncPluginCsvExportPrivate
|
||||
gpointer dummy;
|
||||
} GncPluginCsvExportPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginCsvExport, gnc_plugin_csv_export, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_CSV_EXPORT_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_CSV_EXPORT, GncPluginCsvExportPrivate))
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gnc_plugin_csv_export_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_csv_export_type = 0;
|
||||
|
||||
if (gnc_plugin_csv_export_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginCsvExportClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_csv_export_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginCsvExport),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_csv_export_init,
|
||||
};
|
||||
|
||||
gnc_plugin_csv_export_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginCsvExport",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_csv_export_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_csv_export_new (void)
|
||||
{
|
||||
@ -130,8 +104,6 @@ gnc_plugin_csv_export_class_init (GncPluginCsvExportClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginCsvExportPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -69,39 +69,13 @@ typedef struct GncPluginCsvImportPrivate
|
||||
gpointer dummy;
|
||||
} GncPluginCsvImportPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginCsvImport, gnc_plugin_csv_import, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_CSV_IMPORT_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_CSV_IMPORT, GncPluginCsvImportPrivate))
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gnc_plugin_csv_import_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_csv_import_type = 0;
|
||||
|
||||
if (gnc_plugin_csv_import_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginCsvImportClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_csv_import_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginCsvImport),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_csv_import_init,
|
||||
};
|
||||
|
||||
gnc_plugin_csv_import_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginCsvImport",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_csv_import_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_csv_import_new (void)
|
||||
{
|
||||
@ -126,8 +100,6 @@ gnc_plugin_csv_import_class_init (GncPluginCsvImportClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginCsvImportPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -57,39 +57,13 @@ typedef struct GncPluginLogreplayPrivate
|
||||
gpointer dummy;
|
||||
} GncPluginLogreplayPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginLogreplay, gnc_plugin_log_replay, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_LOG_REPLAY_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_LOG_REPLAY, GncPluginLogreplayPrivate))
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gnc_plugin_log_replay_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_log_replay_type = 0;
|
||||
|
||||
if (gnc_plugin_log_replay_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginLogreplayClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_log_replay_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginLogreplay),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_log_replay_init,
|
||||
};
|
||||
|
||||
gnc_plugin_log_replay_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginLogreplay",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_log_replay_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_log_replay_new (void)
|
||||
{
|
||||
@ -114,8 +88,6 @@ gnc_plugin_log_replay_class_init (GncPluginLogreplayClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginLogreplayPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -55,39 +55,13 @@ typedef struct GncPluginOfxPrivate
|
||||
gpointer dummy;
|
||||
} GncPluginOfxPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginOfx, gnc_plugin_ofx, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_OFX_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_OFX, GncPluginOfxPrivate))
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gnc_plugin_ofx_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_ofx_type = 0;
|
||||
|
||||
if (gnc_plugin_ofx_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginOfxClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_ofx_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginOfx),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_ofx_init,
|
||||
};
|
||||
|
||||
gnc_plugin_ofx_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginOfx",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_ofx_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_ofx_new (void)
|
||||
{
|
||||
@ -112,8 +86,6 @@ gnc_plugin_ofx_class_init (GncPluginOfxClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginOfxPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -56,39 +56,13 @@ typedef struct GncPluginQifImportPrivate
|
||||
gpointer dummy;
|
||||
} GncPluginQifImportPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginQifImport, gnc_plugin_qif_import, GNC_TYPE_PLUGIN);
|
||||
|
||||
#define GNC_PLUGIN_QIF_IMPORT_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_QIF_IMPORT, GncPluginQifImportPrivate))
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gnc_plugin_qif_import_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_qif_import_type = 0;
|
||||
|
||||
if (gnc_plugin_qif_import_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginQifImportClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_qif_import_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginQifImport),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_qif_import_init,
|
||||
};
|
||||
|
||||
gnc_plugin_qif_import_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginQifImport",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_qif_import_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_qif_import_new (void)
|
||||
{
|
||||
@ -113,8 +87,6 @@ gnc_plugin_qif_import_class_init (GncPluginQifImportClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginQifImportPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -132,6 +132,8 @@ typedef struct GncPluginPageReportPrivate
|
||||
GtkContainer *container;
|
||||
} GncPluginPageReportPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginPageReport, gnc_plugin_page_report, GNC_TYPE_PLUGIN_PAGE)
|
||||
|
||||
#define GNC_PLUGIN_PAGE_REPORT_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_PAGE_REPORT, GncPluginPageReportPrivate))
|
||||
|
||||
@ -180,34 +182,6 @@ static void gnc_plugin_page_report_print_cb(GtkAction *action, GncPluginPageRepo
|
||||
static void gnc_plugin_page_report_exportpdf_cb(GtkAction *action, GncPluginPageReport *rep);
|
||||
static void gnc_plugin_page_report_copy_cb(GtkAction *action, GncPluginPageReport *rep);
|
||||
|
||||
GType
|
||||
gnc_plugin_page_report_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_page_report_type = 0;
|
||||
|
||||
if (gnc_plugin_page_report_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginPageReportClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gnc_plugin_page_report_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GncPluginPageReport),
|
||||
0,
|
||||
(GInstanceInitFunc) gnc_plugin_page_report_init
|
||||
};
|
||||
|
||||
gnc_plugin_page_report_type = g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
|
||||
"GncPluginPageReport",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_page_report_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_plugin_page_report_get_property( GObject *obj,
|
||||
guint prop_id,
|
||||
@ -326,8 +300,6 @@ gnc_plugin_page_report_class_init (GncPluginPageReportClass *klass)
|
||||
gnc_plugin_page_class->update_edit_menu_actions = gnc_plugin_page_report_update_edit_menu;
|
||||
gnc_plugin_page_class->finish_pending = gnc_plugin_page_report_finish_pending;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginPageReportPrivate));
|
||||
|
||||
// create the "reportId" property
|
||||
g_object_class_install_property( object_class,
|
||||
PROP_REPORT_ID,
|
||||
|
@ -61,6 +61,8 @@ typedef struct GncPluginStylesheetsPrivate
|
||||
gpointer dummy;
|
||||
} GncPluginStylesheetsPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginStylesheets, gnc_plugin_stylesheets, GNC_TYPE_PLUGIN)
|
||||
|
||||
#define GNC_PLUGIN_STYLESHEETS_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_STYLESHEETS, GncPluginStylesheetsPrivate))
|
||||
|
||||
@ -70,34 +72,6 @@ static GObjectClass *parent_class = NULL;
|
||||
* Object Implementation *
|
||||
************************************************************/
|
||||
|
||||
GType
|
||||
gnc_plugin_stylesheets_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_stylesheets_type = 0;
|
||||
|
||||
if (gnc_plugin_stylesheets_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginStylesheetsClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gnc_plugin_stylesheets_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GncPluginStylesheets),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gnc_plugin_stylesheets_init,
|
||||
};
|
||||
|
||||
gnc_plugin_stylesheets_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
||||
"GncPluginStylesheets",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_stylesheets_type;
|
||||
}
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_stylesheets_new (void)
|
||||
{
|
||||
@ -122,8 +96,6 @@ gnc_plugin_stylesheets_class_init (GncPluginStylesheetsClass *klass)
|
||||
plugin_class->actions = gnc_plugin_actions;
|
||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginStylesheetsPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user