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
1
vote
1 answer

compiling gtk+3 project with msys on windows

I'm trying to compile a C project on windows that has a dependency on gtk+-3.0 (using msys to build it). Here's the list of gtk packages that I installed: $ pacman -Ss gtk | grep installed mingw32/mingw-w64-i686-glib2 2.52.3-1…
1
vote
1 answer

How to check gtk version in Vala?

I am developing some Gtk based application using Vala. In my application I want to add some custom styles. I want to retain my styles for both Gtk 3.20- and Gtk 3.20+ versions. As we are aware, Gtk3 has changed widget classes beginning from Gtk…
niyasc
  • 4,440
  • 1
  • 23
  • 50
1
vote
0 answers

Detect keyboard layout in GTK 3?

Is there a way to detect the current keyboard layout (i.e. "us", "de", "de_CH", "it"...) under GTK3 in a portable way? I don't need mswindows compatilibity, only linux, but it should work with both Xorg and Wayland backends and under different…
giox069
  • 137
  • 3
1
vote
1 answer

How to populate a GtkMenu with some GtkMenuItem and set its parent in Glade?

In a Gtk.Toolbar I have a Gtk.MenuToolButton with an arrow to which I want to associate a Gtk.Menu, preferably built in Glade. My code was this: self.menuToolButtonCalculate.set_menu(self.get_object("menuCalculate")) where…
silviubogan
  • 3,343
  • 3
  • 31
  • 57
1
vote
1 answer

Python Start & stop a continous function with Gtk Switch

I have a issue where I want a Gtk.Switch to start and stop a function. This function should work as long as the switch is active. For example it could just print "Function is on" as long as switch is active. But unless I thread this function it will…
user3566237
1
vote
1 answer

Why is the event handler called with different parameters when added in Glade vs. in code?

Below are 4 files: Case #1: example1.py using example1.glade. Case #2: example2.py using example2.glade. To see the output in both cases, the steps are the same for each case. Just click on the multiline label or on the link button after opening one…
silviubogan
  • 3,343
  • 3
  • 31
  • 57
1
vote
1 answer

How to set the label of a Gtk.LinkButton in Glade or in code after creating the button in Glade, without manually editing the .glade file?

I have a Gtk.LinkButton and I want to change it's label programatically during the execution of the program I am writing. I have found out that I can change the label by manually editing the .glade file. How can I change it programatically? I use…
silviubogan
  • 3,343
  • 3
  • 31
  • 57
1
vote
1 answer

GTK allow open files with new vala application

I'm developing a media player with Vala and I want to be able to open audio files with this application (once it is installed). In .descktop files I added the following MIME types to indicate which files can open (they are the same MIME types than…
bcedu
  • 158
  • 2
  • 10
1
vote
2 answers

Python GTK+3 tutorial--window appearing oversized, not like the example pictures

I'm working through the GTK+3 tutorials, and all the examples I have worked through--as well as code I've written using code as well as glade--produce a window larger than necessary. Does anyone have a suggestion for what I'm doing wrong, or how to…
user45878
  • 21
  • 5
1
vote
1 answer

Can't GTK3 programs be in multiple source files?

I am trying to make a C-program with multiple c-files in GTK3. As models I am using: how-to-split-a-c-program-into-multiple-files and this example-0.c My program looks like this: Functions.c (with the function activate) #include…
Store Nord
  • 13
  • 4
1
vote
1 answer

How can Devhelp be installed on Windows, with GTK+ stable documentation?

I searched with Google for Windows binaries of Devhelp but I did not find something useful. I use MSYS2 and in the MSYS2 MinGW 32-bit terminal I executed pacman -Q devhelp and pacman -S devhelp, but the package could not be found.
silviubogan
  • 3,343
  • 3
  • 31
  • 57
1
vote
0 answers

gtk paned handle fixed lower half

I'd like to fixed the lower half of the paned, the second childs height to a x pixels. When the window is resized it must stay at x pixels. You would think it would be easy but it doesn't seem to be the case. The problem I'm having is that when I…
AbstractDissonance
  • 1
  • 2
  • 16
  • 31
1
vote
1 answer

gtk/glade expandable toolbar

I guess I have a unique problem. I am trying to create a horizontal toolbar like widget that can can hold labels, buttons, and other gtk widgets. I want to pack as much info as I can but I also need it to work for various screen sizes. Ultimately…
AbstractDissonance
  • 1
  • 2
  • 16
  • 31
1
vote
1 answer

gtk expander with complex expander widgets

I have an expander that, instead of using a label, have a box with buttons and labels in it, sort of like a tool bar. The problem is that when I interact with those widgets, the expander is activated instead. Basically I want the expander to only…
AbstractDissonance
  • 1
  • 2
  • 16
  • 31
1
vote
1 answer

How to compiling C GTK3+ program in Linux mint for windows?

I am using Linux mint and gcc-7 and mingw-w64.I want to compile a c gtk3+ program in Linux using mingw so that it will produce .exe file which can be run in windows.I am able to Compile normal c programs using mingw,But I can't compile gtk…
user8102522