Issue #3555 resolved

New repository dialog buttons backwards on Linux (Mac also likely)

Patrick Plenefisch
created an issue

Under File > New Repository... the resulting dialog is backwards of the standard dialogs on Linux. This has caused me to cancel creating new repos numerous times now as the standard Linux and Mac layout (not tested, but I assume its backwards also) is [negative][affirmative] in contrast to the Windows guidelines of [affirmative][negative]. Either make/find a container that does this automatically or just check for OS's manually. This is the most annoying thing about THG I've yet encountered, so I'm a bit suprised this was not already polished out as otherwise the UI & UX is quite nice.

Comments (3)

  1. Patrick Plenefisch reporter

    This was very simple so I'm adding the patch inline:

    diff --git a/tortoisehg/hgqt/hginit.py b/tortoisehg/hgqt/hginit.py
    --- a/tortoisehg/hgqt/hginit.py
    +++ b/tortoisehg/hgqt/hginit.py
    @@ -57,11 +57,10 @@
             self.init_btn.setDefault(True)
             self.close_btn = QPushButton(_('&Close'))
             self.close_btn.setAutoDefault(False)
    -        self.hbox = QHBoxLayout()
    -        self.hbox.addStretch(0)
    -        self.hbox.addWidget(self.init_btn)
    -        self.hbox.addWidget(self.close_btn)
    -        self.vbox.addLayout(self.hbox)
    +        self.hbox = QDialogButtonBox()
    +        self.hbox.addButton(self.init_btn, QDialogButtonBox.AcceptRole)
    +        self.hbox.addButton(self.close_btn, QDialogButtonBox.RejectRole)
    +        self.vbox.addWidget(self.hbox)
    
             # some extras
             self.hgcmd_lbl = QLabel(_('Hg command:'))
    
  2. Log in to comment