Project

General

Profile

GTK2 port

Added by John Lindgren almost 10 years ago

As anyone using Git master has noticed (or will notice soon), the GTK+ interfaces are now using GTK2 again rather than GTK3. The change was made because certain design choices [1] in recent releases of GTK3 have made it increasingly difficult to write a "traditional" PC / desktop program using the toolkit. The long-term goal is still to switch to Qt; however, the GTK+ interfaces need to remain stable in the meantime, and going back to GTK2 appears to be the only way to achieve this.

The 3.5.x branches of audacious and audacious-plugins are still using GTK3. There are also new gtk3 branches which will be kept up-to-date with the master branch. If there is enough interest, we might provide separate GTK3 tarballs for the 3.6 release. Let us know if you are interested in continuing GTK3 releases.

[1] A few examples of non-traditional design choices: monochrome icons (or none at all), client-side window decorations, and message windows mimicking Android.


Replies (13)

RE: GTK2 port - Added by Audacious User2 almost 10 years ago

No issue switching to GTK2 here (in fact, it actually looks better with the theme I'm using). Then again, I'm not a distro packager (or gnome user...)

A couple of things when enabling the QT interface.
- The "position" marker (i.e. bolding the current track to indicate its playing) gets stuck on the GTK interface when one builds with Qt enabled (this happened with GTK2 and 3). It won't update until audacious is restarted, and I don't see any errors in verbose output. Using Debian sid 64-bit.

- I found it odd that I had to pass "--enable-qtui" and "--enable-qt" to audacious-plugins in order to get the Qt interface to build. Is that an oversight, or is there a reason for the separate options?

Thanks

RE: GTK2 port - Added by John Lindgren almost 10 years ago

You need to compile Audacious core without --enable-qt in order to use the GTK interfaces. On Linux, the Qt UI should still work this way (not the case for Mac OS X or Windows). I will try to make the options less confusing before the next release.

RE: GTK2 port - Added by Jean-Alexandre Anglès d'Auriac almost 10 years ago

What do you mean by monochrome icons? Are the icons not determined by the icon theme?
Is it about the icons in the file selector? Or is it something else?

Apparently, Wayland will bring CSD to all anyway :(.

RE: GTK2 port - Added by John Lindgren almost 10 years ago

Anne O'neam wrote:

What do you mean by monochrome icons? Are the icons not determined by the icon theme?

GTK+ has started using icon names ending in "-symbolic" to request monochrome icons specifically. Of course you could defeat this behavior by creating an icon theme providing colored icons under the "-symbolic" names as well, but it's a hack and I'm not aware of any icon theme that does so.

Apparently, Wayland will bring CSD to all anyway :(.

That is a myth. See http://blog.martin-graesslin.com/blog/2013/02/client-side-window-decorations-and-wayland/.

RE: GTK2 port - Added by Q. P. almost 10 years ago

Hello,

this has made it to the news (plus lots of comments):

http://www.webupd8.org/2014/06/audacious-going-back-to-gtk2-starting.html

;)

Regards

RE: GTK2 port - Added by Anonymous over 9 years ago

Hi, so I just heard that you were moving back to GTK2 for 3.6. I know that criticism is more common than praise, so I really wanted to stop by and offer my sincere thanks as an Xfce user for this change.

Pretty much the only two themes capable of skinning GTK3 apps well has been Adwaita and Clearlooks-Phenix. All of my other, more preferred themes, render GTK3 applications themeless (eg like GTK1 applications used to look.) I've experienced increasing regressions caused by the GTK3.x changes that have been going on, up to and including these doubled title bars now, and really wanted to simply drop use of all GTK3 programs.

But audacious was definitely my favorite, and most useful GTK3 application. So seeing it moving back to GTK2 has really made my week (my goal is now realistic.) Qt will also be fine for us on Xfce, thanks to QGtkStyle.

So thank you again, and thank you for making such a fantastic, simple, easy to use music player for Linux and BSD. If you guys run into any issues programming in Qt, please let me know if I can help. I have a few years of experience with Qt, and know the toolkit very deeply.

By the way, as a long shot idea, one of my projects is that I write a very lightweight toolkit wrapper in C++11 (lambda callbacks!), very similar to Qt. It's a ~200KB library that you build with a define-flag to select between GTK2, Qt4, Cocoa and Win32. It's very easy to add new backends as the API strives for minimalism. So you write your UI only once, statically link this wrapper (GTK/Qt remain dynamic) at a ~50KB binary size cost, and the same code can produce 100% native interfaces for any of those toolkits. Plugin libraries can use the same API wrapper, too. It lets you move between the toolkits without having to rewrite anything or maintain multiple forks. The downside is that it's not really 100% ready for broad use or well-documented yet, but if that idea really appeals to you, it's capable of doing about 95% of the stuff your UI does now easily, and we could add the rest quickly. I imagine you probably don't want to experiment with something entirely new though, just thought I'd mention it since you're planning a rewrite now.

Regardless, thanks again and best wishes on whatever you ultimately decide to do!

RE: GTK2 port - Added by John Lindgren over 9 years ago

byuu san wrote:

So thank you again, and thank you for making such a fantastic, simple, easy to use music player for Linux and BSD. If you guys run into any issues programming in Qt, please let me know if I can help. I have a few years of experience with Qt, and know the toolkit very deeply.

The best help would be to try out the Qt UI, take note of where it's lacking in comparison with the GTK UI, and see if you can fill in a missing feature or two. Copying or porting code from the GTK UI (or libaudgui) is perfectly fine, and you can use GitHub to submit pull requests. Also, as of this past weekend, you can include Qt and GTK support in the same build. Just run "audacious --qt" to get the Qt UI.

RE: GTK2 port - Added by Meister P over 9 years ago

John Lindgren wrote:

If there is enough interest, we might provide separate GTK3 tarballs for the 3.6 release. Let us know if you are interested in continuing GTK3 releases.

Well, since I'm a gnome3 user, I would like to see the GTK3 version to be continued.

RE: GTK2 port - Added by Ariadne Conill over 9 years ago

I would just like to say that the Qt UI is growing at a fast rate, so if you do not want to use the Gtk2 port, the Qt port could easily be viable for your needs soon.

There are several people using it for their day-to-day use already.

RE: GTK2 port - Added by Anonymous over 9 years ago

Is a Qt port truly necessary? It seems they're backpedaling some decisions with GTK3.14

http://blogs.gnome.org/mclasen/2014/07/28/a-talk-in-9-images/

RE: GTK2 port - Added by John Lindgren over 9 years ago

Well, it's good to see they've reversed one bad decision. However, a widget toolkit is a pretty important shared library, and one that should remain usable at all times. One should not be breaking it with each new release and then waiting until all one's users are leaving to fix it.

RE: GTK2 port - Added by Ariadne Conill over 9 years ago

Daniel Mota wrote:

Is a Qt port truly necessary? It seems they're backpedaling some decisions with GTK3.14

http://blogs.gnome.org/mclasen/2014/07/28/a-talk-in-9-images/

The Qt port was going to happen regardless of the GTK3 debacle. The fact that we've been burned multiple times by GTK3 just means that the Qt work will be eventually the main focus of Audacious from this point forward.

We can do so much more with Qt than we can with GTK, simply because the documentation is good, and the community is actually committed to helping people build the things they want to build.

RE: GTK2 port - Added by John Lindgren over 9 years ago

Anyone like the status icon? That's now deprecated in GTK+ 3.14.
https://git.gnome.org/browse/gtk+/commit/?id=cab7dcde1bef1ea589a9f3c4d8512e59ade8a4a2

    (1-13/13)