[vinagre] Added VinagrePluginInfo ref into a plugin.
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vinagre] Added VinagrePluginInfo ref into a plugin.
- Date: Fri, 31 Jul 2009 17:24:44 +0000 (UTC)
commit 4c36107264da4a3888a97a91d064f8eb95a3384d
Author: Jonh Wendell <jwendell gnome org>
Date: Fri Jul 31 14:23:18 2009 -0300
Added VinagrePluginInfo ref into a plugin.
Thus you can get the plugin info inside the plugin.
vinagre/vinagre-plugin.c | 8 ++++++++
vinagre/vinagre-plugin.h | 2 ++
vinagre/vinagre-plugins-engine.c | 4 +++-
3 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/vinagre/vinagre-plugin.c b/vinagre/vinagre-plugin.c
index bc9b567..7395c00 100644
--- a/vinagre/vinagre-plugin.c
+++ b/vinagre/vinagre-plugin.c
@@ -553,4 +553,12 @@ vinagre_plugin_get_file_filter (VinagrePlugin *plugin)
return VINAGRE_PLUGIN_GET_CLASS (plugin)->get_file_filter (plugin);
}
+VinagrePluginInfo *
+vinagre_plugin_get_info (VinagrePlugin *plugin)
+{
+ g_return_val_if_fail (VINAGRE_IS_PLUGIN (plugin), NULL);
+
+ return g_object_get_data (G_OBJECT (plugin), "info");
+}
+
/* vim: set ts=8: */
diff --git a/vinagre/vinagre-plugin.h b/vinagre/vinagre-plugin.h
index e596cf5..19368d2 100644
--- a/vinagre/vinagre-plugin.h
+++ b/vinagre/vinagre-plugin.h
@@ -26,6 +26,7 @@
#include <glib-object.h>
#include "vinagre-window.h"
+#include "vinagre-plugin-info.h"
/* TODO: add a .h file that includes all the .h files normally needed to
* develop a plugin */
@@ -111,6 +112,7 @@ GType vinagre_plugin_get_type (void) G_GNUC_CONST;
gchar *vinagre_plugin_get_install_dir (VinagrePlugin *plugin);
gchar *vinagre_plugin_get_data_dir (VinagrePlugin *plugin);
+VinagrePluginInfo *vinagre_plugin_get_info (VinagrePlugin *plugin);
void vinagre_plugin_activate (VinagrePlugin *plugin,
VinagreWindow *window);
diff --git a/vinagre/vinagre-plugins-engine.c b/vinagre/vinagre-plugins-engine.c
index 0cd0b63..b6d9bcb 100644
--- a/vinagre/vinagre-plugins-engine.c
+++ b/vinagre/vinagre-plugins-engine.c
@@ -605,7 +605,9 @@ load_plugin (VinagrePluginsEngine *engine,
info->available = FALSE;
return FALSE;
}
-
+
+ g_object_set_data (G_OBJECT (info->plugin), "info", info);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]