From 45f90fb61bacf708b2ab3f5247636656c7406e65 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Wed, 27 Aug 2008 13:12:11 -0500 Subject: [PATCH] Renamed MOO_PLUGIN_DEFINE_FULL to MOO_PLUGIN_DEFINE --- moo/mooedit/mooplugin-macro.h | 29 +++++++++++++++++++++--- moo/mooedit/plugins/ctags/ctags-plugin.c | 8 +++---- moo/mooedit/plugins/moofilelist.c | 6 ++--- moo/mooedit/plugins/moofileselector.c | 10 ++++---- moo/mooedit/plugins/moofind.c | 6 ++--- 5 files changed, 41 insertions(+), 18 deletions(-) diff --git a/moo/mooedit/mooplugin-macro.h b/moo/mooedit/mooplugin-macro.h index b2c6dc87..f4b102e1 100644 --- a/moo/mooedit/mooplugin-macro.h +++ b/moo/mooedit/mooplugin-macro.h @@ -35,6 +35,7 @@ static const MooPluginInfo plugin_name__##_plugin_info = \ #define MOO_PLUGIN_DEFINE_FULL(Name__,name__, \ + class_init_code__,instance_init_code__, \ attach_win__,detach_win__, \ attach_doc__,detach_doc__, \ prefs_page_func__, \ @@ -60,6 +61,10 @@ name__##_plugin_class_init (MooPluginClass *klass) \ klass->attach_doc = attach_doc__; \ klass->detach_doc = detach_doc__; \ klass->create_prefs_page = prefs_page_func__; \ + \ + { \ + class_init_code__ ; \ + } \ } \ \ static void \ @@ -67,6 +72,10 @@ name__##_plugin_instance_init (MooPlugin *plugin) \ { \ plugin->win_plugin_type = WIN_PLUGIN_TYPE__; \ plugin->doc_plugin_type = DOC_PLUGIN_TYPE__; \ + \ + { \ + instance_init_code__ ; \ + } \ } \ \ static GType name__##_plugin_get_type (void) G_GNUC_CONST; \ @@ -92,12 +101,24 @@ name__##_plugin_get_type (void) \ }; \ \ type__ = g_type_register_static (MOO_TYPE_PLUGIN, \ - #Name__ "Plugin", &info__, 0); \ + #Name__ "Plugin", &info__, \ + (GTypeFlags) 0); \ } \ \ return type__; \ } +#define MOO_PLUGIN_DEFINE(Name__,name__, \ + attach_win__,detach_win__, \ + attach_doc__,detach_doc__, \ + prefs_page_func__, \ + WIN_PLUGIN_TYPE__,DOC_PLUGIN_TYPE__) \ +MOO_PLUGIN_DEFINE_FULL(Name__,name__, \ + {},{}, \ + attach_win__,detach_win__, \ + attach_doc__,detach_doc__, \ + prefs_page_func__, \ + WIN_PLUGIN_TYPE__,DOC_PLUGIN_TYPE__) #define MOO_WIN_PLUGIN_DEFINE(Name__,name__) \ \ @@ -140,7 +161,8 @@ name__##_window_plugin_get_type (void) }; \ \ type__ = g_type_register_static (MOO_TYPE_WIN_PLUGIN, \ - #Name__ "WindowPlugin",&info__, 0); \ + #Name__ "WindowPlugin",&info__, \ + (GTypeFlags) 0); \ } \ \ return type__; \ @@ -188,7 +210,8 @@ name__##_doc_plugin_get_type (void) \ }; \ \ type__ = g_type_register_static (MOO_TYPE_DOC_PLUGIN, \ - #Name__ "DocPlugin", &info__, 0); \ + #Name__ "DocPlugin", &info__, \ + (GTypeFlags) 0); \ } \ \ return type__; \ diff --git a/moo/mooedit/plugins/ctags/ctags-plugin.c b/moo/mooedit/plugins/ctags/ctags-plugin.c index 484a8671..7bbb1dc8 100644 --- a/moo/mooedit/plugins/ctags/ctags-plugin.c +++ b/moo/mooedit/plugins/ctags/ctags-plugin.c @@ -158,10 +158,10 @@ MOO_PLUGIN_DEFINE_INFO (ctags, "Ctags", "Shows functions in the open document", "Christian Dywan ", MOO_VERSION, NULL) MOO_WIN_PLUGIN_DEFINE (Ctags, ctags) -MOO_PLUGIN_DEFINE_FULL (Ctags, ctags, - NULL, NULL, NULL, NULL, NULL, - ctags_window_plugin_get_type (), - MOO_TYPE_CTAGS_DOC_PLUGIN) +MOO_PLUGIN_DEFINE (Ctags, ctags, + NULL, NULL, NULL, NULL, NULL, + ctags_window_plugin_get_type (), + MOO_TYPE_CTAGS_DOC_PLUGIN) gboolean _moo_ctags_plugin_init (void) diff --git a/moo/mooedit/plugins/moofilelist.c b/moo/mooedit/plugins/moofilelist.c index 942ede01..35245f78 100644 --- a/moo/mooedit/plugins/moofilelist.c +++ b/moo/mooedit/plugins/moofilelist.c @@ -2403,9 +2403,9 @@ MOO_PLUGIN_DEFINE_INFO (file_list, "Yevgen Muntyan ", MOO_VERSION, NULL) MOO_WIN_PLUGIN_DEFINE (FileList, file_list) -MOO_PLUGIN_DEFINE_FULL (FileList, file_list, - NULL, NULL, NULL, NULL, NULL, - file_list_window_plugin_get_type (), 0) +MOO_PLUGIN_DEFINE (FileList, file_list, + NULL, NULL, NULL, NULL, NULL, + file_list_window_plugin_get_type (), 0) gboolean diff --git a/moo/mooedit/plugins/moofileselector.c b/moo/mooedit/plugins/moofileselector.c index 6623bae5..4dfe6ad4 100644 --- a/moo/mooedit/plugins/moofileselector.c +++ b/moo/mooedit/plugins/moofileselector.c @@ -1294,11 +1294,11 @@ MOO_PLUGIN_DEFINE_INFO (file_selector, N_("File selector pane for editor window"), "Yevgen Muntyan ", MOO_VERSION, NULL) -MOO_PLUGIN_DEFINE_FULL (FileSelector, file_selector, - file_selector_plugin_attach, file_selector_plugin_detach, - NULL, NULL, - _moo_file_selector_prefs_page, - 0, 0) +MOO_PLUGIN_DEFINE (FileSelector, file_selector, + file_selector_plugin_attach, file_selector_plugin_detach, + NULL, NULL, + _moo_file_selector_prefs_page, + 0, 0) static gpointer diff --git a/moo/mooedit/plugins/moofind.c b/moo/mooedit/plugins/moofind.c index 8ecf5d56..e85590a3 100644 --- a/moo/mooedit/plugins/moofind.c +++ b/moo/mooedit/plugins/moofind.c @@ -1068,9 +1068,9 @@ MOO_PLUGIN_DEFINE_INFO (find, "Yevgen Muntyan ", MOO_VERSION, NULL) MOO_WIN_PLUGIN_DEFINE (Find, find) -MOO_PLUGIN_DEFINE_FULL (Find, find, - NULL, NULL, NULL, NULL, NULL, - find_window_plugin_get_type (), 0) +MOO_PLUGIN_DEFINE (Find, find, + NULL, NULL, NULL, NULL, NULL, + find_window_plugin_get_type (), 0) gboolean