X-Git-Url: https://harishankar.org/repos/?p=biaweb_qt.git;a=blobdiff_plain;f=main_window.py;h=ff4f3cfc3480c7aba4f129f772a7f542375725fd;hp=b2547b65899ed2131d0ebf1f626d8693969c52e6;hb=592798cba4152c0726edeb629da48cc8ac23a3a3;hpb=a17e899ab18f129ecc6e894e8b2ddc3322aef6f8 diff --git a/main_window.py b/main_window.py index b2547b6..ff4f3cf 100644 --- a/main_window.py +++ b/main_window.py @@ -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: