Re: Issue with vim and GtkFileChooser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Emmanuele Bassi <ebassi@xxxxxxxxx> [2008-07-26 15:16]:
> the list of recently used files is not written by the file selector
> widget: it's entirely up to the application to do that, by calling the
> GtkRecentManager API.
> 
> >  from what I can see it uses GtkFileChooser as in the
> > reference manual and does not use GTK's recently used files list
> > functionality directly. However I saw that the recently used
> > files functionality was added to the GtkFileChooser in GTK 2.11.
> 
> yes, but the FileChooser widget *reads* that file to generate the
> recently used file list.
> 
> so, if you're seeing writes to that file you'll have to find the calls
> to gtk_recent_manager_add_item() or gtk_recent_manager_add_full().

$ grep gtk_recent vim71/src/*.c | wc -l
0

There is no use of GtkRecentManager in the vim source.

Yet using strace on vim reveals this

[...]
open("/home/gber/.recently-used.xbel.WBHYEU", O_RDWR|O_CREAT|O_EXCL, 0666) = 15
fcntl(15, F_GETFL)                      = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(15, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbd288f000
lseek(15, 0, SEEK_CUR)                  = 0
write(15, "<?xml version=\"1.0\" encoding=\"UT"..., 218) = 218
close(15)                               = 0
munmap(0x7fcbd288f000, 4096)            = 0
rename("/home/gber/.recently-used.xbel.WBHYEU", "/home/gber/.recently-used.xbel") = 0
stat("/home/gber/.recently-used.xbel", {st_mode=S_IFREG|0644, st_size=218, ...}) = 0
[...]

on every keypress, mouseclick etc.

> > This is as far as I can get with my knowledge, could someone with
> > more insight on the inner workings of GTK comment on what might
> > be going on here? If needed the relevant parts of the GTK UI are
> > in
> > http://vim.svn.sourceforge.net/viewvc/vim/vim7/src/gui_gtk.c?view=markup
> 
> I don't see any call to GtkRecentManager.

Me neither, so what is happening here?

-- 
Guido Berhoerster
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux