[PATCH] make ksnapshot increment the last number

Richard Moore richmoore44 at gmail.com
Wed Oct 3 22:26:25 BST 2007


On 10/3/07, Riccardo Iaconelli <riccardo at kde.org> wrote:
> On Wednesday 03 October 2007 11:10:28 Jos Poortvliet wrote:
> > On 10/3/07, Riccardo Iaconelli <riccardo at kde.org> wrote:
> > > On Wednesday 03 October 2007 08:25:49 Andras Mantia wrote:
> > > > On Tuesday 02 October 2007, Matthew Woehlke wrote:
> > > > > Hmm... for writing maybe. But DD-MM-YYYY doesn't sort properly, where
> > > > > YYYY-MM-DD does ;-).
> > > >
> > > > And that is official for some countries, like Hungary. :)
> > >
> > > Shall we check for where the 20?? sequence appears, and increment
> > > smartly?
> >
> > Well, if you're up to doing that, I think it would rock. But as 4.0 is
> > getting closer, we might just fix it basically (just increment the
> > last number) and get back to this for 4.1? Unless you  or someone else
> > can whip up a patch in 20 minutes ;-)
>
> As you asked for it, I did it. =)
>
> The behiavour now is the following:
> - KSnapshot checks if there are any numbers in the filename.
> - If there is any number, it checks for an xx-xx-20xx sequence.
>   - If this sequence is found, it assumes the user is saving using the
> dd-mm-yyyy sequence, and increments the day.
>   - If it's not, it just increments the last number, as it has been corrected
> in the previous patch.
>
> I choosed to support dd-mm-yyyy instead of mm-dd-yyyy as for what I saw it's a
> sequence way more used in the world (at least outside the USA).
>
> Please revise the patch as I'm not a regexp wizard, and please double check as
> I couldn't test the modifications because my ksnapshot (for an unknown
> reason) crashes when trying to open the filedialog to save the
> screenshot... =\
> For now I implemented just the above scenario, please tell me if you have
> others in mind.
> Tell me if it's ok to commit, and I'll do that immediately!

I find this idea very very scary. I think it will lead to some very
strange behaviours. If that's what people want then ok, but I think
it's a bad idea.

Rich.




More information about the kde-core-devel mailing list