# HG changeset patch # User Olaf Wintermann # Date 1726603677 -7200 # Node ID 2f924f7ca901a26834f463458379a1f67c06580e # Parent 48763a9d19a7e17e428319dc54b022319aafd4aa fix gtk3 build diff -r 48763a9d19a7 -r 2f924f7ca901 ui/gtk/draw_cairo.c --- a/ui/gtk/draw_cairo.c Tue Sep 17 22:00:07 2024 +0200 +++ b/ui/gtk/draw_cairo.c Tue Sep 17 22:07:57 2024 +0200 @@ -62,7 +62,7 @@ gboolean ui_drawingarea_expose(GtkWidget *w, cairo_t *cr, void *data) { int width = gtk_widget_get_allocated_width(w); int height = gtk_widget_get_allocated_height(w); - ui_drawingarea_draw(w, cr, width, height, data); + ui_drawingarea_draw(GTK_DRAWING_AREA(w), cr, width, height, data); return FALSE; } #endif diff -r 48763a9d19a7 -r 2f924f7ca901 ui/gtk/toolkit.h --- a/ui/gtk/toolkit.h Tue Sep 17 22:00:07 2024 +0200 +++ b/ui/gtk/toolkit.h Tue Sep 17 22:07:57 2024 +0200 @@ -52,11 +52,11 @@ #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(sw)) #else #define WINDOW_SHOW(window) gtk_widget_show_all(window) -#define WINDOW_DESTROY(window) gtk_window_destroy(GTK_WINDOW(window)) +#define WINDOW_DESTROY(window) gtk_widget_destroy(window) #define WINDOW_SET_CONTENT(window, child) gtk_container_add(GTK_CONTAINER(window), child) #define BOX_ADD(box, child) gtk_box_pack_end(GTK_BOX(box), child, TRUE, TRUE, 0) -#define ENTRY_SET_TEXT(entry, text) gtk_entry_set_text(GTK_EDITABLE(entry), text) -#define ENTRY_GET_TEXT(entry) gtk_entry_get_text(GTK_EDITABLE(entry)) +#define ENTRY_SET_TEXT(entry, text) gtk_entry_set_text(GTK_ENTRY(entry), text) +#define ENTRY_GET_TEXT(entry) gtk_entry_get_text(GTK_ENTRY(entry)) #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new(NULL, NULL) #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_container_add(GTK_CONTAINER(sw), child) #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_bin_get_child(GTK_BIN(sw))