[gedit/libgpe: 5/18] Port C plugins to the libgpe API



commit cd020ebeeb9efefb9104006372d1e9da4f702d9d
Author: Steve Frécinaux <code istique net>
Date:   Sun Nov 1 18:40:23 2009 +0100

    Port C plugins to the libgpe API

 gedit/gedit-plugin.h                            |   18 +++++-------------
 plugins/changecase/gedit-changecase-plugin.c    |    9 +++++----
 plugins/changecase/gedit-changecase-plugin.h    |    2 +-
 plugins/checkupdate/gedit-check-update-plugin.h |    2 +-
 plugins/docinfo/gedit-docinfo-plugin.c          |   11 ++++++-----
 plugins/docinfo/gedit-docinfo-plugin.h          |    2 +-
 plugins/filebrowser/gedit-file-browser-plugin.c |   10 +++++-----
 plugins/filebrowser/gedit-file-browser-plugin.h |    2 +-
 plugins/indent/gedit-indent-plugin.c            |    9 +++++----
 plugins/indent/gedit-indent-plugin.h            |    2 +-
 plugins/modelines/gedit-modeline-plugin.c       |    9 +++++----
 plugins/modelines/gedit-modeline-plugin.h       |    2 +-
 plugins/sort/gedit-sort-plugin.c                |   11 ++++++-----
 plugins/sort/gedit-sort-plugin.h                |    2 +-
 plugins/spell/gedit-spell-plugin.c              |   13 +++++++------
 plugins/spell/gedit-spell-plugin.h              |    2 +-
 plugins/taglist/gedit-taglist-plugin.c          |   10 +++++-----
 plugins/taglist/gedit-taglist-plugin.h          |    2 +-
 plugins/time/gedit-time-plugin.c                |   15 ++++++++-------
 plugins/time/gedit-time-plugin.h                |    2 +-
 20 files changed, 67 insertions(+), 68 deletions(-)
---
diff --git a/gedit/gedit-plugin.h b/gedit/gedit-plugin.h
index 2176252..da2e8bd 100644
--- a/gedit/gedit-plugin.h
+++ b/gedit/gedit-plugin.h
@@ -94,7 +94,7 @@ plugin_name##_class_finalize (PluginName##Class *klass)				\
 										\
 										\
 G_MODULE_EXPORT GType								\
-register_gedit_plugin (GTypeModule *type_module)				\
+register_gpe_plugin (GTypeModule *type_module)				\
 {										\
 	plugin_name##_register_type (type_module);				\
 										\
@@ -169,7 +169,7 @@ object_name##_register_type (GTypeModule *type_module)				\
  *
  * Utility macro used to register gobject types in plugins.
  *
- * Deprecated: use G_DEFINE_DYNAMIC instead
+ * Deprecated: use G_DEFINE_DYNAMIC_TYPE instead
  */
 #define GEDIT_PLUGIN_DEFINE_TYPE(ObjectName, object_name, PARENT_TYPE)		\
 	GEDIT_PLUGIN_DEFINE_TYPE_WITH_CODE(ObjectName, object_name, PARENT_TYPE, ;)
@@ -178,19 +178,11 @@ object_name##_register_type (GTypeModule *type_module)				\
  * GEDIT_PLUGIN_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init):
  *
  * Utility macro used to register interfaces for gobject types in plugins.
+ *
+ * Deprecated: use G_IMPLEMENT_INTERFACE instead.
  */
 #define GEDIT_PLUGIN_IMPLEMENT_INTERFACE(object_name, TYPE_IFACE, iface_init)	\
-	const GInterfaceInfo object_name##_interface_info = 			\
-	{ 									\
-		(GInterfaceInitFunc) iface_init,				\
-		NULL, 								\
-		NULL								\
-	};									\
-										\
-	g_type_module_add_interface (type_module, 					\
-				     g_define_type_id, 				\
-				     TYPE_IFACE, 				\
-				     &object_name##_interface_info);
+	G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)
 
 G_END_DECLS
 
diff --git a/plugins/changecase/gedit-changecase-plugin.c b/plugins/changecase/gedit-changecase-plugin.c
index 8544aeb..1e2a77d 100644
--- a/plugins/changecase/gedit-changecase-plugin.c
+++ b/plugins/changecase/gedit-changecase-plugin.c
@@ -30,6 +30,7 @@
 #include <gmodule.h>
 
 #include <gedit/gedit-debug.h>
+#include <gedit/gedit-window.h>
 
 #define WINDOW_DATA_KEY "GeditChangecasePluginWindowData"
 
@@ -385,11 +386,11 @@ static void
 gedit_changecase_plugin_class_init (GeditChangecasePluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = gedit_changecase_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_update_ui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_update_ui;
 }
diff --git a/plugins/changecase/gedit-changecase-plugin.h b/plugins/changecase/gedit-changecase-plugin.h
index 9587928..40bb793 100644
--- a/plugins/changecase/gedit-changecase-plugin.h
+++ b/plugins/changecase/gedit-changecase-plugin.h
@@ -65,7 +65,7 @@ struct _GeditChangecasePluginClass
 GType	gedit_changecase_plugin_get_type		(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/checkupdate/gedit-check-update-plugin.h b/plugins/checkupdate/gedit-check-update-plugin.h
index 68dc7f9..eed6167 100644
--- a/plugins/checkupdate/gedit-check-update-plugin.h
+++ b/plugins/checkupdate/gedit-check-update-plugin.h
@@ -67,7 +67,7 @@ struct _GeditCheckUpdatePluginClass
 GType	gedit_check_update_plugin_get_type	(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/docinfo/gedit-docinfo-plugin.c b/plugins/docinfo/gedit-docinfo-plugin.c
index ce234e9..747aaf4 100644
--- a/plugins/docinfo/gedit-docinfo-plugin.c
+++ b/plugins/docinfo/gedit-docinfo-plugin.c
@@ -34,6 +34,7 @@
 
 #include <gedit/gedit-debug.h>
 #include <gedit/gedit-utils.h>
+#include <gedit/gedit-window.h>
 
 #define WINDOW_DATA_KEY "GeditDocInfoWindowData"
 #define MENU_PATH "/MenuBar/ToolsMenu/ToolsOps_2"
@@ -99,7 +100,7 @@ get_docinfo_dialog (GeditWindow *window,
 
 	dialog = g_new (DocInfoDialog, 1);
 
-	data_dir = gedit_plugin_get_data_dir (data->plugin);
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (data->plugin));
 	ui_file = g_build_filename (data_dir, "docinfo.ui", NULL);
 	ret = gedit_utils_get_ui_objects (ui_file,
 					  NULL,
@@ -570,11 +571,11 @@ static void
 gedit_docinfo_plugin_class_init (GeditDocInfoPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = gedit_docinfo_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_update_ui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_update_ui;
 }
diff --git a/plugins/docinfo/gedit-docinfo-plugin.h b/plugins/docinfo/gedit-docinfo-plugin.h
index 36d6bdd..92e13c2 100644
--- a/plugins/docinfo/gedit-docinfo-plugin.h
+++ b/plugins/docinfo/gedit-docinfo-plugin.h
@@ -68,7 +68,7 @@ struct _GeditDocInfoPluginClass
 GType	gedit_docinfo_plugin_get_type		(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.c b/plugins/filebrowser/gedit-file-browser-plugin.c
index ba37e20..ff55aeb 100644
--- a/plugins/filebrowser/gedit-file-browser-plugin.c
+++ b/plugins/filebrowser/gedit-file-browser-plugin.c
@@ -692,7 +692,7 @@ impl_activate (GeditPlugin * plugin, GeditWindow * window)
 
 	data = g_new0 (GeditFileBrowserPluginData, 1);
 	
-	data_dir = gedit_plugin_get_data_dir (plugin);
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (plugin));
 	data->tree_widget = GEDIT_FILE_BROWSER_WIDGET (gedit_file_browser_widget_new (data_dir));
 	g_free (data_dir);
 
@@ -828,13 +828,13 @@ static void
 filetree_plugin_class_init (GeditFileBrowserPluginClass * klass)
 {
 	GObjectClass  *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass * plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass * plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = filetree_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_updateui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_updateui;
 
 	g_type_class_add_private (object_class,
 				  sizeof (GeditFileBrowserPluginPrivate));
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.h b/plugins/filebrowser/gedit-file-browser-plugin.h
index 19ca86b..116090a 100644
--- a/plugins/filebrowser/gedit-file-browser-plugin.h
+++ b/plugins/filebrowser/gedit-file-browser-plugin.h
@@ -63,7 +63,7 @@ struct _GeditFileBrowserPluginClass
 GType filetree_plugin_get_type              (void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule * module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule * module);
 
 G_END_DECLS
 #endif /* __GEDIT_FILE_BROWSER_PLUGIN_H__ */
diff --git a/plugins/indent/gedit-indent-plugin.c b/plugins/indent/gedit-indent-plugin.c
index 138e325..abe3b37 100644
--- a/plugins/indent/gedit-indent-plugin.c
+++ b/plugins/indent/gedit-indent-plugin.c
@@ -30,6 +30,7 @@
 #include <gmodule.h>
 #include <gtksourceview/gtksourceview.h>
 #include <gedit/gedit-debug.h>
+#include <gedit/gedit-window.h>
 
 
 #define WINDOW_DATA_KEY "GeditIndentPluginWindowData"
@@ -322,11 +323,11 @@ static void
 gedit_indent_plugin_class_init (GeditIndentPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = gedit_indent_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_update_ui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_update_ui;
 }
diff --git a/plugins/indent/gedit-indent-plugin.h b/plugins/indent/gedit-indent-plugin.h
index ae518a4..9623881 100644
--- a/plugins/indent/gedit-indent-plugin.h
+++ b/plugins/indent/gedit-indent-plugin.h
@@ -68,7 +68,7 @@ struct _GeditIndentPluginClass
 GType	gedit_indent_plugin_get_type		(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/modelines/gedit-modeline-plugin.c b/plugins/modelines/gedit-modeline-plugin.c
index 49fc2f6..f3ba0e0 100644
--- a/plugins/modelines/gedit-modeline-plugin.c
+++ b/plugins/modelines/gedit-modeline-plugin.c
@@ -30,6 +30,7 @@
 
 #include <gedit/gedit-debug.h>
 #include <gedit/gedit-utils.h>
+#include <gedit/gedit-window.h>
 
 #define WINDOW_DATA_KEY "GeditModelinePluginWindowData"
 #define DOCUMENT_DATA_KEY "GeditModelinePluginDocumentData"
@@ -69,13 +70,13 @@ static void
 gedit_modeline_plugin_class_init (GeditModelinePluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->constructor = gedit_modeline_plugin_constructor;
 	object_class->finalize = gedit_modeline_plugin_finalize;
 
-	plugin_class->activate = gedit_modeline_plugin_activate;
-	plugin_class->deactivate = gedit_modeline_plugin_deactivate;
+	plugin_class->activate = (GPEFunc) gedit_modeline_plugin_activate;
+	plugin_class->deactivate = (GPEFunc) gedit_modeline_plugin_deactivate;
 }
 
 static GObject *
@@ -90,7 +91,7 @@ gedit_modeline_plugin_constructor (GType                  type,
 										   n_construct_properties,
 										   construct_param);
 
-	data_dir = gedit_plugin_get_data_dir (GEDIT_PLUGIN (object));
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (object));
 
 	modeline_parser_init (data_dir);
 
diff --git a/plugins/modelines/gedit-modeline-plugin.h b/plugins/modelines/gedit-modeline-plugin.h
index 92b01e7..3f3cf00 100644
--- a/plugins/modelines/gedit-modeline-plugin.h
+++ b/plugins/modelines/gedit-modeline-plugin.h
@@ -41,7 +41,7 @@ typedef GeditPlugin		GeditModelinePlugin;
 
 GType	gedit_modeline_plugin_get_type		(void) G_GNUC_CONST;
 
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/sort/gedit-sort-plugin.c b/plugins/sort/gedit-sort-plugin.c
index 62ddccb..9a05b73 100644
--- a/plugins/sort/gedit-sort-plugin.c
+++ b/plugins/sort/gedit-sort-plugin.c
@@ -34,6 +34,7 @@
 #include <gedit/gedit-debug.h>
 #include <gedit/gedit-utils.h>
 #include <gedit/gedit-help.h>
+#include <gedit/gedit-window.h>
 
 #define GEDIT_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GEDIT_TYPE_SORT_PLUGIN, GeditSortPluginPrivate))
 
@@ -137,7 +138,7 @@ get_sort_dialog (ActionData *action_data)
 
 	dialog = g_slice_new (SortDialog);
 
-	data_dir = gedit_plugin_get_data_dir (action_data->plugin);
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (action_data->plugin));
 	ui_file = g_build_filename (data_dir, "sort.ui", NULL);
 	g_free (data_dir);
 	ret = gedit_utils_get_ui_objects (ui_file,
@@ -559,11 +560,11 @@ static void
 gedit_sort_plugin_class_init (GeditSortPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = gedit_sort_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_update_ui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_update_ui;
 }
diff --git a/plugins/sort/gedit-sort-plugin.h b/plugins/sort/gedit-sort-plugin.h
index c10280b..64b06b4 100644
--- a/plugins/sort/gedit-sort-plugin.h
+++ b/plugins/sort/gedit-sort-plugin.h
@@ -66,7 +66,7 @@ struct _GeditSortPluginClass
 GType	gedit_sort_plugin_get_type		(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index 0d5fe15..130cd2f 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -35,6 +35,7 @@
 #include <gedit/gedit-metadata-manager.h>
 #include <gedit/gedit-prefs-manager.h>
 #include <gedit/gedit-statusbar.h>
+#include <gedit/gedit-window.h>
 
 #include "gedit-spell-checker.h"
 #include "gedit-spell-checker-dialog.h"
@@ -701,7 +702,7 @@ set_language_cb (GtkAction   *action,
 
 	lang = gedit_spell_checker_get_language (spell);
 
-	data_dir = gedit_plugin_get_data_dir (action_data->plugin);
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (action_data->plugin));
 	dlg = gedit_spell_language_dialog_new (GTK_WINDOW (action_data->window),
 					       lang,
 					       data_dir);
@@ -794,7 +795,7 @@ spell_cb (GtkAction   *action,
 		return;
 	}
 
-	data_dir = gedit_plugin_get_data_dir (action_data->plugin);
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (action_data->plugin));
 	dlg = gedit_spell_checker_dialog_new_from_spell_checker (spell, data_dir);
 	g_free (data_dir);
 	gtk_window_set_modal (GTK_WINDOW (dlg), TRUE);
@@ -1014,13 +1015,13 @@ static void
 gedit_spell_plugin_class_init (GeditSpellPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = gedit_spell_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_update_ui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_update_ui;
 
 	if (spell_checker_id == 0)
 		spell_checker_id = g_quark_from_string ("GeditSpellCheckerID");
diff --git a/plugins/spell/gedit-spell-plugin.h b/plugins/spell/gedit-spell-plugin.h
index 7de5807..97754df 100644
--- a/plugins/spell/gedit-spell-plugin.h
+++ b/plugins/spell/gedit-spell-plugin.h
@@ -68,7 +68,7 @@ struct _GeditSpellPluginClass
 GType	gedit_spell_plugin_get_type		(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/taglist/gedit-taglist-plugin.c b/plugins/taglist/gedit-taglist-plugin.c
index 081fefc..397ac0f 100644
--- a/plugins/taglist/gedit-taglist-plugin.c
+++ b/plugins/taglist/gedit-taglist-plugin.c
@@ -89,7 +89,7 @@ impl_activate (GeditPlugin *plugin,
 	
 	side_panel = gedit_window_get_side_panel (window);
 	
-	data_dir = gedit_plugin_get_data_dir (plugin);
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (plugin));
 	taglist_panel = gedit_taglist_plugin_panel_new (window, data_dir);
 	g_free (data_dir);
 	
@@ -148,13 +148,13 @@ static void
 gedit_taglist_plugin_class_init (GeditTaglistPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = gedit_taglist_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_update_ui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_update_ui;
 
 	g_type_class_add_private (object_class, sizeof (GeditTaglistPluginPrivate));
 }
diff --git a/plugins/taglist/gedit-taglist-plugin.h b/plugins/taglist/gedit-taglist-plugin.h
index d0444e7..56f1ca6 100644
--- a/plugins/taglist/gedit-taglist-plugin.h
+++ b/plugins/taglist/gedit-taglist-plugin.h
@@ -78,7 +78,7 @@ struct _GeditTaglistPluginClass
 GType	gedit_taglist_plugin_get_type		(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 
diff --git a/plugins/time/gedit-time-plugin.c b/plugins/time/gedit-time-plugin.c
index 441e2b2..cae07d0 100644
--- a/plugins/time/gedit-time-plugin.c
+++ b/plugins/time/gedit-time-plugin.c
@@ -44,6 +44,7 @@
 
 #include <gedit/gedit-debug.h>
 #include <gedit/gedit-utils.h>
+#include <gedit/gedit-window.h>
 
 #define GEDIT_TIME_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
 					      GEDIT_TYPE_TIME_PLUGIN, \
@@ -784,7 +785,7 @@ get_configure_dialog (GeditTimePlugin *plugin)
 
 	g_return_val_if_fail (dialog->dialog != NULL, NULL);
 
-	data_dir = gedit_plugin_get_data_dir (GEDIT_PLUGIN (plugin));
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (plugin));
 	ui_file = g_build_filename (data_dir, "gedit-time-setup-dialog.ui", NULL);
 	ret = gedit_utils_get_ui_objects (ui_file,
 					  root_objects,
@@ -943,7 +944,7 @@ get_choose_format_dialog (GtkWindow                 *parent,
 
 	dialog = g_new0 (ChooseFormatDialog, 1);
 
-	data_dir = gedit_plugin_get_data_dir (GEDIT_PLUGIN (plugin));
+	data_dir = gpe_plugin_get_data_dir (GPE_PLUGIN (plugin));
 	ui_file = g_build_filename (data_dir, "gedit-time-dialog.ui", NULL);
 	ret = gedit_utils_get_ui_objects (ui_file,
 					  NULL,
@@ -1237,7 +1238,7 @@ configure_dialog_response_cb (GtkWidget           *widget,
 }
 
 static GtkWidget *
-impl_create_configure_dialog (GeditPlugin *plugin)
+impl_create_configure_dialog (GPEPlugin *plugin)
 {
 	TimeConfigureDialog *dialog;
 
@@ -1257,13 +1258,13 @@ static void
 gedit_time_plugin_class_init (GeditTimePluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->finalize = gedit_time_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->update_ui = impl_update_ui;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->update_ui = (GPEFunc) impl_update_ui;
 
 	plugin_class->create_configure_dialog = impl_create_configure_dialog;
 
diff --git a/plugins/time/gedit-time-plugin.h b/plugins/time/gedit-time-plugin.h
index 6d59826..e256821 100644
--- a/plugins/time/gedit-time-plugin.h
+++ b/plugins/time/gedit-time-plugin.h
@@ -71,7 +71,7 @@ struct _GeditTimePluginClass
 GType	gedit_time_plugin_get_type		(void) G_GNUC_CONST;
 
 /* All the plugins must implement this function */
-G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
+G_MODULE_EXPORT GType register_gpe_plugin (GTypeModule *module);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]