Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

gdialog: remove obsolete main argument from GDialog

Changeset d392e86e5e04

Parent 1ef3bac66caf

by Steve Borho

Changes to 9 files · Browse files at d392e86e5e04 Showing diff from parent 1ef3bac66caf Diff from another changeset...

 
54
55
56
57
 
 
54
55
56
 
57
@@ -54,4 +54,4 @@
  return vbox    def run(_ui, *pats, **opts): - return BugReport(_ui, None, None, None, opts, True) + return BugReport(_ui, None, None, None, opts)
 
20
21
22
23
24
 
 
25
26
27
 
695
696
697
698
 
699
700
701
 
711
712
713
714
 
715
716
717
 
20
21
22
 
 
23
24
25
26
27
 
695
696
697
 
698
699
700
701
 
711
712
713
 
714
715
716
717
@@ -20,8 +20,8 @@
 class ChangeSet(GDialog):   """GTK+ based dialog for displaying repository logs   """ - def __init__(self, ui, repo, cwd, pats, opts, main, stbar=None): - GDialog.__init__(self, ui, repo, cwd, pats, opts, main) + def __init__(self, ui, repo, cwd, pats, opts, stbar=None): + GDialog.__init__(self, ui, repo, cwd, pats, opts)   self.stbar = stbar   self.glog_parent = None   @@ -695,7 +695,7 @@
  '''User selected annotate file from the file list context menu'''   from datamine import DataMineDialog   rev = self.currev - dialog = DataMineDialog(self.ui, self.repo, self.cwd, [], {}, False) + dialog = DataMineDialog(self.ui, self.repo, self.cwd, [], {})   dialog.display()   dialog.add_annotate_page(self.curfile, str(rev))   @@ -711,7 +711,7 @@
  # Else launch our own GLog instance   import history   dialog = history.GLog(self.ui, self.repo, self.cwd, - [self.repo.root], {}, False) + [self.repo.root], {})   dialog.open_with_file(self.curfile)   dialog.display()  
Change 1 of 1 Show Entire File hggtk/​commit.py Stacked
 
655
656
657
658
 
 
655
656
657
 
658
@@ -655,4 +655,4 @@
  'exclude':[], 'include':[],   'check': True, 'git':False, 'addremove':False,   } - return GCommit(_ui, None, None, pats, cmdoptions, True) + return GCommit(_ui, None, None, pats, cmdoptions)
Change 1 of 3 Show Entire File hggtk/​datamine.py Stacked
 
123
124
125
126
 
127
128
129
 
131
132
133
134
 
135
136
137
 
702
703
704
705
 
 
123
124
125
 
126
127
128
129
 
131
132
133
 
134
135
136
137
 
702
703
704
 
705
@@ -123,7 +123,7 @@
  def _cmenu_display(self, menuitem):   from changeset import ChangeSet   statopts = {'rev' : [self.currev] } - dialog = ChangeSet(self.ui, self.repo, self.cwd, [], statopts, False) + dialog = ChangeSet(self.ui, self.repo, self.cwd, [], statopts)   dialog.display()     def _cmenu_annotate(self, menuitem): @@ -131,7 +131,7 @@
    def _cmenu_file_log(self, menuitem):   from history import GLog - dialog = GLog(self.ui, self.repo, self.cwd, [self.repo.root], {}, False) + dialog = GLog(self.ui, self.repo, self.cwd, [self.repo.root], {})   dialog.open_with_file(self.curpath)   dialog.display()   @@ -702,4 +702,4 @@
  'only_merges':None, 'prune':[], 'git':False, 'verbose':False,   'include':[], 'exclude':[]   } - return DataMineDialog(ui, None, None, pats, cmdoptions, True) + return DataMineDialog(ui, None, None, pats, cmdoptions)
Change 1 of 4 Show Entire File hggtk/​gdialog.py Stacked
 
88
89
90
91
 
92
93
94
 
96
97
98
99
100
101
102
 
142
143
144
145
146
147
148
 
149
150
151
 
287
288
289
290
 
291
292
293
294
295
296
297
298
299
300
301
 
 
 
 
302
303
304
 
88
89
90
 
91
92
93
94
 
96
97
98
 
99
100
101
 
141
142
143
 
 
 
 
144
145
146
147
 
283
284
285
 
286
287
288
289
 
 
 
 
 
 
 
 
290
291
292
293
294
295
296
@@ -88,7 +88,7 @@
  # "Constants"   settings_version = 1   - def __init__(self, ui, repo, cwd, pats, opts, main): + def __init__(self, ui, repo, cwd, pats, opts):   gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)   self.cwd = cwd or os.getcwd()   self.ui = ui @@ -96,7 +96,6 @@
  self.repo = repo or hg.repository(ui, path=hglib.rootpath())   self.pats = pats   self.opts = opts - self.main = main   self.tmproot = None   self.toolbuttons = {}   self.settings = shlib.Settings(self.__class__.__name__) @@ -142,10 +141,7 @@
      def should_live(self, widget=None, event=None): - if self.main: - self._destroying(widget) - else: - self.destroy() + self._destroying(widget)   return False     @@ -287,18 +283,14 @@
  vbox.pack_end(extras, False, False, 0)     self.connect('destroy', self._destroying) - self.connect('delete_event', self.should_live) + #self.connect('delete_event', self.should_live)       def _destroying(self, gtkobj): - try: - settings = self.save_settings() - self.settings.set_value('settings_version', GDialog.settings_version) - self.settings.set_value('dialogs', settings) - self.settings.write() - finally: - if self.main: - gtk.main_quit() + settings = self.save_settings() + self.settings.set_value('settings_version', GDialog.settings_version) + self.settings.set_value('dialogs', settings) + self.settings.write()       def _load_settings(self):
Change 1 of 5 Show Entire File hggtk/​history.py Stacked
 
83
84
85
86
 
87
88
89
 
256
257
258
259
 
260
261
262
 
513
514
515
516
 
517
518
519
 
580
581
582
583
 
584
585
586
 
750
751
752
753
 
 
83
84
85
 
86
87
88
89
 
256
257
258
 
259
260
261
262
 
513
514
515
 
516
517
518
519
 
580
581
582
 
583
584
585
586
 
750
751
752
 
753
@@ -83,7 +83,7 @@
    def _datamine_clicked(self, toolbutton, data=None):   from datamine import DataMineDialog - dialog = DataMineDialog(self.ui, self.repo, self.cwd, [], {}, False) + dialog = DataMineDialog(self.ui, self.repo, self.cwd, [], {})   dialog.display()     def _filter_clicked(self, toolbutton, data=None): @@ -256,7 +256,7 @@
    # Allocate ChangeSet instance to use internally   self.changeview = ChangeSet(self.ui, self.repo, self.cwd, [], - self.opts, False, self.stbar) + self.opts, self.stbar)   self.changeview.display(False)   self.changeview.glog_parent = self   @@ -513,7 +513,7 @@
  statopts['added'] = True   statopts['removed'] = True   dialog = GStatus(self.ui, self.repo, self.cwd, self.pats, - statopts, False) + statopts)   dialog.display()   return True   @@ -580,7 +580,7 @@
  def _show_status(self, menuitem):   rev = self.currow[treemodel.REVID]   statopts = {'rev' : [str(rev)] } - dialog = ChangeSet(self.ui, self.repo, self.cwd, [], statopts, False) + dialog = ChangeSet(self.ui, self.repo, self.cwd, [], statopts)   dialog.display()     def _copy_hash(self, menuitem): @@ -750,4 +750,4 @@
  canonpats = []   for f in pats:   canonpats.append(util.canonpath(root, os.getcwd(), f)) - return GLog(ui, None, None, canonpats, cmdoptions, True) + return GLog(ui, None, None, canonpats, cmdoptions)
Change 1 of 2 Show Entire File hggtk/​status.py Stacked
 
1060
1061
1062
1063
 
1064
1065
1066
 
1330
1331
1332
1333
 
 
1060
1061
1062
 
1063
1064
1065
1066
 
1330
1331
1332
 
1333
@@ -1060,7 +1060,7 @@
  def _log_file(self, stat, wfile):   from history import GLog   # Might want to include 'rev' here... trying without - dialog = GLog(self.ui, self.repo, self.cwd, [wfile], self.opts, False) + dialog = GLog(self.ui, self.repo, self.cwd, [wfile], self.opts)   dialog.display()   return True   @@ -1330,4 +1330,4 @@
  'exclude':[], 'include':[], 'debug':True, 'verbose':True, 'git':False,   'check':True   } - return GStatus(ui, None, None, pats, cmdoptions, True) + return GStatus(ui, None, None, pats, cmdoptions)
Change 1 of 1 Show Entire File hggtk/​synch.py Stacked
 
296
297
298
299
 
300
301
302
 
296
297
298
 
299
300
301
302
@@ -296,7 +296,7 @@
  from history import GLog   countpulled = len(self.repo.changelog) - self.origchangecount   opts = {'limit' : countpulled } - dialog = GLog(self.ui, None, None, [], opts, False) + dialog = GLog(self.ui, None, None, [], opts)   dialog.display()     def _update_to_tip(self, button):
 
216
217
218
219
 
 
216
217
218
 
219
@@ -216,4 +216,4 @@
  'exclude':[], 'include':[],   'check': True, 'git':False, 'addremove':False,   } - return GShelve(_ui, None, None, pats, cmdoptions, True) + return GShelve(_ui, None, None, pats, cmdoptions)