
GTK has a new website - pjmlp
https://www.gtk.org/
======
turbinerneiter
I was playing with Glade the other day and it is quite a nice but also hard to
get into. I wish there were more examples. I'm try trying to replicate some
things I see in the GNOME settings app already, but I can't quite get it.

So - more Glade files as examples would be really helpful! Apperantly, most
GNOME apps don't use it,not I just can't find the Glade source files for them.

But I guess the fact that the tutorial link brings you to a tutorial which
doesn't work with the Glade version in the screenshot already gives away that
glad might not be first priority.

It's still pretty good tough.

~~~
cycloptic
You can use the GTK Inspector to look through an open program to see what
widgets it uses. It should be easy to understand if you're familiar with the
Chrome/Firefox debuggers.

[https://wiki.gnome.org/Projects/GTK/Inspector](https://wiki.gnome.org/Projects/GTK/Inspector)

What you'll find is that several GNOME apps use separate widget libraries like
libdazzle and libhandy to get their look-and-feel. These aren't necessary, but
they may save you some work to make your program feel a little bit more GNOME-
like.

[https://gitlab.gnome.org/GNOME/libdazzle](https://gitlab.gnome.org/GNOME/libdazzle)

[https://source.puri.sm/Librem5/libhandy](https://source.puri.sm/Librem5/libhandy)

~~~
turbinerneiter
Thanks, the Inspector is really cool!

------
jtvjan
The previous site, for comparison:
[https://web.archive.org/web/20200209181217/https://www.gtk.o...](https://web.archive.org/web/20200209181217/https://www.gtk.org/)

I think it's pretty strange that the code example widget defaults to showing
JavaScript code, considering that C is GTK's native language.

~~~
tomtheelder
I don't think that's strange at all. Having JS as your example has the
potential to lure in a huge pool of developers who have no idea that this is
even an option for GUI development in JS. On the other hand, C developers are
almost certainly already aware of GTK.

I don't really think that C being the native language has any significance in
this case.

------
ptx
Looks good!

What's going on with that app icon carousel, though? On mouse-over it shows
the link cursor, but nothing happens when you click the icons.

The feature list could also use some editing. I'm not sure what "enticing
features" and "superb performance" have to do with "stability", and there is
some random capitalization here and there.

------
ftio
Nit: the blue header background took a while to load. Since there’s no
`background-color` set, the white text on white background was really hard to
read.

------
phkahler
Under Apps Built with GTK, I'd like to see something more than Gnome utilities
and GIMP. How about adding Inkscape and SolveSpace? I'm sure there are more
large apps using it.

~~~
PaulDavisThe1st
Ardour, a cross-platform DAW, is written using GTK via the C++ language
bindings (Gtkmm).

------
slater
echoing the "good job", but not sure if a comma is needed in "Create
interfaces, that users just love"? Almost looks translated from German or
French

~~~
sandov
Maybe it's a rearranged version of "Create interfaces, users just love that".
i.e.: users just love interfaces, or users just love when you create
interfaces for them. If that's the meaning, I think it may be correct, but I'm
not sure.

;)

~~~
zapzupnz
That's even more non-sensical. The only problem with the original sentence was
the comma.

------
xwowsersx
I have only ever built for mobile or web. What is the state of affairs on
desktop? What are the options for building for desktop? If I wanted to build
an app targeting Mac, can I use gtk? Has anyone here done a gtk app with Rust?
Generally know very little about the desktop world, can someone enlighten me?

~~~
simion314
I don't have experience with GTK and I stopped working on Desktop apps since 4
years ago. If you target Mac users only then use the Apple tools, if you
target Windows only I would use .Net (C# and WinForms or WPF) for cross
platform depending of the target users I would use Qt or Java.

My choices are more on what is better for the user and not on what is cool for
the developer. Also if you have a small tool that the user will use it a few
minutes he will not complain about it's look the functionality is important.
As an example the games Sims 3 runs on Windows and Mac(not the latest
Catalina) and community made tools for cleaning save files. Most popular tool
was .Net and Windows only but someone made a Java tool that was cross-
platform, the users were happy/great full and not entitled to demand
profesional looking GUI for such a tool.

My advice , if you need a simple UI, buttons, labels, inputs then you should
use the thing that has the best support for the language and platform you
target. If you need to embed a uptodate webview or a video player or you need
to draw graphs, customize widgets then you need a different tool.

If you can provide what you need in details, what platforms, languages and
features you need then people could help eliminate the bad choices.

~~~
xwowsersx
Thanks for the reply. Why does Transmission, for example, have a Mac app and a
GTK app? They wanted a more polished Mac appaand gtk doesn't cut it?

~~~
simion314
Qt has a company behind so is more professional, better documentation, better
cross platform support, less bugs.

This video
[https://www.youtube.com/watch?v=ON0A1dsQOV0](https://www.youtube.com/watch?v=ON0A1dsQOV0)
is about the reasons Subsurface (a diving app started by Linus Torvalds)
changed from GTK to Qt. Things might have improved from GTK I can't tell and
also for simpler GUIs GTK might be enough.

------
tabtab
I wish someone would build a GUI markup language and "browser" based on GTK.
We need an interactive markup language for GUI's and GUI-centric behavior.
Forcing "the web" to act like a desktop takes way too many layers to be
reliable over time.

Make desktop-like apps great again! Webatizing everything proved a mistake,
unless you have deep dev pockets. Time to re-group.

Side note, GTK seems to lack a direct editable "data grid" widget with
expandable columns. On a typical data grid, you can drag a column border to
expand or reduce column width. It's a common need for data-centric CRUD apps.
There are work-arounds, but they are awkward.

------
josteink
Not sure what the old one looks like, but this is pretty appealing.

Up front and center code examples are nice, and IMO works well.

The Rust-example would have been a running application on my machine, had I
not already been in bed and reading it on my phone.

Good job!

~~~
jwilk
[https://web.archive.org/web/20200111102941/https://www.gtk.o...](https://web.archive.org/web/20200111102941/https://www.gtk.org/)

------
speedgoose
The website is working well on mobile, which makes me wonder if GTK has plans
to support Android and iOS. It would be nice. GTK has been multi-platform for
a while.

~~~
cycloptic
There was recently a forum thread where this was asked and the answer is no
[0]. I don't think there is much incentive to do this either because last I
heard the app stores on those platforms still have agreements that are
incompatible with the LGPL [1], which means you can't use them to distribute
GTK programs.

[0] [https://discourse.gnome.org/t/gtk-4-and-
android/2808](https://discourse.gnome.org/t/gtk-4-and-android/2808)

[1] [http://ebb.org/bkuhn/blog/2012/11/22/vlc-
lgpl.html](http://ebb.org/bkuhn/blog/2012/11/22/vlc-lgpl.html)

------
m0zg
Slightly off-topic, but does anyone know if there are adaptations of GTK out
there that are usable on embedded? I.e. full-screen EGL-based apps, like Qt
Embedded.

------
Sebb767
Looks awesome! Especially the code example in the center making it easy to get
started is nice; that's a thing which I though was lacking.

------
zerr
Good to see Rust as the "official" language. Btw, on the Go side, gotk3 also
seems to be quite an active project.

I hope wxRust will catchup some day.

~~~
nineteen999
Rust as "the" official language? Rust as "an" official (or supported)
language.

~~~
zerr
Yeah, yeah... [the] world would be much better place without articles :)

------
apatheticonion
If you're a native app developer, what options do you have for presentation
libraries?

~~~
AppAgency
Preview Transition,Pinterest Swift,Youtube Transition,Twicket Segmented
Control,XLActionController,Feed
UI,ExpandingCollection,DGElasticPullToRefresh,Persei,IGListKit,Presentation,Paper
Switch,Neon.

These are trending presentation libraries in iOS. Most of these have 500+
stars on github, and few have more than 2 K stars.

Feel free to contact me via sudeep at agicent dot com.

------
alg0rith
GTK still doesn't have thumbnails view in file picker. smh

~~~
tabtab
Somebody nearby mentioned that if it could (optionally) use a native OS file
picker, then that problem might go away or be reduced, assuming one can
control the viewing mode to switch the native one to show thumbnails.

------
tuananh
surprised to see vala is first class now. it's right there in the code binding
snippet example.

------
simohakki
today, if you use GTK with ruby you have to deliver MSYS2 (1go) and Ruby with
your GEM.

------
ancharm
This looks great.

------
youeseh
Hope you don't mind some criticism. I'm kind of a n00b...

How do I actually run the code examples that you've provided?

For example, I started a new Cargo project and pasted the Rust example
provided into my main.rs. It failed compilation. Should I have added a few
dependencies to my Cargo.toml first? Should I have upgraded Rust first?

I upgraded Rust, btw. And added lines to my Cargo.toml. No bueno. Now, I have
to go hunting elsewhere for answers.

A few extra lines of instruction would definitely save the thousands of
developers who're bound to get stuck.

~~~
zapzupnz
The samples are only there to give one an idea of how one would access GTK
from within certain languages — or maybe how easy, painless (?) it can be to
use.

It is expected that one would know how to properly add dependencies — and if
they did not, they should go read the documentation (from the 'Docs' link at
the top of the page).

I hate to be dismissive, but did you rtfm?

~~~
youeseh
Yes, in fact. I did go through the links to gtk-rs provided. Added the
dependencies. I still get a compilation error.

Shouldn't there be some continuity between the examples provided on the
webpage and tfm?

~~~
zapzupnz
Perhaps it'd be nice if there were a 'Documentation' button beneath the code
examples that takes you to the appropriate page in the Docs.

There doesn't need to be any further instructions on the landing page, though.
Again, that's what the docs are for.

~~~
youeseh
This is terrible. Even the example on the documentation page doesn't work. One
has to go to the issues page on github for gtk-rs to find that the
documentation in its current form is incorrect.

So, neither the example on the page nor the documentation work.

How desperate should one be to want to use GTK? Is this some kind of an
initiation?

PS. I can't reply to this thread any further.

I'll concede that I may be making a mistake copying and pasting things, but
I've checked a few times. If the job of the documentation is to help, then it
should address situations where people get stuck.

At this stage, the new gtk webpage feels akin to putting lipstick on a pig.

PPS. Seems like I can reply again.

~~~
zapzupnz
We're just taking your word for this. For all I know, you're making some
mistake or skipping some step and blaming it on the documentation.

I'm not sure if you're implicitly wanting us to diagnose your issue for you
without providing any actual information, but seeing as I have no idea if you
have GTK properly installed, the headers in the right place, or anything else
like that, I can't help but be sceptical that the documentation isn't up to
snuff.

~~~
youeseh
Oh, I didn't realize I had to install GTK separately - that I couldn't just
include the libraries in my Cargo.toml and hope the compilation would do it.

So, I went to part of the GTK Project page where it provides examples on how
to install GTK for Mac
([https://www.gtk.org/docs/installations/macos/](https://www.gtk.org/docs/installations/macos/))
and clicked on the installation script link under Getting Started. The
installation script link is broken.

~~~
zapzupnz
You would normally use Homebrew or MacPorts anyway.

