diff options
author | Timm Bäder <mail@baedert.org> | 2020-08-01 20:00:13 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-08-01 20:01:04 +0200 |
commit | 41b458fba7800ad56c906f80c66a3f1b3f716ba8 (patch) | |
tree | 6cf0c32f5768dc5331115cb5cbd10e89b1b0667c /gtk/gtkfilechoosernative.c | |
parent | f716daa483b51551127362a63b016abe81a4e20a (diff) | |
download | gtk+-41b458fba7800ad56c906f80c66a3f1b3f716ba8.tar.gz |
Fix and improve various code samples
Diffstat (limited to 'gtk/gtkfilechoosernative.c')
-rw-r--r-- | gtk/gtkfilechoosernative.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c index 7e050da9d7..08512ee079 100644 --- a/gtk/gtkfilechoosernative.c +++ b/gtk/gtkfilechoosernative.c @@ -68,7 +68,7 @@ * * |[<!-- language="C" --> * static void - * on_response (GtkNativeDialog *dialog, + * on_response (GtkNativeDialog *native, * int response) * { * if (response == GTK_RESPONSE_ACCEPT) @@ -102,12 +102,12 @@ * * |[<!-- language="C" --> * static void - * on_response (GtkNativeDialog *dialog, + * on_response (GtkNativeDialog *native, * int response) * { * if (response == GTK_RESPONSE_ACCEPT) * { - * GtkFileChooser *chooser = GTK_FILE_CHOOSER (dialog); + * GtkFileChooser *chooser = GTK_FILE_CHOOSER (native); * GFile *file = gtk_file_chooser_get_file (chooser); * * save_to_file (file); @@ -131,11 +131,9 @@ * chooser = GTK_FILE_CHOOSER (native); * * if (user_edited_a_new_document) - * gtk_file_chooser_set_current_name (chooser, - * _("Untitled document")); + * gtk_file_chooser_set_current_name (chooser, _("Untitled document")); * else - * gtk_file_chooser_set_filename (chooser, - * existing_filename); + * gtk_file_chooser_set_file (chooser, existing_file, NULL); * * g_signal_connect (native, "response", G_CALLBACK (on_response), NULL); * gtk_native_dialog_show (GTK_NATIVE_DIALOG (native)); |