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

PyGObject GTK3 widget color does not work

I have recently started using pygtk/PyGObject and have been trying to apply or change the background color or a simple button or any other widget using the following line of code obtained from one of the QA…
Naten Baptista
  • 137
  • 1
  • 1
  • 9
1
vote
0 answers

How do I use a GListStore from haskell-gi)? In other words, how do I cast a Ptr () to a GObject?

I'm trying to use the bindModel function of gtk3's flowbox, so that I can just give it a model and creation of child widgets, sorting, and filtering will be done for me. The process of storing and retrieving data into this model isn't clear to me…
Arthur
  • 193
  • 1
  • 9
1
vote
1 answer

Py3cairo installed on mac via Brew, but Pygobject3 says 'pycairo' not found on install

This is what happens when I try to install py3cairo (because it is already installed): brew install py3cairo Updating Homebrew... Warning: py3cairo 1.10.0_3 is already installed brew upgrade py3cairo Updating Homebrew... Error: py3cairo 1.10.0_3…
Zhiming010
  • 303
  • 4
  • 14
1
vote
1 answer

Move GTK+ window in real-time

I am creating a moving window that uses face detection coordinates as an input to assign the window's new position. Currently, the face detection is functional, but the window does not get displayed until the very end of the capture loop. My…
Alex Magsam
  • 53
  • 1
  • 7
1
vote
1 answer

GtkBox center center contents

I have a horizontal GtkBox with three inner components short left | A large mid component | medium right I want the sizes to be x | y | x where x=max(short left,medium right), so A large mid component becomes centred. I tried using expand and fill…
user877329
  • 6,717
  • 8
  • 46
  • 88
1
vote
1 answer

Python GTK get selected value from the treeview

I am working on a mini GUI project , I am currently struggling to figure out how to get selected value from the list and then return that value to the main function so that I can use that value in somewhere else . Can someone help me please !!!! …
Dennis.Z
  • 47
  • 3
1
vote
2 answers

Gtk Notebook call function every time a certain tab is selected

I want a tab on my notebook that pretty much does the same like a button. Every time I select this tab it should execute a certain job (for example print('something') ). How do I get it to execute every time I open it? Right now it just executes…
ph.reisich
  • 13
  • 5
1
vote
1 answer

How to use custom language highlight syntax in Gtk SourceView?

I'm trying to create my own language definition, and use it for highlighting the syntax in my app. The issue I have is that, when trying to access the language definition from my app's data folder (/usr/share/myapp/), even using the c.lang file…
Aleksandar Stefanović
  • 1,583
  • 2
  • 20
  • 36
1
vote
0 answers

How to reorder MenuItems in a MenuBar in Python Gtk3?

Given a Gtk.MenuBar with some MenuItems, I'm looking for a way to rearrange the order in which the MenuItems appear. Here's a basic MenuBar with two MenuItems "foo" and "bar": import gi gi.require_version('Gtk', '3.0') from gi.repository import…
Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
1
vote
0 answers

Call message dialog inside a thread (python + gtk3)

I tried to call a message dialog inside a thread (use python3 and gtk3), in the next example when I pressed the button the label start to change the text every 1 seconds, this part work fine, the problem appear when I uncomment the line…
1
vote
0 answers

How to resize webview in webkit GTK

I have recently started to work on webkitgtk . Currently i am facing issue while trying to resize the webview in webkitgtk. Current implementation: I have one main window GtkWidget *main_window = gtk_plug_new(MYwinId); and then I am creating a…
Spragad
  • 11
  • 1
1
vote
1 answer

How redraw text with cairo using gtk+

I'm using cairo to draw some circular widget like this. I used "draw" event of drawing area to draw all of the widget, but i don't know how to update data in the widget. This is the code that i make: gboolean hald_circular_gauge (GtkWidget…
R. Rodrigues
  • 55
  • 10
1
vote
1 answer

How to find a key by label from secretstorage collection

I used GnomeKeyring from Gtk3 with Python 2.7 but almost all methodes are deprecated [1]. So I tried to use SecretSecret.Collection [2] import gi gi.require_version('Secret', '1.0') from gi.repository import Secret >> ValueError: Namespace Secret…
oxidworks
  • 1,563
  • 1
  • 14
  • 37
1
vote
1 answer

GTK3: Widget mouse events pass-through

I have a custom GtkDrawingArea-based widget inside a GtkHeaderBar which is basically a slider that receives mouse clicks and moves. Everything worked fine in GTK 3.14-something, but in 3.22 things went south: when I click and drag inside my widget,…
NK22
  • 25
  • 4
1
vote
1 answer

Getting value from spin button Glade/GTK3 (python)

I am new to python and I am currently trying to get a value from a spin button that has been created in Glade. I have the following code to try to get the value from the button then use it to filter data: import gi gi.require_version('Gtk',…
mdicrist
  • 175
  • 2
  • 12