[GtkPathBar] Remove unused error argument
It used to be that _gtk_path_bar_set_file() would return an error if it wasn't able to switch to the specified file, but that hasn't been the case for a long while now, since the file chooser became async. Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This commit is contained in:
parent
58d247d7ae
commit
463c98a9d7
@ -5293,7 +5293,7 @@ put_recent_folder_in_pathbar (GtkFileChooserDefault *impl, GtkTreeIter *iter)
|
|||||||
gtk_tree_model_get (GTK_TREE_MODEL (impl->recent_model), iter,
|
gtk_tree_model_get (GTK_TREE_MODEL (impl->recent_model), iter,
|
||||||
MODEL_COL_FILE, &file,
|
MODEL_COL_FILE, &file,
|
||||||
-1);
|
-1);
|
||||||
_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), file, FALSE, NULL); /* NULL-GError */
|
_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), file, FALSE);
|
||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7307,8 +7307,7 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
|
|||||||
if (! _gtk_file_info_consider_as_directory (info))
|
if (! _gtk_file_info_consider_as_directory (info))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), data->file, data->keep_trail, NULL))
|
_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), data->file, data->keep_trail);
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (impl->current_folder != data->file)
|
if (impl->current_folder != data->file)
|
||||||
{
|
{
|
||||||
|
@ -1849,22 +1849,21 @@ gtk_path_bar_get_info_callback (GCancellable *cancellable,
|
|||||||
file_info);
|
file_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
void
|
||||||
_gtk_path_bar_set_file (GtkPathBar *path_bar,
|
_gtk_path_bar_set_file (GtkPathBar *path_bar,
|
||||||
GFile *file,
|
GFile *file,
|
||||||
const gboolean keep_trail,
|
const gboolean keep_trail)
|
||||||
GError **error)
|
|
||||||
{
|
{
|
||||||
struct SetFileInfo *info;
|
struct SetFileInfo *info;
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_PATH_BAR (path_bar), FALSE);
|
g_return_if_fail (GTK_IS_PATH_BAR (path_bar));
|
||||||
g_return_val_if_fail (G_IS_FILE (file), FALSE);
|
g_return_if_fail (G_IS_FILE (file));
|
||||||
|
|
||||||
/* Check whether the new path is already present in the pathbar as buttons.
|
/* Check whether the new path is already present in the pathbar as buttons.
|
||||||
* This could be a parent directory or a previous selected subdirectory.
|
* This could be a parent directory or a previous selected subdirectory.
|
||||||
*/
|
*/
|
||||||
if (keep_trail && gtk_path_bar_check_parent_path (path_bar, file))
|
if (keep_trail && gtk_path_bar_check_parent_path (path_bar, file))
|
||||||
return TRUE;
|
return;
|
||||||
|
|
||||||
info = g_new0 (struct SetFileInfo, 1);
|
info = g_new0 (struct SetFileInfo, 1);
|
||||||
info->file = g_object_ref (file);
|
info->file = g_object_ref (file);
|
||||||
@ -1881,8 +1880,6 @@ _gtk_path_bar_set_file (GtkPathBar *path_bar,
|
|||||||
"standard::display-name,standard::is-hidden,standard::is-backup",
|
"standard::display-name,standard::is-hidden,standard::is-backup",
|
||||||
gtk_path_bar_get_info_callback,
|
gtk_path_bar_get_info_callback,
|
||||||
info);
|
info);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: This should be a construct-only property */
|
/* FIXME: This should be a construct-only property */
|
||||||
|
@ -84,10 +84,9 @@ struct _GtkPathBarClass
|
|||||||
GType gtk_path_bar_get_type (void) G_GNUC_CONST;
|
GType gtk_path_bar_get_type (void) G_GNUC_CONST;
|
||||||
void _gtk_path_bar_set_file_system (GtkPathBar *path_bar,
|
void _gtk_path_bar_set_file_system (GtkPathBar *path_bar,
|
||||||
GtkFileSystem *file_system);
|
GtkFileSystem *file_system);
|
||||||
gboolean _gtk_path_bar_set_file (GtkPathBar *path_bar,
|
void _gtk_path_bar_set_file (GtkPathBar *path_bar,
|
||||||
GFile *file,
|
GFile *file,
|
||||||
gboolean keep_trail,
|
gboolean keep_trail);
|
||||||
GError **error);
|
|
||||||
void _gtk_path_bar_up (GtkPathBar *path_bar);
|
void _gtk_path_bar_up (GtkPathBar *path_bar);
|
||||||
void _gtk_path_bar_down (GtkPathBar *path_bar);
|
void _gtk_path_bar_down (GtkPathBar *path_bar);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user