def addBgClick(self, widget=None, init=False):
"""Creates a new background and adds a new tab to the notebook."""
n = self.bgNotebook.get_n_pages()
if n > (self.defaults["bgCount"] + 2):
if confirmDialog(self, "You already have %d background styles. Are you sure you would like another?" % n) == gtk.RESPONSE_NO:
return
self.addBg()
newId = len(self.bgs)
self.bgNotebook.append_page(self.bgs[newId-1], gtk.Label("Background ID %d" % (newId)))
self.bgNotebook.show_all()
self.updateComboBoxes(n, "add")
self.bgNotebook.set_current_page(n)
if not init:
self.changeOccurred()
评论列表
文章目录