On Fri, 2009-10-23 at 17:14 +0200, ext Luca Donaggio wrote: > I was thinking that there should be a way to remove the existing > screenshot from a postinst script when upgrading to a new version of > the app. > I mean, some way more reliable than > `rm /home/user/.cache/launch/<service name>.pvr`. > This could be useful if the new version has a substantially different > UI than before to not confuse previous users.
Yes, this would be good. You can install a flag file with your application package, telling the application code to delete the screenshot next time the application is started. Hildon desktop could also purge the screenshots when it sees that a .desktop file was updated. -Kimmo > > Luca Donaggio > > 2009/10/23 Claudio Saavedra <csaave...@igalia.com> > El vie, 23-10-2009 a las 17:25 +0300, Kimmo Hämäläinen > escribió: > > On Fri, 2009-10-23 at 14:46 +0200, ext Claudio Saavedra > wrote: > > > El vie, 23-10-2009 a las 15:37 +0300, Kimmo Hämäläinen > escribió: > > ... > > > Let's make a deal, you fix it in the desktop and I fix the > documentation > > > of the method :) > > > > Fixed in hildon-desktop git master now :) > > > Committing this to hildon master now :) > > commit 7a9bcd71fe0399604d2bec10bc024290d8d1a9b9 > Author: Claudio Saavedra <csaave...@igalia.com> > Date: Fri Oct 23 18:02:53 2009 +0300 > > Improve the documentation for > hildon_gtk_window_take_screenshot() > > Mention the fact that it's a Maemo 5 feature, what's the > purpose > of the screenshot, and how to use it. > > diff --git a/hildon/hildon-gtk.c b/hildon/hildon-gtk.c > index f67f830..ee391e4 100644 > --- a/hildon/hildon-gtk.c > +++ b/hildon/hildon-gtk.c > @@ -456,8 +456,23 @@ hildon_gtk_window_enable_zoom_keys > (GtkWindow *window, > * @window: a #GtkWindow > * @take: %TRUE to take a screenshot, %FALSE to destroy the > existing > one. > * > - * Tells the window manager to take a screenshot of @window, > or to > - * destroy the existing one. @window must be mapped. > + * Tells the window manager to create a screenshot of @window > and save > + * it, or to destroy the existing one. If @take is %TRUE but > the > + * screenshot is already available, the window manager will > not create > + * it again. > + * > + * You should only call this method when @window is already > mapped. > + * > + * In Maemo 5 this screenshot, if existent, will be used by > the window > + * manager in subsequent launches of the application that > created > + * it. The window manager will remove this screenshot > automatically > + * whenever the theme, locale, or the time changes; also when > a backup > + * is restored. If your application changes its appearance > between > + * runs and you want to force the existent screenshot to be > removed, > + * set @take to %FALSE. > + * > + * Since: 2.0 > + * > **/ > void > hildon_gtk_window_take_screenshot (GtkWindow > *window, > > > > > _______________________________________________ > maemo-developers mailing list > maemo-developers@maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > > _______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers