[network-manager-applet/lr/gtk4: 2/2] build: convert the GtkBuilder files to GTK4 flavour



commit 348e61d72f337e5662fa617e544e2879c32d6efa
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu May 30 11:44:18 2019 +0200

    build: convert the GtkBuilder files to GTK4 flavour
    
    This is not perfect yet, but as of gtk4-3.96.0 none of the test programs
    crash, which is a good starting point i guess. Improvements should go to
    gtk4-builder-tool.

 Makefile.am | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1f969d74..bce4be42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -545,9 +545,19 @@ src/libnma/nma-resources.h: src/libnma/nma.gresource.xml
 src/libnma/nma-resources.c: src/libnma/nma.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) 
--sourcedir=$(srcdir)/src/libnma --generate-dependencies $(srcdir)/src/libnma/nma.gresource.xml)
        $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ --sourcedir=$(srcdir)/src/libnma 
--generate-source --internal
 
+src/libnma-gtk4/nma-resources.c: src/libnma/nma.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) 
--generate-dependencies $(srcdir)/src/libnma/nma.gresource.xml |sed "s,^,$(builddir)/src/libnma-gtk4/,")
+       @mkdir -p $(builddir)/src/libnma-gtk4
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ --sourcedir=$(builddir)/src/libnma-gtk4 
--generate-source --internal
+
+
+src/libnma-gtk4/%.ui: src/libnma/%.ui
+       @mkdir -p $(builddir)/src/libnma-gtk4
+       gtk4-builder-tool simplify --3to4 $< >$@
+
 CLEANFILES += \
        $(libnma_h_priv_gen) \
-       $(libnma_c_gen)
+       $(libnma_c_gen) \
+       $(libnma_gtk4_c_gen)
 
 libnma_h_priv_gen = \
        src/libnma/nma-resources.h
@@ -555,6 +565,9 @@ libnma_h_priv_gen = \
 libnma_c_gen = \
        src/libnma/nma-resources.c
 
+libnma_gtk4_c_gen = \
+       src/libnma-gtk4/nma-resources.c
+
 libnma_h_pub = \
        src/libnma/nma-version.h \
        src/libnma/nma-wifi-dialog.h \
@@ -806,7 +819,7 @@ endif
 
 nodist_src_libnma_libnma_gtk4_la_SOURCES = \
        $(libnma_h_priv_gen) \
-       $(libnma_c_gen)
+       $(libnma_gtk4_c_gen)
 
 src_libnma_libnma_gtk4_la_CFLAGS = \
        -DICONDIR=\""$(datadir)/icons"\" \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]