Re: Issue with vim and GtkFileChooser



On Sat, 2008-07-26 at 13:45 +0200, Guido Berhoerster wrote:
> Hello,
> I'm trying to debug an issue with the GTK2 version of vim which
> has bothered me for a long time. After the first invocation of
> GtkFileChooser in vim, GTK's list of recently used files
> (~/.recently-used.xbel) gets written on events such as every
> single keypress, mouseclick or the mouse entering/leaving the
> window. This bug occurs with vim (at least) 7.0 and 7.1 built
> against GTK > 2.10 (at least) on Linux. I assume that this is a
> bug in GTK,

no, it's not.

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().

> 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.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net



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