change binary name to idav

Wed, 13 Nov 2024 22:05:52 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 13 Nov 2024 22:05:52 +0100
changeset 81
42f66ebb9881
parent 80
1a908b060122
child 82
6727ea0f8fbe

change binary name to idav

application/Makefile file | annotate | diff | comparison | revisions
ui/gtk/image.c file | annotate | diff | comparison | revisions
--- a/application/Makefile	Wed Nov 13 21:19:55 2024 +0100
+++ b/application/Makefile	Wed Nov 13 22:05:52 2024 +0100
@@ -41,10 +41,10 @@
 
 OBJ = $(SRC:%.c=../build/application/%.$(OBJ_EXT))
 
-all: ../build/bin/mk12
+all: ../build/bin/idav(APP_EXT)
 
 ../build/bin/mk12: $(OBJ) $(BUILD_ROOT)/build/lib/libuitk.a
-	$(CC) -o ../build/bin/mk12$(APP_EXT) $(OBJ) -L$(BUILD_ROOT)/build/lib -luitk -lucx -lidav $(LDFLAGS) $(TK_LDFLAGS) $(DAV_LDFLAGS)
+	$(CC) -o ../build/bin/idav(APP_EXT) $(OBJ) -L$(BUILD_ROOT)/build/lib -luitk -lucx -lidav $(LDFLAGS) $(TK_LDFLAGS) $(DAV_LDFLAGS)
 
 ../build/application/%.$(OBJ_EXT): %.c
 	$(CC) ../ucx $(CFLAGS) $(TK_CFLAGS) $(DAV_CFLAGS) -o $@ -c $<
--- a/ui/gtk/image.c	Wed Nov 13 21:19:55 2024 +0100
+++ b/ui/gtk/image.c	Wed Nov 13 22:05:52 2024 +0100
@@ -93,12 +93,12 @@
     GdkPixbuf *pixbuf = value;
     
     if(pixbuf) {
-        int width, height;
-#if GTK_CHECK_VERSION(4, 12, 0)
+        int width = gdk_pixbuf_get_width(pixbuf);
+        int height = gdk_pixbuf_get_height(pixbuf);
+        
+#if GTK_CHECK_VERSION(4, 0, 0)
         GdkTexture *texture = gdk_texture_new_for_pixbuf(pixbuf);
         gtk_picture_set_paintable(GTK_PICTURE(g->obj), GDK_PAINTABLE(texture));
-        width = gdk_texture_get_width(texture);
-        height = gdk_texture_get_height(texture);
 #else
         gtk_image_set_from_pixbuf(GTK_IMAGE(g->obj), pixbuf);
 #endif

mercurial