Questions tagged [gtk4]

194 questions
1
vote
1 answer

libadwaita: erratic behaviour from AdwComboRow -- my fault or bug?

I'm trying to create an AdwComboRow in libadwaita, but after I change the selected entry a few times, it will suddenly pick a different entry from the one I clicked. This typically takes a while to start happening (20 or so changes), but seems to…
1
vote
0 answers

GTK4 widget customizations using CSS providers do not consistently work

I have been building small "proof of principle" programs to learn about GTK3, and now that GTK4 has limited availability, I have been attempting to learn about this version as well. In attempting to migrate to GTK4, I took a program I wrote for…
NoDakker
  • 3,390
  • 1
  • 10
  • 11
1
vote
1 answer

How should I set up to develop with GTK4?

I'm running Ubuntu 21.10 and have installed build-essential, libgtk-4-dev and Gnome Builder as IDE. I'm starting with a basic tutorial that starts out #include but it gives the error: 1:10: error: 'gtk/gtk.h' file not found I read…
CraigFoote
  • 371
  • 1
  • 7
  • 23
1
vote
1 answer

Drag and drop with GTK4: connecting DragSource and DropTarget via ContentProvider for derived classes

I am working on (py)gtk4's drag-and-drop functionality and I hit a wall. I have a flowbox-derived class MediaGallery that contains frames with images and their filenames (class MediaFile), and a listbox-derived class Albums. I want to drag one or…
Andrej Prsa
  • 551
  • 3
  • 14
1
vote
1 answer

How do I create a close button for notebook tab with GTK/C?

I searching a way to create a small close button for notebook tabs. Here is a common way to create a big close button for GTK 2.24, GTK 3 and 4: GtkWidget *head, *content, *image, *btn, *label = gtk_label_new ("Title"); // create empty boxes #if…
luigifab
  • 384
  • 3
  • 19
1
vote
2 answers

gtkmm4: hide Gtk::Video's Gtk::MediaControls

I'm not exactly a fan of how Gtk::Video's controls look and I want to expand on them with my own custom controls, but I'm not sure how to hide the default media controls. Is there any way that I can do this?
NintendoZaedus
  • 653
  • 3
  • 8
  • 22
1
vote
2 answers

How do I apply CSS attributes by object id in GTK4?

I am learning GTK4 from scratch, using GTKBuilder XML to construct objects and CSS to add style information from a file using: const char cssPath[] = "/a/path/that/is/confirmed/to_be/working.css"; GtkCssProvider * cssProvider =…
rj_code
  • 57
  • 5
1
vote
0 answers

Is it possible to "join" the gtk-event-loop

gtk4 removed the blocking behavior of GtkDialogs: int res = gtk_dialog_run(GTK_DIALOG(dialog)); The proposed alternative is, to make the Dialog modal and connect the "response" signal. But this has a big draw back: Some old code bases have a linear…
Fabian Keßler
  • 563
  • 3
  • 12
1
vote
1 answer

"ERROR: UNKNOWN VARIABLE INT64_T_TYPEDEF" MESON BUILD:GTK+3, GTK+4.4.0, GOOBJECT INTROSPECTION BUILD FAILURE

I am trying to build GTK 4.4 and GOObject Introspection with the meson build system. Every single attempt at a meson build produces the same error...ERROR: Unknown variable "int64_t_typedef". The programs I have tried are GTK 4.4, GOObject…
SPLINTER1369
  • 11
  • 1
  • 5
1
vote
0 answers

How can I limit the maximum displayed items for a GTK4 Combobox and activate the scrollbar?

I am building a GTK4 app with a Combobox which contains 60+ items. I can't find a way to limit the displayed items so that no scrollbar appears.
L1nk27
  • 65
  • 2
  • 7
0
votes
0 answers

Waiting for specifics callbacks to be called once in gtk4-rs

I am writing a Rust screen capture program using the gtk4 crate. It is very similar in concept to the Windows screen capture tool. The main problem is the function draw_area. fn draw_area(window: &Window) -> Arc> { let…
0
votes
1 answer

Limit input into Gtk.Entry to numbers only

I am using GTK 4 with Python and have a Gtk.Entry widget which I would like to limit the characters which can be entered to numbers only. How do I do that?
Fred
  • 12,086
  • 7
  • 60
  • 83
0
votes
1 answer

How do I add a separtor to Gio.Menu?

I am using Python and constructing a menu with code not decoratively using Builder XML. menu = Gio.Menu() menu.append("Foo", "win.foo") # I want a separator between these two menu.append("Bar", "win.bar")
Fred
  • 12,086
  • 7
  • 60
  • 83
0
votes
0 answers

Simple image viewer with Vala and GTK4

I'm trying to code a very simple image viewer component with zoom and pan features. My code looks like this so far: namespace Image { public class ImageViewerPanningArea : Gtk.Widget { construct { set_layout_manager(new…
0
votes
1 answer

Connect handler to insert-text signal in GTK4

I'm trying to display something each time the user inserts something in an Entry widget. For instance, I have the following callback: void entry_text_inserted (GtkEditable* self, gchar* text, gint length, gint* position, gpointer user_data ) { …
Ahmad B
  • 117
  • 7