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

run: use TortoiseHgQt for the application name

to avoid conflicts with the legacy GTK version of TortoiseHg.

This name is used for e.g. storing QSettings in the registry on Windows.

Changeset 06731e08a694

Parent 3b73923a5aa5

by Adrian Buehlmann

Changes to 2 files · Browse files at 06731e08a694 Showing diff from parent 3b73923a5aa5 Diff from another changeset...

 
303
304
305
306
 
307
308
309
 
303
304
305
 
306
307
308
309
@@ -303,7 +303,7 @@
    mainapp = QtGui.QApplication(sys.argv)   # default org is used by QSettings - mainapp.setApplicationName('TortoiseHg') + mainapp.setApplicationName('TortoiseHgQt')   mainapp.setOrganizationName('TortoiseHg')   mainapp.setOrganizationDomain('tortoisehg.org')   mainapp.setApplicationVersion(thgversion.version())
 
530
531
532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
534
535
 
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
@@ -530,6 +530,24 @@
  w.raise_()   w.activateWindow()   + def okToContinue(self): + ''' + returns False if there is unsaved data + + If there is unsaved data, present a dialog asking the user if it is ok to + discard the changes made. + ''' + return True # we currently have no data to loose + + def closeEvent(self, event): + print "closeEvent" + if not self.okToContinue(): + event.ignore() + s = QtCore.QSettings() + V = QtCore.QVariant + s.setValue("MainWindow/Size", V(self.size())) + s.setValue("MainWindow/Position", V(self.pos())) +  def run(ui, *pats, **opts):   from tortoisehg.hgqt import setup_font_substitutions   setup_font_substitutions()