Commit c76379db authored by Philippe Rouquier's avatar Philippe Rouquier

Fix image format retrieval which failed after several images had been selected

parent 6a3cbb79
......@@ -229,8 +229,6 @@ brasero_src_image_update (BraseroSrcImage *self)
/* See if information retrieval went fine and/or is ready */
status = brasero_status_new ();
result = brasero_track_get_status (BRASERO_TRACK (priv->track), status);
brasero_status_free (status);
if (result == BRASERO_BURN_NOT_READY) {
/* Translators: %s is a path */
string = g_strdup_printf (_("\"%s\": loading"), path);
......@@ -238,11 +236,13 @@ brasero_src_image_update (BraseroSrcImage *self)
goto end;
}
else if (result != BRASERO_BURN_OK) {
/* Translators: %s is a path and image refers to a disc image */
string = g_strdup_printf (_("\"%s\": unknown image type"), path);
error = brasero_status_get_error (status);
if (!error)
goto end;
/* Translators: %s is a path and image refers to a disc image */
string = g_strdup_printf (_("\"%s\": unknown image type"), path);
gtk_widget_set_tooltip_text (GTK_WIDGET (self), error->message);
brasero_src_image_error (self, error);
g_error_free (error);
......@@ -263,6 +263,7 @@ brasero_src_image_update (BraseroSrcImage *self)
end:
brasero_status_free (status);
if (string) {
/* This is hackish and meant to avoid ellipsization to make the
* label to small. */
......
......@@ -98,18 +98,26 @@ brasero_track_image_cfg_get_info_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
gboolean was_cancelled;
BraseroTrackImageInfo *info;
BraseroTrackImageCfgPrivate *priv;
info = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result));
priv = BRASERO_TRACK_IMAGE_CFG_PRIVATE (object);
was_cancelled = g_cancellable_is_cancelled (priv->cancel);
if (priv->cancel) {
g_object_unref (priv->cancel);
priv->cancel = NULL;
}
if (info->format == BRASERO_IMAGE_FORMAT_NONE || info->blocks == 0) {
if (was_cancelled) {
brasero_track_changed (BRASERO_TRACK (object));
return;
}
info = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result));
if (info->format == BRASERO_IMAGE_FORMAT_NONE
|| info->blocks == 0) {
GError *error = NULL;
g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), &error);
......@@ -324,6 +332,8 @@ brasero_track_image_cfg_force_format (BraseroTrackImageCfg *track,
if (current_format == format)
return BRASERO_BURN_OK;
}
else if (format == priv->format)
return BRASERO_BURN_OK;
priv->format = format;
......
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