Re: [gtk-list] Re: [bug] GTK November 97: File dialog bug :(
- From: James A <jamesa demon net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: [bug] GTK November 97: File dialog bug :(
- Date: 01 Dec 1997 18:19:17 +0000
Ian Main <slow@intergate.bc.ca> writes:
> On Thu, 27 Nov 1997, Nicholas Lamb wrote:
>
> >
> > Some weeks/ months ago I thought that the File/Open bugs in GIMP were
> > all gone, but now I've found that there's still a problem with all GTK
> > file dialogs, unless it has been patched since the beginning of Nov. :(
> >
> > I've seen it manifest itself in various ways, but this one seems to work
> > (nearly) every single time...
> > Try this in GIMP's File/Open or in the testgtk file dialog:
>
> Yep. It's a real bug all right. I took a look through the code, and
> managed to find where it loops.
>
> line 1167 in gtkfilesel.c:
>
> static void
> prune_memory_usage(CompletionState *cmpl_state)
> {
> ...
>
> It's actually in this loop on line 1184:
>
> while (cdl) {
> if (cdl->data == cmpl_state->reference_dir)
> cmpl_state->directory_storage = g_list_prepend(NULL, cdl->data);
> else
> free_dir (cdl->data);
> cdl = cdl->next;
> }
Yep I sent a patch against this and a few other problems in the
file_selection dialog about a month ago, and I guess they haven't
managed to get into the main source yet. Can someone have a look at
the following patches on ftp.gimp.org:/pub/gtk/patches
1 gtk-jamesa-971010-0.patch.README
1 gtk-jamesa-971010-0.patch.gz
1 gtk-jamesa-main-971010-0.patch.README
1 gtk-jamesa-main-971010-0.patch.gz
1 gtk-jamesa-opt-971010-0.patch.README
1 gtk-jamesa-opt-971010-0.patch.gz
The one for the above problem is gtk-jamesa-971010-0.patch.gz and the
line ...
cmpl_state->directory_storage = NULL;
Which is obvious to work out why if you look at the loop.
The only problem being that these are against and old version of gtk
now, and I haven't got the latest version of gtk on my machine.
--- gtkfilesel-orig.c Thu Oct 9 09:10:38 1997
+++ gtkfilesel.c Thu Oct 9 11:59:40 1997
@@ -1075,6 +1075,7 @@
cdsl->next = NULL;
}
+ cmpl_state->directory_storage = NULL;
while (cdl) {
if (cdl->data == cmpl_state->reference_dir)
cmpl_state->directory_storage = g_list_prepend(NULL, cdl->data);
@@ -1472,7 +1473,7 @@
return FALSE;
}
- cmpl_dir->fullname[length - 3] = 0;
+ cmpl_dir->fullname[length - 2] = 0;
if(!correct_parent(cmpl_dir, &sbuf))
return FALSE;
@@ -1492,7 +1493,7 @@
return FALSE;
}
- cmpl_dir->fullname[length - 4] = 0;
+ cmpl_dir->fullname[length - 3] = 0;
if(!correct_parent(cmpl_dir, &sbuf))
return FALSE;
@@ -1516,7 +1517,7 @@
g_assert(last_slash);
if(last_slash != cmpl_dir->fullname)
- last_slash[0] = 0;
+ { /* last_slash[0] = 0; */ }
else
{
c = last_slash[1];
@@ -1535,8 +1536,8 @@
if(c)
last_slash[1] = c;
- else
- last_slash[0] = '/';
+ /* else
+ last_slash[0] = '/'; */
/* it was a link, have to figure it out the hard way */
--
James Antill
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]