mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
constraint-editor: Fix saving of constraints
g_file_replace_contents take a gsize, so passing -1 for string length does not work here.
This commit is contained in:
parent
76b8676955
commit
831ebe3ef2
@ -300,7 +300,7 @@ save_response_cb (GtkNativeDialog *dialog,
|
|||||||
model = constraint_view_get_model (CONSTRAINT_VIEW (self->view));
|
model = constraint_view_get_model (CONSTRAINT_VIEW (self->view));
|
||||||
text = serialize_model (model);
|
text = serialize_model (model);
|
||||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||||
g_file_replace_contents (file, text, -1,
|
g_file_replace_contents (file, text, strlen (text),
|
||||||
NULL, FALSE,
|
NULL, FALSE,
|
||||||
G_FILE_CREATE_NONE,
|
G_FILE_CREATE_NONE,
|
||||||
NULL,
|
NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user