diff options
author | Federico Mena Quintero <federico@ximian.com> | 2005-10-07 19:54:32 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2005-10-07 19:54:32 +0000 |
commit | cca93029274bc39591f1d844ada3564c73c232da (patch) | |
tree | 58cedd63ca142670c4518994457b081394d91088 /gtk/gtkfilechooser.c | |
parent | cab26ded6f1bc150f83178c68f058608534901d9 (diff) | |
download | gtk+-cca93029274bc39591f1d844ada3564c73c232da.tar.gz |
Fixes bug #317999:
2005-10-07 Federico Mena Quintero <federico@ximian.com>
Fixes bug #317999:
* tests/autotestfilechooser.c (test_reload_sequence): Ensure that
the the result of gtk_file_chooser_get_folder() is NULL or
non-NULL at the right times. Log the tests.
(test_button_folder_states): New test for the initial states of
the current folder in GtkFileChooserButton.
(main): Test that the number of warnings/errors/critical errors is
zero.
* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder):
Clarify the documentation on when this can return NULL.
(gtk_file_chooser_get_current_folder_uri): Likewise.
* gtk/gtkfilechooserbutton.c (struct
_GtkFileChooserButtonPrivate): Added a folder_has_been_set flag;
we use it to keep track of whether a folder has been set.
(gtk_file_chooser_button_map): Implement. If no folder has been
loaded before, we at least try to load $cwd here.
(gtk_file_chooser_button_constructor): If the construct-time
dialog already has a folder set, turn on our folder_has_been_set
flag.
(dialog_current_folder_changed_cb): Turn on our
folder_has_been_set flag.
Diffstat (limited to 'gtk/gtkfilechooser.c')
-rw-r--r-- | gtk/gtkfilechooser.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c index 005d56032e..a55ef8b90b 100644 --- a/gtk/gtkfilechooser.c +++ b/gtk/gtkfilechooser.c @@ -700,9 +700,11 @@ gtk_file_chooser_set_current_folder (GtkFileChooser *chooser, * Gets the current folder of @chooser as a local filename. * See gtk_file_chooser_set_current_folder(). * - * Return value: the full path of the current folder, or %NULL - * if the current path cannot be represented as a local filename. - * Free with g_free(). + * Return value: the full path of the current folder, or %NULL if the current + * path cannot be represented as a local filename. Free with g_free(). This + * function will also return %NULL if the file chooser was unable to load the + * last folder that was requested from it; for example, as would be for calling + * gtk_file_chooser_set_current_folder() on a nonexistent folder. * * Since: 2.4 **/ @@ -1019,8 +1021,10 @@ gtk_file_chooser_set_current_folder_uri (GtkFileChooser *chooser, * Gets the current folder of @chooser as an URI. * See gtk_file_chooser_set_current_folder_uri(). * - * Return value: the URI for the current folder. - * Free with g_free(). + * Return value: the URI for the current folder. Free with g_free(). This + * function will also return %NULL if the file chooser was unable to load the + * last folder that was requested from it; for example, as would be for calling + * gtk_file_chooser_set_current_folder_uri() on a nonexistent folder. * * Since: 2.4 */ |