Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable sync: tweak "Current URL" layout and appearance

- Remove "Hostname:" and "Port:" labels and replace them with tool tips
- Add ':' to separate the port from hostname (for non-local paths)
- Add '/' to separate the path from port (for non-local paths)
- Hide hostname and port line edit widgets (and separators) for local paths
- Put the line edit widgets on first line, schemecombo and buttons on second

Changeset c956b592c17a

Parent cfa0b298d2df

by Adrian Buehlmann

Changes to one file · Browse files at c956b592c17a Showing diff from parent cfa0b298d2df Diff from another changeset...

 
157
158
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
161
162
 
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
 
356
357
358
359
360
 
 
361
362
363
 
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
 
203
204
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
207
208
 
364
365
366
 
 
367
368
369
370
371
@@ -157,6 +157,35 @@
  hbox = QHBoxLayout()   hbox.setSpacing(4)   vbox.addLayout(hbox) + self.hostentry = QLineEdit() + self.hostentry.setToolTip(_('Hostname')) + self.hostentry.setAcceptDrops(False) + self.hostentry.textChanged.connect(self.refreshUrl) + hbox.addWidget(self.hostentry, 1) + self.HostAndPortWidgets = [self.hostentry] + w = QLabel(':') + hbox.addWidget(w) + self.HostAndPortWidgets.append(w) + self.portentry = QLineEdit() + self.portentry.setAcceptDrops(False) + self.portentry.setToolTip(_('Port')) + fontm = QFontMetrics(self.font()) + self.portentry.setFixedWidth(8 * fontm.width('9')) + self.portentry.textChanged.connect(self.refreshUrl) + hbox.addWidget(self.portentry) + self.HostAndPortWidgets.append(self.portentry) + w = QLabel('/') + hbox.addWidget(w) + self.HostAndPortWidgets.append(w) + self.pathentry = QLineEdit() + self.pathentry.setAcceptDrops(False) + self.pathentry.setToolTip(_('Path')) + self.pathentry.textChanged.connect(self.refreshUrl) + hbox.addWidget(self.pathentry, 4) + + hbox = QHBoxLayout() + hbox.setSpacing(4) + vbox.addLayout(hbox)     self.schemecombo = QComboBox()   for s in _schemes: @@ -174,27 +203,6 @@
  hbox.addWidget(self.savebutton)     hbox = QHBoxLayout() - hbox.setSpacing(4) - vbox.addLayout(hbox) - hbox.addWidget(QLabel(_('Hostname:'))) - self.hostentry = QLineEdit() - self.hostentry.setAcceptDrops(False) - self.hostentry.textChanged.connect(self.refreshUrl) - hbox.addWidget(self.hostentry, 1) - hbox.addWidget(QLabel(_('Port:'))) - self.portentry = QLineEdit() - self.portentry.setAcceptDrops(False) - fontm = QFontMetrics(self.font()) - self.portentry.setFixedWidth(8 * fontm.width('9')) - self.portentry.textChanged.connect(self.refreshUrl) - hbox.addWidget(self.portentry) - hbox.addWidget(QLabel(_('Path:'))) - self.pathentry = QLineEdit() - self.pathentry.setAcceptDrops(False) - self.pathentry.textChanged.connect(self.refreshUrl) - hbox.addWidget(self.pathentry, 4) - - hbox = QHBoxLayout()   hbox.setContentsMargins(0, 0, 0, 0)   self.hgrctv = PathsTree(self, True)   self.hgrctv.clicked.connect(self.pathSelected) @@ -356,8 +364,8 @@
  return   self.urllabel.setText(hglib.tounicode(self.currentUrl(True)))   schemeIndex = self.schemecombo.currentIndex() - self.hostentry.setEnabled(schemeIndex != 0) - self.portentry.setEnabled(schemeIndex != 0) + for w in self.HostAndPortWidgets: + w.setHidden(schemeIndex == 0)   self.securebutton.setEnabled(schemeIndex == 3)     def currentUrl(self, hidepw):