Update gtk139

This commit is contained in:
daleclack 2022-08-13 14:13:33 +08:00
parent 17281e8023
commit fbce06d5a1
2 changed files with 9 additions and 0 deletions

View File

@ -45,6 +45,7 @@ MediaPlayer::MediaPlayer()
treeview.set_model(store);
treeview.append_column("File Name", n_columns.file_name);
selection = treeview.get_selection();
treeview.signal_row_activated().connect(sigc::mem_fun(*this, &MediaPlayer::item_activated));
// Add vbox to the window
set_child(vbox);
@ -124,6 +125,13 @@ void MediaPlayer::btnload_clicked()
}
}
void MediaPlayer::item_activated(const Gtk::TreePath &path, Gtk::TreeViewColumn *column)
{
auto row = *(store->get_iter(path));
auto filename = row[n_columns.file_path];
video1.set_filename(filename);
}
void MediaPlayer::btnsave_clicked()
{
// Initalize Vectors

View File

@ -45,4 +45,5 @@ private:
void btnremove_clicked();
void btnload_clicked();
void btnsave_clicked();
void item_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
};