[gedit-plugins/libgpe] Port C plugins to the libgpe API.



commit 88b47949a3c046a438c2f155c453693a2fc1c92c
Author: Steve Frécinaux <code istique net>
Date:   Wed Nov 4 19:54:29 2009 +0100

    Port C plugins to the libgpe API.

 plugins/bookmarks/gedit-bookmarks-plugin.c         |    8 ++++----
 plugins/drawspaces/gedit-drawspaces-plugin.c       |   10 +++++-----
 plugins/showtabbar/gedit-show-tabbar-plugin.c      |    7 ++++---
 .../wordcompletion/gedit-word-completion-plugin.c  |    6 +++---
 4 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/plugins/bookmarks/gedit-bookmarks-plugin.c b/plugins/bookmarks/gedit-bookmarks-plugin.c
index 54155d7..9e3dd3e 100644
--- a/plugins/bookmarks/gedit-bookmarks-plugin.c
+++ b/plugins/bookmarks/gedit-bookmarks-plugin.c
@@ -229,7 +229,7 @@ get_bookmark_pixbuf (GeditPlugin *plugin)
 	gchar *iconpath;
 	GdkPixbuf *pixbuf;
 
-	datadir = gedit_plugin_get_data_dir (plugin);
+	datadir = gpe_plugin_get_data_dir (GPE_PLUGIN (plugin));
 	iconpath = g_build_filename (datadir, "bookmark.png", NULL);
 	pixbuf = gdk_pixbuf_new_from_file (iconpath, NULL);
 
@@ -583,12 +583,12 @@ static void
 gedit_bookmarks_plugin_class_init (GeditBookmarksPluginClass *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_bookmarks_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
 }
 
 static void
diff --git a/plugins/drawspaces/gedit-drawspaces-plugin.c b/plugins/drawspaces/gedit-drawspaces-plugin.c
index a2552d5..1fd17a5 100644
--- a/plugins/drawspaces/gedit-drawspaces-plugin.c
+++ b/plugins/drawspaces/gedit-drawspaces-plugin.c
@@ -599,7 +599,7 @@ get_configuration_dialog (GeditDrawspacesPlugin *plugin)
 
 	dialog = g_slice_new (DrawspacesConfigureDialog);
 
-	datadir = gedit_plugin_get_data_dir (GEDIT_PLUGIN (plugin));
+	datadir = gpe_plugin_get_data_dir (GPE_PLUGIN (plugin));
 	filename = g_build_filename (datadir, UI_FILE, NULL);
 
 	ret = gedit_utils_get_ui_objects (filename,
@@ -799,13 +799,13 @@ static void
 gedit_drawspaces_plugin_class_init (GeditDrawspacesPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	g_type_class_add_private (object_class, sizeof (GeditDrawspacesPluginPrivate));
 
 	object_class->dispose = gedit_drawspaces_plugin_dispose;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
-	plugin_class->create_configure_dialog = impl_create_configure_dialog;	
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
+	plugin_class->create_configure_dialog = (GPEFunc) impl_create_configure_dialog;	
 }
diff --git a/plugins/showtabbar/gedit-show-tabbar-plugin.c b/plugins/showtabbar/gedit-show-tabbar-plugin.c
index 306d1c2..4dbd275 100644
--- a/plugins/showtabbar/gedit-show-tabbar-plugin.c
+++ b/plugins/showtabbar/gedit-show-tabbar-plugin.c
@@ -28,6 +28,7 @@
 
 #include <glib/gi18n-lib.h>
 #include <gedit/gedit-debug.h>
+#include <gedit/gedit-window.h>
 #include <gconf/gconf-client.h>
 
 
@@ -270,10 +271,10 @@ static void
 gedit_show_tabbar_plugin_class_init (GeditShowTabbarPluginClass *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_show_tabbar_plugin_finalize;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
 }
diff --git a/plugins/wordcompletion/gedit-word-completion-plugin.c b/plugins/wordcompletion/gedit-word-completion-plugin.c
index 60dff70..8011092 100644
--- a/plugins/wordcompletion/gedit-word-completion-plugin.c
+++ b/plugins/wordcompletion/gedit-word-completion-plugin.c
@@ -196,10 +196,10 @@ static void
 gedit_word_completion_plugin_class_init (GeditWordCompletionPluginClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
+	GPEPluginClass *plugin_class = GPE_PLUGIN_CLASS (klass);
 
 	object_class->dispose = gedit_word_completion_plugin_dispose;
 
-	plugin_class->activate = impl_activate;
-	plugin_class->deactivate = impl_deactivate;
+	plugin_class->activate = (GPEFunc) impl_activate;
+	plugin_class->deactivate = (GPEFunc) impl_deactivate;
 }



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