Commit ff3cc0e4 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

use a single flags parameter instead of boolean parameters

allow to ignore a task error with the GTH_TASK_FLAGS_IGNORE_ERROR
flag.
parent fd18a89e
......@@ -43,7 +43,7 @@ gth_browser_activate_burn_disc (GSimpleAction *action,
files = gth_file_data_list_to_file_list (file_list);
task = gth_burn_task_new (browser, files);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
_g_object_list_unref (files);
......
......@@ -57,7 +57,7 @@ start_button_clicked_cb (GtkWidget *widget,
gth_organize_task_set_create_singletons (GTH_ORGANIZE_TASK (task), ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("ignore_singletons_checkbutton"))));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("use_singletons_catalog_checkbutton"))))
gth_organize_task_set_singletons_catalog (GTH_ORGANIZE_TASK (task), gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("single_catalog_entry"))));
gth_browser_exec_task (data->browser, task, FALSE);
gth_browser_exec_task (data->browser, task, GTH_TASK_FLAGS_DEFAULT);
gtk_widget_destroy (data->dialog);
g_object_unref (task);
......
......@@ -121,7 +121,7 @@ ok_button_clicked (GtkWidget *button,
change_type,
date_time,
time_adjustment);
gth_browser_exec_task (data->browser, task, FALSE);
gth_browser_exec_task (data->browser, task, GTH_TASK_FLAGS_DEFAULT);
gtk_widget_destroy (data->dialog);
g_object_unref (task);
......
......@@ -44,7 +44,7 @@ gth_browser_activate_import_embedded_metadata (GSimpleAction *action,
file_data_list = gth_file_store_get_visibles (gth_browser_get_file_store (browser));
}
task = gth_import_metadata_task_new (browser, file_data_list);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
_g_object_list_unref (file_data_list);
......
......@@ -248,7 +248,7 @@ ok_clicked_cb (GtkWidget *widget,
gth_contact_sheet_creator_set_thumb_size (GTH_CONTACT_SHEET_CREATOR (task), squared_thumbnail, thumbnail_size, thumbnail_size);
gth_contact_sheet_creator_set_thumbnail_caption (GTH_CONTACT_SHEET_CREATOR (task), thumbnail_caption);
gth_browser_exec_task (data->browser, task, FALSE);
gth_browser_exec_task (data->browser, task, GTH_TASK_FLAGS_DEFAULT);
close_dialog (data);
g_object_unref (task);
......
......@@ -173,7 +173,7 @@ ok_clicked_cb (GtkWidget *widget,
gth_contact_sheet_creator_set_thumb_size (GTH_CONTACT_SHEET_CREATOR (task), TRUE, thumbnail_size, thumbnail_size);
gth_contact_sheet_creator_set_thumbnail_caption (GTH_CONTACT_SHEET_CREATOR (task), "");
gth_browser_exec_task (data->browser, task, FALSE);
gth_browser_exec_task (data->browser, task, GTH_TASK_FLAGS_DEFAULT);
gtk_widget_destroy (data->dialog);
g_object_unref (task);
......
......@@ -103,7 +103,7 @@ ok_button_clicked_cb (GtkWidget *widget,
g_object_unref (destination);
}
gth_browser_exec_task (data->browser, list_task, FALSE);
gth_browser_exec_task (data->browser, list_task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (list_task);
g_object_unref (convert_task);
......
......@@ -397,7 +397,7 @@ gth_browser_activate_set_desktop_background (GSimpleAction *action,
"completed",
G_CALLBACK (save_wallpaper_task_completed_cb),
wdata);
gth_browser_exec_task (GTH_BROWSER (browser), task, FALSE);
gth_browser_exec_task (GTH_BROWSER (browser), task, GTH_TASK_FLAGS_IGNORE_ERROR);
saving_wallpaper = TRUE;
......
......@@ -91,7 +91,7 @@ gth_browser_activate_delete_metadata (GSimpleAction *action,
file_data_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
file_list = gth_file_data_list_to_file_list (file_data_list);
task = gth_delete_metadata_task_new (browser, file_list);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
_g_object_list_unref (file_list);
......
......@@ -194,7 +194,7 @@ edit_metadata_dialog__response_cb (GtkDialog *dialog,
"completed",
G_CALLBACK (saver_completed_cb),
data);
gth_browser_exec_task (data->browser, task, FALSE);
gth_browser_exec_task (data->browser, task, GTH_TASK_FLAGS_IGNORE_ERROR);
g_object_unref (task);
......@@ -275,7 +275,7 @@ update_file_list (gpointer user_data)
"completed",
G_CALLBACK (loader_completed_cb),
loader_data);
gth_browser_exec_task (data->browser, data->loader, FALSE);
gth_browser_exec_task (data->browser, data->loader, GTH_TASK_FLAGS_IGNORE_ERROR);
_g_object_list_unref (file_data_list);
_gtk_tree_path_list_free (items);
......
......@@ -656,7 +656,7 @@ dlg_export_to_facebook (GthBrowser *browser,
data);
data->progress_dialog = gth_progress_dialog_new (GTK_WINDOW (data->browser));
gth_progress_dialog_add_task (GTH_PROGRESS_DIALOG (data->progress_dialog), GTH_TASK (data->service));
gth_progress_dialog_add_task (GTH_PROGRESS_DIALOG (data->progress_dialog), GTH_TASK (data->service), GTH_TASK_FLAGS_DEFAULT);
web_service_autoconnect (WEB_SERVICE (data->service));
}
......@@ -161,7 +161,7 @@ import_dialog_response_cb (GtkDialog *dialog,
FALSE,
FALSE,
FALSE);
gth_browser_exec_task (data->browser, task, FALSE);
gth_browser_exec_task (data->browser, task, GTH_TASK_FLAGS_DEFAULT);
gtk_widget_destroy (data->dialog);
g_object_unref (task);
......@@ -602,7 +602,7 @@ dlg_import_from_facebook (GthBrowser *browser)
data);
data->progress_dialog = gth_progress_dialog_new (GTK_WINDOW (data->browser));
gth_progress_dialog_add_task (GTH_PROGRESS_DIALOG (data->progress_dialog), GTH_TASK (data->service));
gth_progress_dialog_add_task (GTH_PROGRESS_DIALOG (data->progress_dialog), GTH_TASK (data->service), GTH_TASK_FLAGS_DEFAULT);
web_service_autoconnect (WEB_SERVICE (data->service));
}
......@@ -438,7 +438,7 @@ clipboard_received_cb (GtkClipboard *clipboard,
paste_data->cut,
paste_data->files,
position);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
paste_data_free (paste_data);
......@@ -482,7 +482,7 @@ gth_browser_activate_duplicate (GSimpleAction *action,
items = gth_file_selection_get_selected (GTH_FILE_SELECTION (gth_browser_get_file_list_view (browser)));
file_list = gth_file_list_get_files (GTH_FILE_LIST (gth_browser_get_file_list (browser)), items);
task = gth_duplicate_task_new (file_list);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
_g_object_list_unref (file_list);
......@@ -635,7 +635,7 @@ copy_files_to_folder (GthBrowser *browser,
"completed",
G_CALLBACK (copy_complete_cb),
data);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (file_source);
}
......
......@@ -240,7 +240,7 @@ gth_file_list_drag_data_received (GtkWidget *file_view,
visible_files,
selected_files,
data->drop_pos);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
_g_object_list_unref (visible_files);
......@@ -286,7 +286,7 @@ gth_file_list_drag_data_received (GtkWidget *file_view,
move,
selected_files,
data->drop_pos);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
g_object_unref (location_source);
......@@ -733,7 +733,7 @@ fm__gth_browser_folder_tree_drag_data_received_cb (GthBrowser *browser,
(action == GDK_ACTION_MOVE),
file_list,
-1);
gth_browser_exec_task (browser, task, FALSE);
gth_browser_exec_task (browser, task, GTH_TASK_FLAGS_DEFAULT);
g_object_unref (task);
g_object_unref (file_source);
......
......@@ -348,7 +348,7 @@ apply_cb (gpointer user_data)
"completed",
G_CALLBACK (image_task_completed_cb),
self);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, FALSE);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, GTH_TASK_FLAGS_DEFAULT);
return FALSE;
}
......
......@@ -422,7 +422,7 @@ apply_cb (gpointer user_data)
"completed",
G_CALLBACK (image_task_completed_cb),
self);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, FALSE);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, GTH_TASK_FLAGS_DEFAULT);
return FALSE;
}
......
......@@ -635,7 +635,7 @@ gth_file_tool_crop_apply_options (GthFileTool *base)
"completed",
G_CALLBACK (image_task_completed_cb),
self);
gth_browser_exec_task (GTH_BROWSER (gth_file_tool_get_window (GTH_FILE_TOOL (self))), task, FALSE);
gth_browser_exec_task (GTH_BROWSER (gth_file_tool_get_window (GTH_FILE_TOOL (self))), task, GTH_TASK_FLAGS_DEFAULT);
}
......
......@@ -326,7 +326,7 @@ apply_cb (gpointer user_data)
"completed",
G_CALLBACK (image_task_completed_cb),
self);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, FALSE);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, GTH_TASK_FLAGS_DEFAULT);
return FALSE;
}
......
......@@ -139,7 +139,7 @@ apply_cb (gpointer user_data)
"completed",
G_CALLBACK (image_task_completed_cb),
self);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, FALSE);
gth_browser_exec_task (GTH_BROWSER (window), self->priv->image_task, GTH_TASK_FLAGS_DEFAULT);
return FALSE;
}
......
......@@ -70,7 +70,7 @@ gth_file_tool_flip_activate (GthFileTool *base)
"completed",
G_CALLBACK (gth_image_viewer_task_set_destination),
NULL);
gth_browser_exec_task (GTH_BROWSER (window), task, FALSE);
gth_browser_exec_task (GTH_BROWSER (window), task, GTH_TASK_FLAGS_DEFAULT);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment