|
Lines 6870-6875
Link Here
|
| 6870 |
}; |
6869 |
}; |
| 6871 |
|
6870 |
|
| 6872 |
static void |
6871 |
static void |
|
|
6872 |
update_current_folder_mount_enclosing_volume_cb (GCancellable *cancellable, |
| 6873 |
GtkFileSystemVolume *volume, |
| 6874 |
const GError *error, |
| 6875 |
gpointer user_data) |
| 6876 |
{ |
| 6877 |
gboolean cancelled = g_cancellable_is_cancelled (cancellable); |
| 6878 |
struct UpdateCurrentFolderData *data = user_data; |
| 6879 |
GtkFileChooserDefault *impl = data->impl; |
| 6880 |
|
| 6881 |
|
| 6882 |
if (cancellable != impl->update_current_folder_cancellable) |
| 6883 |
goto out; |
| 6884 |
|
| 6885 |
impl->update_current_folder_cancellable = NULL; |
| 6886 |
|
| 6887 |
if (cancelled) |
| 6888 |
goto out; |
| 6889 |
|
| 6890 |
if (error) |
| 6891 |
{ |
| 6892 |
error_changing_folder_dialog (data->impl, data->file, g_error_copy (error)); |
| 6893 |
impl->update_current_folder_cancellable = NULL; |
| 6894 |
impl->reload_state = RELOAD_EMPTY; |
| 6895 |
set_busy_cursor (impl, FALSE); |
| 6896 |
goto out; |
| 6897 |
} |
| 6898 |
|
| 6899 |
change_folder_and_display_error (impl, data->file, data->clear_entry); |
| 6900 |
|
| 6901 |
out: |
| 6902 |
g_object_unref (data->file); |
| 6903 |
g_free (data); |
| 6904 |
|
| 6905 |
g_object_unref (cancellable); |
| 6906 |
} |
| 6907 |
|
| 6908 |
static void |
| 6873 |
update_current_folder_get_info_cb (GCancellable *cancellable, |
6909 |
update_current_folder_get_info_cb (GCancellable *cancellable, |
| 6874 |
GFileInfo *info, |
6910 |
GFileInfo *info, |
| 6875 |
const GError *error, |
6911 |
const GError *error, |
|
Lines 6894-6899
Link Here
|
| 6894 |
{ |
6930 |
{ |
| 6895 |
GFile *parent_file; |
6931 |
GFile *parent_file; |
| 6896 |
|
6932 |
|
|
|
6933 |
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED)) |
| 6934 |
{ |
| 6935 |
GMountOperation *mount_operation; |
| 6936 |
GtkWidget *toplevel; |
| 6937 |
|
| 6938 |
g_object_unref (cancellable); |
| 6939 |
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (impl)); |
| 6940 |
|
| 6941 |
mount_operation = gtk_mount_operation_new (GTK_WINDOW (toplevel)); |
| 6942 |
|
| 6943 |
impl->update_current_folder_cancellable = |
| 6944 |
_gtk_file_system_mount_enclosing_volume (impl->file_system, data->file, |
| 6945 |
mount_operation, |
| 6946 |
update_current_folder_mount_enclosing_volume_cb, |
| 6947 |
data); |
| 6948 |
set_busy_cursor (impl, TRUE); |
| 6949 |
|
| 6950 |
return; |
| 6951 |
} |
| 6952 |
|
| 6897 |
if (!data->original_file) |
6953 |
if (!data->original_file) |
| 6898 |
{ |
6954 |
{ |
| 6899 |
data->original_file = g_object_ref (data->file); |
6955 |
data->original_file = g_object_ref (data->file); |