Questions tagged [gtk3]

The GIMP ToolKit (GTK+) in its version 3.x. GTK+ is a highly usable, feature-rich toolkit for creating graphical user interfaces (GUIs) that boasts cross platform compatibility and an easy to use API.

GTK+ is written in C, but has bindings to many other popular programming languages such as C++ (), Python (), and C# 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.

The latest version is GTK+ 3, released in January, 2011.

For questions not specifically regarding GTK 3, please use instead.

Reference documentation in C

Reference documentation in Python

3219 questions
8
votes
1 answer

"Allocating size to..." GTK Warning when using Gtk.TreeView inside Gtk.ScrolledWindow

I'm receiving the following warnings in my GTK 3 application: Gtk-WARNING **: Allocating size to __main__+MCVEWindow 0000000004e93b30 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? The…
Doom8890
  • 435
  • 3
  • 15
8
votes
0 answers

Unable to Install GTK3.4(libgtk-3.so.0) to run firefox in AWS ec2

I am trying to run my selenium script which has been developed in Selenium 2.53.0 using firefox 46 in a headless AWS linux server. AWS has GTK2.0 and Firefox 46 is compatible with GTK3.4 and above. I tried to install GTK 3.4 from the given links…
8
votes
1 answer

Custom Signal with GTK3 in Ruby

I would like to emit a custom signal from a Widget in gtk3. In GTK2, there was a function called signal_new to create a new signal. You can see an example here:…
0xAffe
  • 1,156
  • 1
  • 13
  • 29
8
votes
2 answers

C: GTK+ 3.0 (3.20) - Cross-Compile from GNU/Linux (Arch Linux) to Windows

I need to cross-compile GTK+ application from GNU/Linux (Arch Linux) to Windows. I have already tried to use mingw32, but it does not see all libraries (including c's standard library!). So, I need to: find the standard libary; find all other (glib,…
handicraftsman
  • 181
  • 1
  • 13
8
votes
3 answers

What's the difference between GtkApplication and gtk_init?

I am now learning to use GTK+3.0 with C in Linux. After reading some tutorials and sample code, I have some questions regarding how to initialize an application. Here are two versions of code I have seen. #include static void activate…
zhshr
  • 95
  • 1
  • 8
8
votes
1 answer

How to change size to GtkWidget with CSS?

I'm trying to create a custom GTK Theme based on Adwaita, but I don't know how to set specific dimensions to some components only using CSS. Example: I want each selector ".titlebar .button" sized to 60x50 pixels. Thanks in advance
Luis Daniel
  • 687
  • 7
  • 18
8
votes
1 answer

GTK3 Drawing area tutorial does not seem to exist?

I've been learning GTK3 on my own and I'm now stuck on Gtk.DrawingArea. As with most widgets and functions in GTK, there seems to be a lack of updated documentation and tutorials on this. For reference as to what I've found(hopefully this will help…
Swashy
  • 177
  • 3
  • 6
8
votes
1 answer

How to create a complete menu using GIO Actions in PyGI GTK?

I'm trying to convert the menubar in my Gtk app so it will use GActions(from the Gio) as opposed of GtkActions in Python3 using GObject Instrospection. I've been trying to figure it out on my own but so far it seems awfully complicated and I didn't…
OdraEncoded
  • 3,064
  • 3
  • 20
  • 31
8
votes
2 answers

How do I make a gtkwindow background transparent on Linux?

I would like to make the background transparent, and only the widgets are visible. Here is my code: #include int main (int argc, char *argv[]) { gtk_init (&argc, &argv); GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL); …
CJD
  • 185
  • 1
  • 2
  • 8
8
votes
2 answers

Gtk.CssProvider() how do ID based selectors work in Gtk3?

I've been fiddling with this on and off for a couple of days but just can't seem to come to grips with what the issues might be. Essentially I'm trying to style some Gtk Widgets in Gtk3 using CSS style declarations, nothing complicated but just…
jduren
  • 630
  • 5
  • 11
8
votes
1 answer

python and gtk3 clipboard onChange

With PyGTK 2 I could attach a function to be executed when the contents of the clipboard was changed. Browsing through the documentation of GTK3's python bindings I can not find any description of such an functionality. Can anyone tell me the 'best…
user1773242
  • 194
  • 6
8
votes
3 answers

Load and show an image from the web in Python with Gtk 3?

I'm writing an app on Ubuntu 12.04 with Python and GTK 3. The problem I have is that I can't figure out how I should do to show a Gtk.Image in my app with an image file from the web. This is as far as I have come: from gi.repository import Gtk from…
Daniel Jonsson
  • 3,261
  • 5
  • 45
  • 66
7
votes
3 answers

How do I raise a window that is minimized or covered with PyGObject?

I'd been using the answer provided in the PyGTK FAQ, but that doesn't seem to work with PyGObject. For your convenience, here is a test case that works with PyGTK, and then a translated version that doesn't work with PyGObject. PyGTK Version: import…
dumbmatter
  • 9,351
  • 7
  • 41
  • 80
7
votes
1 answer

setup rust + gtk::Application to ignore --config argument

I am displaying a UI in a rust based application using gtk3. I am parsing the arguments in the main method for a --config argument in order to find a custom configuration file. The gtk::Application object also does some command line processing and…
ferd tomale
  • 845
  • 7
  • 20
7
votes
2 answers

Learning GUI programming with GTK+2 or GTK+3?

I am new to GUI programming, and I haven't found yet what library is best for my purpose (i want to make desktop environment applications, eg. docks, panels, desklets etc.) I have started learning basics of GTK, mainly using PyGtk. Most tutorials i…
neydroydrec
  • 6,973
  • 9
  • 57
  • 89