Completed the template editing functionality
[biaweb_qt.git] / article_dialog.py
index f8108cf..6b51e70 100644 (file)
@@ -9,6 +9,8 @@ class ArticleDialog (PyQt4.QtGui.QDialog, ui_article_dialog.Ui_ArticleDialog):
        def __init__ (self, parent):
                PyQt4.QtGui.QDialog.__init__ (self, parent)
                self.setupUi (self)
+               # set window to be able to be maximized or minimized
+               self.setWindowFlags (PyQt4.QtCore.Qt.Window)
                # set the code highlighter to the document
                self.hltext = highlighter.SimpleHtmlHighlighter (self.content.document ())
 
@@ -113,11 +115,11 @@ class ArticleDialog (PyQt4.QtGui.QDialog, ui_article_dialog.Ui_ArticleDialog):
        def insert_list_items (self, numbered = False):
                if numbered:
                        title = "Numbered list"
-                       otag = "<ol>\n"
+                       otag = "\n<ol>\n"
                        ctag = "</ol>\n"
                else:
                        title = "Bulleted list"
-                       otag = "<ul>\n"
+                       otag = "\n<ul>\n"
                        ctag = "</ul>\n"
 
                itemlist = [ otag ]
@@ -228,6 +230,6 @@ class ArticleDialog (PyQt4.QtGui.QDialog, ui_article_dialog.Ui_ArticleDialog):
        # when break is clicked
        def onBreak (self):
                textcur = self.content.textCursor ()
-               breaktxt = "\n<br />\n"
+               breaktxt = "<br />\n"
                textcur.clearSelection ()
                textcur.insertText (breaktxt)