On 16-4-2011 8:46, Jon Cruz wrote:
On Apr 15, 2011, at 1:56 PM, Johan Engelen wrote:
Toolbar spinboxes also have this functionality, but lack the unit stuff. (where it would be really convenient :( I will not work on this unit functionality in the toolbar. Maybe someone else can work on C++-ifying the "ege action" stuff and widget/toolbar.cpp, a first step on the way to getting there. In all C++ UI stuff it is easy to add, and let me know if it is missing somewhere.
We have a problem there.
First you did change 10168 which was commented as "remove ridiculous comment"
Unfortunately that was not a ridiculous comment. It was there for a reason. Some parts of our codebase are meant to stay C instead of C++, such as our copies of libraries, code to be shared with non-C++ projects, etc. (when you hit such an item, you can look at the detailed history of the file to see who added it and ask, etc.)
There are also some portions that are plain C++ and not Gtkmm. Those make it easier to share things with other projects, especially Qt/KDE based ones such as Scribus.
Additionally, more than just being C, we have some very tricky issues with Gtkmm vs plain GTK+, and many things work only halfway if implemented with the wrong language. So there are some big picture issues to consider.
I stick to the commit message of r10168.
The C code is very verbose, difficult to read, and no fun to maintain. Especially subclassing is terrible in C-style, and I guess this is why there is so much duplicate code to be found in the UI: nobody can re-use widgets from other parts.
In all C++ dialogs/widgets it is easy to add the extra functionality, and I will do it. In all C code, I will not.
Ciao, Johan