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

thg: use QApplication features

Changeset 0445c6b2dd1d

Parent 6e72e090ea24

by Steve Borho

Changes to one file · Browse files at 0445c6b2dd1d Showing diff from parent 6e72e090ea24 Diff from another changeset...

 
40
41
42
43
44
45
46
 
239
240
241
242
243
244
245
 
297
298
299
300
301
 
302
303
304
305
306
 
 
 
 
 
307
308
309
 
40
41
42
 
43
44
45
 
238
239
240
 
241
242
243
 
295
296
297
 
 
298
299
300
301
302
303
304
305
306
307
308
309
310
311
@@ -40,7 +40,6 @@
 nonrepo_commands = '''userconfig shellconfig clone debugcomplete init  about help version thgstatus serve'''   -mainapp = None  def dispatch(args):   """run the command specified in args"""   try: @@ -239,7 +238,6 @@
  raise error.RepoError(_("There is no Mercurial repository here"   " (.hg not found)"))   - cmdoptions['mainapp'] = True   d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)   return _runcommand(lui, options, cmd, d)   @@ -297,13 +295,17 @@
 def qtrun(dlgfunc, ui, *args, **opts):   portable_fork(ui, opts)   - global mainapp - if mainapp: + if QtGui.QApplication.instance():   dlg = dlgfunc(ui, *args, **opts)   dlg.show()   return     mainapp = QtGui.QApplication(sys.argv) + # default org is used by QSettings + mainapp.setApplicationName('TortoiseHg') + mainapp.setOrganizationName('TortoiseHg') + mainapp.setOrganizationDomain('tortoisehg.org') + mainapp.setApplicationVersion(thgversion.version())   try:   dlg = dlgfunc(ui, *args, **opts)   dlg.show()