Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

Merge with stable

Changeset 49a1f6f23572

Parents e3274375e7be

Parents 6536a00ad721

by Steve Borho

Changes to 2 files · Browse files at 49a1f6f23572 Showing diff from parent e3274375e7be 6536a00ad721 Diff from another changeset...

 
528
529
530
531
532
533
 
 
 
534
535
536
 
539
540
541
542
 
543
544
545
 
528
529
530
 
 
 
531
532
533
534
535
536
 
539
540
541
 
542
543
544
545
@@ -528,9 +528,9 @@
  except ImportError:   return   - # On Windows, the font for main window seems to be determined by "icon" - # font, but Qt chooses uncustomizable system font. - lf = win32gui.SystemParametersInfo(win32con.SPI_GETICONTITLELOGFONT) + # use configurable font like GTK, Mozilla XUL or Eclipse SWT + ncm = win32gui.SystemParametersInfo(win32con.SPI_GETNONCLIENTMETRICS) + lf = ncm['lfMessageFont']   f = QFont(hglib.tounicode(lf.lfFaceName))   f.setItalic(lf.lfItalic)   if lf.lfWeight != win32con.FW_DONTCARE: @@ -539,7 +539,7 @@
  n, w = filter(lambda e: e[0] <= lf.lfWeight, weights)[-1]   f.setWeight(w)   f.setPixelSize(abs(lf.lfHeight)) - QApplication.setFont(f, 'QMainWindow') + QApplication.setFont(f, 'QWidget')    class PMButton(QPushButton):   """Toggle button with plus/minus icon images"""
 
16
17
18
19
 
20
21
22
 
228
229
230
231
232
 
 
 
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
 
 
 
 
 
 
 
 
 
251
252
253
254
255
256
257
258
 
259
260
261
 
271
272
273
274
275
276
277
278
 
279
280
281
 
16
17
18
 
19
20
21
22
 
228
229
230
 
 
231
232
233
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
236
237
238
239
240
241
242
243
244
 
245
246
247
248
 
249
250
251
252
253
 
263
264
265
 
 
 
 
 
266
267
268
269
@@ -16,7 +16,7 @@
 from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt import qtlib  from tortoisehg.hgqt.qtlib import QuestionMsgBox, InfoMsgBox -from tortoisehg.hgqt.qtlib import CustomPrompt, SharedWidget, DemandWidget +from tortoisehg.hgqt.qtlib import CustomPrompt, DemandWidget  from tortoisehg.hgqt.repomodel import HgRepoListModel  from tortoisehg.hgqt import cmdui, update, tag, backout, merge, visdiff  from tortoisehg.hgqt import archive, thgimport, thgstrip, run, purge, bookmark @@ -228,34 +228,26 @@
    QDesktopServices.openUrl(QUrl(link))   - def getCommitWidget(self): - return getattr(self.repo, '_commitwidget', None) # TODO: ugly + def createCommitWidget(self): + pats, opts = {}, {} + cw = CommitWidget(pats, opts, self.repo.root, True, self)   - def createCommitWidget(self): - cw = self.getCommitWidget() - if not cw: - pats = {} - opts = {} - b = QPushButton(_('Commit')) - b.setAutoDefault(True) - f = b.font() - f.setWeight(QFont.Bold) - b.setFont(f) - cw = CommitWidget(pats, opts, self.repo.root, True, self) - cw.buttonHBox.addWidget(b) - cw.commitButtonEnable.connect(b.setEnabled) - b.clicked.connect(cw.commit) - cw.loadSettings(QSettings(), 'workbench') - QTimer.singleShot(0, cw.reload) - self.repo._commitwidget = cw + b = QPushButton(_('Commit')) + b.setAutoDefault(True) + f = b.font() + f.setWeight(QFont.Bold) + b.setFont(f) + cw.buttonHBox.addWidget(b) + cw.commitButtonEnable.connect(b.setEnabled) + b.clicked.connect(cw.commit) + cw.loadSettings(QSettings(), 'workbench')   - cw = SharedWidget(cw)   cw.output.connect(self.output)   cw.progress.connect(self.progress)   cw.makeLogVisible.connect(self.makeLogVisible)   cw.linkActivated.connect(self._openLink) -   cw.showMessage.connect(self.showMessage) + QTimer.singleShot(0, cw.reload)   return cw     def createManifestWidget(self): @@ -271,11 +263,7 @@
  return w     def createSyncWidget(self): - sw = getattr(self.repo, '_syncwidget', None) # TODO: ugly - if not sw: - sw = SyncWidget(self.repo, self) - self.repo._syncwidget = sw - sw = SharedWidget(sw) + sw = SyncWidget(self.repo, self)   sw.output.connect(self.output)   sw.progress.connect(self.progress)   sw.makeLogVisible.connect(self.makeLogVisible)