X-Git-Url: https://harishankar.org/repos/?a=blobdiff_plain;f=main_window.py;h=86e9b12a08be7f6aa9641767e09c4a5d6cf3b3e4;hb=826408979db0e8e4675d51def6ce7dadd305cf9c;hp=6b7f31ad7f919c0e369bf4c8c81199465cb2a60c;hpb=2687a3c3b18c3a267ca60ecdd3759ed0856471e0;p=biaweb_qt.git diff --git a/main_window.py b/main_window.py index 6b7f31a..86e9b12 100644 --- a/main_window.py +++ b/main_window.py @@ -9,6 +9,7 @@ import site_configuration_dialog as scd import category_dialog as catd import article_dialog as artd import templates_dialog as tpld +import generate_dialog as gend import biaweb_db class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): @@ -362,6 +363,23 @@ class MainWindow (PyQt4.QtGui.QMainWindow, ui_main_window.Ui_MainWindow): else: PyQt4.QtGui.QMessageBox.critical (self, "Error", "System or SQLite 3 error in creating database") + # when generate site menu is triggered + def onGenerateSite (self): + if self.current_db is None: + PyQt4.QtGui.QMessageBox.critical (self, "Error", + "Cannot generate site. You need to create or open a website first") + else: + # run the generate site dialog + gendlg = gend.GenerateDialog (self, self.current_db) + gendlg.exec_ () + + # about menu is triggered + def onAbout (self): + PyQt4.QtGui.QMessageBox.about (self, "BiaWeb Qt", + "A static website/weblog content management system

\ +Copyright © 2010 Harishankar
\ +Licensed under GNU/GPL v3") + # file quit is clicked def onFileQuit (self): sys.exit (0)