Norsk versjon lagt til.
This commit is contained in:
parent
dc0992579c
commit
3205c764ba
16
egon.py
16
egon.py
|
@ -1103,11 +1103,12 @@ class ScheduleTab(QWidget):
|
|||
def addLessonToTable(self, lesson):
|
||||
row = lesson.getTime() - 8
|
||||
column = self.getColumn(lesson.getDay())
|
||||
course = lesson.getCourse().getFull()
|
||||
code = lesson.getCourse().getCode()
|
||||
title = lesson.getCourse().getTitle()
|
||||
type = lesson.getType()
|
||||
room = lesson.getRoom()
|
||||
olditem = self.scheduleTable.item(row, column)
|
||||
newtext = "%s\n%s\n%s" % (course, type, room)
|
||||
newtext = "%s\n%s\n%s\n%s" % (code, title, type, room)
|
||||
if olditem:
|
||||
oldtext = olditem.text()
|
||||
text = QString(oldtext + "\n" + newtext)
|
||||
|
@ -1220,8 +1221,8 @@ class ScheduleDlg(QDialog):
|
|||
self.setLayout(self.layout)
|
||||
|
||||
# Connect statements
|
||||
self.connect(buttonBox, SIGNAL("accepted()"), self, SLOT("accept()"))
|
||||
self.connect(buttonBox, SIGNAL("rejected()"), self, SLOT("reject()"))
|
||||
self.connect(self.buttonBox, SIGNAL("accepted()"), self, SLOT("accept()"))
|
||||
self.connect(self.buttonBox, SIGNAL("rejected()"), self, SLOT("reject()"))
|
||||
|
||||
# Set the title
|
||||
self.setWindowTitle(self.trUtf8("Add new lesson"))
|
||||
|
@ -1519,7 +1520,12 @@ class BookModel():
|
|||
|
||||
## Connect to the database and return the cursor and connection
|
||||
def initDB():
|
||||
conn = sqlite.connect('.egon/egon.db')
|
||||
if 'HOME' in os.environ:
|
||||
home = os.environ['HOME']
|
||||
else:
|
||||
home = ""
|
||||
path = home+"/.egon/egon.db"
|
||||
conn = sqlite.connect(path)
|
||||
cursor = conn.cursor()
|
||||
|
||||
cursor.execute('''
|
||||
|
|
Reference in New Issue