about summary refs log tree commit diff
path: root/cmd/demo4/main.ha
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/demo4/main.ha')
-rw-r--r--cmd/demo4/main.ha10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/demo4/main.ha b/cmd/demo4/main.ha
index ea8649c..97693eb 100644
--- a/cmd/demo4/main.ha
+++ b/cmd/demo4/main.ha
@@ -9,7 +9,7 @@ use types::c;
 fn about_clicked(btn: *gtk4::Button, data: *opaque) void = {
 	let dialog = gtk4::about_dialog_new();
 	const authors: []*c::char = [
-		c::fromstr("Harriet?"),
+		c::nulstr("Harriet?\0"),
 		null: *c::char,
 	];
 	gtk4::about_dialog_set_license_type(
@@ -22,7 +22,7 @@ fn about_clicked(btn: *gtk4::Button, data: *opaque) void = {
 	);
 	gtk4::about_dialog_set_website(
 		dialog: *gtk4::AboutDialog,
-		c::fromstr("https://git.sr.ht/~yerinalexey/hare-gi"),
+		c::nulstr("https://git.sr.ht/~yerinalexey/hare-gi\0"),
 	);
 
 	gtk4::widget_show(dialog);
@@ -31,11 +31,11 @@ fn about_clicked(btn: *gtk4::Button, data: *opaque) void = {
 fn activate(app: *gio::Application, data: *opaque) void = {
 	const app = app: *gtk4::Application;
 
-	let button = gtk4::button_new_with_label(c::fromstr("About"));
+	let button = gtk4::button_new_with_label(c::nulstr("About\0"));
 	gtk4::button_connect_clicked(button: *gtk4::Button, &about_clicked, null);
 
 	let headerbar = gtk4::header_bar_new();
-	let title = gtk4::label_new(c::fromstr("hare-gi demo"));
+	let title = gtk4::label_new(c::nulstr("hare-gi demo\0"));
 	gtk4::header_bar_set_title_widget(headerbar: *gtk4::HeaderBar, title);
 	gtk4::header_bar_set_show_title_buttons(headerbar: *gtk4::HeaderBar, glib::TRUE);
 	gtk4::header_bar_pack_end(headerbar: *gtk4::HeaderBar, button);
@@ -47,7 +47,7 @@ fn activate(app: *gio::Application, data: *opaque) void = {
 
 export fn main() void = {
 	let app = gtk4::application_new(
-		c::fromstr("hare_gi.example"),
+		c::nulstr("hare_gi.example\0"),
 		gio::ApplicationFlags::FLAGS_NONE,
 	): *gio::Application;
 	gio::application_connect_activate(app, &activate, null);