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