GNOME Bugzilla – Bug 103688
Updated timeout/io/idle chapter
Last modified: 2004-12-22 21:47:04 UTC
http://gtkmm.org/gtkmm2/docs/tutorial/html/ch17s02.html describs gtkmm 1.2
http://gtkmm.org/gtkmm2/docs/tutorial/html/ch17.html http://gtkmm.org/gtkmm2/docs/tutorial/html/ch17s02.html http://gtkmm.org/gtkmm2/docs/tutorial/html/ch17s03.html All do not work on Gtkmm2. They seem to be describing Gtkmm1.2. The examples do not compile in Gtkmm2, and some of them seem to be missing from the /examples directory.
Created attachment 15001 [details] Updated ch17.html file (page 1) - describing Timeouts.
Created attachment 15002 [details] Timeout Examples - updated for Gtkmm2/2.2
I'll try and get the rest of this updated by this weekend. It's very important to have good documentation, especially for the new users.
So should I apply what we have so far, or wait?
Why don't you wait till this weekend. I was at work, and I couldn't create proper patches. I'll have everything updated by the end of this weekend.
re. the html: You do know that the .html is generated, right? You would need to patch the .xml. It's much easier for me to review a patch than the whole end result.. Please do mention the patch filenames when uploading, so I know what format they are.
Okay, sorry about the confusion earlier. This is the first time I've used bugzilla and done any sort of patching. Anyhow, below is the patch for the updated documentation. Specifically, I've updated the documentation for the timeout and the idle functions. The monitoring I/O chapter still needs to be updated. The patch also includes new examples for the two updated chapters.
Created attachment 15055 [details] [review] patch file for updated docs/examples described above
Created attachment 15056 [details] new timeout.cc example (patch above did not include this)
It looks good. I will make the following changes when I apply it: - I will put the examples in examples/book/ - I will remove the text "+//Its more memory efficient to only include the header files that your +// application will need rather than including <gtkmm.h>" because that's more a question of compile-time and I'd prefer our examples to use <glibmm.h> or <gtkmm.h> anyway. - I will use on_something() instead of something_callback(). - I will make some methods protected, because they don't need to be public. - I will avoid the use of CAPITALS for member variable. even if they are const they are not really constants. - I will use 2-space indentation, like the other book examples. - I might use stock IDs instead of hard-coded button names like "Quit" - I'm not sure how consistent we are about this. I won't have a chance to apply this before the weekend so feel free to revise the patch yourself in the meantime if you want to help me a little. Thanks a lot for this work - lots of people will appreciate it.
Actually, I might not have a chance to do this before the weekend either. If you revise the patch then I can get someone else to apply it sooner. Thanks.
Added PATCH keyword so this isn't forgotten about.
Also, there should be no source code directly in the XML files. It should be in examples/book/ and it should look like existing examples. Please update your patch, providing any extra directories/files if necessary.
Created attachment 15317 [details] [review] Final (hopefully) patch that incorporates all the above suggestions/fixes. - Updates Idle/Timeout chapters to Gtkmm2
Created attachment 15318 [details] timeout_files.tar.gz - added files for the above patch.
Thanks. That seems much neater. I'll review and apply it ASAP.
In the examples/book/timeout/timerexample.cc file, I forgot to change the < and > symbols to < and > respectively. Do you want me to resubmit a patch or can you make the changes when you apply the above patch? (about 3-4 places in that one file).
Please revise the patch. I might be able to apply this at the weekend.
I'll have a revised patch for you this weekend! =)
Patch and tar.gz for the additional files below. This updated patch fixes the problem described above, and everything compiles and seems to work fine.
Created attachment 15514 [details] [review] latest patch to update documentation for timer & idle functions
Created attachment 15515 [details] files.tar.gz - additional files for the above patch
Great. Sorry to be pedantic, but examples that go in the book should be in the examples/book directory. Whoever commits this could move this for you though. As long as that is done then I am very happy for someone to commit this, In future please also try to use spaces around operators and commas to make the code more readable.
the attached files.tar.gz should extract the files to the correct directories. (ie. the book examples go into their own directories under examples/book/, while non book examples go into their own directory under the example/ directory). If this is not correct, I can redo it.
Sounds good. Thanks. This should be applied.
I'm really sorry for the delay.
Murray, do you want me to commit it?
Yes, please - to both branches (that might mean glibmm 2.4, and that might be difficult so leave this open for 2.4 if necessary)
Applied to gtkmm 2.2 for now.
Applied to gtkmm 2.4, and cleaned up the examples in both branches.