maemo-leste / bugtracker

Issue tracking repository
62 stars 3 forks source link

Finish gtk3 port #261

Open MerlijnWajer opened 5 years ago

MerlijnWajer commented 5 years ago

I was wondering if we can bring a part of fremantle-gtk3 over -- namely the gtk3 parts (not necessarily ported hildon applications). This would allow gtk3 applications run on Maemo Leste with a proper theme.

@android-808 and @freemangordon - any clue what the state is and how it would be forward port any gtk3 patches to the gtk3 in ascii/jessie?

android-808 commented 5 years ago

Theme wise, it's a bit hit and miss. The title bar was working as it was themed by the window manager. Everything gtk theme wise would need the correct gtk3 theme CSS file. I might have some very early work on it, maybe window colour and notification bars.

We did at one point (either my repo or the Fremantle-gtk3 one) so hildon, hildon-desktop etc created the libs so it could be installed in parallel (libhildon3 Vs libhildon1) but I think off the top of my head that may have been reverted.

Also not sure if there would be issues like gtk3 applet in gtk2 panel

MerlijnWajer commented 5 years ago

Would be interesting to check out, anyway. Let me find some time and import the first games bits after fixing the signing key...

MerlijnWajer commented 4 years ago

@android-808 - Do you have some of your early work somewhere?

android-808 commented 4 years ago

First port, an updated version of Cordia version, might have been based on Nemo/Mer and Debian. If component was marked as deprecated it was removed. https://github.com/android-808/hildon

Second version based on Fremantle version, retaining components: https://github.com/android-808/hildon

I have repos for quite a few ported libs, libhildondesktop, hildonhome etc.

IIRC, freemangordon had an organisation called Fremantle-GTK3 (or similar). Then he started Fremantle-GTK2 which I think was updated GTK with Maemo patches and clutter 1 support. It may have then reverted to 0.8.

The biggest problem with clutter update is interface depreciation. The interface in 0.8 was replaced, and that new interface is replaced or marked for removal. At the time examples were almost none existent, even big projects were still using interfaces marked for removal.

MerlijnWajer commented 4 years ago

I think leste hildon-desktop uses new clutter interfaces already, I didn't realise that we used libclutter outside of hildon-desktop.

This looks great though, thank you.

Are there also additional patches needed for gtk+ itself? I think we have a bunch at least for gtk2, like here: https://github.com/maemo-leste/gtk/tree/master/debian/patches

MerlijnWajer commented 4 years ago

Fremantle-gtk3 is here: https://github.com/fremantle-gtk3

android-808 commented 4 years ago

Fremantle-GTK3 is probably the most up to date from what I recall. Whatever port it's based on, I would use the patches to build it as libhildon3 to avoid clashing with current install.

Theme would need to be worked out. I made a very small start on one to match default Fremantle (black windows, yellow gradient for notifications and maybe buttons) but not sure where it is at the moment.

For clutter, main area was stuff like task switcher transition which would be hildon-desktop. I only mention it in case people want to consider moving more towards GTK3 desktop with some GTK2 apps instead of GTK2 with some GTK3 apps.

I didn't patch GTK for either. My goal was to try to use upstream debs as much as possible. Can't remember what Fremantle-GTK3 did without looking.

Not sure if it's worth disabling CSD to stop GTKHeaderBar coming up under status bar (eg gedit). Can't remember if there's an envvar for this or not of hand.

If you check last few commits in second one there there's a comment on one part from fmg about one of the icons, I changed name to use standard icon name instead of Maemo so that needs changing back.

MerlijnWajer commented 4 years ago

I see, thank you. Should we just try to packaging this work, and see what breaks? (At least libhildon3 - I don't think moving our other core stuff over makes sense)

Regarding not patching gtk3, that does have an impact on how 'normal applications' (that are not aware of hildon) work, right?

MerlijnWajer commented 4 years ago

I don't think it makes sense to move over core apps yet, simply because it might be hard to have a status bar that works with both gtk2 and gtk3, same for home, and we have them working now, so would like to not break them. My hope was that we could build gtk3 hildon applications (dialer?) and maybe run gtk3 applications without changes (like empathy) - but I don't think the latter will change at all unless we patch gtk3.

android-808 commented 4 years ago

Libhildon3 and get the included test apps working correctly. They will run even on stock GTK3 outside of hildon-desktop but don't display correctly, notification bars appear but as windows with title bars etc for example. Under hildon-desktop they mostly display correctly.

What patches GTK3 might need, I don't know. I tested in VM and never got as far as virtual keyboard.

MerlijnWajer commented 4 years ago

For me, getting stuff like vkb integrated and working sounds like a reason to patch gtk3 if we have to.

MerlijnWajer commented 4 years ago

It looks like your hildon repo is further along, actually: https://github.com/android-808/hildon

limingchina commented 4 years ago

Is it a known issue for the menus of gtk3 apps? gtk3-menu-issue

It has some error message on the console:

(sol:4450): Gtk-WARNING **: 08:54:35.404: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node menuitem, owner GtkImageMenuItem)

(sol:4450): Gtk-WARNING **: 08:54:35.405: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node menuitem, owner GtkImageMenuItem)

(sol:4450): Gtk-WARNING **: 08:54:35.406: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node menuitem, owner GtkImageMenuItem)
android-808 commented 4 years ago

It looks like your hildon repo is further along, actually: https://github.com/android-808/hildon

This depends on what version/attempt that is, can't remember off hand but I messed up earlier post and put both repo links the same. The Fremantle-GTK3 like one is hildon, the Cordia based one is libhildon.

My first attempt I did on my own was based off Cordia that was started by Smoku. I built it on Debian (so systemd) using a number of Mer/Sailfish versions of MCE, DSME etc. Anything marked as deprecated in Fremantle got removed by Smoku, something I sort of agreed with. Smaller source, easier maintenance.

The newer hildon one retains the deprecated bits and Maemo/CSSU userland. I think iirc Fremantle-GTK3 was aiming to use upstart where as I still targeted systems.

For gtk2, patches were needed access a usually private struct/member to specify intent to control input for vkb. You specified it took numbers, passwords, text etc. For gtk3 you could do it without a patch, work is in one of the repos but hildon input enum didn't match exactly gtk3 version.

Is it a known issue for the menus of gtk3 apps?

Might be from changing to width-by-height/ h-by-w instead of using GtkAlloc somewhere.

MerlijnWajer commented 3 years ago

Just checked, the examples package of libhildon3 isn't sane yet. We'll get that fixed and start working on some theming, as well as the hildon input method port.

MerlijnWajer commented 3 years ago

This is the repo, btw: https://github.com/maemo-leste/libhildon3/

MerlijnWajer commented 3 years ago

@android-808 - you write:

For gtk2, patches were needed access a usually private struct/member to specify intent to control input for vkb. You specified it took numbers, passwords, text etc. For gtk3 you could do it without a patch, work is in one of the repos but hildon input enum didn't match exactly gtk3 version.

What repos is that? I'd like to take a look.

MerlijnWajer commented 3 years ago

Sorry, specifically I was asking about the hildon input module, if you already did the port that will save me some time, I can look at the enums.

MerlijnWajer commented 1 year ago

Adding this to the beta milestone, I think we'll probably really want to have this working by then. We've gotten stuck on themes now, so maybe we should just make a theme that kind of looks like the gtk2 one, for say the alpha theme, and then take it from there.

MerlijnWajer commented 1 year ago

@freemangordon has mostly finished the keyboard port