Ugly (and I hope temporary) fix for #1933, based on substring matching.
This commit is contained in:
parent
af78a12f6c
commit
5fe6ffbd15
|
@ -357,7 +357,8 @@ TransportList :: setStatus(Gtk::TreeIter iter,
|
||||||
iter->set_value(modelColumns.statusColumn,
|
iter->set_value(modelColumns.statusColumn,
|
||||||
faultStatusKey);
|
faultStatusKey);
|
||||||
iter->set_value(modelColumns.statusDisplayColumn,
|
iter->set_value(modelColumns.statusDisplayColumn,
|
||||||
*formatMessage(faultStatusKey, *errorMsg));
|
*formatMessage(faultStatusKey,
|
||||||
|
*processException(errorMsg)));
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -491,3 +492,18 @@ TransportList :: onCancelTransport(void) throw ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Handle some known exception types.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
Ptr<const Glib::ustring>::Ref
|
||||||
|
TransportList :: processException(Ptr<const Glib::ustring>::Ref rawMessage)
|
||||||
|
throw ()
|
||||||
|
{
|
||||||
|
if (rawMessage->find("[888]") != Glib::ustring::npos) {
|
||||||
|
return getResourceUstring("duplicateFileMsg");
|
||||||
|
} else {
|
||||||
|
return rawMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,17 @@ class TransportList : public Gtk::VBox,
|
||||||
bool
|
bool
|
||||||
update(Gtk::TreeIter iter) throw (XmlRpcException);
|
update(Gtk::TreeIter iter) throw (XmlRpcException);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle some known exception types.
|
||||||
|
*
|
||||||
|
* @param rawMessage the error message to be processed.
|
||||||
|
* @return a localized error message if rawMessage contains
|
||||||
|
* [xxx], where xxx is a recognized error code.
|
||||||
|
*/
|
||||||
|
Ptr<const Glib::ustring>::Ref
|
||||||
|
processException(Ptr<const Glib::ustring>::Ref rawMessage)
|
||||||
|
throw ();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -394,9 +394,9 @@ root:table
|
||||||
|
|
||||||
transportList:table
|
transportList:table
|
||||||
{
|
{
|
||||||
workingStatus:string { "in progress" }
|
workingStatus:string { "In progress..." }
|
||||||
successStatus:string { "ready" }
|
successStatus:string { "Ready" }
|
||||||
faultStatus:string { "error: {0}" }
|
faultStatus:string { "Error: {0}" }
|
||||||
|
|
||||||
titleColumnLabel:string { "Title" }
|
titleColumnLabel:string { "Title" }
|
||||||
dateColumnLabel:string { "Date" }
|
dateColumnLabel:string { "Date" }
|
||||||
|
@ -406,6 +406,8 @@ root:table
|
||||||
cancelDownloadMenuItem:string { "Cancel download" }
|
cancelDownloadMenuItem:string { "Cancel download" }
|
||||||
|
|
||||||
cannotCancelTransportMsg:string { "Canceling failed: {0}." }
|
cannotCancelTransportMsg:string { "Canceling failed: {0}." }
|
||||||
|
duplicateFileMsg:string { "the file is in the network "
|
||||||
|
"hub already." }
|
||||||
}
|
}
|
||||||
|
|
||||||
restoreBackupWindow:table
|
restoreBackupWindow:table
|
||||||
|
|
Loading…
Reference in New Issue