[vinagre/gnome-3-8] implement recognize_file() in VNC plugin
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre/gnome-3-8] implement recognize_file() in VNC plugin
- Date: Thu, 11 Jul 2013 17:38:43 +0000 (UTC)
commit dc0b73db658b01709918db59705a1cfd3c3167f7
Author: Jonh Wendell <jonh wendell intel com>
Date: Thu Jul 11 14:28:27 2013 -0300
implement recognize_file() in VNC plugin
plugins/vnc/vinagre-vnc-plugin.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/plugins/vnc/vinagre-vnc-plugin.c b/plugins/vnc/vinagre-vnc-plugin.c
index 5b5153c..d77140f 100644
--- a/plugins/vnc/vinagre-vnc-plugin.c
+++ b/plugins/vnc/vinagre-vnc-plugin.c
@@ -210,6 +210,21 @@ the_end:
}
+static gboolean
+impl_recognize_file (VinagreProtocol *plugin, GFile *file)
+{
+ gboolean result = FALSE;
+ gchar *filename = g_file_get_basename (file);
+
+ if (filename)
+ {
+ result = g_str_has_suffix (filename, ".vnc");
+ g_free (filename);
+ }
+
+ return result;
+}
+
static GtkWidget *
impl_new_tab (VinagreProtocol *plugin,
VinagreConnection *conn,
@@ -404,6 +419,7 @@ vinagre_vnc_protocol_iface_init (VinagreProtocolInterface *iface)
iface->get_public_description = impl_get_public_description;
iface->new_connection = impl_new_connection;
iface->new_connection_from_file = impl_new_connection_from_file;
+ iface->recognize_file = impl_recognize_file;
iface->get_mdns_service = impl_get_mdns_service;
iface->new_tab = impl_new_tab;
iface->get_connect_widget = impl_get_connect_widget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]