Web lists-archives.com

Re: recently-used.xbel

On 22/01/2015 19:48, Emmanuele Bassi wrote:
I honestly don't really understand what are you trying to achieve. do
you want to add files, or is it just an issue of displayed files?

I want to prevent files of a particular type from getting displayed in the 'Recently Used' list. AFAICT that would mean me needing to prevent them from getting added to 'recently-used.xbel'?

Here's the scenario... our dialog can display two types of file - let's call them "typeA" and "typeB". But our application can only understand files of typeB. If the user selects a file of typeA, we defer to a 3rd party app which converts it to typeB. The conversion never needs to get done more than once. So there's no need for files of typeA to ever appear in the Recently Used list.

a GtkRecentManager is a GObject; you just connect to the changed
signal, like you would on any other GObject instance.

I guess what I'm asking is this....

Our app interacts with the file chooser dialog through an object of type Gtk::FileChooserButton (strictly speaking, that's a gtkmm object so maybe I'm posting on the wrong list anyway...)

But the RecentManager object isn't a member of Gtk::FileChooserButton. It's a member of one of the panes that gets displayed when the resulting FileChooser dialog gets displayed after pressing the button.

So what API calls do I need to eventually arrive at a pointer to the RecentManager object? It's a long way down the chain with several objects in between. From the Gtk::Filechooser button, I assume:-

      1)  I'd need to get a pointer to the FileChooser dialog.
      2)  I'd then (possibly) need to get a pointer to the relevant pane??
3) I'd then (possibly) need to get a pointer to the 'Recently Used' list object?? 4) And ultimately I'd need to get a pointer to the Gtk::RecentManager object so I could add a "changed" handler

Does that make sense or am I over-thinking all this??

gtk-devel-list mailing list