ui/gtk/headerbar.c

changeset 51
e324291ca9f8
parent 46
31bc86844659
child 56
294d5515583a
--- a/ui/gtk/headerbar.c	Sun Oct 06 18:43:06 2024 +0200
+++ b/ui/gtk/headerbar.c	Sun Oct 20 21:24:13 2024 +0200
@@ -31,25 +31,7 @@
 #include "button.h"
 #include "menu.h"
 
-#if GTK_MAJOR_VERSION >= 3
-
-#ifdef UI_LIBADWAITA
-#define UI_HEADERBAR AdwHeaderBar*
-#define UI_HEADERBAR_CAST(h) ADW_HEADER_BAR(h)
-#define UI_HEADERBAR_PACK_START(h, w) adw_header_bar_pack_start(ADW_HEADER_BAR(h), w)
-#define UI_HEADERBAR_PACK_END(h, w) adw_header_bar_pack_end(ADW_HEADER_BAR(h), w)
-#define UI_HEADERBAR_SET_TITLE_WIDGET(h, w) adw_header_bar_set_title_widget(ADW_HEADER_BAR(h), w)
-#else
-#define UI_HEADERBAR GtkHeaderBar*
-#define UI_HEADERBAR_CAST(h) GTK_HEADER_BAR(h)
-#define UI_HEADERBAR_PACK_START(h, w) gtk_header_bar_pack_start(GTK_HEADER_BAR(h), w)
-#define UI_HEADERBAR_PACK_END(h, w) gtk_header_bar_pack_end(GTK_HEADER_BAR(h), w)
-#if GTK_MAJOR_VERSION >= 4
-#define UI_HEADERBAR_SET_TITLE_WIDGET(h, w) gtk_header_bar_set_title_widget(GTK_HEADER_BAR(h), w)
-#else
-#define UI_HEADERBAR_SET_TITLE_WIDGET(h, w) gtk_header_bar_set_custom_title(GTK_HEADER_BAR(h), w)
-#endif
-#endif
+#if GTK_CHECK_VERSION(3, 10, 0)
     
 void ui_fill_headerbar(UiObject *obj, GtkWidget *headerbar) {
     CxList *left_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_LEFT);

mercurial