Пример #1
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()
Пример #2
0
    def refresh(self):
        #Dialog.refresh(self) # must be called *before*        
        #self.headlines = BLOG.tag_names_list()
        Dialog.refresh(self) # must be called *before* 

        self.headlines = BLOG.tag_names_list()
        if not self.headlines:
            self.headlines = [ LABELS.loc.tg_info_udt_tags_lst ]
            
        #self.headlines = []
        #for t in BLOG.tags:
        #    line = u"%s (%s)" % (t['name'],t['count'])
        #    self.headlines.append(line)
                               
        self.last_idx = min( self.last_idx, len(self.headlines)-1 ) # avoiding problems after removing
        app.body.set_list( self.headlines, self.last_idx )

        
Пример #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()