Skip to content
Permalink
Browse files

[hig] Capitalization, improve dialog titles

(cherry picked from commit baf2a0f)
  • Loading branch information
nyalldawson committed Nov 29, 2018
1 parent 65c26d8 commit f34ddaf73dda96b02f3ca7b0e62d8554c78bcabf
@@ -1106,7 +1106,7 @@ void QgsLayoutLegendWidget::mItemTreeView_doubleClicked( const QModelIndex &idx
}

bool ok;
QString newText = QInputDialog::getText( this, tr( "Legend item properties" ), tr( "Item text" ),
QString newText = QInputDialog::getText( this, tr( "Legend Item Properties" ), tr( "Item text" ),
QLineEdit::Normal, currentText, &ok );
if ( !ok || newText == currentText )
return;
@@ -8811,7 +8811,7 @@ QgsVectorLayer *QgisApp::pasteAsNewMemoryVector( const QString &layerName )
{
bool ok;
QString defaultName = tr( "Pasted" );
layerNameCopy = QInputDialog::getText( this, tr( "New temporary scratch layer name" ),
layerNameCopy = QInputDialog::getText( this, tr( "Paste as Scratch Layer" ),
tr( "Layer name" ), QLineEdit::Normal,
defaultName, &ok );
if ( !ok )
@@ -101,7 +101,7 @@ void QgsMapLayerStyleGuiUtils::addStyle()
return;

bool ok;
QString text = QInputDialog::getText( nullptr, tr( "New style" ),
QString text = QInputDialog::getText( nullptr, tr( "New Style" ),
tr( "Style name:" ), QLineEdit::Normal,
QStringLiteral( "new style" ), &ok );
if ( !ok || text.isEmpty() )
@@ -166,7 +166,7 @@ void QgsMapLayerStyleGuiUtils::renameStyle()
QString name = layer->styleManager()->currentStyle();

bool ok;
QString text = QInputDialog::getText( nullptr, tr( "Rename style" ),
QString text = QInputDialog::getText( nullptr, tr( "Rename Style" ),
tr( "Style name:" ), QLineEdit::Normal,
name, &ok );
if ( !ok )
@@ -462,7 +462,7 @@ void QgsAuthOAuth2Method::onRefreshFinished( QNetworkReply::NetworkError err )
void QgsAuthOAuth2Method::onAuthCode()
{
bool ok = false;
QString code = QInputDialog::getText( QApplication::activeWindow(), QStringLiteral( "Enter the authorization code" ), QStringLiteral( "Authoriation code" ), QLineEdit::Normal, QStringLiteral( "Required" ), &ok, Qt::Dialog, Qt::InputMethodHint::ImhNone );
QString code = QInputDialog::getText( QApplication::activeWindow(), QStringLiteral( "Authoriation Code" ), QStringLiteral( "Enter the authorization code" ), QLineEdit::Normal, QStringLiteral( "Required" ), &ok, Qt::Dialog, Qt::InputMethodHint::ImhNone );
if ( ok && !code.isEmpty() )
{
emit setAuthCode( code );
@@ -329,8 +329,8 @@ void QgsExpressionBuilderWidget::newFunctionFile( const QString &fileName )
void QgsExpressionBuilderWidget::btnNewFile_pressed()
{
bool ok;
QString text = QInputDialog::getText( this, tr( "Enter new file name" ),
tr( "File name:" ), QLineEdit::Normal,
QString text = QInputDialog::getText( this, tr( "New File" ),
tr( "New file name:" ), QLineEdit::Normal,
QString(), &ok );
if ( ok && !text.isEmpty() )
{
@@ -139,7 +139,7 @@ void QgsMapLayerStyleManagerWidget::styleRenamed( const QString &oldname, const
void QgsMapLayerStyleManagerWidget::addStyle()
{
bool ok;
QString text = QInputDialog::getText( nullptr, tr( "New style" ),
QString text = QInputDialog::getText( nullptr, tr( "New Style" ),
tr( "Style name:" ), QLineEdit::Normal,
QStringLiteral( "new style" ), &ok );
if ( !ok || text.isEmpty() )
@@ -490,7 +490,7 @@ bool QgsOgrDataCollectionItem::storeConnection( const QString &path, const QStri
while ( ok && ! QgsOgrDbConnection( connName, ogrDriverName ).path( ).isEmpty( ) )
{

connName = QInputDialog::getText( nullptr, tr( "Cannot add connection '%1'" ).arg( connName ),
connName = QInputDialog::getText( nullptr, tr( "Add Connection" ),
tr( "A connection with the same name already exists,\nplease provide a new name:" ), QLineEdit::Normal,
QString(), &ok );
}
@@ -296,7 +296,7 @@ bool QgsSpatiaLiteSourceSelect::newConnection( QWidget *parent )
while ( ! settings.value( baseKey + savedName + "/sqlitepath", "" ).toString().isEmpty() )
{
bool ok;
savedName = QInputDialog::getText( nullptr, tr( "Cannot add connection '%1'" ).arg( myName ),
savedName = QInputDialog::getText( nullptr, tr( "Add Connection" ),
tr( "A connection with the same name already exists,\nplease provide a new name:" ), QLineEdit::Normal,
QString(), &ok );
if ( !ok || savedName.isEmpty() )

0 comments on commit f34ddaf

Please sign in to comment.
You can’t perform that action at this time.