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
23
votes
5 answers

" Gtk-WARNING: Unable to locate theme engine in module_path: "murrine" error while installing Adobe air installation on Ubuntu 13.10

Hi I'm new to Ubuntu and I need to install Adobe Air on my computer! I have Ubuntu 13.10 version. I have followed the following steps: $ sudo apt-get install libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386…
user3174967
  • 245
  • 1
  • 2
  • 4
23
votes
3 answers

keyboard interrupt with with python gtk?

So just like the question says, I'm trying to let keyboard interrupts happens while Gtk.main() is in progress, however, it just doesn't seem to notice that the keyboard interrupt happens until after the function is done. So I tried sticking…
QxQ
  • 675
  • 7
  • 18
23
votes
6 answers

Scale an image in GTK

In GTK, how can I scale an image? Right now I load images with PIL and scale them beforehand, but is there a way to do it with GTK?
Claudiu
  • 224,032
  • 165
  • 485
  • 680
22
votes
3 answers

Where GTK finds icon names to use with gtk_image_new_from_icon_name()?

GTK can construct images by name of the "icon from current icon theme". For example: #!/usr/bin/env python import gtk; wnd=gtk.Window(); img=gtk.Image(); img.set_from_icon_name( "go-jump", gtk.ICON_SIZE_BUTTON ); wnd.add( img ); img.show();…
grigoryvp
  • 40,413
  • 64
  • 174
  • 277
22
votes
4 answers

How to distribute a GTK+ application on Windows?

I have installed GTK+ (specifically GTK3) via MSYS and MinGW on Windows. I now want to copy the GTK+ dlls to my application directory so that it can be run on a computer without a global GTK+ installation. Which dlls are required for GTK+ to…
bradrn
  • 8,337
  • 2
  • 22
  • 51
22
votes
1 answer

Cabal install gtk failing

I'm trying to install gtk via cabal, however, I'm getting the following type errors when building it [ 22 of 209] Compiling Graphics.UI.Gtk.Embedding.Plug ( dist/build/Graphics/UI/Gtk/Embedding/Plug.hs, dist/build/Graphics/UI/Gtk/Embedding/Plug.o…
Matt
  • 4,029
  • 3
  • 20
  • 37
21
votes
1 answer

Adding a slider to AppIndicator (Ubuntu 11.04)

I'm trying to add a slider to an AppIndicator similar to what the Sound Menu has. I've looked through the code of the Sound Menu and found that I should be using libido-0.1. Here's what I have so far: indicator_menu =…
Romeo Calota
  • 333
  • 1
  • 4
21
votes
2 answers

How does one add an item to GTK's "recently used" file list from Python?

I'm trying to add to the "recently used" files list from Python 3 on Ubuntu. I am able to successfully read the recently used file list like this: from gi.repository import Gtk recent_mgr = Gtk.RecentManager.get_default() for item in…
Laurence Gonsalves
  • 137,896
  • 35
  • 246
  • 299
21
votes
2 answers

GTK and PYGTK difference

many programmers import both gtk and pygtk in this way: import gtk import pygtk I have created a simple program using only gtk and it works: import gtk window = gtk.Window() window.set_size_request(800,…
xRobot
  • 25,579
  • 69
  • 184
  • 304
21
votes
1 answer

What's the difference between X-Windows, wxWidgets, GTK/Qt and OpenGL?

I've been doing console programming for a few years, and now it's about time that I learned a little about the fascinating world of GUIs. I've dabbled a little in wxWidgets; compiled a Hello World program, played around with it a little, etc. Now…
MGA
  • 1,658
  • 15
  • 28
21
votes
3 answers

How to configure gtk on Visual studio 2010

I have tried configuring gtk+ on visual studio but doesn't work properly., Can anyone suggest me with a proper solution, as how to install gtk on Visual studio 2010
Nischal Kumar BC
  • 227
  • 1
  • 2
  • 10
21
votes
2 answers

Compiling and Linking GTK 3 with C project on Ubuntu

I believe this is not a duplicate question, I have seen all questions/answers before I post this question. I think I have a different situation here. I use Ubuntu 12.04 and downloaded GTK 2 and 3. I have copied a simple GTK source code from GNOME's…
Anwar
  • 4,470
  • 4
  • 24
  • 30
20
votes
3 answers

How to disconnect a signal of Gtk?

Will signals automatically disconnect, when target object is destroyed? Without recording the signal id from g_signal_connect(), can I remove that signal?
daisy
  • 22,498
  • 29
  • 129
  • 265
20
votes
5 answers

Pango-WARNING **: failed to choose a font, expect ugly output

I'm getting this error when starting anything that uses the Pango library. I'm using Kubuntu 9.10. I've done 'sudo apt-get --reinstall install' on libgtk* libcairo* libpango* and fontconfig, with no luck. Could someone point me in the right…
Andrew
  • 201
  • 1
  • 2
  • 4
19
votes
7 answers

Netbeans 8.1 Gnome 3 GTK+ UI Font and tabs height

I just installed NetBeans 8.1 at Ubuntu 16.04 running GNOME 3 desktop. I would like to keep using the GTK+ Look & Feel of the IDE if possible but the font on the UI especially in the tab is way too small and overlapping. I tried adding --fontsize…
d4v1dv00
  • 971
  • 4
  • 10
  • 21