logo       

[vinagre] Added VinagrePluginInfo ref into a plugin.: msg#08172

svn-commits-list

Subject: [vinagre] Added VinagrePluginInfo ref into a plugin.

commit 4c36107264da4a3888a97a91d064f8eb95a3384d
Author: Jonh Wendell <jwendell@xxxxxxxxx>
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;
}

_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit
your options and select the modules ('topics') you want.

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise