[gtk/bilelmoussaoui/g-i: 5/5] g-i: Mark FileChooser [s|g]et_current_[folder|name] as nullable




commit ba266325d028f163d89e5a20a98d6783ea33ffcf
Author: Bilal Elmoussaoui <belmouss redhat com>
Date:   Fri Feb 11 12:19:10 2022 +0100

    g-i: Mark FileChooser [s|g]et_current_[folder|name] as nullable
    
    The code seems to already check if folder/name is NULL
    Fixes https://github.com/gtk-rs/gtk4-rs/issues/896

 gtk/gtkfilechooser.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c
index 78cfdb1001..1df736fd2a 100644
--- a/gtk/gtkfilechooser.c
+++ b/gtk/gtkfilechooser.c
@@ -335,7 +335,7 @@ gtk_file_chooser_set_current_name  (GtkFileChooser *chooser,
  * This is meant to be used in save dialogs, to get the currently typed
  * filename when the file itself does not exist yet.
  *
- * Returns: The raw text from the file chooser’s “Name” entry. Free with
+ * Returns: (nullable): The raw text from the file chooser’s “Name” entry. Free with
  *   g_free(). Note that this string is not a full pathname or URI; it is
  *   whatever the contents of the entry are. Note also that this string is
  *   in UTF-8 encoding, which is not necessarily the system’s encoding for
@@ -369,7 +369,7 @@ gtk_file_chooser_unselect_all (GtkFileChooser *chooser)
 /**
  * gtk_file_chooser_set_current_folder:
  * @chooser: a `GtkFileChooser`
- * @file: the `GFile` for the new folder
+ * @file: (nullable): the `GFile` for the new folder
  * @error: location to store error
  *
  * Sets the current folder for @chooser from a `GFile`.
@@ -395,7 +395,7 @@ gtk_file_chooser_set_current_folder (GtkFileChooser  *chooser,
  *
  * Gets the current folder of @chooser as `GFile`.
  *
- * Returns: (transfer full): the `GFile` for the current folder.
+ * Returns: (transfer full) (nullable): the `GFile` for the current folder.
  */
 GFile *
 gtk_file_chooser_get_current_folder (GtkFileChooser *chooser)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]