Exemple #1
0
    def refresh(self):
        Dialog.refresh(self) # must be called *before* 
        
        self.headlines = BLOG.category_names_list()
        self.last_idx = min( self.last_idx, len(self.headlines)-1 ) # avoiding problems after removing
        self.set_title( LABELS.loc.ca_info_cat_pos % ( self.body.current()+1,len(self.headlines) ) )

        self.body.set_list( self.headlines, self.last_idx )
Exemple #2
0
 def contents(self):
     if BLOG.posts:
         idx = self.body.current()
         if self.download_contents(idx):
             publish = BLOG.posts[idx]['post_status'] == 'publish' # 'publish' or 'draft'
             self.dlg = EditPost(self.contents_cbk,
                                 BLOG.category_names_list(),
                                 BLOG.tag_names_list(),
                                 idx,
                                 publish)
             self.dlg.run()
Exemple #3
0
 def new(self):
     self.dlg = NewPost(self.new_cbk, u"", u"",
                        BLOG.category_names_list(), [],
                        BLOG.tag_names_list(), [],
                        True)
     self.dlg.run()