Re: Filtering Recent Documents

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

 



On Thu, 2007-10-04 at 23:20 +0100, Emmanuele Bassi wrote:

> >   action = gtk_recent_action_new ("recent_connections",
> > 				  _("_Recent connections"),
> > 				  NULL, NULL);
> >   filter = gtk_recent_filter_new ();
> >   gtk_recent_filter_add_group (filter, "vinagre");
> >   gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (action),
> > 				 filter);
> > 
> > What's wrong in that code? I'd like to list only documents tagged as
> > 'vinagre'.
> 
> you did not call gtk_recent_chooser_set_filter() after
> gtk_recent_chooser_add_filter(); add_filter() will add a filter to the
> list of available filters, but it's set_filter() that will apply it to
> the list displayed by a GtkRecentChooser.

sorry, I must be asleep at the terminal.

this code should already work - if it doesn't, then it might be a bug in
the GtkRecentAction code (not propagating the filter property change to
the proxies). are you sure you're saving the "recent connections" under
the "vinagre" group? the group name is case-sensitive.

also, for these cases, you should filter on the application name, not on
the group (that was a problem of the old EggRecent code: now we save
more meta-data). the application name used is either set by you or is
the same string returned by g_get_application_name().

if everything fails, could you open a bug with some real code, so I can
have a look at it?

ciao,
 Emmanuele.

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

_______________________________________________
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