Exemple #1
0
 def new_cbk(self):
     if not self.dlg.cancel:
         self.lock_ui()
         # send to WP
         np = BLOG.new_post(self.dlg.post_title,
                            self.dlg.contents,
                            self.dlg.categories,
                            self.dlg.tags,
                            self.dlg.publish)
         self.unlock_ui()
         
         if np == -1:
             return False
     elif self.dlg.save:
         # just save
         BLOG.save_new_post(self.dlg.post_title,
                            self.dlg.contents,
                            self.dlg.categories,
                            self.dlg.tags,
                            self.dlg.publish)
         
     self.refresh()
     return True