Adding error reporting to GtkFileChooser



Some functions in GtkFileChooser don't report errors back to the caller:

	gtk_file_chooser_set_filename
	gtk_file_chooser_select_filename
	gtk_file_chooser_unselect_filename *
	gtk_file_chooser_set_current_folder
	gtk_file_chooser_set_uri
	gtk_file_chooser_select_uri
	gtk_file_chooser_unselect_uri *
	gtk_file_chooser_set_current_folder_uri
	gtk_file_chooser_set_current_name **

These all return void and take a string argument.  Are we truly
API-frozen, or should I make them return gboolean and take in a 
GError **?

The functions marked with an asterisk may not need an error code, but
they still hand their path argument to _gtk_file_system_model_path_do(),
which expects a valid path.  Maybe they do need the error code after
all.

For gtk_file_chooser_set_current_name, marked with two asterisks, should
it check that the passed name has no path components in it, and is just
a pathless filename?  This could just go in a g_return_if_fail() and not
need a GError at all.

  Federico




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