equal
deleted
inserted
replaced
837 VideoItem * item = nameItem(index); |
837 VideoItem * item = nameItem(index); |
838 if (!item) |
838 if (!item) |
839 return; |
839 return; |
840 |
840 |
841 // ask user if (s)he is serious |
841 // ask user if (s)he is serious |
842 if (QMessageBox::question(this, |
842 QMessageBox reallyDeleteMsg(this); |
843 tr("Are you sure?"), |
843 reallyDeleteMsg.setIcon(QMessageBox::Question); |
844 tr("Do you really want do remove %1?").arg(item->name), |
844 reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Videos - Are you sure?")); |
845 QMessageBox::Yes | QMessageBox::No) |
845 reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the video '%1'?").arg(item->name)); |
846 != QMessageBox::Yes) |
846 reallyDeleteMsg.setWindowModality(Qt::WindowModal); |
|
847 reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); |
|
848 |
|
849 if (reallyDeleteMsg.exec() != QMessageBox::Ok) |
847 return; |
850 return; |
848 |
851 |
849 // remove |
852 // remove |
850 if (!item->ready()) |
853 if (!item->ready()) |
851 item->pRecorder->deleteLater(); |
854 item->pRecorder->deleteLater(); |
858 int num = items.size() / vcNumColumns; |
861 int num = items.size() / vcNumColumns; |
859 if (num == 0) |
862 if (num == 0) |
860 return; |
863 return; |
861 |
864 |
862 // ask user if (s)he is serious |
865 // ask user if (s)he is serious |
863 if (QMessageBox::question(this, |
866 QMessageBox reallyDeleteMsg(this); |
864 tr("Are you sure?"), |
867 reallyDeleteMsg.setIcon(QMessageBox::Question); |
865 tr("Do you really want do remove %1 file(s)?", "", num).arg(num), |
868 reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Videos - Are you sure?")); |
866 QMessageBox::Yes | QMessageBox::No) |
869 reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to remove %1 file(s)?", "", num).arg(num)); |
867 != QMessageBox::Yes) |
870 reallyDeleteMsg.setWindowModality(Qt::WindowModal); |
|
871 reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); |
|
872 |
|
873 if (reallyDeleteMsg.exec() != QMessageBox::Ok) |
868 return; |
874 return; |
869 |
875 |
870 // remove |
876 // remove |
871 foreach (QTableWidgetItem * witem, items) |
877 foreach (QTableWidgetItem * witem, items) |
872 { |
878 { |
1079 int row = filesTable->currentRow(); |
1085 int row = filesTable->currentRow(); |
1080 VideoItem * item = nameItem(row); |
1086 VideoItem * item = nameItem(row); |
1081 |
1087 |
1082 if (item->pUploading) |
1088 if (item->pUploading) |
1083 { |
1089 { |
1084 if (QMessageBox::question(this, |
1090 // ask user if (s)he is serious |
1085 tr("Are you sure?"), |
1091 QMessageBox reallyStopMsg(this); |
1086 tr("Do you really want do cancel uploading %1?").arg(item->name), |
1092 reallyStopMsg.setIcon(QMessageBox::Question); |
1087 QMessageBox::Yes | QMessageBox::No) |
1093 reallyStopMsg.setWindowTitle(QMessageBox::tr("Videos - Are you sure?")); |
1088 != QMessageBox::Yes) |
1094 reallyStopMsg.setText(QMessageBox::tr("Do you really want to cancel uploading %1?").arg(item->name)); |
|
1095 reallyStopMsg.setWindowModality(Qt::WindowModal); |
|
1096 reallyStopMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); |
|
1097 |
|
1098 if (reallyStopMsg.exec() != QMessageBox::Ok) |
1089 return; |
1099 return; |
1090 item->pUploading->deleteLater(); |
1100 item->pUploading->deleteLater(); |
1091 filesTable->setCellWidget(row, vcProgress, NULL); // remove progress bar |
1101 filesTable->setCellWidget(row, vcProgress, NULL); // remove progress bar |
1092 numUploads--; |
1102 numUploads--; |
1093 return; |
1103 return; |