[vinagre] Added a get_file_filter() virtual function to the plugins.
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Subject: [vinagre] Added a get_file_filter() virtual function to the plugins.
- Date: Mon, 27 Jul 2009 12:05:18 +0000 (UTC)
commit 8431551c7edb7f740c11cbeb45d808151bee82e4
Author: Jonh Wendell <jwendell gnome org>
Date: Sat Jul 25 13:00:39 2009 -0300
Added a get_file_filter() virtual function to the plugins.
This is supposed to be used by plugins that support the "Open File"
feature.
vinagre/vinagre-plugin.c | 22 ++++++++++++++++++++++
vinagre/vinagre-plugin.h | 4 ++++
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-plugin.c b/vinagre/vinagre-plugin.c
index b86e6aa..bc9b567 100644
--- a/vinagre/vinagre-plugin.c
+++ b/vinagre/vinagre-plugin.c
@@ -121,6 +121,12 @@ default_get_connect_widget (VinagrePlugin *plugin,
return NULL;
}
+static GtkFileFilter *
+default_get_file_filter (VinagrePlugin *plugin)
+{
+ return NULL;
+}
+
static void
vinagre_plugin_get_property (GObject *object,
guint prop_id,
@@ -189,6 +195,7 @@ vinagre_plugin_class_init (VinagrePluginClass *klass)
klass->get_mdns_service = default_get_protocol;
klass->new_tab = default_new_tab;
klass->get_connect_widget = default_get_connect_widget;
+ klass->get_file_filter = default_get_file_filter;
klass->create_configure_dialog = create_configure_dialog;
klass->is_configurable = is_configurable;
@@ -531,4 +538,19 @@ vinagre_plugin_get_connect_widget (VinagrePlugin *plugin,
return VINAGRE_PLUGIN_GET_CLASS (plugin)->get_connect_widget (plugin, initial_settings);
}
+/**
+ * vinagre_plugin_get_file_filter
+ * @plugin: a #VinagrePlugin
+ *
+ *
+ * Returns: a filter to be used at Open File dialog
+ */
+GtkFileFilter *
+vinagre_plugin_get_file_filter (VinagrePlugin *plugin)
+{
+ g_return_val_if_fail (VINAGRE_IS_PLUGIN (plugin), NULL);
+
+ return VINAGRE_PLUGIN_GET_CLASS (plugin)->get_file_filter (plugin);
+}
+
/* vim: set ts=8: */
diff --git a/vinagre/vinagre-plugin.h b/vinagre/vinagre-plugin.h
index 1a69136..4292f66 100644
--- a/vinagre/vinagre-plugin.h
+++ b/vinagre/vinagre-plugin.h
@@ -92,6 +92,8 @@ struct _VinagrePluginClass
GtkWidget *(*get_connect_widget) (VinagrePlugin *plugin,
VinagreConnection *initial_settings);
+ GtkFileFilter *(*get_file_filter) (VinagrePlugin *plugin);
+
/* Plugins should not override this, it's handled automatically by
the VinagrePluginClass */
gboolean (*is_configurable) (VinagrePlugin *plugin);
@@ -140,6 +142,8 @@ GtkWidget *vinagre_plugin_new_tab (VinagrePlugin *plugin,
GtkWidget *vinagre_plugin_get_connect_widget (VinagrePlugin *plugin,
VinagreConnection *initial_settings);
+GtkFileFilter *vinagre_plugin_get_file_filter (VinagrePlugin *plugin);
+
/**
* VINAGRE_PLUGIN_REGISTER_TYPE_WITH_CODE(PluginName, plugin_name, CODE):
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]