Now allows to add files, remove titles and files.
This commit is contained in:
parent
aa9bc39692
commit
1299c83991
9 changed files with 306 additions and 63 deletions
|
|
@ -21,17 +21,26 @@ class title(GObject.GObject):
|
|||
|
||||
counter = 0
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self,file_treeview,original_liststore):
|
||||
|
||||
GObject.GObject.__init__(self)
|
||||
self.file_treeview = file_treeview
|
||||
title.counter += 1
|
||||
self.title_name = _("Title %(X)d") % {"X":title.counter}
|
||||
self.chapters = Gtk.ListStore()
|
||||
|
||||
def get_number_of_chapters(self):
|
||||
|
||||
return len(self.chapters)
|
||||
columns = []
|
||||
for iterator in range(0, original_liststore.get_n_columns()):
|
||||
columns.append(original_liststore.get_column_type(iterator))
|
||||
self.files = Gtk.ListStore()
|
||||
self.files.set_column_types(columns)
|
||||
|
||||
def delete_title(self):
|
||||
|
||||
print("Deleted title "+self.title_name)
|
||||
print("Deleted title "+self.title_name)
|
||||
|
||||
def refresh(self):
|
||||
|
||||
self.file_treeview.set_model(self.files)
|
||||
|
||||
def add_file(self,new_file):
|
||||
|
||||
self.files.append([new_file.file_name, new_file])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue