GNOME Bugzilla – Bug 677292
Semi-automatic generation of screenshots for the gtkmm tutorial
Last modified: 2012-06-09 09:02:38 UTC
Created attachment 215447 [details] Compressed tar file with Perl script and input data Unpack and store the attached file in gtkmm-documentation/docs, if you want to test it. Updating the screenshots for the gtkmm tutorial was discussed in bug 658265, comments 9, 10, 11, 14. In comment 14 Murray requested an automatic screenshot generator. The attached file contains a Perl script which is a first attempt at such a screenshot generator. It's not fully automatic, though. It generates screenshots by starting an example program and saving a screenshot of the program's window as it looks just after start-up. 63 screenshots are shown in the tutorial. 47 of them will be correctly generated in this simple way. The other 16 screenshots require some kind of user input or a specific location of the cursor before they are saved. I imagine that this Perl script can be useful even if it does not generate all necessary screenshots automatically. But I don't know what to do it, or where to save it. Create a gktmm-documentation/tools/make_screenshots directory for it? Shall it be executed as part of 'make'? I don't recommend it. It would increase the time for 'make' drastically, since the example programs must be compiled (= 'make check'). And to get good screenshots some system settings may have to be changed. E.g. I must change language and region from Swedish to English in order to get all text in English and the English decimal delimiter (period instead of comma) in the screenshots. And it's not recommended to run it in the Ubuntu Unity desktop, where menubars are detached from the windows.
> Create a gktmm-documentation/tools/make_screenshots directory for it? Sure, yes, please. And feel free to update any screenshots. Then we can play with it some more, and think about how to increase the number of screenshots that can be automated. > Shall it be executed as part of 'make'? I don't recommend it. No, that's too much for a build.
I have pushed a patch that adds a tools/make_screenshots directory with some files. It's not perfect, but I will leave it as it is, at least for now. Of course anyone is free to improve it. http://git.gnome.org/browse/gtkmm-documentation/commit/?id=7b31117da789541571334b7eac0c6cf0a26506f3