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

How to add css style context providers for all labels in a grid?

I am trying to set the background color of all labels in GtkGrid. Here is a simplified example: #include static void activate (GtkApplication* app, gpointer user_data) { GtkWidget *window = gtk_application_window_new (app); …
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
1
vote
1 answer

Gtk-WARNING **: Failed to fetch network locations

I'm converting an old (pure C) program to Gtk-3, and though the conversion is done, I have to debug some issues. Debugging is made difficult, as I continuously hit: Gtk-WARNING **: Failed to fetch network locations: The specified location is not…
jcoppens
  • 5,306
  • 6
  • 27
  • 47
1
vote
1 answer

pygtk+: How to display a second image 3 seconds after the first?

I am writing a pygtk+ program that would allow a user to navigate thru a book by using buttons in a toolbar. On opening the program, I would like to display a "title" or "cover page" image for a few seconds while the GUI is completed. Then a…
eole77
  • 35
  • 1
  • 5
1
vote
1 answer

draw sphere using python3 in GTK+ window using GLUT

My intention is to draw some 3d object in a GTK+ window. I found OpenGL is best for my purpose. So, I am using GTK+ and pyopenGL for the purpose. This is my current status, and merely able to draw a GtkGlArea: import gi import…
BaRud
  • 3,055
  • 7
  • 41
  • 89
1
vote
2 answers

Why do I get a segmentation fault in my GTK+ signal callback?

I am trying to measure the size of a GTK label: #include static void map_event(GtkWidget *window, gpointer lab) { g_print( "In the callback..\n" ); GtkWidget *label = GTK_WIDGET(lab); g_print( "Everything is ok..\n"…
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
1
vote
1 answer

Right to Left in Python GTK+ 3

Is there a way to change direction of Gtk.Window in sample code below and make it Right to Left? i tried to change it with gravity but didn't worked. import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk class…
user4266493
1
vote
1 answer

How to set fontsize of label with Pango attributes?

I am trying to add a label to a GTK3 window and then set the font size of the label. Here is my attempt: #include static void add_label (GtkWidget* window, gchar *text) { GtkWidget *label = gtk_label_new(text); PangoAttrList…
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
1
vote
1 answer

GTK not rendering all user interfaces

I am using gtk+ with c . I have created menu bar and now want to attach a table with some buttons. I have written all essential API routines but, problem I am facing is, if I first create menu bar then table is not rendered to window and it I render…
1
vote
1 answer

Manage the cursor position in a GtkEntry

Python3-Gtk3 In a GtkEntry justified on the right if I replace the content the cursor is on the left of the string. I would like him to be right. The 'cursor-position' property is read-only. How to manage the cursor position? Thanks for your help.
phdb44
  • 45
  • 7
1
vote
1 answer

Can't find GDK::InterpType members in gtkmm

I'm trying to make a Gtk::Image widget display a picture from a file, but prevent the widget from expanding in size, so I'm loading it from a Gdk::Pixbuf and then scaling the picture. I'm using Gdk::Pixbuf instead of GdkPixBuf because the latter one…
rusins
  • 309
  • 4
  • 8
1
vote
1 answer

Python3 GTK3 - Change button to insensitive immediately after click

Please take a look on my test code below: import time import subprocess import os,re import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MyWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self,…
1
vote
1 answer

Error displaying Info Dialog in GTK3+

I am trying to display a info dialog window when the gtk_drawing_area is clicked. Here is the code I am using: #include #include void show_dialog_window(GtkWidget *widget, gpointer window) { GtkWidget *dialog; dialog =…
PintoDoido
  • 1,011
  • 16
  • 35
1
vote
1 answer

Python GTK File Save Dialog, How Can I create "Close Without Saving" ResponseType

some times when we need more ResponseType for dialogs of our programs. for example, when the user close the file editor, editor shows up dialog to get user choice: "cancel", "close without saving" "save" But "save" and "close without saving" does…
Nomad
  • 918
  • 6
  • 23
1
vote
2 answers

GTK+3 GUI freezes randomly (after 1 hour or after 20 minutes)

I am developping a program in C that uses GTK+3 and follows - more or less - the MVC architecture: The model is updated each 20 ms by calling model_update (it does not call to GTK functions) ; The GUI is updated by calling gui_update each 50 ms by…
1
vote
1 answer

GBinding update timing?

I connected a property of my GtkApplication with a GtkEntry field in my Preference dialog through g_object_bind_property. Works like a charm. However, it works a little too well, in that each and every character added/deleted/changed in the GtkEntry…
user2186577