summaryrefslogtreecommitdiff
path: root/gtk/inspector
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2022-12-23 03:43:01 +0100
committerMatthias Clasen <mclasen@redhat.com>2022-12-24 07:56:57 -0500
commit8a2d35b9fbe5f6c63c1f26aeee612b5632db4208 (patch)
tree9c30eb43a317532cbe17193a3bb9ea33fd5bf59e /gtk/inspector
parent26cec4a021bc6a9e71d182f6edca2cf6002e83a4 (diff)
downloadgtk+-8a2d35b9fbe5f6c63c1f26aeee612b5632db4208.tar.gz
filedialog: Add gtk_file_dialog_set_initial_name()
Diffstat (limited to 'gtk/inspector')
-rw-r--r--gtk/inspector/css-editor.c4
-rw-r--r--gtk/inspector/recorder.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/gtk/inspector/css-editor.c b/gtk/inspector/css-editor.c
index 6b866e27b8..0f177add9d 100644
--- a/gtk/inspector/css-editor.c
+++ b/gtk/inspector/css-editor.c
@@ -243,10 +243,10 @@ save_clicked (GtkButton *button,
GtkFileDialog *dialog;
dialog = gtk_file_dialog_new ();
+ gtk_file_dialog_set_initial_name (dialog, "custom.css");
gtk_file_dialog_save (dialog,
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (ce))),
- NULL, "custom.css",
- NULL,
+ NULL, NULL,
save_response, ce);
g_object_unref (dialog);
}
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index cb8b6b2ca8..f827e30108 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -1859,12 +1859,14 @@ render_node_save (GtkButton *button,
filename = g_strdup_printf ("%s.node", nodename);
dialog = gtk_file_dialog_new ();
+ gtk_file_dialog_set_initial_name (dialog, filename);
gtk_file_dialog_save (dialog,
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (recorder))),
- NULL, filename,
- NULL,
+ NULL, NULL,
render_node_save_response, node);
g_object_unref (dialog);
+ g_free (filename);
+ g_free (nodename);
}
static void