commit 0b3a3f0453a483e9b1d862a72a8841f9e44318a8
Author: phantomjinx <p.g.richard...@phantomjinx.co.uk>
Date:   Sun Apr 8 00:33:08 2012 +0100

    Small fixes
    
    * file.c
     * Fix incorrect logic when error handling file info
    
    * gtkpod_app_iface.c
     * Avoid winding on the suffixes list permanently when registering file
       types.

 libgtkpod/file.c             |    2 +-
 libgtkpod/gtkpod_app_iface.c |    8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libgtkpod/file.c b/libgtkpod/file.c
index 7f3b3cc..323df96 100644
--- a/libgtkpod/file.c
+++ b/libgtkpod/file.c
@@ -1180,7 +1180,7 @@ Track *get_track_info_from_file(gchar *name, Track 
*orig_track, GError **error)
 
     GError *info_error = NULL;
     nti = filetype_get_file_info(filetype, name, &info_error);
-    if (info_error || !nti) {
+    if (info_error && !nti) {
         gtkpod_log_error_printf(error, _("No track information could be 
retrieved from the file %s due to the following error:\n\n%s"), name_utf8, 
info_error->message);
         g_error_free(info_error);
         info_error = NULL;
diff --git a/libgtkpod/gtkpod_app_iface.c b/libgtkpod/gtkpod_app_iface.c
index d0af9fc..e161e7a 100644
--- a/libgtkpod/gtkpod_app_iface.c
+++ b/libgtkpod/gtkpod_app_iface.c
@@ -661,14 +661,16 @@ void gtkpod_register_filetype(FileType *filetype) {
     g_return_if_fail(FILE_IS_TYPE(filetype));
     g_return_if_fail(GTKPOD_IS_APP(gtkpod_app));
     GtkPodAppInterface *gp_iface = GTKPOD_APP_GET_INTERFACE (gtkpod_app);
+    GList *s;
 
     GList *suffixes = filetype_get_suffixes(filetype);
     if (!suffixes)
         return;
 
-    while(suffixes) {
-        g_hash_table_insert(gp_iface->filetypes, suffixes->data, filetype);
-        suffixes = g_list_next(suffixes);
+    s = suffixes;
+    while(s) {
+        g_hash_table_insert(gp_iface->filetypes, s->data, filetype);
+        s = g_list_next(s);
     }
 }
 

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to