parent
816dbe9ec6
commit
86b1346aa7
|
@ -155,10 +155,11 @@ int EventHandler::pointerHandler(const int type, const int par1, const int par2)
|
|||
}
|
||||
else
|
||||
{
|
||||
int dialogResult = 2;
|
||||
|
||||
int dialogResult = 0;
|
||||
if (_nextcloud.getItems()->at(itemID).getState() != FileState::ICLOUD)
|
||||
{
|
||||
dialogResult = DialogSynchro(ICON_QUESTION, "Action", "What do you want to do?", "Open", "Sync", "Remove");
|
||||
dialogResult = DialogSynchro(ICON_QUESTION, "Action", "What do you want to do?", "Open", "Remove", "Cancel");
|
||||
}
|
||||
|
||||
switch (dialogResult)
|
||||
|
@ -167,6 +168,12 @@ int EventHandler::pointerHandler(const int type, const int par1, const int par2)
|
|||
_nextcloud.getItems()->at(itemID).open();
|
||||
break;
|
||||
case 2:
|
||||
if (!_nextcloud.getItems()->at(itemID).removeFile())
|
||||
Message(ICON_WARNING, "Warning", "Could not delete the file, please try again.", 1200);
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
default:
|
||||
if (_nextcloud.isWorkOffline())
|
||||
{
|
||||
int dialogResult = DialogSynchro(ICON_QUESTION, "Action", "You are in offline modus. Go back online?", "Yes", "No", "Cancel");
|
||||
|
@ -178,13 +185,6 @@ int EventHandler::pointerHandler(const int type, const int par1, const int par2)
|
|||
_nextcloud.downloadItem(itemID);
|
||||
CloseProgressbar();
|
||||
break;
|
||||
case 3:
|
||||
if (!_nextcloud.getItems()->at(itemID).removeFile())
|
||||
Message(ICON_WARNING, "Warning", "Could not delete the file, please try again.", 1200);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
_listView->drawEntry(itemID);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue