]> Pileus Git - ~andy/gtk/commitdiff
Free volumes not actually put into the shortcut list.
authorMorten Welinder <terra@gnome.org>
Wed, 17 Mar 2004 21:52:29 +0000 (21:52 +0000)
committerMorten Welinder <mortenw@src.gnome.org>
Wed, 17 Mar 2004 21:52:29 +0000 (21:52 +0000)
2004-03-17  Morten Welinder  <terra@gnome.org>

* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free
volumes not actually put into the shortcut list.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkfilechooserdefault.c

index 290bf4a71eba37d286433a26ee845ce3581afb70..5af0fb14fb5827ac52033c6f042fb63e5e0045c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-03-17  Morten Welinder  <terra@gnome.org>
 
+       * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free
+       volumes not actually put into the shortcut list.
+
        * tests/prop-editor.c (object_changed): Plug leak.
 
        * tests/testfilechooser.c (main): Plug some leaks and expose
index 290bf4a71eba37d286433a26ee845ce3581afb70..5af0fb14fb5827ac52033c6f042fb63e5e0045c9 100644 (file)
@@ -1,5 +1,8 @@
 2004-03-17  Morten Welinder  <terra@gnome.org>
 
+       * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free
+       volumes not actually put into the shortcut list.
+
        * tests/prop-editor.c (object_changed): Plug leak.
 
        * tests/testfilechooser.c (main): Plug some leaks and expose
index 290bf4a71eba37d286433a26ee845ce3581afb70..5af0fb14fb5827ac52033c6f042fb63e5e0045c9 100644 (file)
@@ -1,5 +1,8 @@
 2004-03-17  Morten Welinder  <terra@gnome.org>
 
+       * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free
+       volumes not actually put into the shortcut list.
+
        * tests/prop-editor.c (object_changed): Plug leak.
 
        * tests/testfilechooser.c (main): Plug some leaks and expose
index 290bf4a71eba37d286433a26ee845ce3581afb70..5af0fb14fb5827ac52033c6f042fb63e5e0045c9 100644 (file)
@@ -1,5 +1,8 @@
 2004-03-17  Morten Welinder  <terra@gnome.org>
 
+       * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free
+       volumes not actually put into the shortcut list.
+
        * tests/prop-editor.c (object_changed): Plug leak.
 
        * tests/testfilechooser.c (main): Plug some leaks and expose
index 290bf4a71eba37d286433a26ee845ce3581afb70..5af0fb14fb5827ac52033c6f042fb63e5e0045c9 100644 (file)
@@ -1,5 +1,8 @@
 2004-03-17  Morten Welinder  <terra@gnome.org>
 
+       * gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Free
+       volumes not actually put into the shortcut list.
+
        * tests/prop-editor.c (object_changed): Plug leak.
 
        * tests/testfilechooser.c (main): Plug some leaks and expose
index 39cda5688c6fd3f4fb7cf5b1a2f76f184017510a..8987297667fd8402043ffd0074b524b2b8bfa938 100644 (file)
@@ -1224,11 +1224,16 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
          gtk_file_path_free (base_path);
 
          if (!is_local)
-           continue;
+           {
+             gtk_file_system_volume_free (impl->file_system, volume);
+             continue;
+           }
        }
 
-      shortcuts_insert_path (impl, start_row + n, TRUE, volume, NULL, NULL, FALSE, NULL);
-      n++;
+      if (shortcuts_insert_path (impl, start_row + n, TRUE, volume, NULL, NULL, FALSE, NULL))
+       n++;
+      else
+       gtk_file_system_volume_free (impl->file_system, volume);
     }
 
   impl->num_volumes = n;