Re: Feature request: cycle through images by their mtime

Am Samstag, den 07.11.2009, 16:59 -0500 schrieb Christian Jaeger:
> > There's a bug where this would fit:
> >
> >
> > It's about following nautilus' search order, but being able to set a
> > custom search order is practically a prerequisite for nautilus support.
> I like the idea to reuse the sorting from the file manager. Although
> eog should then also offer a way to open the folder in nautilus, as
> sometimes eog may have been opened through other means and it would be
> cumbersome to have to find the folder in nautilus manually.

That's the smallest issue. gtk_launch_uri() is your friend here and in
theory also supports Thunar.

> Also I wonder a bit whether Thunar, which Debian's Gnome installation
> somehow uses for opening folders from the Gnome menu (dunno why and
> whether it can be changed, I'm too much of a commandline guy to
> bother), stores the same sorting order, and if not, what to do about
> this.
I kinda doubt that Thunar adapted GIO metadata (which is where nautilus
saves this stuff now) support so fast, as it's only in nautilus since
this summer:

Not sure if Thunar has the sort order available for others somewhere, 

> Do you have an easy hint how to start? The only Gnome app I've ever
> tried to modify was xchat, and I wasn't very successful. I'll also
> only have a bit of time on the side, like if I feel I get to complete
> something within two hours (at least in the sense that I can close it
> in my mind, meaning I can either pass the ball on, or have solved one
> distinctive part of a problem) I try to tackle it, if I feel it will
> take longer then I leave it aside (possibly indefinitely).

The sorting work would need to be done in eog-list-store.c. Sorting
happens through the eog_list_store_compare_func() function. It currently
sorts by filename. If you don't have that much time, it would help
already if you could modify it to sort by mtime (GIO/GFile will have
this info) and check if any function in eog seems to rely on the old
sorting behavior and breaks with mtime sorting. If that's not the case
the rest shouldn't be a big problem.

> PS. nowadays I'm mostly programming in Scheme, if there is a Guile
> plugin, maybe it would make sense to extend the plugin api or language
> bindings and write the sorting and/or Nautilus access in Scheme. Or
> Python if need be. I'm really mostly a newbie when it comes to
> programming Gnome, so don't know what's available.

Extending the plugin API to be able to do this, wouldn't be trivial as
you'd have to adapt most of the eog GUI code to be pluggable as well.
It's likely to be error prone too, since eog is a bit fragile in some

Regarding the Scheme bindings, I'm not paticulary against it. But we
would need someone with guile knowledge to make it (and maintain it) as
neither I nor Lucas or Claudio (feel free to correct me guys) know
Scheme well enough. ;)
The current Python bindings are a bit behind for the same reason.


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