Update email adress and git respository adress.
[hgct.git] / commit.py
bloba1d9ed2aa6c628f940a49f7917b2167709b056b7
1 # Copyright (c) 2005 Fredrik Kuivinen <frekui@gmail.com>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License version 2 as
5 # published by the Free Software Foundation.
6 #
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
12 # You should have received a copy of the GNU General Public License
13 # along with this program; if not, write to the Free Software
14 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 from ctcore import *
17 import qt, re, os
18 qconnect = qt.QObject.connect
19 Qt = qt.Qt
21 class CommitDialog(qt.QDialog):
22 def __init__(self, mergeMsg, commitMsg, files):
23 qt.QDialog.__init__(self)
24 self.setModal(True)
25 self.setCaption('Confirm Commit - ' + applicationName)
26 self.layout = qt.QVBoxLayout(self)
27 self.layout.setAutoAdd(True)
28 self.layout.setMargin(10)
29 self.layout.setSpacing(10)
31 self.msgL1 = qt.QLabel('<qt><p>' + mergeMsg + '</p>' + \
32 '<p>Do you want to commit the following file(s):</p></qt>', self)
33 self.fileList = qt.QListBox(self)
34 self.fileList.setSelectionMode(qt.QListBox.NoSelection)
35 for f in files:
36 self.fileList.insertItem(f)
37 self.fileList.setMinimumSize(self.fileList.width(),
38 self.fileList.itemHeight()*10)
40 self.msgL2 = \
41 qt.QLabel('<qt><p>with the commit message:</p>' + \
42 '<blockquote><pre>' + unicode(qt.QStyleSheet.escape(commitMsg)) + '</pre></blockquote></qt>',
43 self)
45 self.buttonL = qt.QHBox(self)
46 self.yes = qt.QPushButton("&Yes", self.buttonL)
47 self.no = qt.QPushButton("&No", self.buttonL)
48 qconnect(self.yes, qt.SIGNAL("clicked()"), self.accept)
49 qconnect(self.no, qt.SIGNAL("clicked()"), self.reject)
51 self.yes.setFocus()
53 def paintEvent(self, e):
54 qt.QDialog.paintEvent(self, e)