Live data from Hacker News

How Does One Create A Gtk+ Application?

blogs.gnome.org

51–60 of 103 posts

Re: How Does One Create A Gtk+ Application?

#51
post #47

Earlier quoted context omitted.

It would be stupid and pointless? The Qt Project is an incredibly open environment. You want cleanups, go and file some PRs. WTF is it with people's first instinct being "let's fork instead of contributing fixes"?

Sorry, "fork" was the wrong term. How about "long-term working branch that might get merged eventually, but also might get used in preference to the original to the point that people start just submitting their PRs directly to it"? (Think egcs's "fork" of gcc.)

And what is the point? You haven't actually suggested any improvements that require such a "fork"

Re: How Does One Create A Gtk+ Application?

#52
post #12

This state of Gtk sad, but I'm really glad we (VLC) moved to Qt, a few years ago (2006), before many applications did the switch, and when it was an unpopular move. Before that time, we were using WxWidgets and had many issues, notably with Unicode and Windows support. WxWidget APIs and behaviors were changing too much between releases (even minor ones). When we moved, we were in the early Qt 4.1/4.2 days, and most V…

Speaking from a Windows user perspective, Qt interfaces feel near-native, much unlike Gtk interfaces, where many of the little details don't quite match native behavior.

But there is this massively annoying little bug where submenus close immediately when you hover another top menu item before reaching the submenu. This makes quickly navigating menus quite cumbersome. (Doesn't happen with native Windows interfaces.)

Does anybody know if the Qt devs are aware of this? Don't they think of it as an issue?

Re: How Does One Create A Gtk+ Application?

#53

There is a lot of truth in this but it does take a very lazy attitude to testing. The simple truth is that if you need your application to support certain distributions, you need to be there on the development releases testing them and either submitting bug reports or improving your application. And you can automate much of this with a pile of bootable ISOs and a scriptable virtual machine. Testing isn't new.

It's not fair to put all the blame on the end developer IMHO. I mean, in Windows, Microsoft obviously take care not to break binary compatibility - even across several generations of OSes. Right now, in my Windows VM I can run Office 97 on Windows 7 [1]. That's an 18 year old piece of software. And it's still working fine. I upgrade Ubuntu and it's a flip of a coin whether Google Earth will stop working. [1] http://w…

Binary compatibility is noble goal, but when you have the source code to everything it can also be advantageous to just rebuild dependents. The Windows source code contained lots of extra complexity because of its legacy compatibility commitments.

Being mindful of ABI compat, though, is important because rebuilds mean more package downloads for end users and more builds for distros. That doesn't mean we should never, ever rebuild stuff, though.

The KDE project has a really helpful C++ ABI compatibility reference: https://techbase.kde.org/Policies/Binary_Compatibility_Issue...

Re: How Does One Create A Gtk+ Application?

#54

Earlier quoted context omitted.

> On the other hand, as a C++ library it really couldn't be worse, with its flagrant reinvention of the standard library, pervasive UTF16, complex object hierarchies, raw pointers, extensive use of macros, etc., etc. Have you given Qt a serious try? Most of the above arguments don't hold good at all. * c++ std lib is total crap. Anyone arguing for it has no idea what a good API is. Have you used Qt container? It's as…

No offence, but you calling the STL "total crap" can lend others to claim you haven't given the STL a serious try as well. A related stackexchange question on critisms of the STL [1] [1] http://gamedev.stackexchange.com/questions/268/stl-for-games...

He/she called the std lib total crap, not the STL. A very strong and broad statement though.

Re: How Does One Create A Gtk+ Application?

#55
There is a lot about GTK I like; it's a C library making compatibility easier[1], it always seemed way faster (less memory bloat?) than QT, and while the widget-packing/nesting style was somewhat ugly, I found it surprisingly easy to write.

I was even enjoying Vala. While it was obviously a young language, it had a lot of interesting ideas.

Then we got the new 3.x version of GTK with its "lets rewrite everything for no other reason than to break compatibility"[2] project goal that seems to have corrupted far too many projects recently. In addition to the problems already mentioned in this thread, it seemed so.. unfinished. Various components or features were gone or rewritten into something else. I guess they spent all their development time trying to tie Gnome and in as tightly as possible instead of finishing features.

The last straw was when they decided to join Pottering's "lets forget Unix and make Linux into Windows" crusade. A terrible design decision on top of years of other questionable choices and bad attitude about actually listening to user needs.

I supported GTK and Gnome waaaaay back when they first started, when the fight was between a Free (GPL) library and the increasingly popular proprietary-license-only[3] Qt. Now, I'm not sure what to support in the GUI toolkit area.

While I figure that out, my current project's GUI is being written in ruby-tk. The widgets in Tk have a terrible look and strange layout/interaction quirks, but at least it isn't a moving target and work more or less everywhere.

[1] e.g.: writing Ruby bindings C++ libraries can be problematic. While problems such as the name-mangled symbols are not as bad as they once were, it is still much easier to link a C library into a random environment.

[2] As Linus said, "...thou shalt not break working code."

[3] Trolltech changed the license about a year (?) afterwords.

Re: How Does One Create A Gtk+ Application?

#56
post #17

It's unfortunate that Linux and/or Linux distributions have not yet solved the problem of supporting parallel versions of dependencies. Even Node's package manager supports that. The end result is that rolling release distros break stuff often, as applications can't be tested and executed in isolation of each other. The "solution" to this is releasing everything every 6 months, when you can actually test everything t…

Well (I think) part of the whole point of a package manager is to reduce space by sharing dependencies. Npm seems to actually store a copy of the dependency individually for each package that requires it. I really think that is inefficient and a step backwards.

Re: How Does One Create A Gtk+ Application?

#57
post #12

This state of Gtk sad, but I'm really glad we (VLC) moved to Qt, a few years ago (2006), before many applications did the switch, and when it was an unpopular move. Before that time, we were using WxWidgets and had many issues, notably with Unicode and Windows support. WxWidget APIs and behaviors were changing too much between releases (even minor ones). When we moved, we were in the early Qt 4.1/4.2 days, and most V…

Speaking from a Windows user perspective, Qt interfaces feel near-native, much unlike Gtk interfaces, where many of the little details don't quite match native behavior. But there is this massively annoying little bug where submenus close immediately when you hover another top menu item before reaching the submenu. This makes quickly navigating menus quite cumbersome. (Doesn't happen with native Windows interfaces.)…

Am I correct thinking you are talking about this bug? https://bugreports.qt-project.org/browse/QTBUG-20094

If so, then yes they are aware of it and treating it as critical.

Edit: Reading into this bug is so cool. This video was linked from it, fascinating stuff: https://www.youtube.com/watch?v=90NsjKvz9Ns&t=18m46s

Re: How Does One Create A Gtk+ Application?

#58
post #55

There is a lot about GTK I like; it's a C library making compatibility easier[1], it always seemed way faster (less memory bloat?) than QT, and while the widget-packing/nesting style was somewhat ugly, I found it surprisingly easy to write. I was even enjoying Vala. While it was obviously a young language, it had a lot of interesting ideas. Then we got the new 3.x version of GTK with its "lets rewrite everything for…

You mean Qt?

Re: How Does One Create A Gtk+ Application?

#59
post #14

Earlier quoted context omitted.

I feel really conflicted about Qt. On one hand, as a graphical toolkit/environment, it's great. It's well-structured and easy to use, and QML is basically everything web applications should have been. On the other hand, as a C++ library it really couldn't be worse, with its flagrant reinvention of the standard library, pervasive UTF16, complex object hierarchies, raw pointers, extensive use of macros, etc., etc. Mayb…

> On the other hand, as a C++ library it really couldn't be worse, with its flagrant reinvention of the standard library, pervasive UTF16, complex object hierarchies, raw pointers, extensive use of macros, etc., etc. Have you given Qt a serious try? Most of the above arguments don't hold good at all. * c++ std lib is total crap. Anyone arguing for it has no idea what a good API is. Have you used Qt container? It's as…

Calling the C++ standard library crap is acknowledging the Wheel was Not Invented Here.

Glazing over the fact that Qt has an incredibly complicated object hierarchy by saying "they're good for you" is not acknowledging the fact that it's complicated and difficult to learn or work with. You didn't even mention, e.g., MOC - Qt's incredibly complicated Meta-Object Compiler. And people call GObject complicated...

Ignoring the fact that basically every other platform than Windows (and the platforms it has managed to infect) uses UTF-8 as its One True Encoding, and that you and Qt are proliferating the claim that every sufficiently complicated C++ project has its own string class with its own specific peculiarities is not a good thing.

Most importantly, you can't dismiss his concerns by agreeing that all of them exist and that he shouldn't care.

Re: How Does One Create A Gtk+ Application?

#60

There is a lot of truth in this but it does take a very lazy attitude to testing. The simple truth is that if you need your application to support certain distributions, you need to be there on the development releases testing them and either submitting bug reports or improving your application. And you can automate much of this with a pile of bootable ISOs and a scriptable virtual machine. Testing isn't new.

Testing is not enough.

I release an application "today" (and "today" for example is when Gtk 3.4 is released), and six months down the line the Gtk team decides to release Gtk 3.6 which breaks just about every application that has a GtkTable. As an application developer, I believe I have a right to be pissed.

How do I file a grievance? I go to the GNOME bug tracker to find my bug. CLOSED: WONTFIX - we don't care, our solution is you port to GtkGrid. Doesn't matter to us that you now have to bifurcate your codebase to work with people still running Gtk 3.0 or 3.2, or choose to ship your own built version of Gtk 3.4 with your application. Fuck you, application developer.

What do I do to mitigate the impact? Well, I have to spin an emergency release of my application, despite the fact that no other code might have changed, just because the Gtk team decided that breaking ABI was no longer a concern for them.

Now multiply this for basically every Gtk cycle from 3.4 to 3.1(3/4) and you realize the problem.

Post reply on HN