Skip to content

Commit

Permalink
Use ellipsis for isolated strings in plugins too
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 10, 2017
1 parent dc58c1a commit e0fbe34
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/CheckValidity.py
Expand Up @@ -158,7 +158,7 @@ def doCheck(self, method, parameters, context, feedback):

reason = "\n".join(reasons)
if len(reason) > 255:
reason = reason[:252] + '...'
reason = reason[:252] + ''
attrs.append(reason)

outFeat = QgsFeature()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/BatchInputSelectionPanel.py
Expand Up @@ -72,7 +72,7 @@ def __init__(self, param, row, col, dialog):
QSizePolicy.Expanding)
self.horizontalLayout.addWidget(self.text)
self.pushButton = QPushButton()
self.pushButton.setText('...')
self.pushButton.setText('')
self.pushButton.clicked.connect(self.showPopupMenu)
self.horizontalLayout.addWidget(self.pushButton)
self.setLayout(self.horizontalLayout)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/BatchOutputSelectionPanel.py
Expand Up @@ -64,7 +64,7 @@ def __init__(self, output, alg, row, col, panel):
QSizePolicy.Expanding)
self.horizontalLayout.addWidget(self.text)
self.pushButton = QPushButton()
self.pushButton.setText('...')
self.pushButton.setText('')
self.pushButton.clicked.connect(self.showSelectionDialog)
self.horizontalLayout.addWidget(self.pushButton)
self.setLayout(self.horizontalLayout)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/ConfigDialog.py
Expand Up @@ -405,7 +405,7 @@ def __init__(self, parent=None, selectFile=False):

# create gui
self.btnSelect = QToolButton()
self.btnSelect.setText(self.tr('...'))
self.btnSelect.setText('…')
self.lineEdit = QLineEdit()
self.hbl = QHBoxLayout()
self.hbl.setMargin(0)
Expand Down Expand Up @@ -452,7 +452,7 @@ def __init__(self, parent=None):

# create gui
self.btnSelect = QToolButton()
self.btnSelect.setText(self.tr('...'))
self.btnSelect.setText('…')
self.lineEdit = QLineEdit()
self.hbl = QHBoxLayout()
self.hbl.setMargin(0)
Expand Down
15 changes: 8 additions & 7 deletions python/plugins/processing/gui/wrappers.py
Expand Up @@ -230,7 +230,7 @@ class ExpressionWidgetWrapperMixin():
def wrapWithExpressionButton(self, basewidget):
expr_button = QToolButton()
expr_button.clicked.connect(self.showExpressionsBuilder)
expr_button.setText('...')
expr_button.setText('')

layout = QHBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
Expand Down Expand Up @@ -640,7 +640,7 @@ def createWidget(self):
self.combo = QgsMapLayerComboBox()
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
Expand Down Expand Up @@ -680,7 +680,7 @@ def createWidget(self):
layout.setSpacing(2)
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
Expand Down Expand Up @@ -755,6 +755,7 @@ def value(self):


class LayerWidgetWrapper(WidgetWrapper):

def __init__(self):
raise NotImplementedError('Layer widget wrapper is not implemented yet')

Expand All @@ -774,7 +775,7 @@ def createWidget(self):
layout.addWidget(self.combo)
layout.setAlignment(self.combo, Qt.AlignTop)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
Expand Down Expand Up @@ -843,7 +844,7 @@ def createWidget(self):
layout.setSpacing(2)
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
Expand Down Expand Up @@ -1063,7 +1064,7 @@ def createWidget(self):
self.combo = QgsMapLayerComboBox()
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
Expand Down Expand Up @@ -1113,7 +1114,7 @@ def createWidget(self):
layout.setSpacing(2)
layout.addWidget(self.combo)
btn = QToolButton()
btn.setText('...')
btn.setText('')
btn.setToolTip(self.tr("Select file"))
btn.clicked.connect(self.selectFile)
layout.addWidget(btn)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/modeler/ModelerGraphicItem.py
Expand Up @@ -260,10 +260,10 @@ def getAdjustedText(self, text):
if w < self.BOX_WIDTH - 25 - FlatButtonGraphicItem.WIDTH:
return text

text = text[0:-3] + '...'
text = text[0:-3] + ''
w = fm.width(text)
while w > self.BOX_WIDTH - 25 - FlatButtonGraphicItem.WIDTH:
text = text[0:-4] + '...'
text = text[0:-4] + ''
w = fm.width(text)
return text

Expand Down

0 comments on commit e0fbe34

Please sign in to comment.