ui/gtk/headerbar.c

changeset 45
ab71409644b0
parent 44
473954dc6b74
child 46
31bc86844659
--- a/ui/gtk/headerbar.c	Sun Sep 29 13:32:51 2024 +0200
+++ b/ui/gtk/headerbar.c	Sun Sep 29 20:25:41 2024 +0200
@@ -152,19 +152,28 @@
         UiObject *obj,
         enum UiToolbarPos pos)
 {
+    
+    
+#if GTK_MAJOR_VERSION >= 4
     GtkWidget *menubutton = gtk_menu_button_new();
-    
     if(item->args.label) {
         gtk_menu_button_set_label(GTK_MENU_BUTTON(menubutton), item->args.label);
     }
     if(item->args.icon) {
         gtk_menu_button_set_icon_name(GTK_MENU_BUTTON(menubutton), item->args.icon); 
     }
-   
+    
     GMenu *menu = g_menu_new();
     ui_gmenu_add_menu_items(menu, 0, &item->menu, obj);
     
     gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(menubutton), G_MENU_MODEL(menu));
+#else
+    GtkWidget *menubutton = gtk_menu_button_new();
+    
+    // TODO
+    
+    
+#endif
     
     headerbar_add(headerbar, box, menubutton, pos);
 }

mercurial