Databasewindow: assume that language/tvid is correct since it's from combobox/searchwindow

This commit is contained in:
zvon 2020-02-25 10:03:59 +01:00
parent 7065074121
commit 53024af1a6

View File

@ -228,15 +228,9 @@ void DatabaseWindow::remove() {
void DatabaseWindow::changed( const Gtk::TreeModel::Path & /*UNUSED*/, void DatabaseWindow::changed( const Gtk::TreeModel::Path & /*UNUSED*/,
const Gtk::TreeModel::iterator &row ) { const Gtk::TreeModel::iterator &row ) {
std::string path = ( *row )[m_columns_database.m_col_path]; std::string path = ( *row )[m_columns_database.m_col_path];
std::string lang = ( *row )[m_columns_database.m_col_lang];
std::string show_id = ( *row )[m_columns_database.m_col_show_id];
if ( !FSLib::isDirectory( path ) ) { if ( !FSLib::isDirectory( path ) ) {
return errorPath( path ); return errorPath( path );
} else if ( !findLanguage( lang.c_str() ) ) {
return errorLanguage( lang );
} else if ( !validID( show_id ) ) {
return errorID( show_id );
} }
changed_rows.insert( changed_rows.insert(
@ -249,19 +243,6 @@ void DatabaseWindow::errorPath( const std::string &path ) {
d.run(); d.run();
} }
void DatabaseWindow::errorLanguage( const std::string &lang ) {
Gtk::MessageDialog d( *this, "Invalid language", false,
Gtk::MESSAGE_ERROR );
d.set_secondary_text( "Language '" + lang + "' isn't valid" );
d.run();
}
void DatabaseWindow::errorID( const std::string &show_id ) {
Gtk::MessageDialog d( *this, "Invalid ID", false, Gtk::MESSAGE_ERROR );
d.set_secondary_text( "ID '" + show_id + "' isn't valid" );
d.run();
}
void DatabaseWindow::quit() { void DatabaseWindow::quit() {
hide(); hide();
} }