diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-05-12 20:20:04 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-05-12 20:20:04 +0200 |
commit | 1cedd98d86df3b6cbb3f732047081f0d7ad7800f (patch) | |
tree | 0da0bb33d3fe5fe98386fa31a1b4e0a8e3d1d421 /lib/gtk-experiment-widgets/gtk-experiment-navigator.c | |
parent | 1f2c549f927a4b6698df4400bcbedbc7b4a1c176 (diff) | |
download | gtk-vlc-player-1cedd98d86df3b6cbb3f732047081f0d7ad7800f.tar.gz |
simplified gtk_experiment_navigator_get_type()
Diffstat (limited to 'lib/gtk-experiment-widgets/gtk-experiment-navigator.c')
-rw-r--r-- | lib/gtk-experiment-widgets/gtk-experiment-navigator.c | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/lib/gtk-experiment-widgets/gtk-experiment-navigator.c b/lib/gtk-experiment-widgets/gtk-experiment-navigator.c index 829dab7..0c3792c 100644 --- a/lib/gtk-experiment-widgets/gtk-experiment-navigator.c +++ b/lib/gtk-experiment-widgets/gtk-experiment-navigator.c @@ -48,32 +48,12 @@ enum { NUM_COLS /**< Number of columns */ }; -/** @private */ -GType -gtk_experiment_navigator_get_type(void) -{ - static GType type = 0; - - if (!type) { - /* FIXME: destructor needed */ - const GTypeInfo info = { - sizeof(GtkExperimentNavigatorClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc)gtk_experiment_navigator_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof(GtkExperimentNavigator), - 0, /* n_preallocs */ - (GInstanceInitFunc)gtk_experiment_navigator_init, - }; - - type = g_type_register_static(GTK_TYPE_TREE_VIEW, - "GtkExperimentNavigator", &info, 0); - } - - return type; -} +/** + * @private + * will create gtk_experiment_navigator_get_type and set + * gtk_experiment_navigator_parent_class + */ +G_DEFINE_TYPE(GtkExperimentNavigator, gtk_experiment_navigator, GTK_TYPE_TREE_VIEW); static void gtk_experiment_navigator_class_init(GtkExperimentNavigatorClass *klass) @@ -89,7 +69,7 @@ gtk_experiment_navigator_class_init(GtkExperimentNavigatorClass *klass) } /** - * Internal constructor for the \e GtkExperimentNavigator widget. + * Instance initializer for the \e GtkExperimentNavigator widget. * It has to create the \e GtkTreeStore (MVC model), add and configure * view columns and add cell renderers to the view columns. * It should connect the necessary signals to respond to row activations |