Commit aed932f2 authored by Jesse van den Kieboom's avatar Jesse van den Kieboom

Use G_ADD_PRIVATE for plugins

parent 554c2a1f
......@@ -47,20 +47,8 @@
#include "gedit/gedit-app-osx.h"
#endif
#define GEDIT_CHECK_UPDATE_PLUGIN_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
GEDIT_TYPE_CHECK_UPDATE_PLUGIN, \
GeditCheckUpdatePluginPrivate))
static void gedit_window_activatable_iface_init (GeditWindowActivatableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditCheckUpdatePlugin,
gedit_check_update_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_WINDOW_ACTIVATABLE,
gedit_window_activatable_iface_init))
struct _GeditCheckUpdatePluginPrivate
{
......@@ -80,10 +68,18 @@ enum
PROP_WINDOW
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditCheckUpdatePlugin,
gedit_check_update_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_WINDOW_ACTIVATABLE,
gedit_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (GeditCheckUpdatePlugin))
static void
gedit_check_update_plugin_init (GeditCheckUpdatePlugin *plugin)
{
plugin->priv = GEDIT_CHECK_UPDATE_PLUGIN_GET_PRIVATE (plugin);
plugin->priv = gedit_check_update_plugin_get_instance_private (plugin);
gedit_debug_message (DEBUG_PLUGINS,
"GeditCheckUpdatePlugin initializing");
......@@ -623,8 +619,6 @@ gedit_check_update_plugin_class_init (GeditCheckUpdatePluginClass *klass)
object_class->get_property = gedit_check_update_plugin_get_property;
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_type_class_add_private (object_class, sizeof (GeditCheckUpdatePluginPrivate));
}
static void
......
......@@ -85,7 +85,8 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditDocinfoPlugin,
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_APP_ACTIVATABLE,
gedit_app_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_WINDOW_ACTIVATABLE,
gedit_window_activatable_iface_init))
gedit_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (GeditDocinfoPlugin))
static void
calculate_info (GeditDocument *doc,
......@@ -429,9 +430,7 @@ gedit_docinfo_plugin_init (GeditDocinfoPlugin *plugin)
{
gedit_debug_message (DEBUG_PLUGINS, "GeditDocinfoPlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
GEDIT_TYPE_DOCINFO_PLUGIN,
GeditDocinfoPluginPrivate);
plugin->priv = gedit_docinfo_plugin_get_instance_private (plugin);
}
static void
......@@ -602,8 +601,6 @@ gedit_docinfo_plugin_class_init (GeditDocinfoPluginClass *klass)
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_object_class_override_property (object_class, PROP_APP, "app");
g_type_class_add_private (klass, sizeof (GeditDocinfoPluginPrivate));
}
static void
......
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-activation.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -27,8 +27,6 @@
#include "gedit-file-browser-message-activation.h"
#define GEDIT_FILE_BROWSER_MESSAGE_ACTIVATION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_ACTIVATION, GeditFileBrowserMessageActivationPrivate))
enum
{
PROP_0,
......@@ -41,7 +39,11 @@ struct _GeditFileBrowserMessageActivationPrivate
gboolean active;
};
G_DEFINE_TYPE (GeditFileBrowserMessageActivation, gedit_file_browser_message_activation, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageActivation,
gedit_file_browser_message_activation,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageActivation))
static void
gedit_file_browser_message_activation_get_property (GObject *obj,
......@@ -96,12 +98,10 @@ gedit_file_browser_message_activation_class_init (GeditFileBrowserMessageActivat
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageActivationPrivate));
}
static void
gedit_file_browser_message_activation_init (GeditFileBrowserMessageActivation *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_ACTIVATION_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_activation_get_instance_private (message);
}
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-activation.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-add-filter.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -27,8 +27,6 @@
#include "gedit-file-browser-message-add-filter.h"
#define GEDIT_FILE_BROWSER_MESSAGE_ADD_FILTER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_ADD_FILTER, GeditFileBrowserMessageAddFilterPrivate))
enum
{
PROP_0,
......@@ -45,7 +43,11 @@ struct _GeditFileBrowserMessageAddFilterPrivate
guint id;
};
G_DEFINE_TYPE (GeditFileBrowserMessageAddFilter, gedit_file_browser_message_add_filter, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageAddFilter,
gedit_file_browser_message_add_filter,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageAddFilter))
static void
gedit_file_browser_message_add_filter_finalize (GObject *obj)
......@@ -153,12 +155,10 @@ gedit_file_browser_message_add_filter_class_init (GeditFileBrowserMessageAddFilt
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageAddFilterPrivate));
}
static void
gedit_file_browser_message_add_filter_init (GeditFileBrowserMessageAddFilter *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_ADD_FILTER_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_add_filter_get_instance_private (message);
}
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-add-filter.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -4,6 +4,7 @@
* This file is part of gedit
*
* Copyright (C) 2014 - Paolo Borelli
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -28,8 +29,6 @@
#include "gedit-file-browser-message-extend-context-menu.h"
#include <gedit/gedit-menu-extension.h>
#define GEDIT_FILE_BROWSER_MESSAGE_EXTEND_CONTEXT_MENU_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_EXTEND_CONTEXT_MENU, GeditFileBrowserMessageExtendContextMenuPrivate))
enum
{
PROP_0,
......@@ -42,7 +41,11 @@ struct _GeditFileBrowserMessageExtendContextMenuPrivate
GeditMenuExtension *extension;
};
G_DEFINE_TYPE (GeditFileBrowserMessageExtendContextMenu, gedit_file_browser_message_extend_context_menu, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageExtendContextMenu,
gedit_file_browser_message_extend_context_menu,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageExtendContextMenu))
static void
gedit_file_browser_message_extend_context_menu_finalize (GObject *obj)
......@@ -118,12 +121,10 @@ gedit_file_browser_message_extend_context_menu_class_init (GeditFileBrowserMessa
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageExtendContextMenuPrivate));
}
static void
gedit_file_browser_message_extend_context_menu_init (GeditFileBrowserMessageExtendContextMenu *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_EXTEND_CONTEXT_MENU_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_extend_context_menu_get_instance_private (message);
}
......@@ -4,6 +4,7 @@
* This file is part of gedit
*
* Copyright (C) 2014 - Paolo Borelli
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-get-root.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -28,8 +28,6 @@
#include "gedit-file-browser-message-get-root.h"
#include "gio/gio.h"
#define GEDIT_FILE_BROWSER_MESSAGE_GET_ROOT_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_GET_ROOT, GeditFileBrowserMessageGetRootPrivate))
enum
{
PROP_0,
......@@ -42,7 +40,11 @@ struct _GeditFileBrowserMessageGetRootPrivate
GFile *location;
};
G_DEFINE_TYPE (GeditFileBrowserMessageGetRoot, gedit_file_browser_message_get_root, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageGetRoot,
gedit_file_browser_message_get_root,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageGetRoot))
static void
gedit_file_browser_message_get_root_finalize (GObject *obj)
......@@ -118,12 +120,10 @@ gedit_file_browser_message_get_root_class_init (GeditFileBrowserMessageGetRootCl
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageGetRootPrivate));
}
static void
gedit_file_browser_message_get_root_init (GeditFileBrowserMessageGetRoot *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_GET_ROOT_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_get_root_get_instance_private (message);
}
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-get-root.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-get-view.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -28,8 +28,6 @@
#include "gedit-file-browser-message-get-view.h"
#include "plugins/filebrowser/gedit-file-browser-view.h"
#define GEDIT_FILE_BROWSER_MESSAGE_GET_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_GET_VIEW, GeditFileBrowserMessageGetViewPrivate))
enum
{
PROP_0,
......@@ -42,7 +40,11 @@ struct _GeditFileBrowserMessageGetViewPrivate
GeditFileBrowserView *view;
};
G_DEFINE_TYPE (GeditFileBrowserMessageGetView, gedit_file_browser_message_get_view, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageGetView,
gedit_file_browser_message_get_view,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageGetView))
static void
gedit_file_browser_message_get_view_finalize (GObject *obj)
......@@ -118,12 +120,10 @@ gedit_file_browser_message_get_view_class_init (GeditFileBrowserMessageGetViewCl
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageGetViewPrivate));
}
static void
gedit_file_browser_message_get_view_init (GeditFileBrowserMessageGetView *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_GET_VIEW_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_get_view_get_instance_private (message);
}
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-get-view.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,8 +3,8 @@
* gedit-file-browser-message-id-location.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2013 - Garrett Regier
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -29,8 +29,6 @@
#include "gedit-file-browser-message-id-location.h"
#include "gio/gio.h"
#define GEDIT_FILE_BROWSER_MESSAGE_ID_LOCATION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_ID_LOCATION, GeditFileBrowserMessageIdLocationPrivate))
enum
{
PROP_0,
......@@ -49,7 +47,11 @@ struct _GeditFileBrowserMessageIdLocationPrivate
gboolean is_directory;
};
G_DEFINE_TYPE (GeditFileBrowserMessageIdLocation, gedit_file_browser_message_id_location, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageIdLocation,
gedit_file_browser_message_id_location,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageIdLocation))
static void
gedit_file_browser_message_id_location_finalize (GObject *obj)
......@@ -181,12 +183,10 @@ gedit_file_browser_message_id_location_class_init (GeditFileBrowserMessageIdLoca
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageIdLocationPrivate));
}
static void
gedit_file_browser_message_id_location_init (GeditFileBrowserMessageIdLocation *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_ID_LOCATION_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_id_location_get_instance_private (message);
}
......@@ -3,7 +3,8 @@
* gedit-file-browser-message-id-location.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2013 - Garrett Regier
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-id.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -27,8 +27,6 @@
#include "gedit-file-browser-message-id.h"
#define GEDIT_FILE_BROWSER_MESSAGE_ID_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_ID, GeditFileBrowserMessageIdPrivate))
enum
{
PROP_0,
......@@ -41,7 +39,11 @@ struct _GeditFileBrowserMessageIdPrivate
guint id;
};
G_DEFINE_TYPE (GeditFileBrowserMessageId, gedit_file_browser_message_id, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageId,
gedit_file_browser_message_id,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageId))
static void
gedit_file_browser_message_id_get_property (GObject *obj,
......@@ -98,12 +100,10 @@ gedit_file_browser_message_id_class_init (GeditFileBrowserMessageIdClass *klass)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageIdPrivate));
}
static void
gedit_file_browser_message_id_init (GeditFileBrowserMessageId *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_ID_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_id_get_instance_private (message);
}
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-id.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-set-emblem.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -27,8 +27,6 @@
#include "gedit-file-browser-message-set-emblem.h"
#define GEDIT_FILE_BROWSER_MESSAGE_SET_EMBLEM_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_SET_EMBLEM, GeditFileBrowserMessageSetEmblemPrivate))
enum
{
PROP_0,
......@@ -43,7 +41,11 @@ struct _GeditFileBrowserMessageSetEmblemPrivate
gchar *emblem;
};
G_DEFINE_TYPE (GeditFileBrowserMessageSetEmblem, gedit_file_browser_message_set_emblem, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageSetEmblem,
gedit_file_browser_message_set_emblem,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageSetEmblem))
static void
gedit_file_browser_message_set_emblem_finalize (GObject *obj)
......@@ -133,12 +135,10 @@ gedit_file_browser_message_set_emblem_class_init (GeditFileBrowserMessageSetEmbl
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageSetEmblemPrivate));
}
static void
gedit_file_browser_message_set_emblem_init (GeditFileBrowserMessageSetEmblem *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_SET_EMBLEM_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_set_emblem_get_instance_private (message);
}
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-set-emblem.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -4,6 +4,7 @@
* This file is part of gedit
*
* Copyright (C) 2013 - Garrett Regier
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -27,8 +28,6 @@
#include "gedit-file-browser-message-set-markup.h"
#define GEDIT_FILE_BROWSER_MESSAGE_SET_MARKUP_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_SET_MARKUP, GeditFileBrowserMessageSetMarkupPrivate))
enum
{
PROP_0,
......@@ -43,7 +42,11 @@ struct _GeditFileBrowserMessageSetMarkupPrivate
gchar *markup;
};
G_DEFINE_TYPE (GeditFileBrowserMessageSetMarkup, gedit_file_browser_message_set_markup, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageSetMarkup,
gedit_file_browser_message_set_markup,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageSetMarkup))
static void
gedit_file_browser_message_set_markup_finalize (GObject *obj)
......@@ -133,12 +136,10 @@ gedit_file_browser_message_set_markup_class_init (GeditFileBrowserMessageSetMark
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageSetMarkupPrivate));
}
static void
gedit_file_browser_message_set_markup_init (GeditFileBrowserMessageSetMarkup *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_SET_MARKUP_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_set_markup_get_instance_private (message);
}
......@@ -4,6 +4,7 @@
* This file is part of gedit
*
* Copyright (C) 2013 - Garrett Regier
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-set-root.c
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -28,8 +28,6 @@
#include "gedit-file-browser-message-set-root.h"
#include "gio/gio.h"
#define GEDIT_FILE_BROWSER_MESSAGE_SET_ROOT_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), GEDIT_TYPE_FILE_BROWSER_MESSAGE_SET_ROOT, GeditFileBrowserMessageSetRootPrivate))
enum
{
PROP_0,
......@@ -44,7 +42,11 @@ struct _GeditFileBrowserMessageSetRootPrivate
gchar *virtual;
};
G_DEFINE_TYPE (GeditFileBrowserMessageSetRoot, gedit_file_browser_message_set_root, GEDIT_TYPE_MESSAGE)
G_DEFINE_TYPE_EXTENDED (GeditFileBrowserMessageSetRoot,
gedit_file_browser_message_set_root,
GEDIT_TYPE_MESSAGE,
0,
G_ADD_PRIVATE (GeditFileBrowserMessageSetRoot))
static void
gedit_file_browser_message_set_root_finalize (GObject *obj)
......@@ -140,12 +142,10 @@ gedit_file_browser_message_set_root_class_init (GeditFileBrowserMessageSetRootCl
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GeditFileBrowserMessageSetRootPrivate));
}
static void
gedit_file_browser_message_set_root_init (GeditFileBrowserMessageSetRoot *message)
{
message->priv = GEDIT_FILE_BROWSER_MESSAGE_SET_ROOT_GET_PRIVATE (message);
message->priv = gedit_file_browser_message_set_root_get_instance_private (message);
}
......@@ -3,7 +3,7 @@
* gedit-file-browser-message-set-root.h
* This file is part of gedit
*
* Copyright (C) 2011 - Jesse van den Kieboom
* Copyright (C) 2014 - Jesse van den Kieboom
*
* gedit is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -52,7 +52,8 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditModelinePlugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_VIEW_ACTIVATABLE,
gedit_view_activatable_iface_init))
gedit_view_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (GeditModelinePlugin))
static void
gedit_modeline_plugin_constructed (GObject *object)
......@@ -73,9 +74,7 @@ gedit_modeline_plugin_init (GeditModelinePlugin *plugin)
{
gedit_debug_message (DEBUG_PLUGINS, "GeditModelinePlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
GEDIT_TYPE_MODELINE_PLUGIN,
GeditModelinePluginPrivate);
plugin->priv = gedit_modeline_plugin_get_instance_private (plugin);
}
......@@ -200,8 +199,6 @@ gedit_modeline_plugin_class_init (GeditModelinePluginClass *klass)
object_class->get_property = gedit_modeline_plugin_get_property;
g_object_class_override_property (object_class, PROP_VIEW, "view");
g_type_class_add_private (klass, sizeof (GeditModelinePluginPrivate));
}
static void
......
......@@ -34,20 +34,9 @@
#include <gedit/gedit-app-activatable.h>
#include <gedit/gedit-window-activatable.h>
#define GEDIT_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GEDIT_TYPE_SORT_PLUGIN, GeditSortPluginPrivate))
static void gedit_app_activatable_iface_init (GeditAppActivatableInterface *iface);
static void gedit_window_activatable_iface_init (GeditWindowActivatableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditSortPlugin,
gedit_sort_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_APP_ACTIVATABLE,
gedit_app_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_WINDOW_ACTIVATABLE,
gedit_window_activatable_iface_init))
struct _GeditSortPluginPrivate
{
GeditWindow *window;
......@@ -81,6 +70,16 @@ enum
PROP_APP
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditSortPlugin,
gedit_sort_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_APP_ACTIVATABLE,
gedit_app_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_WINDOW_ACTIVATABLE,
gedit_window_activatable_iface_init)
G_ADD_PRIVATE_DYNAMIC (GeditSortPlugin))
static void sort_real (GeditSortPlugin *plugin);
static void
......@@ -488,9 +487,7 @@ gedit_sort_plugin_init (GeditSortPlugin *plugin)
{
gedit_debug_message (DEBUG_PLUGINS, "GeditSortPlugin initializing");
plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin,
GEDIT_TYPE_SORT_PLUGIN,
GeditSortPluginPrivate);
plugin->priv = gedit_sort_plugin_get_instance_private (plugin);
}
static void
......@@ -573,8 +570,6 @@ gedit_sort_plugin_class_init (GeditSortPluginClass *klass)
g_object_class_override_property (object_class, PROP_WINDOW, "window");
g_object_class_override_property (object_class, PROP_APP, "app");
g_type_class_add_private (klass, sizeof (GeditSortPluginPrivate));
}
static void
......
......@@ -52,19 +52,8 @@
#define GEDIT_AUTOMATIC_SPELL_VIEW "GeditAutomaticSpellView"
#define GEDIT_SPELL_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
GEDIT_TYPE_SPELL_PLUGIN, \
GeditSpellPluginPrivate))
static void gedit_window_activatable_iface_init (GeditWindowActivatableInterface *iface);
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditSpellPlugin,
gedit_spell_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
G_IMPLEMENT_INTERFACE_DYNAMIC (GEDIT_TYPE_WINDOW_ACTIVATABLE,
gedit_window_activatable_iface_init))
struct _GeditSpellPluginPrivate
{
GeditWindow *window;
......@@ -93,6 +82,14 @@ enum
PROP_WINDOW
};
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditSpellPlugin,
gedit_spell_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,