def new_event(self, button): """ Adds a new row to the bottom of the array / Grid """ now = datetime.now(); self.config.events.append([ ConfigFileManager.get_new_id(), True, '', False, now.year, now.month, now.day, 8, 30, 0, False, '', 'Yearly', True, 'Green', 0, 0, 0, 15, 0, 0 ]) self.treeview.set_cursor(len(self.config.events) - 1, self.treeview.get_column(0), True) self.set_size_request(-1, 150 + len(self.config.events) * 20 )
def new_feed(self, button): """ Adds a new row to the bottom of the array / Grid """ self.config.feeds.append([ ConfigFileManager.get_new_id(), True, "http://", "", True, 5, False, False ]) self.treeview.set_cursor( len(self.config.feeds) - 1, self.treeview.get_column(0), True) self.set_size_request(-1, 150 + len(self.config.feeds) * 20)
def new_feed(self, button): """ Adds a new row to the bottom of the array / Grid """ self.config.feeds.append([ConfigFileManager.get_new_id(), True, "http://", "", True, 5, False, False]) self.treeview.set_cursor(len(self.config.feeds) - 1, self.treeview.get_column(0), True) self.set_size_request(-1, 150 + len(self.config.feeds) * 20 )