On Fri, Aug 26, 2005 at 09:11:54AM +0200, Ralf Stephan wrote:
You wrote a while ago:
> ...
> Next is the main window work. This involves conversion of two code
> objects: SPView and SPDesktop. Each of those also have a variety of
> accessory classes to convert as well. This is the area I've been
> working on, and I'm trying to do it by first refactoring these from C to
> C++. If anyone's interested in working on this, I can give more details.
Yes, please. I assume ui/view/edit.* is the new class for SPDesktop,
so I guess what is next is completing Edit according to SPDesktop
and test it in the --new-gui environment. After that,
That's correct.
However, I found that straight up conversion of SPDesktop to ::Edit to
be difficult; I attempted to do this in one all-at-once conversion but
it quickly unravelled into a mess. I think the best approach is to do
the conversion a piece at a time. Start at an easy point and work your
way in.
The place I found to start was with converting SPView to C++. I've got
this about half done, and it'll be fairly obvious what's left to do.
After that, it may make sense to go ahead and knock out conversion of
the SPViewWidget class next, since that's not too complicated.
Since SPDesktop derives from SPView, having SPView in C++ is the first
step to convert SPDesktop. Next thing would be to start converting
SPDesktop into a C++ class. Next move the file(s) to their proper final
location. Finally rename SPDesktop to Inkscape::UI::View::Edit.
I found for the renaming, that it helped to create a typedef.
Note that there are some forward definitions of the class that get in
the way; I wasn't sure if it was better to remove them or to try to
refactor them. Ultimately, though, at some point you have to just start
going through the whole codebase and rename stuff. That sounds like a
lot of work, but actually for SPView I found I was able to do it over
the course of a long airplane flights. ;-)
> ...
> Fourth, there are several main window components such as the statusbar,
> context menu, and so on that have not received any attention so far. We
> have the gtk+ code for these items, and they just need to be converted
> to gtkmm. I suspect the best approach is to refactor them in place.
> The current statusbar code is pretty good, although it could use a few
> enhancements. The current context menu is okay but could use a lot more
> attention to make it more usable.
Do I have the order of things right?
It is likely I will take over single steps of the process *without*
taking over the whole thing officially, as I like to work on several
different micro-tasks at the same time, probably going the circle
documentation->bugfixing->refactoring->doc...
Thus, I will ask you from time to time 'what next?' until I have
the big picture.
Yes, I think you've got it. The process isn't totally linear; there's
several things that could be worked on independently. Let me know how
your progress goes; I expect to keep plugging away at it too.
Bryce