Mercurial > minori
comparison src/gui/pages/anime_list.cc @ 291:9a88e1725fd2
*: refactor lots of stuff
I forgot to put this into different commits, oops!
anyway, it doesn't really matter *that* much since this is an
unfinished hobby project anyway. once it starts getting stable
commit history will be more important, but for now it's not
that big of a deal
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Sun, 12 May 2024 16:31:07 -0400 |
| parents | f6a756c19bfb |
| children | 91ac90a34003 |
comparison
equal
deleted
inserted
replaced
| 290:9347e2eaf6e5 | 291:9a88e1725fd2 |
|---|---|
| 318 *anime, [this, anime] { UpdateAnime(anime->GetId()); }, InformationDialog::PAGE_MAIN_INFO, this); | 318 *anime, [this, anime] { UpdateAnime(anime->GetId()); }, InformationDialog::PAGE_MAIN_INFO, this); |
| 319 | 319 |
| 320 dialog->show(); | 320 dialog->show(); |
| 321 dialog->raise(); | 321 dialog->raise(); |
| 322 dialog->activateWindow(); | 322 dialog->activateWindow(); |
| 323 connect(dialog, &InformationDialog::finished, dialog, &InformationDialog::deleteLater); | |
| 323 } | 324 } |
| 324 }); | 325 }); |
| 325 menu->addSeparator(); | 326 menu->addSeparator(); |
| 326 menu->addAction(tr("Edit"), [this, animes] { | 327 menu->addAction(tr("Edit"), [this, animes] { |
| 327 for (auto& anime : animes) { | 328 for (auto& anime : animes) { |
| 329 *anime, [this, anime] { UpdateAnime(anime->GetId()); }, InformationDialog::PAGE_MY_LIST, this); | 330 *anime, [this, anime] { UpdateAnime(anime->GetId()); }, InformationDialog::PAGE_MY_LIST, this); |
| 330 | 331 |
| 331 dialog->show(); | 332 dialog->show(); |
| 332 dialog->raise(); | 333 dialog->raise(); |
| 333 dialog->activateWindow(); | 334 dialog->activateWindow(); |
| 335 connect(dialog, &InformationDialog::finished, dialog, &InformationDialog::deleteLater); | |
| 334 } | 336 } |
| 335 }); | 337 }); |
| 336 menu->addAction(tr("Delete from list..."), [this, animes] { | 338 menu->addAction(tr("Delete from list..."), [this, animes] { |
| 337 for (auto& anime : animes) { | 339 for (auto& anime : animes) { |
| 338 RemoveAnime(anime->GetId()); | 340 RemoveAnime(anime->GetId()); |
| 359 *anime, [this, anime] { UpdateAnime(anime->GetId()); }, InformationDialog::PAGE_MAIN_INFO, this); | 361 *anime, [this, anime] { UpdateAnime(anime->GetId()); }, InformationDialog::PAGE_MAIN_INFO, this); |
| 360 | 362 |
| 361 dialog->show(); | 363 dialog->show(); |
| 362 dialog->raise(); | 364 dialog->raise(); |
| 363 dialog->activateWindow(); | 365 dialog->activateWindow(); |
| 366 connect(dialog, &InformationDialog::finished, dialog, &InformationDialog::deleteLater); | |
| 364 } | 367 } |
| 365 | 368 |
| 366 void AnimeListPage::RefreshList() { | 369 void AnimeListPage::RefreshList() { |
| 367 for (unsigned int i = 0; i < sort_models.size(); i++) | 370 for (unsigned int i = 0; i < sort_models.size(); i++) |
| 368 reinterpret_cast<AnimeListPageModel*>(sort_models[i]->sourceModel())->RefreshList(); | 371 reinterpret_cast<AnimeListPageModel*>(sort_models[i]->sourceModel())->RefreshList(); |
