[RFC] GTK+ 3 Migration - Alpha-grade Patchset

Geert Janssens geert.gnucash at kobaltwit.be
Mon Feb 22 16:57:42 EST 2016


Hi Tobias,

For some reason I missed your original announcement. Your reply to John made me find it.

Anyway...

First off, thanks for the effort you have spent so far to migrate gnucash to gtk+3. I gather this is 
a huge job (and the size of your branch confirms this).

I agree with John we haven't decided on our future toolkit yet. However I also believe gtk+2 is a 
dead end and porting from gtk+2 to gtk+3 is currently the least effort we can make to stay 
relevant. Even if it may turn out gtk+3 won't be the future officially endorsed toolkit by the core 
developers at some point, it will bring gnucash now to a actively supported toolkit. So I am all 
for getting gnucash running under gtk+3.

Having said that, I unfortunately also have a few reservations with your current approach.

I looked a a few commits in your branch. My first impression is that the conversion happened 
slightly chaotically (like in a coding frenzy). That's fine for a first code run. However we prefer 
our central code to be more structured. The idea is that not only you at this point in time needs 
to understand what happened. All other gnucash developers should as well. And that means 
both at present as well as 5 years in the future.

So to get your work merged it will need some clean up at least.

A few general suggestions:
1. Better commit messages. Each commit message should summarize what the commit does.
2. Make changes as atomic as possible. One commit should focus on one change. Depending on 
the change, a commit can be large or small. As long as it remains clear what that commit is 
doing.
3. Split out cosmetic changes (like whitespace and indentation fixes) from functional changes.

I'll add more comments below between your message.

On Sunday 21 February 2016 20:12:58 Tobias Markus wrote:
> Hi GnuCash developers,
> 
> over the last few feeks, I have developed a fundamental patchset that
> should get GnuCash up and running in GTK+ 3.
> 
> The source code is available at GitHub:
> https://github.com/hesiod/gnucash/tree/gtk3
> 
> Some independent commits are on the next branch. All GTK+ 3-related
> stuff is on the gtk3 branch.
> 
> I'm sorry for the sometimes messy commits, but the number of commits
> is quite massive already and I really didn't have the time splitting
> them up. If you have any questions regarding a particular commit,
> feel free to ask me.

No need to apologize and we're not in a hurry. As said before however, your branch will need 
tidying before it can be merged.

> 
> DISCLAIMER: This is alpha-quality software and not at all ready for
> users! Please do not run GnuCash built from my development tree unless
> you want to contribute to the development process. This development
> version may delete all your data and eat your CPU!
> 
> While I got GnuCash pretty much working under GTK+ 3, a lot of further
> (fundamental and architectural) changes are required before even
> thinking about a release. Simply spoken, we now have GnuCash working
> in GTK+ 3, but using GTK+/Gnome 2 patterns. While it is possible to
> go down this path, the user experience will be substandard,
> especially compared to the current releases.
> 

Well, current release is obviously the baseline to compare with. If there are regressions in the 
current functionality, these need to be fixed indeed before release.

> Because GnuCash 2.0 was (afaik) coupled to the GTK+ 2 migration, I
> suggest that the GTK+ 3 version should be GnuCash 3.0.
> 

Perhaps indeed.

> A quick word on dependencies: I set the minimum GTK+ version to be
> 3.18 because I didn't try to compile it with any earlier versions,
> but backporting probably isn't too hard.
> 
We will have to check what's available in the distributions we intend to support. The two most 
conservative ones typically are Debian and RHEL.
Current stable Debian (8.0/Jesse) is at gtk+ 3.14.5. I don't think Debian will have another major 
release at least one year before the next major gnucash release.
RHEL (7.2) is at gtk+ 3.14.13.

So I expect we will need to support 3.14.

> Major changes already in my tree:
> * All "rich" GtkActions/GtkRadioActions/GtkToggleActions were replaced
> by abstract GActions/GMenus. This doesn't sound like a lot, but is a
> major change. Please read the relevant API documentation and do not
> hestitate to ask me if you have any questions about the new GAction-
> based infrastructure. Sorry for not going into more detail, but
> describing the technical peculiarities here would take considerably
> too long.
> * I removed the splash screen and replaced it by GApplication's busy
>   notification in some places.

What's the motivation to remove the splash screen ? GnuCash is a slow loading application. 
Several users prefer to have a splash screen indicating progress (like LibreOffice does for 
example).
And yes, I understand that we could optimize loading speed to avoid the need for a splash 
screen altogether. But we're not there yet by a long shot.

> * I updated the HTML code to use the Webkit2 API, but it needs some
>   more love.

That's a nice improvement. We were lagging on the Webkit upgrades. There is an important 
reason for that though: it's almost impossible to build webkit on Windows. Do you intend to 
tackle that part as well ? We'll need a usable Webkit2 library on Windows before we can land 
your webkit2 api.

As an aside: I would prefer to see the migration to the Webkit2 API as a separate project from 
the gtk3 migration to reduce the amount of moving parts per branch. If gtk3 migration depends 
on webkit2 API, it should be done first. If not, it can also be done after the gtk3 migration has 
stabilized.

> * Using GtkApplication renders everything related to
>   gtk-osx-integration unnecessary.

That would certainly be nice. John is in a better position to confirm or deny this.

> * This is unrelated to the GTK+ 3 migration, but I added a Markdown
>   version of the README and added a DOAP project description.

So now there are 2 README's to keep in sync and an additional DOAP description. I would 
propose to keep only one README file. I have no strong preference over plain vs Markdown. 
What benefit is the Markdown edition ?

And what benefit does the DOAP file bring us ?

Lastly as you say yourself, this is not Gtk+3 migration related, so would best be submitted as a 
separate PR.


More information about the gnucash-devel mailing list