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

stable sync: hide the target selector again when running outside the Workbench

Changeset cf7622800865

Parent 606c40397743

by Steve Borho

Changes to 2 files · Browse files at cf7622800865 Showing diff from parent 606c40397743 Diff from another changeset...

 
280
281
282
283
 
284
285
286
 
280
281
282
 
283
284
285
286
@@ -280,7 +280,7 @@
  def createSyncWidget(self):   sw = getattr(self.repo, '_syncwidget', None) # TODO: ugly   if not sw: - sw = SyncWidget(self.repo, True, self) + sw = SyncWidget(self.repo, self)   self.repo._syncwidget = sw   sw = SharedWidget(sw)   sw.output.connect(self.output)
 
57
58
59
60
 
61
62
63
 
76
77
78
79
 
80
81
82
 
127
128
129
130
131
132
133
134
135
 
 
 
 
136
137
138
 
212
213
214
215
 
216
217
218
 
223
224
225
226
 
227
228
229
 
1324
1325
1326
1327
 
 
57
58
59
 
60
61
62
63
 
76
77
78
 
79
80
81
82
 
127
128
129
 
 
 
 
 
 
130
131
132
133
134
135
136
 
210
211
212
 
213
214
215
216
 
221
222
223
 
224
225
226
227
 
1322
1323
1324
 
1325
@@ -57,7 +57,7 @@
  progress = pyqtSignal(QString, object, QString, QString, object)   makeLogVisible = pyqtSignal(bool)   - def __init__(self, repo, embedded=False, parent=None, **opts): + def __init__(self, repo, parent, **opts):   QWidget.__init__(self, parent)     layout = QVBoxLayout() @@ -76,7 +76,7 @@
    self.repo.configChanged.connect(self.configChanged)   - if embedded: + if parent:   layout.setContentsMargins(2, 2, 2, 2)   else:   self.setWindowTitle(_('TortoiseHg Sync')) @@ -127,12 +127,10 @@
  self.targetcombo.setEnabled(False)   self.targetcheckbox = QCheckBox(_('Target:'))   self.targetcheckbox.toggled.connect(self.targetcombo.setEnabled) - tb.addSeparator() - tb.addWidget(self.targetcheckbox) - tb.addWidget(self.targetcombo) - if not embedded: - self.targetcombo.setHidden(True) - self.targetcheckbox.setHidden(True) + if parent: + tb.addSeparator() + tb.addWidget(self.targetcheckbox) + tb.addWidget(self.targetcombo)     self.urllabel = QLabel()   self.urllabel.setMargin(4) @@ -212,7 +210,7 @@
  self.postpullbutton.clicked.connect(self.postpullclicked)   self.optionsbutton.pressed.connect(self.editOptions)   - cmd = cmdui.Widget(not embedded, self) + cmd = cmdui.Widget(not parent, self)   cmd.commandStarted.connect(self.commandStarted)   cmd.commandFinished.connect(self.commandFinished)   @@ -223,7 +221,7 @@
  layout.addWidget(cmd)   cmd.setVisible(False)   self.cmd = cmd - self.embedded = embedded + self.embedded = bool(parent)     self.reload()   if 'default' in self.paths: @@ -1324,4 +1322,4 @@
  from tortoisehg.util import paths   from tortoisehg.hgqt import thgrepo   repo = thgrepo.repository(ui, path=paths.find_root()) - return SyncWidget(repo, **opts) + return SyncWidget(repo, None, **opts)