Article dialog internals implemented
[biaweb_qt.git] / main_window.py
index b2547b6..ff4f3cf 100644 (file)
@@ -57,8 +57,10 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow):
                                PyQt4.QtGui.QMessageBox.critical (self, "Error", "No category selected for article")
                                return
                        artdlg = artd.ArticleDialog (self)
-                       artdlg.exec_ ()
+                       cats = biaweb_db.get_categories (self.current_db)
 
+                       artdlg.populate_categories (cats, catid)
+                       artdlg.exec_ ()
 
        # when edit article is triggered
        def onArticleEdit (self):
@@ -68,6 +70,10 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow):
        def onArticleDelete (self):
                pass
 
+       # when category item is activated
+       def onCategoryItemActivated (self):
+               self.onCategoryEdit ()
+
        # when item selection is changed in categories tree widget
        def onCategorySelectionChanged (self):
                if self.current_db is not None: