G_DEFINE_TYPE (MidoriApp, midori_app, G_TYPE_OBJECT)
-static MidoriApp* _midori_app_singleton = NULL;
-
enum
{
PROP_0,
static guint signals[LAST_SIGNAL];
-static GObject*
-midori_app_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam* construct_properties);
-
static void
midori_app_finalize (GObject* object);
G_TYPE_NONE, 0);
gobject_class = G_OBJECT_CLASS (class);
- gobject_class->constructor = midori_app_constructor;
gobject_class->finalize = midori_app_finalize;
gobject_class->set_property = midori_app_set_property;
gobject_class->get_property = midori_app_get_property;
G_PARAM_READABLE));
}
-static GObject*
-midori_app_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam* construct_properties)
-{
- if (_midori_app_singleton)
- return g_object_ref (_midori_app_singleton);
- else
- return G_OBJECT_CLASS (midori_app_parent_class)->constructor (
- type, n_construct_properties, construct_properties);
-}
-
#if HAVE_UNIQUE
static UniqueResponse
midori_browser_message_received_cb (UniqueApp* instance,
guint i, n;
#endif
- g_assert (!_midori_app_singleton);
-
- _midori_app_singleton = app;
-
app->accel_group = gtk_accel_group_new ();
app->settings = midori_web_settings_new ();