G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static void
-psppire_dialog_base_init (PsppireDialogClass *class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = psppire_dialog_finalize;
-}
-
-GType
-psppire_dialog_get_type (void)
-{
- static GType dialog_type = 0;
-
- if (!dialog_type)
- {
- static const GTypeInfo dialog_info =
- {
- sizeof (PsppireDialogClass),
- (GBaseInitFunc) (void (*)(void)) psppire_dialog_base_init,
- NULL, /* base_finalize */
- (GClassInitFunc) (void (*)(void)) psppire_dialog_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PsppireDialog),
- 0,
- (GInstanceInitFunc) (void (*)(void)) psppire_dialog_init,
- NULL /* value_table */
- };
-
- dialog_type = g_type_register_static (PSPPIRE_TYPE_WINDOW_BASE,
- "PsppireDialog", &dialog_info, 0);
- }
-
- return dialog_type;
-}
-
+G_DEFINE_TYPE (PsppireDialog, psppire_dialog, PSPPIRE_TYPE_WINDOW_BASE);
/* Properties */
enum
static void
psppire_dialog_class_init (PsppireDialogClass *class)
{
- GObjectClass *object_class = (GObjectClass *) class;
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ object_class->finalize = psppire_dialog_finalize;
GParamSpec *sliding_spec ;
GParamSpec *help_page_spec ;
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
#ifndef __PSPPIRE_DIALOG_H__
#define __PSPPIRE_DIALOG_H__
-
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
G_END_DECLS
#endif /* __PSPPIRE_DIALOG_H__ */
-
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
-static void psppire_dict_view_base_finalize (PsppireDictViewClass *, gpointer);
-static void psppire_dict_view_base_init (PsppireDictViewClass *class);
static void psppire_dict_view_class_init (PsppireDictViewClass *class);
static void psppire_dict_view_init (PsppireDictView *dict_view);
-GType
-psppire_dict_view_get_type (void)
-{
- static GType psppire_dict_view_type = 0;
-
- if (!psppire_dict_view_type)
- {
- static const GTypeInfo psppire_dict_view_info =
- {
- sizeof (PsppireDictViewClass),
- (GBaseInitFunc) (void (*)(void)) psppire_dict_view_base_init,
- (GBaseFinalizeFunc) (void (*)(void)) psppire_dict_view_base_finalize,
- (GClassInitFunc) (void (*)(void)) psppire_dict_view_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (PsppireDictView),
- 0,
- (GInstanceInitFunc) (void (*)(void)) psppire_dict_view_init,
- NULL /* value_table */
- };
-
- psppire_dict_view_type =
- g_type_register_static (GTK_TYPE_TREE_VIEW, "PsppireDictView",
- &psppire_dict_view_info, 0);
- }
-
- return psppire_dict_view_type;
-}
-
+G_DEFINE_TYPE (PsppireDictView, psppire_dict_view, GTK_TYPE_TREE_VIEW)
static void
psppire_dict_view_finalize (GObject *object)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = psppire_dict_view_finalize;
+
GParamSpec *predicate_spec =
g_param_spec_pointer ("predicate",
"Predicate",
selection_mode_spec);
}
-
-static void
-psppire_dict_view_base_init (PsppireDictViewClass *class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = psppire_dict_view_finalize;
-}
-
-
-
-static void
-psppire_dict_view_base_finalize (PsppireDictViewClass *class,
- gpointer class_data)
-{
-
-}
-
static gboolean
use_labels (PsppireDictView *dv)
{
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
-static void psppire_syntax_window_base_finalize (PsppireSyntaxWindowClass *, gpointer);
-static void psppire_syntax_window_base_init (PsppireSyntaxWindowClass *class);
static void psppire_syntax_window_class_init (PsppireSyntaxWindowClass *class);
static void psppire_syntax_window_init (PsppireSyntaxWindow *syntax_editor);
};
}
-GType
-psppire_syntax_window_get_type (void)
-{
- static GType psppire_syntax_window_type = 0;
-
- if (!psppire_syntax_window_type)
- {
- static const GTypeInfo psppire_syntax_window_info =
- {
- sizeof (PsppireSyntaxWindowClass),
- (GBaseInitFunc) (void (*)(void)) psppire_syntax_window_base_init,
- (GBaseFinalizeFunc) (void (*)(void)) psppire_syntax_window_base_finalize,
- (GClassInitFunc) (void (*)(void)) psppire_syntax_window_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (PsppireSyntaxWindow),
- 0,
- (GInstanceInitFunc) (void (*)(void)) psppire_syntax_window_init,
- NULL /* value_table */
- };
-
- static const GInterfaceInfo window_interface_info =
- {
- (GInterfaceInitFunc) (void (*)(void)) psppire_syntax_window_iface_init,
- NULL,
- NULL
- };
-
- psppire_syntax_window_type =
- g_type_register_static (PSPPIRE_TYPE_WINDOW, "PsppireSyntaxWindow",
- &psppire_syntax_window_info, 0);
-
- g_type_add_interface_static (psppire_syntax_window_type,
- PSPPIRE_TYPE_WINDOW_MODEL,
- &window_interface_info);
- }
-
- return psppire_syntax_window_type;
-}
+G_DEFINE_TYPE_WITH_CODE (PsppireSyntaxWindow, psppire_syntax_window, PSPPIRE_TYPE_WINDOW,
+ G_IMPLEMENT_INTERFACE (PSPPIRE_TYPE_WINDOW_MODEL, psppire_syntax_window_iface_init))
static GObjectClass *parent_class ;
{
GParamSpec *encoding_spec;
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+ gobject_class->finalize = psppire_syntax_window_finalize;
GtkSourceLanguageManager *lm = gtk_source_language_manager_get_default ();
}
-static void
-psppire_syntax_window_base_init (PsppireSyntaxWindowClass *class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
- object_class->finalize = psppire_syntax_window_finalize;
-}
-
-
-
-static void
-psppire_syntax_window_base_finalize (PsppireSyntaxWindowClass *class,
- gpointer class_data)
-{
-}
-
-
static void
editor_execute_syntax (const PsppireSyntaxWindow *sw, GtkTextIter start,
GtkTextIter stop)
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
-static void psppire_val_chooser_base_finalize (PsppireValChooserClass *, gpointer);
-static void psppire_val_chooser_base_init (PsppireValChooserClass *class);
static void psppire_val_chooser_class_init (PsppireValChooserClass *class);
static void psppire_val_chooser_init (PsppireValChooser *vc);
static void psppire_val_chooser_realize (GtkWidget *w);
-GType
-psppire_val_chooser_get_type (void)
-{
- static GType psppire_val_chooser_type = 0;
-
- if (!psppire_val_chooser_type)
- {
- static const GTypeInfo psppire_val_chooser_info =
- {
- sizeof (PsppireValChooserClass),
- (GBaseInitFunc) (void (*)(void)) psppire_val_chooser_base_init,
- (GBaseFinalizeFunc) (void (*)(void)) psppire_val_chooser_base_finalize,
- (GClassInitFunc) (void (*)(void)) psppire_val_chooser_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (PsppireValChooser),
- 0,
- (GInstanceInitFunc) (void (*)(void)) psppire_val_chooser_init,
- NULL /* value_table */
- };
-
- psppire_val_chooser_type =
- g_type_register_static (GTK_TYPE_FRAME, "PsppireValChooser",
- &psppire_val_chooser_info, 0);
- }
-
- return psppire_val_chooser_type;
-}
-
+G_DEFINE_TYPE (PsppireValChooser, psppire_val_chooser, GTK_TYPE_FRAME)
static void
psppire_val_chooser_finalize (GObject *object)
psppire_val_chooser_class_init (PsppireValChooserClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ object_class->finalize = psppire_val_chooser_finalize;
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
GParamSpec *is_string_spec =
}
-static void
-psppire_val_chooser_base_init (PsppireValChooserClass *class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = psppire_val_chooser_finalize;
-}
-
-
-
-static void
-psppire_val_chooser_base_finalize (PsppireValChooserClass *class,
- gpointer class_data)
-{
-
-}
-
-
/* Set the focus of B to follow the sensitivity of A */
static void
focus_follows_sensitivity (GtkWidget *a, GParamSpec *pspec, GtkWidget *b)
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
-static void psppire_var_view_base_finalize (PsppireVarViewClass *, gpointer);
-static void psppire_var_view_base_init (PsppireVarViewClass *class);
static void psppire_var_view_class_init (PsppireVarViewClass *class);
static void psppire_var_view_init (PsppireVarView *var_view);
iface->contains_var = var_view_contains_var;
}
-GType
-psppire_var_view_get_type (void)
-{
- static GType psppire_var_view_type = 0;
-
- if (!psppire_var_view_type)
- {
- static const GTypeInfo psppire_var_view_info =
- {
- sizeof (PsppireVarViewClass),
- (GBaseInitFunc) (void (*)(void)) psppire_var_view_base_init,
- (GBaseFinalizeFunc) (void (*)(void)) psppire_var_view_base_finalize,
- (GClassInitFunc) (void (*)(void)) psppire_var_view_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (PsppireVarView),
- 0,
- (GInstanceInitFunc) (void (*)(void)) psppire_var_view_init,
- NULL /* value_table */
- };
-
- static const GInterfaceInfo var_view_model_info = {
- (GInterfaceInitFunc) (void (*)(void)) model_init, /* Fill this in */
- NULL,
- NULL
- };
-
- psppire_var_view_type =
- g_type_register_static (GTK_TYPE_TREE_VIEW, "PsppireVarView",
- &psppire_var_view_info, 0);
-
- g_type_add_interface_static (psppire_var_view_type,
- PSPPIRE_TYPE_SELECT_DEST_WIDGET,
- &var_view_model_info);
- }
-
- return psppire_var_view_type;
-}
+G_DEFINE_TYPE_WITH_CODE (PsppireVarView, psppire_var_view, GTK_TYPE_TREE_VIEW,
+ G_IMPLEMENT_INTERFACE (PSPPIRE_TYPE_SELECT_DEST_WIDGET, model_init))
void
psppire_var_view_clear (PsppireVarView *vv)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = psppire_var_view_finalize;
+
GParamSpec *n_cols_spec =
g_param_spec_int ("n-cols",
"Number of columns",
n_cols_spec);
}
-
-static void
-psppire_var_view_base_init (PsppireVarViewClass *class)
-{
-
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = psppire_var_view_finalize;
-}
-
-
-
-static void
-psppire_var_view_base_finalize (PsppireVarViewClass *class,
- gpointer class_data)
-{
-}
-
-
-
static void
psppire_var_view_init (PsppireVarView *vv)
{
#include <gtk/gtk.h>
static void psppire_window_base_class_init (PsppireWindowBaseClass *class);
-static void psppire_window_base_init (PsppireWindowBase *window);
G_DEFINE_ABSTRACT_TYPE (PsppireWindowBase, psppire_window_base, GTK_TYPE_APPLICATION_WINDOW);
#include "psppire-syntax-window.h"
#include "psppire-window-register.h"
-static void psppire_window_base_init (PsppireWindowClass *class);
static void psppire_window_class_init (PsppireWindowClass *class);
static void psppire_window_init (PsppireWindow *window);
-
static GObjectClass *parent_class;
-GType
-psppire_window_get_type (void)
-{
- static GType psppire_window_type = 0;
-
- if (!psppire_window_type)
- {
- static const GTypeInfo psppire_window_info =
- {
- sizeof (PsppireWindowClass),
- (GBaseInitFunc) (void (*)(void)) psppire_window_base_init,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) (void (*)(void)) psppire_window_class_init,
- (GClassFinalizeFunc) NULL,
- NULL,
- sizeof (PsppireWindow),
- 0,
- (GInstanceInitFunc) (void (*)(void)) psppire_window_init,
- NULL /* value_table */
- };
-
- psppire_window_type =
- g_type_register_static (PSPPIRE_TYPE_WINDOW_BASE, "PsppireWindow",
- &psppire_window_info, G_TYPE_FLAG_ABSTRACT);
- }
-
- return psppire_window_type;
-}
-
+G_DEFINE_ABSTRACT_TYPE (PsppireWindow, psppire_window, PSPPIRE_TYPE_WINDOW_BASE)
/* Properties */
enum
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
+ object_class->finalize = psppire_window_finalize;
+
GParamSpec *description_spec =
null_if_empty_param ("description",
"Description",
}
-static void
-psppire_window_base_init (PsppireWindowClass *class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = psppire_window_finalize;
-}
-
-
-
static void
insert_menuitem_into_menu (PsppireWindow *window, gpointer key)
{
g_free (uri);
}
-