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

sync: refactor layout, use toolbar icons for primary options

Still not happy, but this is better

Changeset 9ae2bb75ed50

Parent 5c67c38b4084

by Steve Borho

Changes to one file · Browse files at 9ae2bb75ed50 Showing diff from parent 5c67c38b4084 Diff from another changeset...

 
38
39
40
41
 
 
42
43
44
 
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
 
82
83
84
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
87
88
 
104
105
106
107
108
109
110
111
112
113
114
 
116
117
118
119
120
121
122
123
124
125
126
127
 
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
 
195
196
197
198
 
199
200
201
202
203
204
205
206
207
208
209
210
211
212
 
213
214
215
 
38
39
40
 
41
42
43
44
45
 
60
61
62
 
 
 
 
 
 
 
 
 
 
 
 
63
64
65
 
71
72
73
 
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
 
122
123
124
 
 
 
 
 
125
126
127
 
129
130
131
 
 
 
 
 
 
 
 
 
132
133
134
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
137
138
 
162
163
164
 
165
166
167
168
 
 
 
 
 
169
170
171
 
 
 
172
173
174
175
@@ -38,7 +38,8 @@
  QWidget.__init__(self, parent)     layout = QVBoxLayout() - layout.setSpacing(4) + layout.setContentsMargins(0, 0, 0, 0) + layout.setSpacing(0)   self.setLayout(layout)   self.setAcceptDrops(True)   @@ -59,18 +60,6 @@
  self.setWindowTitle(_('TortoiseHg Sync'))   self.resize(850, 550)   - toph = QHBoxLayout() - toph.setContentsMargins(0, 0, 0, 0) - layout.addLayout(toph) - - urlframe = QFrame() - urlframe.setFrameStyle(QFrame.StyledPanel|QFrame.Raised) - urlvbox = QVBoxLayout() - urlvbox.setContentsMargins(0, 0, 0, 0) - urlvbox.setSpacing(4) - urlframe.setLayout(urlvbox) - toph.addWidget(urlframe, 1) -   hbox = QHBoxLayout()   hbox.setContentsMargins(0, 0, 0, 0)   hbox.setSpacing(4) @@ -82,7 +71,36 @@
  self.urllabel.setAcceptDrops(False)   hbox.addWidget(self.urllabel)   hbox.addStretch(1) - urlvbox.addLayout(hbox) + self.detailsbutton = QPushButton(_('Details')) + hbox.addWidget(self.detailsbutton) + self.postpullbutton = QPushButton() + hbox.addWidget(self.postpullbutton) + if 'perfarce' in self.repo.extensions(): + self.p4pbutton = QPushButton(_('p4pending')) + self.p4pbutton.clicked.connect(self.p4pending) + hbox.addWidget(self.p4pbutton) + else: + self.p4pbutton = None + tb = QToolBar(self) + for tip, icon, cb in ( + (_('Preview incoming changesets from specified URL'), + 'incoming', self.inclicked), + (_('Pull incoming changesets from specified URL'), + 'pull', self.pullclicked), + (_('Filter outgoing changesets to specified URL'), + 'outgoing', self.outclicked), + (_('Push outgoing changesets to specified URL'), + 'push', self.pushclicked), + (_('Email outgoing changesets for specified URL'), + 'forward', self.emailclicked)): # TODO: need an email svg + a = QAction(self) + a.setToolTip(tip) + a.setIcon(qtlib.geticon(icon)) + a.triggered.connect(cb) + tb.addAction(a) + tb.setMaximumHeight(self.postpullbutton.sizeHint().height()) + hbox.addWidget(tb) + self.layout().addLayout(hbox)     hbox = QHBoxLayout()   hbox.setContentsMargins(0, 0, 0, 0) @@ -104,11 +122,6 @@
  self.portentry.setFixedWidth(8 * fontm.width('9'))   self.portentry.textChanged.connect(self.refreshUrl)   hbox.addWidget(self.portentry) - urlvbox.addLayout(hbox) - - hbox = QHBoxLayout() - hbox.setContentsMargins(0, 0, 0, 0) - hbox.setSpacing(4)   hbox.addWidget(QLabel(_('Path:')))   self.pathentry = QLineEdit()   self.pathentry.setAcceptDrops(False) @@ -116,56 +129,10 @@
  hbox.addWidget(self.pathentry, 1)   self.authbutton = QPushButton(_('Authentication'))   hbox.addWidget(self.authbutton) - urlvbox.addLayout(hbox) - - buttonframe = QFrame() - buttonframe.setFrameStyle(QFrame.StyledPanel|QFrame.Raised) - buttonvbox = QVBoxLayout() - buttonvbox.setContentsMargins(0, 0, 0, 0) - buttonvbox.setSpacing(4) - buttonframe.setLayout(buttonvbox) - toph.addWidget(buttonframe) + self.layout().addLayout(hbox)     hbox = QHBoxLayout()   hbox.setContentsMargins(0, 0, 0, 0) - hbox.setSpacing(4) - self.inbutton = QPushButton(_('Incoming')) - hbox.addWidget(self.inbutton) - self.pullbutton = QPushButton(_('Pull')) - hbox.addWidget(self.pullbutton) - buttonvbox.addLayout(hbox) - - hbox = QHBoxLayout() - hbox.setContentsMargins(0, 0, 0, 0) - hbox.setSpacing(4) - self.postpullbutton = QPushButton() - hbox.addWidget(self.postpullbutton) - self.detailsbutton = QPushButton(_('Details')) - hbox.addWidget(self.detailsbutton) - buttonvbox.addLayout(hbox) - - hbox = QHBoxLayout() - hbox.setContentsMargins(0, 0, 0, 0) - hbox.setSpacing(4) - self.outbutton = QPushButton(_('Outgoing')) - hbox.addWidget(self.outbutton) - self.pushbutton = QPushButton(_('Push')) - hbox.addWidget(self.pushbutton) - self.emailbutton = QPushButton(_('Email')) - hbox.addWidget(self.emailbutton) - buttonvbox.addLayout(hbox) - - if 'perfarce' in self.repo.extensions(): - self.p4pbutton = QPushButton(_('p4pending')) - self.p4pbutton.clicked.connect(self.p4pending) - hbox.addWidget(self.p4pbutton) - else: - self.p4pbutton = None - - - hbox = QHBoxLayout() - hbox.setContentsMargins(0, 0, 0, 0) -   self.hgrctv = PathsTree(self, True)   self.hgrctv.clicked.connect(self.pathSelected)   self.hgrctv.removeAlias.connect(self.removeAlias) @@ -195,21 +162,14 @@
  pathsbox.addWidget(self.reltv)   hbox.addWidget(pathsframe)   - layout.addLayout(hbox, 1) + self.layout().addLayout(hbox, 1)     self.savebutton.clicked.connect(self.saveclicked)   self.authbutton.clicked.connect(self.authclicked) - self.inbutton.clicked.connect(self.inclicked) - self.pullbutton.clicked.connect(self.pullclicked) - self.outbutton.clicked.connect(self.outclicked) - self.pushbutton.clicked.connect(self.pushclicked) - self.emailbutton.clicked.connect(self.emailclicked)   self.postpullbutton.clicked.connect(self.postpullclicked)   self.detailsbutton.pressed.connect(self.details)   - self.opbuttons = (self.inbutton, self.pullbutton, - self.outbutton, self.pushbutton, - self.emailbutton, self.p4pbutton) + self.opbuttons = (tb, self.p4pbutton)     cmd = cmdui.Widget(not embedded, self)   cmd.commandStarted.connect(self.commandStarted)