From 39bee0e5cce7f455c12d58d307ddcbc7764b11bb Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Sat, 18 Apr 2026 21:52:02 +0900 Subject: [PATCH] fix --- configure | 3 +++ examples/basic/periodic.c | 4 ++-- include/Mw/Widget/ListBox.h | 2 +- pl/rules.pl | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 98a6b3a..2592542 100755 --- a/configure +++ b/configure @@ -45,6 +45,7 @@ param_set("vulkan-string-helper", 1); param_set("shared", 1); param_set("static", 1); param_set("examples", 1); +param_set("dbus", 1); my %features = ( @@ -60,6 +61,7 @@ my %features = ( "static" => "build static library", "wayland" => "enable wayland backend", "gnustep" => "use gnustep", + "dbus" => "use DBus on supported platform" ); my @features_keys = ( "1classic-theme", "1stb-image", @@ -68,6 +70,7 @@ my @features_keys = ( "1vulkan", "2vulkan-string-helper", "1shared", "1static", "1wayland", "1gnustep", + "1dbus" ); foreach my $l (@ARGV) { diff --git a/examples/basic/periodic.c b/examples/basic/periodic.c index c6043f2..f2466ad 100644 --- a/examples/basic/periodic.c +++ b/examples/basic/periodic.c @@ -241,8 +241,8 @@ int main() { MwNhasHeading, 1, NULL); w = child(f); - index = MwListBoxInsert(w, -1, 0, "Epic title..."); - index = MwListBoxInsert(w, -1, 0, "Hello"); + index = MwListBoxSet(w, -1, 0, "Epic title..."); + index = MwListBoxSet(w, -1, 0, "Hello"); add(f); f = frame("NumberEntry", -PaddingContent, 24, MwNumberEntryClass, NULL); diff --git a/include/Mw/Widget/ListBox.h b/include/Mw/Widget/ListBox.h index 5f2ef05..f4fe48f 100644 --- a/include/Mw/Widget/ListBox.h +++ b/include/Mw/Widget/ListBox.h @@ -19,7 +19,7 @@ extern "C" { MWDECL MwClass MwListBoxClass; /*! - * @brief Inserts item on the listbox + * @brief Sets item on the listbox * @param handle Widget * @param row Row * @param col Column diff --git a/pl/rules.pl b/pl/rules.pl index 7ad414d..d45d7c9 100644 --- a/pl/rules.pl +++ b/pl/rules.pl @@ -60,6 +60,10 @@ if (grep(/^wayland$/, @backends)) { $gl_libs = "-lGL -lGLU"; } +if (not(param_get("dbus"))) { + $cflags =~ s/( |^)-DUSE_DBUS( |$)/ /; +} + if (grep(/( |^)-DUSE_DBUS( |$)/, $cflags)) { add_cflags(`pkg-config --cflags dbus-1`); }