Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

synch: refactoring: cleanup

Changeset 10dbfaad55ed

Parent 47ecdfbe1fa3

by Yuki KODAMA

Changes to one file · Browse files at 10dbfaad55ed Showing diff from parent 47ecdfbe1fa3 Diff from another changeset...

Change 1 of 9 Show Entire File hggtk/​synch.py Stacked
 
99
100
101
 
 
102
103
104
105
106
 
107
 
 
108
109
110
 
115
116
117
118
 
119
120
121
 
142
143
144
145
146
147
148
149
150
 
151
152
153
 
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
 
184
185
186
187
 
 
188
189
190
191
192
193
194
195
196
 
198
199
200
 
201
 
202
203
204
 
212
213
214
215
 
216
217
218
 
226
227
228
 
 
 
 
 
 
229
230
231
 
249
250
251
 
252
253
254
 
 
 
 
 
 
255
256
257
 
99
100
101
102
103
104
105
106
107
 
108
109
110
111
112
113
114
 
119
120
121
 
122
123
124
125
 
146
147
148
 
 
 
 
 
 
149
150
151
152
 
156
157
158
 
 
 
 
 
 
 
159
160
161
162
163
 
 
 
 
164
165
166
167
168
169
170
 
171
172
173
174
175
176
177
178
 
181
182
183
 
184
185
186
 
 
 
 
 
187
188
189
 
191
192
193
194
195
196
197
198
199
 
207
208
209
 
210
211
212
213
 
221
222
223
224
225
226
227
228
229
230
231
232
 
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
@@ -99,12 +99,16 @@
  ]   for btn in tbuttons:   self.tbar.insert(btn, -1) + + # Base box   basevbox = gtk.VBox()   self.add(basevbox)   basevbox.pack_start(self.tbar, False, False, 2)   - # sync target selection buttons + # Sync Target Path   targethbox = gtk.HBox() + + ## target selection buttons   lbl = gtk.Button(_('Repo:'))   lbl.unset_flags(gtk.CAN_FOCUS)   lbl.connect('clicked', self.btn_remotepath_clicked) @@ -115,7 +119,7 @@
  lbl.connect('clicked', self.btn_bundlepath_clicked)   targethbox.pack_start(lbl, False, False)   - # target path combobox + ## target path combobox   self.pathlist = gtk.ListStore(str, str)   self.pathbox = gtk.ComboBoxEntry(self.pathlist, 0)   self.pathtext = self.pathbox.get_child() @@ -142,12 +146,7 @@
  elif defrow is not None:   self.pathbox.set_active(defrow)   - # support dropping of repos or bundle files - self.drag_dest_set(gtk.DEST_DEFAULT_ALL, - [("text/uri-list", 0, 1)], gtk.gdk.ACTION_COPY) - self.connect('drag_data_received', self._drag_receive) - - # group for 'Post pull operation' + # Post Pull Operation   ppullhbox = gtk.HBox()   self.ppulldata = [('none', _('Nothing')), ('update', _('Update')),   ('fetch', _('Fetch')), ('rebase', _('Rebase'))] @@ -157,25 +156,23 @@
  ppullhbox.pack_start(gtk.Label(_('Post Pull: ')), False, False, 2)   ppullhbox.pack_start(self.ppullcombo, True, True)   - # Advanced options - self.expander = expander = gtk.Expander(_('Advanced Options')) - expander.set_expanded(False) - expander.connect_after('activate', self.expanded) - opthbox = gtk.HBox() - expander.add(opthbox) - + # Fixed options box (non-foldable)   fixedhbox = gtk.HBox()   fixedhbox.pack_start(targethbox, True, True, 2)   fixedhbox.pack_start(ppullhbox, False, False, 2)   - topvbox = gtk.VBox() - topvbox.pack_start(fixedhbox, True, True, 2) - topvbox.pack_start(expander, False, False, 2) - basevbox.pack_start(topvbox, False, False, 2) + # Advanced options (foldable) + opthbox = gtk.HBox() + self.expander = expander = gtk.Expander(_('Advanced Options')) + expander.set_expanded(False) + expander.connect_after('activate', self.expanded) + expander.add(opthbox)   - # checkbox options + ## checkbox options   chkopthbox = gtk.HBox()   self.force = gtk.CheckButton(_('Force pull or push')) + self.tips.set_tip(self.force, _('Run even when remote repository' + ' is unrelated.'))   self.use_proxy = gtk.CheckButton(_('use proxy server'))   if ui.ui().config('http_proxy', 'host', ''):   self.use_proxy.set_active(True) @@ -184,13 +181,9 @@
  chkopthbox.pack_start(self.force, False, False, 4)   chkopthbox.pack_start(self.use_proxy, False, False, 4)   - # other options + ## target revision option + revhbox = gtk.HBox()   self.reventry = gtk.Entry() - self.cmdentry = gtk.Entry() - self.tips.set_tip(self.force, _('Run even when remote repository' - ' is unrelated.')) - - revhbox = gtk.HBox()   revhbox.pack_start(gtk.Label(_('Target Revision:')), False, False, 2)   revhbox.pack_start(self.reventry, True, True, 2)   reveventbox = gtk.EventBox() @@ -198,7 +191,9 @@
  self.tips.set_tip(reveventbox, _('A specific revision up to which you'   ' would like to push or pull.'))   + ## remote command option   cmdhbox = gtk.HBox() + self.cmdentry = gtk.Entry()   cmdhbox.pack_start(gtk.Label(_('Remote Command:')), False, False, 2)   cmdhbox.pack_start(self.cmdentry, True, True, 2)   cmdeventbox = gtk.EventBox() @@ -212,7 +207,7 @@
  revvbox.pack_start(cmdeventbox, False, False, 4)   opthbox.pack_start(revvbox, True, True, 4)   - # groupbox for 'Incoming/Outgoing' + ## incoming/outgoing options   frame = gtk.Frame(_('Incoming/Outgoing'))   opthbox.pack_start(frame, False, False, 2)   @@ -226,6 +221,12 @@
  iovbox.pack_start(self.nomerge, False, False, 2)   frame.add(iovbox)   + # Main option box + topvbox = gtk.VBox() + topvbox.pack_start(fixedhbox, True, True, 2) + topvbox.pack_start(expander, False, False, 2) + basevbox.pack_start(topvbox, False, False, 2) +   # hg output window   scrolledwindow = gtk.ScrolledWindow()   scrolledwindow.set_shadow_type(gtk.SHADOW_ETCHED_IN) @@ -249,9 +250,16 @@
  self.buttonhbox.pack_start(self.updatetip, False, False, 2)   basevbox.pack_start(self.buttonhbox, False, False, 2)   + # statusbar   self.stbar = gtklib.StatusBar()   basevbox.pack_start(self.stbar, False, False, 2)   + # support dropping of repos or bundle files + self.drag_dest_set(gtk.DEST_DEFAULT_ALL, + [("text/uri-list", 0, 1)], gtk.gdk.ACTION_COPY) + self.connect('drag_data_received', self._drag_receive) + + # prepare to show   self.load_settings()   self.update_pull_setting()   gobject.idle_add(self.finalize_startup)