Author: peter
Date: 2007-01-19 14:24:16 +0000 (Fri, 19 Jan 2007)
New Revision: 24547

Modified:
   squeeze/trunk/libsqueeze/archive.c
   squeeze/trunk/src/archive_store.c
   squeeze/trunk/src/tool_bar.c
Log:
bug in delete fix
bug in home button fixed


Modified: squeeze/trunk/libsqueeze/archive.c
===================================================================
--- squeeze/trunk/libsqueeze/archive.c  2007-01-19 13:49:50 UTC (rev 24546)
+++ squeeze/trunk/libsqueeze/archive.c  2007-01-19 14:24:16 UTC (rev 24547)
@@ -668,6 +668,7 @@
                        {
                                case(G_TYPE_STRING):
                                        g_free(*(gchar **)props_iter);
+                                       *(gchar **)props_iter = (gchar *)0x1;
                                        props_iter += sizeof(gchar *);
                                        break;
                                case(G_TYPE_UINT):
@@ -779,11 +780,11 @@
                {
                        g_free(_filename);
                        lsq_archive_entry_free(archive, 
entry->children[begin+pos]);
-                       total_size -= 1;
-                       for(;pos < total_size; ++pos)
+                       for(;(begin + pos) < total_size; ++pos)
                        {
                                entry->children[begin+pos] = 
entry->children[begin+pos+1];
                        }
+                       total_size -= 1;
                        *entry->children = GUINT_TO_POINTER(total_size);
                        return TRUE;
                }
@@ -946,7 +947,10 @@
 gboolean
 lsq_archive_iter_is_directory(const LSQArchive *archive, const LSQArchiveIter 
*iter)
 {
-       if(!strcmp(lsq_archive_iter_get_mimetype(archive, iter), 
LSQ_MIME_DIRECTORY))
+       const gchar *mime = lsq_archive_iter_get_mimetype(archive, iter);
+       if(!mime)
+               return FALSE;
+       if(!strcmp(mime, LSQ_MIME_DIRECTORY))
                return TRUE;
        return FALSE;
 }

Modified: squeeze/trunk/src/archive_store.c
===================================================================
--- squeeze/trunk/src/archive_store.c   2007-01-19 13:49:50 UTC (rev 24546)
+++ squeeze/trunk/src/archive_store.c   2007-01-19 14:24:16 UTC (rev 24547)
@@ -680,7 +680,13 @@
                else
                        entry = lsq_archive_iter_nth_child(archive, entry, n);
        
-               g_return_val_if_fail(entry, FALSE);
+               if(!entry)
+               {
+#ifdef DEBUG
+                       g_debug("iter %d not found", n);
+#endif
+                       return FALSE;
+               }
        }
 
        iter->stamp = store->stamp;
@@ -1279,7 +1285,7 @@
 
        g_strfreev(buf);
 
-       if(lsq_archive_iter_is_directory(store->archive, (LSQArchiveIter 
*)stack->data))
+       if(!stack->next || lsq_archive_iter_is_directory(store->archive, 
(LSQArchiveIter *)stack->data))
        {
                sq_archive_store_append_history(store, stack);
 
@@ -1287,9 +1293,10 @@
                sq_archive_store_refresh(store);
 
                g_signal_emit(store, 
sq_archive_store_signals[SQ_ARCHIVE_STORE_SIGNAL_PWD_CHANGED], 0,NULL);
+               return TRUE;
        }
 
-       return TRUE;
+       return FALSE;
 }
 
 void

Modified: squeeze/trunk/src/tool_bar.c
===================================================================
--- squeeze/trunk/src/tool_bar.c        2007-01-19 13:49:50 UTC (rev 24546)
+++ squeeze/trunk/src/tool_bar.c        2007-01-19 14:24:16 UTC (rev 24547)
@@ -365,7 +365,7 @@
 cb_sq_tool_bar_home(GtkWidget *forward_button, SQToolBar *tool_bar)
 {
        /* FIXME: the part about "/" could be bugged */
-       sq_archive_store_set_pwd(SQ_NAVIGATION_BAR(tool_bar)->store, "/");
+       sq_archive_store_set_pwd(SQ_NAVIGATION_BAR(tool_bar)->store, "");
 }
 
 static void

_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to