[vinagre/gnome-3-8] Use the new API recognize_file() when parsing a file
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre/gnome-3-8] Use the new API recognize_file() when parsing a file
- Date: Thu, 11 Jul 2013 17:38:38 +0000 (UTC)
commit 7430bcc4f8e38fee3e4bd1e505074277230295e4
Author: Jonh Wendell <jonh wendell intel com>
Date: Thu Jul 11 14:27:26 2013 -0300
Use the new API recognize_file() when parsing a file
vinagre/vinagre-connection.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index 60a9c1b..ffa8e94 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -639,14 +639,16 @@ 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))
{
- conn = vinagre_protocol_new_connection_from_file ((VinagreProtocol *)ext,
- data,
- use_bookmarks,
- error_msg);
- g_free (*error_msg);
- *error_msg = NULL;
- if (conn)
- break;
+ 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;
+ }
}
the_end:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]