logo       

[vinagre] Added vinagre_plugin_get_icon(): msg#08218

svn-commits-list

Subject: [vinagre] Added vinagre_plugin_get_icon()

commit e90f14cd4db10a1d608670698f0b9e8f1a336133
Author: Jonh Wendell <jwendell@xxxxxxxxx>
Date: Fri Jul 31 20:11:22 2009 -0300

Added vinagre_plugin_get_icon()

vinagre/vinagre-plugin.c | 18 ++++++++++++++++++
vinagre/vinagre-plugin.h | 3 +++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-plugin.c b/vinagre/vinagre-plugin.c
index bc9b567..fc62d06 100644
--- a/vinagre/vinagre-plugin.c
+++ b/vinagre/vinagre-plugin.c
@@ -26,6 +26,7 @@
#endif

#include "vinagre-plugin.h"
+#include "vinagre-plugin-info.h"
#include "vinagre-dirs.h"

/* properties */
@@ -553,4 +554,21 @@ vinagre_plugin_get_file_filter (VinagrePlugin *plugin)
return VINAGRE_PLUGIN_GET_CLASS (plugin)->get_file_filter (plugin);
}

+GdkPixbuf *
+vinagre_plugin_get_icon (VinagrePlugin *plugin, gint size)
+{
+ VinagrePluginInfo *info;
+
+ g_return_val_if_fail (VINAGRE_IS_PLUGIN (plugin), NULL);
+
+ info = g_object_get_data (G_OBJECT (plugin), "info");
+ g_return_val_if_fail (info != NULL, NULL);
+
+ return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+ vinagre_plugin_info_get_icon_name (info),
+ size,
+ 0,
+ NULL);
+}
+
/* vim: set ts=8: */
diff --git a/vinagre/vinagre-plugin.h b/vinagre/vinagre-plugin.h
index e596cf5..49fa05f 100644
--- a/vinagre/vinagre-plugin.h
+++ b/vinagre/vinagre-plugin.h
@@ -143,6 +143,9 @@ GtkWidget *vinagre_plugin_get_connect_widget
(VinagrePlugin *plugin,

GtkFileFilter *vinagre_plugin_get_file_filter (VinagrePlugin
*plugin);

+GdkPixbuf *vinagre_plugin_get_icon (VinagrePlugin *plugin,
+ gint size);
+
/**
* VINAGRE_PLUGIN_REGISTER_TYPE_WITH_CODE(PluginName, plugin_name, CODE):
*
_______________________________________________
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