Questions tagged [gtk]

GTK (formerly GTK+) is a toolkit for creating graphical user interfaces (GUIs) with cross platform compatibility and an easy to use API.

GTK is written in C, and has bindings to many other popular programming languages such as C++ (), Python (, ), C# (), and Perl, among others. GTK+ is licensed under the GNU LGPL 2.1, allowing development of both free and proprietary software with GTK+ without any license fees or royalties.

"GTK" stands for GIMP Tool Kit. It was originally developed to serve as the widget set for The GIMP, the GNU Image Manipulation Program. In the intervening years its usage has expanded greatly.

This tag should be used for questions about GTK in general. For more specific questions regarding how a certain version works, use or .

Reference GTK 3 documentation: http://developer.gnome.org/gtk3/stable/

Reference GTK 2 documentation: http://developer.gnome.org/gtk2/stable/

GTK Java binding - http://java-gnome.sourceforge.net/

GTK 2 Perl binding - https://metacpan.org/pod/Gtk2

GTK 3 Perl binding - https://metacpan.org/pod/Gtk3

Books:

SO Chatroom:

8468 questions
182
votes
14 answers

How to show a GUI message box from a bash script in linux?

I'm writing a few little bash scripts under Ubuntu linux. I want to be able to run them from the GUI without needing a terminal window to enter any input or view any output. So far the only input required is a password for sudo - and gksudo handles…
Blorgbeard
  • 101,031
  • 48
  • 228
  • 272
119
votes
5 answers

GLib compile error (ffi.h), but libffi is installed

After a succesful configure, make exits with snipped gclosure.c:29:17: fatal error: ffi.h: No such file or directory compilation terminated. I have libffi installed, and locate ffi.h…
deltaluca
  • 1,652
  • 2
  • 10
  • 9
106
votes
14 answers

How do you find out which version of GTK+ is installed on Ubuntu?

I need to determine which version of GTK+ is installed on Ubuntu Man does not seem to help
Craig Angus
  • 22,784
  • 18
  • 55
  • 63
104
votes
9 answers

What should I choose: GTK+ or Qt?

Can someone suggest what's the best uses for those libraries today? Is it just GUI, or do they have database, XML, networking, threading, etc support too? I was reading about them, and considered starting to learning/using one of them. What is the…
Idan
  • 5,717
  • 10
  • 47
  • 84
74
votes
8 answers

How to make a GUI for bash scripts?

I want to make some graphical dialogs for my script but don't know how. I hear something about GTK-Server or something like that. If someone knows how to link Bash with tcl/tk I also be satisfied. Please do not post something like "change to C++"…
lauriys
  • 4,652
  • 7
  • 32
  • 40
69
votes
7 answers

Very large tabs in Eclipse panes on Ubuntu

My question is very similar to Stack Overflow question Gigantic Tabs in Eclipse on Ubuntu. I have tried the solutions presented, but they appear to be old. I have found a solution that nicely handles the toolbar and menus, but not a solution that…
Andy
  • 2,154
  • 3
  • 20
  • 16
68
votes
2 answers

Is recent GTK 3.22 still Boehm GC friendly (thread issue)?

The Boehm's conservative garbage collector is quite useful (e.g. Bigloo is using it, Guile is using something similar, etc....), notably on Linux (which is the only OS I care about; I'm using Debian/Sid/x86-64 if that matters, and libgc-dev package…
Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
48
votes
1 answer

Trying to style SwingNodes in JavaFX with GTKLookAndFeel freezes application

We have a Java application that used Swing, but we are migrating it to JavaFX. Therefore, we wrap the old Swing code into SwingNodes and replace them step-by-step. Before migrating, the Swing application used…
Markus Weninger
  • 11,931
  • 7
  • 64
  • 137
47
votes
2 answers

GtkDialog mapped without a transient parent

I have a GUI built in Glade (3.18) which is called by a Python 3 program (using PyGObject). I get a lot of warnings when running the program (Fedora 21) that say: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. How…
tobias47n9e
  • 2,233
  • 3
  • 28
  • 54
43
votes
3 answers

What is the relation between GTK, GTK+ and GTK2?

I'm confused by the GTK terminology. According to Wikipedia, there seem to be bindings to GTK+ that are called GTK (GtkAda) and GTK2 (gtk2hs, Gtk2-Perl). Could someone clear this up for me?
Tim
  • 13,904
  • 10
  • 69
  • 101
42
votes
3 answers

GTK implementation of MessageBox

I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL, so this isn't a GTK app. I handle the initialization (gtk_init) sort of stuff inside the MessageBox function as follows: int MessageBox(HWND hwnd, const char*…
Bernard
  • 45,296
  • 18
  • 54
  • 69
41
votes
7 answers

How to change the highlight color in autocomplete box in Eclipse

I can't find a way to change the color of the highlighted selection in the autocomplete box in Eclipse. As you can see from the screenshot white text on light gray background is not very readable. Ubuntu 11.10 with Unity and Eclipse…
Emil Ivanov
  • 37,300
  • 12
  • 75
  • 90
40
votes
1 answer

GLib-CRITICAL **: Source ID XXX was not found when attempting to remove it

I made a treeview with a treestore as model. The window is shown as expected, but when I click in the "+" to expand the items, I get this message: GLib-CRITICAL **: Source ID 221 was not found when attempting to remove it Here is my code: #include…
Joel
  • 1,805
  • 1
  • 22
  • 22
40
votes
1 answer

How to install gtk development dependencies on Ubuntu?

I have the code from GTK tutorial in base.c. I am working on Ubuntu and when I compile using $ gcc base.c -o base `pkg-config --cflags --libs gtk+-2.0` I get the following error Package gtk+-2.0 was not found in the pkg-config search…
Kraken
  • 23,393
  • 37
  • 102
  • 162
38
votes
1 answer

Sometimes GTK modal dialogs are not modal --- bug or feature?

When I create a custom dialog in GTK (both, GTK2 or GTK3) and set it to be modal, all input to other windows of my application is ignored. This works nearly always, but it fails under certain conditions. When I add a ScrolledWindow containing a…
Simme
  • 565
  • 4
  • 7
1
2 3
99 100