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

Decrease the tabs bar height in gnome terminal

I recently installed Lubuntu 16.04 with gnome-terminal. I like gnome-terminal to consume less space on monitor. But latest version comes with two annoying buttons at the right top corner which makes no sense to me. Because, user who prefer terminals…
Madhusudhan Kasula
  • 170
  • 1
  • 1
  • 9
13
votes
1 answer

How to embed external window in GUI (Python + Glade + Gtk3)

I started to build a GUI with Glade, python and Gtk3 libraries. I want to try to view an external window linking it inside a container in my GUI. Is it possible? Which is the best container object to do this? I started to search but easy methods in…
marcoresk
  • 1,837
  • 2
  • 17
  • 29
13
votes
4 answers

GTK3 and multithreading, replacing deprecated functions

I would like to replace deprecated functions gdk_threads_enter()/leave() in my application that uses threads. The application as it is now, works perfect (although i am not sure if this is the right way to do it). My main loop, runs the gtk_main and…
Sam Gomari
  • 733
  • 4
  • 13
  • 37
13
votes
5 answers

Gtk3 keys bindings in css files

Where can I find an exhaustive list of available keybindings that a user can define in a CSS file for GTK+ 3? I have already checked those…
cedlemo
  • 3,205
  • 3
  • 32
  • 50
13
votes
1 answer

Asyncio calls running in Gtk main loop

Okey guys question concerning asyncio and Gtk+. How can I run code below in Gtk.main loop ? I searched for example but couldn't find any. #!/usr/bin/python3.4 import asyncio @asyncio.coroutine def client_connected_handler(client_reader,…
harisk92
  • 1,088
  • 1
  • 14
  • 24
12
votes
2 answers

Use glade with pygobject Gtk3

I am converting a script to use Gtk3 using the migration guide (Porting GTK2 to GTK3). I converted my import pygtk to a from gi.repository import Gtk and so on... I'm stuck because the glade module was loaded from module gtk: import gtk import…
MP0
  • 1,033
  • 2
  • 10
  • 17
12
votes
1 answer

Bring new GTK 3 window to foreground on OSX

How do I bring any new GTK 3 window to the foreground on OSX sierra? Any window I open (using gtk-rs or python) ends up in the background first. I tried: set_modal(true) set_keep_above(true) present() Nothing seems to help and I couldn't find any…
languitar
  • 6,554
  • 2
  • 37
  • 62
12
votes
2 answers

python GTK3 limit label width

I've got a set of labels in a flowbox, the problem is that I would like for these labels to be 96px wide at most. I've set label.set_ellipsize(True), but since the flowbox gives them as much room as they like they don't get ellipsized, even though…
doxin
  • 698
  • 1
  • 7
  • 22
12
votes
3 answers

Displaying an image with Pygobject and Python 3 from in-memory data

I have some RGBA data in Python 3 and I want to display the image it represents in a GTK3 window without using any extra libraries. First thing I tried was editing a Pixbuf's data as in an example…
ikn
  • 123
  • 1
  • 6
11
votes
3 answers

How to configure VSCode for GTK3 for intellisense / build / debug and g++

I'm using g++ GTK3 VSCode How do I get the following to work: Intellisense / code completion for gtk Buiding inside VSCode Debugging with VSCode Problem: VSCode does not find includes - especially #include is red in source.
DarkTrick
  • 2,447
  • 1
  • 21
  • 39
11
votes
2 answers

GtkContainer/GtkWidget maximum width

I am trying to write an application that contains a GtkBox (Horizontal) where I add a dynamic number of buttons (with labels) depending on various conditions. Now I want to prevent the GtkBox to grow more than (for example) 600px. The button labels…
mame98
  • 1,271
  • 12
  • 26
11
votes
2 answers

customizing completion of GtkComboBoxText

How can I customize the completion of a GtkComboBoxText with both a "static" aspect and a "dynamic" one? The static aspect is because some entries are known and added to the combo-box-text at construction time with gtk_combo_box_text_append_text.…
Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
11
votes
3 answers

How to get the background color of a widget in GTK and Python?

I want to get the normal background color of a widget (a GtkHeaderBar, in this case). I'm currently using style = self.get_titlebar().get_style_context() to get the style, and color = style.get_property("background-color",…
user3474251
  • 209
  • 2
  • 12
11
votes
1 answer

How to detect the change of a GtkStack or GtkStackSwitcher

What I'm trying to-do is detect when a user changes the visible child in a GtkStack. I'm using a GtkStackSwitcher as a visible way to display buttons as per this design: Thus - when a person clicks/toggles one of those buttons I want to perform…
fossfreedom
  • 2,903
  • 2
  • 19
  • 40
10
votes
1 answer

How to create a cairo-gl surface under Gtk

I want to create a window using GTK 3 under linux (fedora 12) and draw on it a simple rectangle using cairo-gl backend, for this I want to create a cairo-gl surface. How can I do this, can anybody help me with a sample code. Thanks in advance. RC7
RC7
  • 101
  • 1
  • 4