[maemo-developers] Screenshot as loading screen on Maemo 5

From: Luca Donaggio donaggio at gmail.com
Date: Thu Oct 22 18:13:27 EEST 2009
On Thu, Oct 22, 2009 at 5:06 PM, Aniello Del Sorbo <anidel at gmail.com> wrote:

> 2009/10/22 Luca Donaggio <donaggio at gmail.com>:
> > On Sat, Oct 17, 2009 at 1:03 PM, Cornelius Hald <hald at icandy.de> wrote:
> >>
> >> On Sat, 2009-10-17 at 11:58 +0100, Aniello Del Sorbo wrote:
> >> >
> >> > My program doesn't ask anything when you close it, but it keeps
> >> > automatically saving the document in
> >> > a temporary file. Thus at every start it loads it up and you're back
> >> > where you left.
> >> > So I thought I would call the screenshot function at the very end,
> >> > while closing down the program.
> >> >
> >> > It didn't work. It didn't save the screenshot of what was there.
> >> >
> >> > So I call it when I receive the expose event (like in the example) and
> >> > it does work there.
> >> > Why is that?
> >> >
> >> > I still have to investigate it, but I thought the window would be
> >> > still available in my Quit function
> >> > when called from the destroy event.
> >>
> >> I'm also calling it when quitting the application. I'm using the
> >> 'delete-event' on my main window. There I call it just before
> >> gtk_main_quit(). It's working for me...
> >>
> >> Cheers!
> >> Conny
> >>
> >>
> >> _______________________________________________
> >> maemo-developers mailing list
> >> maemo-developers at maemo.org
> >> https://lists.maemo.org/mailman/listinfo/maemo-developers
> >
> > I'm resuming an old thread, sorry!
> >
> > If I call hildon_gtk_window_take_screenshot() within the callback
> function
> > for the delete-event of the main app, just before gtk_main_quit(), it
> seems
> > that something has already happened to the main window: it complains that
> it
> > is not a GtkWindow (which usually is, as HildonWindow derives from it),
> but
> > a GdkWindow, and, of course, no screenshot were taken.
> >
> > Luca Donaggio
> >
>
> I am doing the same and works, but then I was thinking that's it's
> probably best doing at the
> beginning, with a clean UI.
>
> I thought that doing it at the end, before closing it, would then fake
> a reload of the app in the state
> it was left when closing it.
>
> But this has an issue, which I think deserves thoughts:
>
> 1) to really speed up things you should take the screenshot only once.
> 2) if you do it at the end, before closing, for the reason above, then
> you've got to take the screenshot
> at every exit. This slows down the exit itself. And this is as much of
> an issue as the startup speed.
>
> Thus I thought I'll take the screenshot at the expose event and only
> take it if the file is not there already.
>
> --
> anidel
> Sent from London, Eng, United Kingdom
>

You're right, I moved the screenshot-taking process at the beginning too.
Where are the screenshots stored? Ie: which file I should check to determine
if a screenshot has already been taken once?
As a side fact: we should remove the existing screenshot when installing a
new version of our apps, as their appearance could have changed and the
stored screenshot could not reflect the current UI any more.

Luca Donaggio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20091022/623fbd13/attachment.htm 
More information about the maemo-developers mailing list