Author: colossus
Date: 2007-02-13 13:53:17 +0000 (Tue, 13 Feb 2007)
New Revision: 24968

Modified:
   xarchiver/trunk/src/archive.c
   xarchiver/trunk/src/interface.c
Log:
Fixed seg fault with the up button.


Modified: xarchiver/trunk/src/archive.c
===================================================================
--- xarchiver/trunk/src/archive.c       2007-02-13 12:02:06 UTC (rev 24967)
+++ xarchiver/trunk/src/archive.c       2007-02-13 13:53:17 UTC (rev 24968)
@@ -411,8 +411,8 @@
                                }
                        }
                }
-               if (archive->location_entry_path == NULL)
-                       gtk_entry_set_text(GTK_ENTRY(location_entry),"");
+               gtk_widget_set_sensitive(up_button,FALSE);
+               gtk_entry_set_text(GTK_ENTRY(location_entry),"");
                return;
        }
        else

Modified: xarchiver/trunk/src/interface.c
===================================================================
--- xarchiver/trunk/src/interface.c     2007-02-13 12:02:06 UTC (rev 24967)
+++ xarchiver/trunk/src/interface.c     2007-02-13 13:53:17 UTC (rev 24968)
@@ -927,7 +927,6 @@
        {
                /* Root */
                case 0:
-                       gtk_widget_set_sensitive (up_button,FALSE);
                        archive[idx]->location_entry_path = NULL;
                        xa_update_window_with_archive_entries(archive[idx],"/");
                break;
@@ -937,13 +936,13 @@
                        path =  
g_strndup((gchar*)gtk_entry_get_text(GTK_ENTRY(location_entry)),
                                        
strlen(gtk_entry_get_text(GTK_ENTRY(location_entry)))-1);
                        up = xa_get_parent_dir (path);
-                       if (*up == '/')
+                       _path = remove_level_from_path(path);
+
+                       if (_path == NULL || *up == '/')
                                archive[idx]->location_entry_path = NULL;
                        else
-                       {
-                               _path = remove_level_from_path(path);
                                archive[idx]->location_entry_path = g_strconcat 
(_path,"/",NULL);
-                       }
+
                        g_free (_path);
                        g_free (path);
                        xa_update_window_with_archive_entries(archive[idx],up);

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to