[gedit/eggplugins] Update all the C plugins to the new API



commit 5bf2fd22cb0000db6ff55492bcdccaea9ba0b2e6
Author: Steve Frécinaux <code istique net>
Date:   Sun Oct 11 23:22:45 2009 +0200

    Update all the C plugins to the new API

 libplugins/egg-plugins-plugin.h                  |    2 +
 plugins/changecase/gedit-changecase-plugin.c     |    9 ++++---
 plugins/docinfo/gedit-docinfo-plugin.c           |   11 +++++----
 plugins/filebrowser/gedit-file-bookmarks-store.c |   13 +++++++++++-
 plugins/filebrowser/gedit-file-bookmarks-store.h |    2 +-
 plugins/filebrowser/gedit-file-browser-plugin.c  |   18 ++++++++--------
 plugins/filebrowser/gedit-file-browser-store.c   |   24 +++++++++++++++------
 plugins/filebrowser/gedit-file-browser-store.h   |    2 +-
 plugins/filebrowser/gedit-file-browser-view.c    |   16 +++++++++++--
 plugins/filebrowser/gedit-file-browser-view.h    |    2 +-
 plugins/filebrowser/gedit-file-browser-widget.c  |   14 +++++++++++-
 plugins/filebrowser/gedit-file-browser-widget.h  |    2 +-
 plugins/indent/gedit-indent-plugin.c             |    9 ++++---
 plugins/modelines/gedit-modeline-plugin.c        |    9 ++++---
 plugins/sort/gedit-sort-plugin.c                 |   11 +++++----
 plugins/spell/gedit-spell-plugin.c               |   12 +++++-----
 plugins/taglist/gedit-taglist-plugin-panel.c     |   13 +++++++++++-
 plugins/taglist/gedit-taglist-plugin-panel.h     |    2 +-
 plugins/taglist/gedit-taglist-plugin.c           |   12 +++++-----
 plugins/time/gedit-time-plugin.c                 |   13 ++++++-----
 20 files changed, 128 insertions(+), 68 deletions(-)
---
diff --git a/libplugins/egg-plugins-plugin.h b/libplugins/egg-plugins-plugin.h
index 9de08b8..ef36596 100644
--- a/libplugins/egg-plugins-plugin.h
+++ b/libplugins/egg-plugins-plugin.h
@@ -63,6 +63,8 @@ struct _EggPluginsPlugin
 /*
  * Class definition
  */
+typedef void (*EggPluginsFunc) (EggPluginsPlugin *plugin, GObject *target_object);
+
 typedef struct _EggPluginsPluginClass EggPluginsPluginClass;
 
 struct _EggPluginsPluginClass
diff --git a/plugins/changecase/gedit-changecase-plugin.c b/plugins/changecase/gedit-changecase-plugin.c
index 8544aeb..29322da 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);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_update_ui;
 }
diff --git a/plugins/docinfo/gedit-docinfo-plugin.c b/plugins/docinfo/gedit-docinfo-plugin.c
index ce234e9..23ceb73 100644
--- a/plugins/docinfo/gedit-docinfo-plugin.c
+++ b/plugins/docinfo/gedit-docinfo-plugin.c
@@ -33,6 +33,7 @@
 #include <gmodule.h>
 
 #include <gedit/gedit-debug.h>
+#include <gedit/gedit-window.h>
 #include <gedit/gedit-utils.h>
 
 #define WINDOW_DATA_KEY "GeditDocInfoWindowData"
@@ -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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_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);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_update_ui;
 }
diff --git a/plugins/filebrowser/gedit-file-bookmarks-store.c b/plugins/filebrowser/gedit-file-bookmarks-store.c
index d53bfd4..c063e06 100644
--- a/plugins/filebrowser/gedit-file-bookmarks-store.c
+++ b/plugins/filebrowser/gedit-file-bookmarks-store.c
@@ -56,7 +56,7 @@ static gboolean find_with_flags       (GtkTreeModel * model,
                                        guint flags,
                                        guint notflags);
 
-GEDIT_PLUGIN_DEFINE_TYPE(GeditFileBookmarksStore, gedit_file_bookmarks_store, GTK_TYPE_TREE_STORE)
+G_DEFINE_DYNAMIC_TYPE(GeditFileBookmarksStore, gedit_file_bookmarks_store, GTK_TYPE_TREE_STORE)
 
 static void
 gedit_file_bookmarks_store_dispose (GObject * object)
@@ -98,6 +98,11 @@ gedit_file_bookmarks_store_class_init (GeditFileBookmarksStoreClass *klass)
 }
 
 static void
+gedit_file_bookmarks_store_class_finalize (GeditFileBookmarksStoreClass *klass)
+{
+}
+
+static void
 gedit_file_bookmarks_store_init (GeditFileBookmarksStore * obj)
 {
 	obj->priv = GEDIT_FILE_BOOKMARKS_STORE_GET_PRIVATE (obj);
@@ -876,4 +881,10 @@ on_bookmarks_file_changed (GFileMonitor * monitor,
 	}
 }
 
+void
+gedit_file_bookmarks_store_register (GTypeModule *module)
+{
+	gedit_file_bookmarks_store_register_type (module);
+}
+
 // ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-bookmarks-store.h b/plugins/filebrowser/gedit-file-bookmarks-store.h
index bd20911..7291fb4 100644
--- a/plugins/filebrowser/gedit-file-bookmarks-store.h
+++ b/plugins/filebrowser/gedit-file-bookmarks-store.h
@@ -77,7 +77,7 @@ struct _GeditFileBookmarksStoreClass
 };
 
 GType gedit_file_bookmarks_store_get_type               (void) G_GNUC_CONST;
-GType gedit_file_bookmarks_store_register_type          (GTypeModule * module);
+void gedit_file_bookmarks_store_register                (GTypeModule * module);
 
 GeditFileBookmarksStore *gedit_file_bookmarks_store_new (void);
 gchar *gedit_file_bookmarks_store_get_uri               (GeditFileBookmarksStore * model,
diff --git a/plugins/filebrowser/gedit-file-browser-plugin.c b/plugins/filebrowser/gedit-file-browser-plugin.c
index ba37e20..df4b4a3 100644
--- a/plugins/filebrowser/gedit-file-browser-plugin.c
+++ b/plugins/filebrowser/gedit-file-browser-plugin.c
@@ -105,10 +105,10 @@ static gboolean on_confirm_no_trash_cb   (GeditFileBrowserWidget * widget,
 
 GEDIT_PLUGIN_REGISTER_TYPE_WITH_CODE (GeditFileBrowserPlugin, filetree_plugin, 	\
 	gedit_file_browser_enum_and_flag_register_type (type_module);		\
-	gedit_file_browser_store_register_type         (type_module);		\
-	gedit_file_bookmarks_store_register_type       (type_module);		\
-	gedit_file_browser_view_register_type	       (type_module);		\
-	gedit_file_browser_widget_register_type	       (type_module);		\
+	gedit_file_browser_store_register              (type_module);		\
+	gedit_file_bookmarks_store_register            (type_module);		\
+	gedit_file_browser_view_register	       (type_module);		\
+	gedit_file_browser_widget_register	       (type_module);		\
 )
 
 
@@ -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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_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);
+	EggPluginsPluginClass * plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_updateui;
 
 	g_type_class_add_private (object_class,
 				  sizeof (GeditFileBrowserPluginPrivate));
diff --git a/plugins/filebrowser/gedit-file-browser-store.c b/plugins/filebrowser/gedit-file-browser-store.c
index 4a67c32..8b6fe36 100644
--- a/plugins/filebrowser/gedit-file-browser-store.c
+++ b/plugins/filebrowser/gedit-file-browser-store.c
@@ -197,14 +197,13 @@ static void model_check_dummy                               (GeditFileBrowserSto
 static void next_files_async 				    (GFileEnumerator * enumerator,
 							     AsyncNode * async);
 
-GEDIT_PLUGIN_DEFINE_TYPE_WITH_CODE (GeditFileBrowserStore, gedit_file_browser_store,
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (GeditFileBrowserStore, gedit_file_browser_store,
 			G_TYPE_OBJECT,
-			GEDIT_PLUGIN_IMPLEMENT_INTERFACE (gedit_file_browser_store_tree_model,
-							  GTK_TYPE_TREE_MODEL,
-							  gedit_file_browser_store_iface_init)
-			GEDIT_PLUGIN_IMPLEMENT_INTERFACE (gedit_file_browser_store_drag_source,
-							  GTK_TYPE_TREE_DRAG_SOURCE,
-							  gedit_file_browser_store_drag_source_init))
+			0,
+			G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
+					       gedit_file_browser_store_iface_init)
+			G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE,
+					       gedit_file_browser_store_drag_source_init))
 
 /* Properties */
 enum {
@@ -428,6 +427,11 @@ gedit_file_browser_store_class_init (GeditFileBrowserStoreClass * klass)
 }
 
 static void
+gedit_file_browser_store_class_finalize (GeditFileBrowserStoreClass *klass)
+{
+}
+
+static void
 gedit_file_browser_store_iface_init (GtkTreeModelIface * iface)
 {
 	iface->get_flags = gedit_file_browser_store_get_flags;
@@ -3612,4 +3616,10 @@ gedit_file_browser_store_new_directory (GeditFileBrowserStore * model,
 	return result;
 }
 
+void
+gedit_file_browser_store_register (GTypeModule *module)
+{
+	gedit_file_browser_store_register_type (module);
+}
+
 // ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-store.h b/plugins/filebrowser/gedit-file-browser-store.h
index f31da32..b2446ba 100644
--- a/plugins/filebrowser/gedit-file-browser-store.h
+++ b/plugins/filebrowser/gedit-file-browser-store.h
@@ -116,7 +116,7 @@ struct _GeditFileBrowserStoreClass {
 };
 
 GType gedit_file_browser_store_get_type               (void) G_GNUC_CONST;
-GType gedit_file_browser_store_register_type          (GTypeModule * module);
+void  gedit_file_browser_store_register               (GTypeModule * module);
 
 GeditFileBrowserStore *gedit_file_browser_store_new   (gchar const *root);
 
diff --git a/plugins/filebrowser/gedit-file-browser-view.c b/plugins/filebrowser/gedit-file-browser-view.c
index 661b1a9..7b4adda 100644
--- a/plugins/filebrowser/gedit-file-browser-view.c
+++ b/plugins/filebrowser/gedit-file-browser-view.c
@@ -85,8 +85,7 @@ static const GtkTargetEntry drag_source_targets[] = {
 	{ "text/uri-list", 0, 0 }
 };
 
-GEDIT_PLUGIN_DEFINE_TYPE (GeditFileBrowserView, gedit_file_browser_view,
-	                  GTK_TYPE_TREE_VIEW)
+G_DEFINE_DYNAMIC_TYPE (GeditFileBrowserView, gedit_file_browser_view, GTK_TYPE_TREE_VIEW)
 
 static void on_cell_edited 		(GtkCellRendererText 	* cell, 
 				 	 gchar 			* path,
@@ -910,6 +909,11 @@ gedit_file_browser_view_class_init (GeditFileBrowserViewClass * klass)
 }
 
 static void
+gedit_file_browser_view_class_finalize (GeditFileBrowserViewClass * klass)
+{
+}
+
+static void
 cell_data_cb (GtkTreeViewColumn * tree_column, GtkCellRenderer * cell,
 	      GtkTreeModel * tree_model, GtkTreeIter * iter,
 	      GeditFileBrowserView * obj)
@@ -1248,5 +1252,11 @@ on_row_inserted (GeditFileBrowserStore * model,
 
 	gtk_tree_path_free (copy);
 }
-				 
+
+void
+gedit_file_browser_view_register (GTypeModule *module)
+{
+	gedit_file_browser_view_register_type (module);
+}
+
 // ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-view.h b/plugins/filebrowser/gedit-file-browser-view.h
index a5ada25..8a575b5 100644
--- a/plugins/filebrowser/gedit-file-browser-view.h
+++ b/plugins/filebrowser/gedit-file-browser-view.h
@@ -66,7 +66,7 @@ struct _GeditFileBrowserViewClass
 };
 
 GType gedit_file_browser_view_get_type			(void) G_GNUC_CONST;
-GType gedit_file_browser_view_register_type		(GTypeModule 			* module);
+void gedit_file_browser_view_register			(GTypeModule 			* module);
 
 GtkWidget *gedit_file_browser_view_new			(void);
 void gedit_file_browser_view_set_model			(GeditFileBrowserView 		* tree_view,
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index db324fa..81a7b59 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -231,8 +231,7 @@ static void on_action_filter_binary            (GtkAction * action,
 static void on_action_bookmark_open            (GtkAction * action,
 						GeditFileBrowserWidget * obj);
 
-GEDIT_PLUGIN_DEFINE_TYPE (GeditFileBrowserWidget, gedit_file_browser_widget,
-	                  GTK_TYPE_VBOX)
+G_DEFINE_DYNAMIC_TYPE (GeditFileBrowserWidget, gedit_file_browser_widget, GTK_TYPE_VBOX)
 
 static void
 free_name_icon (gpointer data)
@@ -475,6 +474,11 @@ gedit_file_browser_widget_class_init (GeditFileBrowserWidgetClass * klass)
 }
 
 static void
+gedit_file_browser_widget_class_finalize (GeditFileBrowserWidgetClass * klass)
+{
+}
+
+static void
 add_signal (GeditFileBrowserWidget * obj, gpointer object, gulong id)
 {
 	SignalNode *node = g_new (SignalNode, 1);
@@ -3032,4 +3036,10 @@ on_action_bookmark_open (GtkAction * action, GeditFileBrowserWidget * obj)
 		bookmark_open (model, &iter, obj);
 }
 
+void 
+gedit_file_browser_widget_register (GTypeModule *module)
+{
+	gedit_file_browser_widget_register_type (module);
+}
+
 // ex:ts=8:noet:
diff --git a/plugins/filebrowser/gedit-file-browser-widget.h b/plugins/filebrowser/gedit-file-browser-widget.h
index 661497b..6ac92ff 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.h
+++ b/plugins/filebrowser/gedit-file-browser-widget.h
@@ -71,7 +71,7 @@ struct _GeditFileBrowserWidgetClass
 };
 
 GType gedit_file_browser_widget_get_type            (void) G_GNUC_CONST;
-GType gedit_file_browser_widget_register_type       (GTypeModule * module);
+void gedit_file_browser_widget_register             (GTypeModule * module);
 
 GtkWidget *gedit_file_browser_widget_new            (const gchar *data_dir);
 
diff --git a/plugins/indent/gedit-indent-plugin.c b/plugins/indent/gedit-indent-plugin.c
index 138e325..252c61a 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);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_update_ui;
 }
diff --git a/plugins/modelines/gedit-modeline-plugin.c b/plugins/modelines/gedit-modeline-plugin.c
index ba6c9d5..de12e31 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);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) gedit_modeline_plugin_activate;
+	plugin_class->deactivate = (EggPluginsFunc) 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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_PLUGIN (object));
 
 	modeline_parser_init (data_dir);
 
diff --git a/plugins/sort/gedit-sort-plugin.c b/plugins/sort/gedit-sort-plugin.c
index 62ddccb..b3a6138 100644
--- a/plugins/sort/gedit-sort-plugin.c
+++ b/plugins/sort/gedit-sort-plugin.c
@@ -33,6 +33,7 @@
 
 #include <gedit/gedit-debug.h>
 #include <gedit/gedit-utils.h>
+#include <gedit/gedit-window.h>
 #include <gedit/gedit-help.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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_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);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_update_ui;
 }
diff --git a/plugins/spell/gedit-spell-plugin.c b/plugins/spell/gedit-spell-plugin.c
index 0d5fe15..ef5b23d 100644
--- a/plugins/spell/gedit-spell-plugin.c
+++ b/plugins/spell/gedit-spell-plugin.c
@@ -701,7 +701,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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_PLUGIN (action_data->plugin));
 	dlg = gedit_spell_language_dialog_new (GTK_WINDOW (action_data->window),
 					       lang,
 					       data_dir);
@@ -794,7 +794,7 @@ spell_cb (GtkAction   *action,
 		return;
 	}
 
-	data_dir = gedit_plugin_get_data_dir (action_data->plugin);
+	data_dir = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_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 +1014,13 @@ static void
 gedit_spell_plugin_class_init (GeditSpellPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_update_ui;
 
 	if (spell_checker_id == 0)
 		spell_checker_id = g_quark_from_string ("GeditSpellCheckerID");
diff --git a/plugins/taglist/gedit-taglist-plugin-panel.c b/plugins/taglist/gedit-taglist-plugin-panel.c
index d66acc0..0edf0d1 100644
--- a/plugins/taglist/gedit-taglist-plugin-panel.c
+++ b/plugins/taglist/gedit-taglist-plugin-panel.c
@@ -68,7 +68,7 @@ struct _GeditTaglistPluginPanelPrivate
 	gchar *data_dir;
 };
 
-GEDIT_PLUGIN_DEFINE_TYPE (GeditTaglistPluginPanel, gedit_taglist_plugin_panel, GTK_TYPE_VBOX)
+G_DEFINE_DYNAMIC_TYPE (GeditTaglistPluginPanel, gedit_taglist_plugin_panel, GTK_TYPE_VBOX)
 
 enum
 {
@@ -160,6 +160,11 @@ gedit_taglist_plugin_panel_class_init (GeditTaglistPluginPanelClass *klass)
 }
 
 static void
+gedit_taglist_plugin_panel_class_finalize (GeditTaglistPluginPanelClass *klass)
+{
+}
+
+static void
 insert_tag (GeditTaglistPluginPanel *panel,
 	    Tag                     *tag,
 	    gboolean                 grab_focus)
@@ -774,3 +779,9 @@ gedit_taglist_plugin_panel_new (GeditWindow *window,
 	
 	return GTK_WIDGET (panel);
 }
+
+void
+gedit_taglist_plugin_panel_register (GTypeModule *module)
+{
+	gedit_taglist_plugin_panel_register_type (module);
+}
diff --git a/plugins/taglist/gedit-taglist-plugin-panel.h b/plugins/taglist/gedit-taglist-plugin-panel.h
index 3f8e82d..1704d16 100644
--- a/plugins/taglist/gedit-taglist-plugin-panel.h
+++ b/plugins/taglist/gedit-taglist-plugin-panel.h
@@ -77,7 +77,7 @@ struct _GeditTaglistPluginPanelClass
 /*
  * Public methods
  */
-GType		 gedit_taglist_plugin_panel_register_type	(GTypeModule *module);
+void		 gedit_taglist_plugin_panel_register		(GTypeModule *module);
 							
 GType 		 gedit_taglist_plugin_panel_get_type		(void) G_GNUC_CONST;
 
diff --git a/plugins/taglist/gedit-taglist-plugin.c b/plugins/taglist/gedit-taglist-plugin.c
index 081fefc..2dd2d94 100644
--- a/plugins/taglist/gedit-taglist-plugin.c
+++ b/plugins/taglist/gedit-taglist-plugin.c
@@ -51,7 +51,7 @@ struct _GeditTaglistPluginPrivate
 };
 
 GEDIT_PLUGIN_REGISTER_TYPE_WITH_CODE (GeditTaglistPlugin, gedit_taglist_plugin,
-	gedit_taglist_plugin_panel_register_type (module);
+	gedit_taglist_plugin_panel_register (type_module);
 )
 
 static void
@@ -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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_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);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_update_ui;
 
 	g_type_class_add_private (object_class, sizeof (GeditTaglistPluginPrivate));
 }
diff --git a/plugins/time/gedit-time-plugin.c b/plugins/time/gedit-time-plugin.c
index 441e2b2..5db1124 100644
--- a/plugins/time/gedit-time-plugin.c
+++ b/plugins/time/gedit-time-plugin.c
@@ -43,6 +43,7 @@
 #include <gmodule.h>
 
 #include <gedit/gedit-debug.h>
+#include <gedit/gedit-window.h>
 #include <gedit/gedit-utils.h>
 
 #define GEDIT_TIME_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
@@ -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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_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 = egg_plugins_plugin_get_data_dir (EGG_PLUGINS_PLUGIN (plugin));
 	ui_file = g_build_filename (data_dir, "gedit-time-dialog.ui", NULL);
 	ret = gedit_utils_get_ui_objects (ui_file,
 					  NULL,
@@ -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);
+	EggPluginsPluginClass *plugin_class = EGG_PLUGINS_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 = (EggPluginsFunc) impl_activate;
+	plugin_class->deactivate = (EggPluginsFunc) impl_deactivate;
+	plugin_class->update_ui = (EggPluginsFunc) impl_update_ui;
 
 	plugin_class->create_configure_dialog = impl_create_configure_dialog;
 



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