@ -476,7 +476,6 @@ void UBDocumentController::showKeyboard(bool show)
mKeyboardPalette - > setVisible ( show ) ;
mKeyboardPalette - > setVisible ( show ) ;
}
}
// mPaletteManager->showVirtualKeyboard(show);
}
}
void UBDocumentController : : setupPalettes ( )
void UBDocumentController : : setupPalettes ( )
@ -640,10 +639,7 @@ void UBDocumentController::deleteSelectedItem()
}
}
}
}
if ( QMessageBox : : question ( 0 , tr ( " Remove Page " ) ,
if ( UBApplication : : mainWindow - > yesNoQuestion ( tr ( " Remove Page " ) , tr ( " Are you sure you want to remove %n page(s) from the selected document '%1'? " , " " , sceneIndexes . count ( ) ) . arg ( proxy - > metaData ( UBSettings : : documentName ) . toString ( ) ) ) )
tr ( " Are you sure you want to remove %n page(s) from the selected document '%1'? " , " " , sceneIndexes . count ( ) )
. arg ( proxy - > metaData ( UBSettings : : documentName ) . toString ( ) ) ,
QMessageBox : : Yes | QMessageBox : : No ) = = QMessageBox : : Yes )
{
{
UBPersistenceManager : : persistenceManager ( ) - > deleteDocumentScenes ( proxy , sceneIndexes ) ;
UBPersistenceManager : : persistenceManager ( ) - > deleteDocumentScenes ( proxy , sceneIndexes ) ;
proxy - > setMetaData ( UBSettings : : documentUpdatedAt , UBStringUtils : : toUtcIsoDateTime ( QDateTime : : currentDateTime ( ) ) ) ;
proxy - > setMetaData ( UBSettings : : documentUpdatedAt , UBStringUtils : : toUtcIsoDateTime ( QDateTime : : currentDateTime ( ) ) ) ;
@ -668,9 +664,7 @@ void UBDocumentController::deleteSelectedItem()
if ( proxyTi & & proxyTi - > proxy ( ) & & proxyTi - > parent ( ) )
if ( proxyTi & & proxyTi - > proxy ( ) & & proxyTi - > parent ( ) )
{
{
if ( QMessageBox : : question ( 0 , tr ( " Remove Document " ) ,
if ( UBApplication : : mainWindow - > yesNoQuestion ( tr ( " Remove Document " ) , tr ( " Are you sure you want to remove the document '%1'? " ) . arg ( proxyTi - > proxy ( ) - > metaData ( UBSettings : : documentName ) . toString ( ) ) ) )
tr ( " Are you sure you want to remove the document '%1'? " ) . arg ( proxyTi - > proxy ( ) - > metaData ( UBSettings : : documentName ) . toString ( ) ) ,
QMessageBox : : Yes | QMessageBox : : No ) = = QMessageBox : : Yes )
{
{
if ( proxyTi - > parent ( ) = = mTrashTi )
if ( proxyTi - > parent ( ) = = mTrashTi )
{
{
@ -737,9 +731,7 @@ void UBDocumentController::deleteSelectedItem()
{
{
if ( groupTi = = mTrashTi )
if ( groupTi = = mTrashTi )
{
{
if ( QMessageBox : : question ( 0 , tr ( " Empty Trash " ) ,
if ( UBApplication : : mainWindow - > yesNoQuestion ( tr ( " Empty Trash " ) , tr ( " Are you sure you want to empty trash? " ) ) )
tr ( " Are you sure you want to empty trash? " ) ,
QMessageBox : : Yes | QMessageBox : : No ) = = QMessageBox : : Yes )
{
{
QApplication : : setOverrideCursor ( QCursor ( Qt : : WaitCursor ) ) ;
QApplication : : setOverrideCursor ( QCursor ( Qt : : WaitCursor ) ) ;
QList < UBDocumentProxyTreeItem * > toBeDeleted ;
QList < UBDocumentProxyTreeItem * > toBeDeleted ;
@ -769,9 +761,7 @@ void UBDocumentController::deleteSelectedItem()
}
}
else
else
{
{
if ( QMessageBox : : question ( 0 , tr ( " Remove Folder " ) ,
if ( UBApplication : : mainWindow - > yesNoQuestion ( tr ( " Remove Folder " ) , tr ( " Are you sure you want to remove the folder '%1' and all its content? " ) . arg ( groupTi - > groupName ( ) ) ) )
tr ( " Are you sure you want to remove the folder '%1' and all its content? " ) . arg ( groupTi - > groupName ( ) ) ,
QMessageBox : : Yes | QMessageBox : : No ) = = QMessageBox : : Yes )
{
{
QApplication : : setOverrideCursor ( QCursor ( Qt : : WaitCursor ) ) ;
QApplication : : setOverrideCursor ( QCursor ( Qt : : WaitCursor ) ) ;
@ -1483,11 +1473,10 @@ bool UBDocumentController::isOKToOpenDocument(UBDocumentProxy* proxy)
}
}
else
else
{
{
if ( QMessageBox : : question ( 0 , tr ( " Open Document " ) ,
if ( UBApplication : : mainWindow - > yesNoQuestion ( tr ( " Open Document " ) ,
tr ( " The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed? " )
tr ( " The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed? " )
. arg ( proxy - > metaData ( UBSettings : : documentName ) . toString ( ) )
. arg ( proxy - > metaData ( UBSettings : : documentName ) . toString ( ) )
. arg ( docVersion ) ,
. arg ( docVersion ) ) )
QMessageBox : : Yes | QMessageBox : : No ) = = QMessageBox : : Yes )
{
{
return true ;
return true ;
}
}