projects
/
biaweb_qt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modified the template editing setup
[biaweb_qt.git]
/
templates_dialog.py
diff --git
a/templates_dialog.py
b/templates_dialog.py
index
7d8fbf0
..
8a57482
100644
(file)
--- a/
templates_dialog.py
+++ b/
templates_dialog.py
@@
-3,10
+3,17
@@
import PyQt4
import ui_templates_dialog
import PyQt4
import ui_templates_dialog
-import
highlighter
+import
biaweb_db
class TemplatesDialog (PyQt4.QtGui.QDialog, ui_templates_dialog.Ui_TemplatesDialog):
class TemplatesDialog (PyQt4.QtGui.QDialog, ui_templates_dialog.Ui_TemplatesDialog):
- def __init__ (self, master):
+ def __init__ (self, master
, currentdb
):
PyQt4.QtGui.QDialog.__init__ (self, master)
self.setupUi (self)
PyQt4.QtGui.QDialog.__init__ (self, master)
self.setupUi (self)
- self.setWindowFlags (PyQt4.QtCore.Qt.Window)
+
+ # set the current database
+ self.current_db = currentdb
+
+ # populate the templates
+ tpls = biaweb_db.get_templates (self.current_db)
+ for tpl_name, tpl_content in tpls:
+ self.templates.addItem (str (tpl_name))