DialerFrame.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:fmc-dialer 作者: sguron 项目源码 文件源码
def UpdateCallHistory(self):
        history = self.wxapp.dialed_history[:50]
        history.reverse()
        iterhistory = iter(history)
        startrow = 3
        startcol = 1
        row = 0
        col = 0

        windows = iter(list(self.recenthistory_panel.GetChildren()))
        #dont remove the transparent header.. just skip over it  #NEXT IT ;)
        next(windows)
        for window in windows:
            self.recenthistory_sizer.Detach(window)
            window.Destroy()
        self.recenthistory_sizer.Layout()

        #self.recenthistory_sizer.AddSpacer( ( 5, 1 ), wx.GBPosition( 0, startcol + col ), wx.GBSpan( 1, 1 ), wx.FIXED_MINSIZE, 0 )
        #self.recenthistory_sizer.AddSpacer( ( 5, 1 ), wx.GBPosition( 0, startcol + col + 2 ), wx.GBSpan( 1, 1 ), wx.FIXED_MINSIZE, 0 )
        #self.recenthistory_sizer.AddSpacer( ( 5, 1 ), wx.GBPosition( 0, startcol + col + 4 ), wx.GBSpan( 1, 1 ), wx.FIXED_MINSIZE, 0 )

        for row in range(5):
            try:
                for col in range(3):
                    call = next(iterhistory)
                    #print "Adding call to pane;", call
                    rc1 = LastdialedPanel(call[0], call[1], self.dialRecent, u"images/panel/recentcallbg.png",
                                          self.recenthistory_panel, wx.ID_ANY, )
                    self.recenthistory_sizer.Add(rc1, wx.GBPosition(startrow + row + 1, startcol + col),
                                                 wx.GBSpan(1, 1), wx.ALIGN_LEFT, 0)
                if row != 0:
                    try:
                        self.recenthistory_sizer.AddSpacer(( 2, 63 ), wx.GBPosition(startrow + row, 0), wx.GBSpan(1, 1),
                                                           wx.FIXED_MINSIZE, 0)
                    except:
                        pass
            except StopIteration:
                break
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号