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.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

How to get button label from gtk_container_get_children

I have an array of buttons in my window and I would like to be able to click on any one of the buttons, call the button_clicked function and get the label of each button within the array. I think I'...
0
votes
2answers
24 views

Is there a way to import a widget that is written in a different programming language?

I recently came across this Github page which provides a nice circular progress bar that i would like to use, but its written in Vala and i use Python for my app currently. Is there a way to use it ...
0
votes
1answer
15 views

GTK3 - radiobutton: callback is called twice every time toggle the button

I'm trying to use gtk3 radiobutton following the turorial bellow. The problem is I noticed the callback funcion is being called twice everytime I click in the button. My question is why and how can I ...
0
votes
0answers
10 views

How do you pack an SWT tree column so that headers of empty columns are shown?

I am trying to pack the columns of an SWT tree, so that each column is wide enough to show its header text, even if the tree items are empty for that column. Here is my sample code that shows the ...
0
votes
0answers
18 views

How do I make a progressbar with gtk3 that can display multiple groups of values?

I want to make a progress bar with gtk3 in C that can fill different parts of the same progress bar, like this:
0
votes
0answers
17 views

GTK Data Capturing

Im working in C on a project to capture data from a sensor and display it as part of a GUI application on the Raspberry Pi. I am using GTK 3.0, plus Cairo for graphing. I have built an application ...
0
votes
1answer
13 views

Python and GTK+3: widget for choosing a keyboard shortcut

I'm looking for a way to add a shortcut chooser widget on a dialog with Python and GTK+3. I tried to search through all available widgets and don't seem to find any out-of-the-box solution. What ...
0
votes
1answer
20 views

Gtk-WARNING **: cannot open display: export DISPLAY=localhost:0.0 Windows 10 Cygwin

i wrote this program in C on my win10 pc using Clion 2019.2.4. #include <stdio.h> #include <gtk/gtk.h> int main(int argc, char *argv[]) { printf("Hello, World!\n"); gtk_init(&...
1
vote
0answers
35 views

How to change a gtk image button in C

I've tried many things but I can't change the image in a button. In my case, I would like to change the image of the button that allows to put my application in full screen and vice versa. I tried to ...
1
vote
1answer
31 views

How to pass an integer using g_signal_connect

I'm trying to pass an integer using g_signal_connect into my function to display the button index but it throws an error: gui.c:35:39: warning: cast to pointer from integer of different size [-Wint-...
2
votes
1answer
27 views

How to get range of a GLib.Settings

Normally I use below code to get string from an GLib.Settings. var ss = new GLib.Settings ("org.gnome.system.proxy"); string sm = ss.get_string ("mode"); now I want get the range like this ...
0
votes
0answers
16 views

how to highlight cursor position in gtk_treeview & have editable cells

From what I am experiencing I cannot highlight the cursor position by adjusting the font weight of the current cell using cursor-changed signal callback AND complete the edit operation in an editable ...
0
votes
0answers
22 views

GTK 3 GUI updated from separate thread text countdown in text box

First post, so will try and be brief until need to add more. Ported an app from macOS to NI LabWindows/CVI, in "C", then to port to GTK3 and trying to grasp the updating GUI from external thread ...
1
vote
0answers
48 views

Drag-and-drop youtube videos into Python/Gtk window

I want to drag and drop a youtube video from a web browser into a Gtk window. The Gtk window receives the URL of the video. The test script below works only 20% of the time. Sometimes the Gtk window ...
0
votes
0answers
23 views

GTK Notebook TAB do not allow keyboard focus but how

Yesterday I learned how to manipulate the focus chain of GTK Entry objects. Now the question rises up how I can deny the focus of GtkNotebook TABs? I have a GtkNotebook with 3 pages and therefore 3 ...
0
votes
0answers
31 views

Readjusting xx scale in graph made with Cairo and GTK+

I am coding a simulation of a physical system made of GTK+ and Cairo and programmed in C. I have already made the code for the masses and its movement, and now I want to build graphs that reflect ...
0
votes
1answer
23 views

Make GTK Entry only focusable on click but gain keyboard control if selected

I have a GtkBox with some GtkEntry elements inside. Some of them should not be focused by keyboard-tab. Only when clicking on them. How can this be achieved? If I set gtk_widget_set_can_focus to ...
0
votes
0answers
16 views

PyGTK Builder add_from_file() different path approach with PyCharm

Well, in my app/view.py there's the a function call to GTK.Builder().add_from_file("AppView.glade"), however I observed it has been interpreted differently depending of how I execute the code. ...
0
votes
0answers
14 views

Plplot library examples build but not run on Windows 10

I have installed plplot library using MSYS2 on Windows 10 pacman -S mingw-w64-x86_64-plplot , and I have the examples folder. I can successfully build the examples for C language and now I have a .exe ...
0
votes
2answers
42 views

gtk_message_dialog_set_image is deprecated

I have this code to display a message dialog box: void mensajeVentana (GtkWidget *wid, GtkWidget *win, gchar *mensaje) { GtkWidget *dialog = NULL; GtkWidget *image; dialog = ...
-1
votes
0answers
120 views
+50

GTK app has huge memory footprint, can't find any leaks

I have a simple GTK-app. I created the design with glade (it is linked as RO-data into the binary) and load it with gtk_builder_new_from_string. In another c-file all the callback-functions are ...
0
votes
1answer
40 views

How to create GTK3 app with CMake and Eclipse CDT on Windows

I trying create simple gtk3 app for windows. Gtk3 has been installed with official instruction by mysys. I created cmake app in eclipse. I tried create simple gtk3 app and it compiled successful, but ...
0
votes
1answer
65 views

The difference between using GtkFileChooserButton and GtkFileChooserDialog

I would like to let user choose two directories and then retrieve their URIs after the click of button so I could pass them to another function. For now I have tried to do something along of: ...
1
vote
1answer
77 views

Need help translating a Make File into Meson Build File for Vala

I am working on an Application in Vala. I need to use both webkit2gtk-web-extension-4.0 and webkit2gtk-4.0 in an single project. I am following the example from - https://github.com/rschroll/...
0
votes
1answer
45 views

How to port GTK2 pixmaps to GTK3_

I'm trying to port a Ruby application from GTK2 to GTK3 but I didn't find a way to draw GdkPixbufs to a window. With GTK2, I use the following dead simple code to draw 11 bitmaps to a GtkImage ...
1
vote
1answer
36 views

Custom Gtk.CellRenderer with a Toggle cycling between True, None (displayed as inconsistent) and False, python GTK 3

I need to write a custom Gtk.CellRenderer (let's call it CellRendererToogleWithNone) that behaves similar to Gtk.CellRendererToggle, but instead of only supporting True and False I also want it to ...
0
votes
0answers
23 views

How to correctly set the value of WM_CLASS in the GNOME(GTK) application

Which function to use: GLib.set_prgname (prgname) GLib.set_application_name (application_name) Gtk.Window.set_wmclass (wmclass_name, wmclass_class) (In the documentation - Deprecated since version 3....
-1
votes
0answers
37 views

Manage APT packages with python3 (something like app stores), maybe python-apt?

I'd like to install/remove some packages on button press from Python GTK GUI (something like mintinstall, the app store for linux mint written in python), that asks for a password (only once in a ...
0
votes
0answers
32 views

pkg-config as command line argument in cmd windows 10 back quote problem

Problem description: I am using windows-10 OS and from the cmd window I can use gcc compiler: gcc --version returns: gcc (Rev2, Built by MSYS2 project) 9.2.0 Copyright (C) 2019 Free Software ...
0
votes
1answer
36 views

Change a property of an existing object. gtk3 + python

I want to change objects property when needed. How can i "point" to the object ? How can i change the objects property while the app is open/active? An example (this is code is not correct) ...
0
votes
1answer
36 views

How to activate the favorites icon on the taskbar?

My application is in the selected taskbar(GNOME, dash-to-panel). When a window opens, a new icon appears in the taskbar. How to make so that the favorites icon is activated and a new one does not ...
1
vote
1answer
38 views

How to I add a “header” to the tab and page parts of a notebook?

I am using gtk-rs to create a GUI. I want something like the image below: However, I cannot find a way to position a header relative to either the tabs or the page part of the notebook. Even after ...
0
votes
0answers
25 views

Add scrollable to textview using gtk.jl julia

I want the text view to be scrollable as the text begins to fill the box, but the box keeps on expanding to accommodate more text. How to do I limit the size of the text view and create a scrollable ...
0
votes
0answers
22 views

Cairo line misses statring or ending pixel

I paint lines via Cairo API on Ubuntu 19.10 x64. I first call cairo_move_to(...) for starting point, then call cairo_line_to(...) for ending point, then call cairo_stroke(). I add 0.5 increment to all ...
0
votes
1answer
35 views

How can i press a button in headerbar and do things in window in vala

How to make a button in headerbar and do things in window i've tried: public class headerbar : Gtk.HeaderBar { construct { title = "Quiz"; subtitle = "You can solve this!"; ...
0
votes
0answers
18 views

XML from glade and reusable components/list?

They have some examples in the GTK+ Python docs on how to make an advanced listing with labels and controls on each listing. However, I thought best practice was moving away from defining each hbox/...
0
votes
1answer
55 views

Perl-gtk2 error : unable to build perl-gtk2 successfully

enter image description here While building my code in getting error : can't locate GTK2.pm @INC (you may need to install gtk2 module) So I tried to build perl-gtk2 source code on RHEL 8.1. I'm ...
0
votes
1answer
39 views

Problem styling Gtk::Box with CSS in gtkmm 3.10.1

I have to write a program with gtkmm that runs on a legacy system that has GTK 3.10.1. So I have to steer clear of any features added after that. I am having some trouble styling Gtk::Box instances ...
1
vote
2answers
74 views

Why doesn't my GtkBox update until I resize the whole window?

When I attach a menu to a window I detach the existing root control, add a vertical GtkBox to hold the menu and the root control and then attach that box to the GtkWindow, like so: Gtk::GtkWidget *...
1
vote
0answers
33 views

How to perform cleanup after custom Gtk widget is destroyed?

I have a custom Gtk widget like MyWidget defined in the code example below: import gc import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MyWidget(Gtk.Button): def ...
2
votes
1answer
153 views

How do I make button label translations work in GTK?

I'm trying to make a simple dialog window in GTK 3 where the button labels are set in accordance with the chosen language. Here is my program gtklocale.c: #include <glib/gi18n.h> #include <...
0
votes
0answers
65 views

Theme and Icons Problem with GTK3 Installed with vcpkg

I am using Visual Studio 2019 on Windows 10 and am trying to use GTK in C++ and installed it using vcpkg. I've installed GTK using vcpkg according to the guide from GTK. I'm using Visual Studio 2019 ...
0
votes
2answers
32 views

Python and Webkit, watching serial port thread, how to avoid core dump running javascript

I'm writing a game that uses python and webkit, and a webpage is the front-end/GUI. The PC is connected to an Arduino that controls a coin hopper and other i/o. When the Arduino sends 'coinin' over ...
0
votes
1answer
72 views

Pass parameters from ComboBox to GTKTreeView in C

In C Language, how is it possible to pass the values in ComboBox to GtkTreeView? We have tried this code, but we do not know where to write the ids of ComboBox. What signals should be used in ComboBox?...
0
votes
0answers
18 views

How do you keep GTK3 Buttons from growing?

I'm trying to create a grid of buttons that have text dynamically loaded, so I have no control over what text actually ends up on the button. Ideally I would want to ellipsis the button so it ...
0
votes
0answers
61 views

Why does my cross platform C app crash when freeing memory in Windows?

I'm writing a cross platform app in C. On Linux and macOS it works fine - no leaks, no crashes, large datasets can be loaded and edited without problem. On Windows (with GTK 3, MinGW and using CLion)...
0
votes
1answer
43 views

Gtk 3.0 Text View Resizable

I am attempting to create a text area so that I can create a text editor but when ever the text reaches the end of the window, it just expands and becomes bigger and looks bad. I have tried multiple ...
0
votes
0answers
61 views

How to Scroll a ScrolledWindow with arrow keys in Gtk 3.24.5?

I have a gtk entry right below the scrolled window which has the default focus , left and right keys move the cursor in the entry ,I am able to catch the key press events for up and down arrow keys ...
0
votes
1answer
34 views

GTk and open GL Not working at compile time

I am trying to make an application using Gtk 3 and OpenGl but when I try to compile the file, the Gl commands are not recognized. Any suggestions? Code and Errors provided below. I am just trying to ...
0
votes
0answers
36 views

How to use cairo with Gtk on recent Fedora

When I wrote the bottom program of gtk and cairo in Fedora 31, the display became a bug. The figure is protrude and the window is transparent. #include <gtk/gtk.h> //#include <gdk/gdk.h> ...