Qtox: Migration from gtk2 to gtk3

Created on 4 Oct 2019  Â·  10Comments  Â·  Source: qTox/qTox

I had a problem with building qTox.
I found the problem it is conflict glib2 2.62.1 with gtk2

some errors:

/usr/include/gtk-2.0/gtk/gtktypeutils.h:236: error: ‘GTypeDebugFlags’ is deprecated /usr/include/gtk-2.0/gtk/gtktooltips.h:73: error: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead
I did downgrading package glib2 2.62.1 to 2.60.7 it fixed the problem.

I think in future qTox need migration to gtk3 to avoid this problem.

C-bug M-packaging

All 10 comments

We should also re-check why we even have that dependency and if it's still needed at all.

qTox uses gtk for system tray icons
maybe need to use only QSystemTrayIcon for it?

I don't know, IIRC we once used some special code for Ubuntus Unity, not sure if Qt got everything properly working in newer versions of QSystemTrayIcon. It needs to be tested.

There is no more Ubuntu's Unity. Proof.

I checked QSystemTrayIcon on Ubuntu Unity. It works badly. The program after hiding doesn't show if use launcher(

We should maybe prune back our use of env specific icons, and prefer to use Qt's backend when available. Related issue: https://github.com/qTox/qTox/issues/5881#issuecomment-541519590. From https://stackoverflow.com/questions/41917903/gtk-3-statusicon-replacement, it looks like there isn't a GTK+ 3 replacement?

@anthonybilinski I agree, with removing specialized backends in favour of Qt.

From the link it seems however that GTK+ 3 doesn't support tray icons at all? Maybe we need a solution for such platforms too.

@TriKriSta I just tried on Ubuntu 16.04 with Unity, and during qTox start it logs that it's using the Qt tray icon backend, and it works well from my testing (menu works, status change, hiding to tray and restoring).

Which Ubuntu version were you on specifically? Can you post logs from it not working? And what do you mean exactly by "after hiding"? The qTox settings "minimize to tray" + minimizing?

@sudden6 in my testing at https://github.com/qTox/qTox/issues/5881#issuecomment-541892457, e.g. Arch which fails compilation because GTK is too old in qTox, still functions correctly when the Qt tray backend is forced, so I'm not sure we need to worry about GTK+ 3's lack of tray support if Qt is handling it for us (however it is), and based on that testing, switching to Qt backend for all DEs is looking promising.

@anthonybilinski Oh, I tested it again, and it works normally (in Ubuntu 16.4).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

anthonybilinski picture anthonybilinski  Â·  3Comments

dubslow picture dubslow  Â·  6Comments

ghost picture ghost  Â·  4Comments

tox-user picture tox-user  Â·  4Comments