[vinagre/gnome-3-8] Revert "Use the new API recognize_file() when parsing a file"



commit a608a162867f1423279b4febd4915ab750fc95ef
Author: David King <amigadave amigadave com>
Date:   Tue Jul 23 15:26:50 2013 +0100

    Revert "Use the new API recognize_file() when parsing a file"
    
    This reverts commit 7430bcc4f8e38fee3e4bd1e505074277230295e4.

 vinagre/vinagre-connection.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index ffa8e94..60a9c1b 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -639,16 +639,14 @@ vinagre_connection_new_from_file (const gchar *uri, gchar **error_msg, gboolean
   g_hash_table_iter_init (&iter, extensions);
   while (g_hash_table_iter_next (&iter, NULL, &ext))
     {
-      VinagreProtocol *protocol = VINAGRE_PROTOCOL (ext);
-
-      if (vinagre_protocol_recognize_file (protocol, file_a))
-        {
-          conn = vinagre_protocol_new_connection_from_file (protocol,
-                                                           data,
-                                                           use_bookmarks,
-                                                           error_msg);
-          break;
-        }
+      conn = vinagre_protocol_new_connection_from_file ((VinagreProtocol *)ext,
+                                                       data,
+                                                       use_bookmarks,
+                                                       error_msg);
+      g_free (*error_msg);
+      *error_msg = NULL;
+      if (conn)
+       break;
     }
 
 the_end:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]