Post a Comment
I've always wanted to learn some GUI programming with GTK+. I've just never had the time to. Maybe reading this will spark my motivation.
Another decent (and more extensive) tutorial for using GTK+-2.0 can be found on GTK's own site at http://www.gtk.org/tutorial/
If you want to learn GTK+ programming, and want to make it as easy as possible, you might consider http://gtk.php.net/ PHP-GTK.
I've used PHP 4/GTK 1.3 to write a large (80,000 line) application used to generate compliance paperwork for schools. It works well, and I can often edit the source code to a *running* program and see the result right away.
To hide the sources in distribution, I use ioncube encoder.
Because GTK+ is a toolkit on its own, it does not use the Windows toolkit in any way to get the look copied (similar to what toolkits do on OSX, where they can use the "Appearance Manager" API). wxWidgets and Qt do that on both Windows and OSX and so they feel more native. GTK has chosen not to do so and relies on the abilities of a Windows-like theme to make the look similar to Windows'. But a flat out answer to your troll-baiting question is: it was a design decision from Day 1. And it was probably easier to implement it this way.
Easier? So what? Are the GTK devs lazy?
If it means the difference between a decent toolkit that looks good in an OS used on 90% of the world's desktop computers, and a decent toolkit that looks out of place and causes some people to choose not to use GTK-based apps because of their appearance, then the choice is obvious.
If I understand correctly, Qt doesn't actually use Windows widgets, it uses XP's style engine to draw the widgets ( http://doc.trolltech.com/4.0/qwindowsxpstyle.html#details ), which gives them a native look that follows the theme etc. That is, assuming you are using Qt's XP theme.
But AFAICT, the same is true for GTK if you use GTK-Wimp ( http://gtk-wimp.sourceforge.net ).
So, is there a technical difference between what the Windows XP theme for Qt does and what GTK-Wimp does?
wxWidgets and Qt do that on both Windows and OSX and so they feel more native.
Qt does emulation which strikes a balance between native look and feel and maintainability, with the extremely complex differences you can get between supporting each platform natively. SWT has a lot of experience with this.
But a flat out answer to your troll-baiting question is: it was a design decision from Day 1. And it was probably easier to implement it this way.
That's a bit of a problem for a cross-platform toolkit, isn't it?
You don't have to mention Apple. It was an example to counter your little theory that only GTK+ apps look out-of-place in Windows.
Every app looks out of place in Windows, Microsoft apps included (hint: WMP). QT apps look out of place as well, you just don't take into account the fact that design-wise, KDE apps (which use Qt) are much closer to Windows than GNOME is.
Whoa whoa, don't put words in my mouth. I didn't say that ONLY GTK apps look out-of-place. That was your assumption.
And no, every app does not look out of place on Windows. Apple apps are even designed to look like Windows Luna/Classic, so that's a moot point. Microsoft's poor consistency with regards to Office/Media Player are something that I wish was corrected, but you can't have everything.
GTK apps, on the other hand, DO attempt to look like Windows, but do it poorly.
Have you ever looked at yourself at all? Please look at the mirror now! You will finally notice ... that.. actually... you are the poo itself! You look so out-of-place among us. Why is that? Do troll NO MORE. It makes you not-respectful/worthless person in this society.
Back to the topic, It seems the programming in GTK+ easier than I thought after quick look at the article. However, for this kind of development, I feel like OOP makes much more sense than non-OOP.
Back to the topic, It seems the programming in GTK+ easier than I thought after quick look at the article. However, for this kind of development, I feel like OOP makes much more sense than non-OOP.
It is OOP, the C-syntax just makes it look awkward. As the article shows, you can easily use Gtk with an object oriented language like Python or C# (and C++ of course).
well QT still has some licensing issues on windows and I had a lot of problem getting it setup and working along with pyQT due to the different versions... There is a unofficial FREE winQT port and and a official NC (non commercial) port but none seem to like the pyQT I was trying to use to build some pyQT apps...
I find gtk to be simple and have no problems on either platform...
A GPL version of Qt4 is available for every platform (including Windows) at this page: http://www.trolltech.com/download/opensource.html
If the GPL isn't good enough, then you have to pay. But it should be good enough for open-source, and if you don't want to write open-source (e.g. you want your users to pay) I don't see why you shouldn't expect to pay yourself.
PyQt hasn't caught up with Qt4 yet, but when it does no-one will have any troubles. Until then, you can still use C++.
Personally I find Qt to be a lot easier than GTK. It's important not to confuse "licensing issues" with actual development.
yea i think I mentioned that....
So you do a lot of QT and in particular pyQT developing on windows and have no troubles?
Please give me a step by step of your setup and let me know which python you use, which QT and which pyQT I would be very interested. When I do it my QT NC version always looks for the NC pyQT matchign version or some such and then it seems to overlook my python2.4 install and so forth...
Oh, I am mostly just trying to get some apps compiled and am having lots of problems...in fact I gave up! 
Come on get real. GTK apps don't stick out that much in Windows. I installed Gimp2 on all our labs windows xp boxes and nobody has said anything about how it looks. They are just happy to be able to edit their photos for free. Not everything has to have gel buttons on it or brushed metal to make it work well.
Edited 2006-01-12 03:43
For the look, yeah. WIMP does a great job. As for the feel... For example, the Save dialog is completely foreign. The redraw speed isn't typical of the other applications, either.
Of course, it doesn't remove its merits nor its usefulness. The possibility of using a powerful application for manipulating your pictures at no charge is nothing to sneeze at. Still, it doesn't feel completely at home. That said, it would probably need a new UI just for Windows and I don't believe the port maintainers are interested...
Agreed. With the WMP theme, gtk+ on windows looks pretty good. At least it uses native fonts, unlike the still butt-ugly Swing.
Yeah - though in the win port of Gnumeric you can choose if you want the WMP or GTK theme, I prefer it with the GTK look. But I guess that's the way I am used to seeing it.
The Swing fonts look worst on Linux/GTK especially with that disgusting parody of a GTK theme (I switch it back to metal if I can). Thank god for SWT, it gets the fonts right on both Windows and GTK and looks nice on both.
well poo, more often then not I disagree with you, however on this issue, I do agree with you, gtk apps look horrable in windows, I've run gaim and gimp in windows in the past and it looks nasty, I don't care because I haven't run Windows in quite some time on any of my machines but most people do run windows and they do care.
I'll be honest, I tend to lean towards qt for a lot of things but this is not why I say these things about gtk, I try to be very objective, and from my point of view gtk does not fit well into the windows api.
PyQt hasn't caught up with Qt4 yet, but when it does no-one will have any troubles. Until then, you can still use C++.
But it's getting there, while I was reading your post this message appeared on the PyQt mailinglist:-)
"You can find a binary package of a current snapshot of PyQt4 GPL for Windows
at http://www.riverbankcomputing.com/Downloads/PyQt4/"
Ah common, and look closer, notepad, winrar, winzip, powerarchiver, office, outlook look definitely not the same. Each of these apps have different toolbars, different size of icons, different menus, some are flat some are more 3D. On my win2000 machine, some apps have xp style menus, some don't, some apps use the File, Edit, View .. Help menu system some don't. Sometimes the difference between a VC app and a delphi app is far greater then notepad <-> gtk / Qt app.
I think that the bigger problem here is not how apps LOOK like but that they all WORK in a different way. Most gtk+ programs have a connection to gnome, which WORKS a *little* different than windows.
You forgot the apps that have colored icons by default, and those that appear gray and are colored when you point your mouse other them. There are so much examples.
Windows users that talk about inconsistency in other OS than Windows are zealots : the pot that call the kettle black. Everyone of them with some sense admit it, even on this thread, but they are quick to find excuses and dismiss what they found so important seconds before : talk about hypocrisis.
Currently, I have to use 2 Windows OS at work (NT4 and XP SP2), and you can bet no app look the same, and I have Wordpad, Outlook, Firefox and Explorer opened !!! Fonts are different, widgets are different, behaviour is different, size and design of icons are different, ... And they dare talk about consistency !! On the XP SP2 it's even worse.
I think that the bigger problem here is not how apps LOOK like but that they all WORK in a different way. Most gtk+ programs have a connection to gnome, which WORKS a *little* different than windows
The major problem is Windows zealots actually.
You say Gnome works a little different than Windows, I say it works a LOT different.
Gnome apps are consistent, Gnome apps are integrated, Gnome apps work right (well sort of), Windows apps don't.
There still are basic things that don't work on Windows : the application bar (which for example, shrinks itself at each reboot when in vertical position, or does not disappear automatically sometimes), the multi file selection (order still wrong when you paste), the install/remove that does not work, ... The inconsistent things have been listed already.
I have other examples of how Gnome works a lot different : simple click is usable, files copied have their size updated in real time, theme is consistent not per app, session works, input methods are consistent, virtual desktops works, multisession exists and is powerful, email clients never infect you, ...
Windows power users should stop these Windows zealots that give a bad reputation to their OS (there I said it).
These complaints were true, but as soon as Gnome 2.0 came out (with pango, gobject, gconf, gnome-vfs, ...) to address all of these, the complaints should have stopped, cause at least Gnome devs tried to do sth about these problems. MS did not do that for Windows till then, but you never hear a complaint from the zealot.
I would like to point out that the average user just flat out doesnt care if an application looks different.
Take Limewire for instance. I have asked MANY people if the different color scheme and controls bother them and most people didnt even pay attention/notice it till i brought it up. THe rest simply didnt care.
If the app is easy to use, the look and feel (at the trivial color scheme and button style) is absolutely the lease important factor for the average user.
Basically when these discussion arise it just shows that the average geek is long out of touch with the average USER.
I would like to point out that the average user just flat out doesnt care if an application looks different
That's my experience too. Actually, I never saw a user complain about that, except Windows zealots of course.
If the app is easy to use, the look and feel is absolutely the lease important factor for the average user
I'd go as far as saying even if the app is not easy to use, people will use the app without complaining, especially if that's all they know about/can afford. I used to do fansubs on Windows, and had to battle through a lot of hard to use apps and the crappy OS to get something done, but I never complained about inconsistency, I was at least getting work done, and that's what count.
Basically when these discussion arise it just shows that the average geek is long out of touch with the average USER
I don't think so, I think Windows zealots are out of touch. It has been showed time and again that geeks don't mind these things. Gnome 1.0 was heavily criticised as a geek desktop because of that.
"I would like to point out that the average user just flat out doesnt care if an application looks different."
I'd agree, but make an exception for the gimp. Aside from the internet, I've never met a person who didn't have to overcome an initial revulsion at its gui. I'm not trying to overstate the case either. Most artists I've shown it too really were right next to the point of cringing when I showed it to them.
Not really trying to put down the gimp, so much as just state amazement at how a single program can break so many expectations.
The gtkembedded object from Mozilla gives your gtk program the most 3wc compliant browser there is for you to easily hook to your hardware events, a whole big can of whoop-ass for embedded linux. I easily created browser javascript function hooks for a mag card reader and bar code scanner with it, endless possibilities available. GTK+ rocks.







