Mercurial > minori
comparison src/gui/dialog/information.cc @ 250:c130f47f6f48
*: many many changes
e.g. the search page is actually implemented now!
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Sun, 04 Feb 2024 21:17:17 -0500 |
| parents | 4d461ef7d424 |
| children | b3549da699a6 |
comparison
equal
deleted
inserted
replaced
| 249:6b2441c776dd | 250:c130f47f6f48 |
|---|---|
| 28 #endif | 28 #endif |
| 29 | 29 |
| 30 /* TODO: Taiga disables rendering of the tab widget entirely when the anime is not part of a list, | 30 /* TODO: Taiga disables rendering of the tab widget entirely when the anime is not part of a list, |
| 31 which sucks. Think of a better way to implement this later. */ | 31 which sucks. Think of a better way to implement this later. */ |
| 32 void InformationDialog::SaveData(Anime::Anime& anime) { | 32 void InformationDialog::SaveData(Anime::Anime& anime) { |
| 33 if (!anime.IsInUserList()) | |
| 34 return; | |
| 35 | |
| 33 anime.SetUserProgress(_progress); | 36 anime.SetUserProgress(_progress); |
| 34 anime.SetUserScore(_score); | 37 anime.SetUserScore(_score); |
| 35 anime.SetUserIsRewatching(_rewatching); | 38 anime.SetUserIsRewatching(_rewatching); |
| 36 anime.SetUserStatus(_status); | 39 anime.SetUserStatus(_status); |
| 37 anime.SetUserNotes(_notes); | 40 anime.SetUserNotes(_notes); |
| 96 /* Main information */ | 99 /* Main information */ |
| 97 AnimeInfoWidget* main_information_widget = new AnimeInfoWidget(anime, tabbed_widget); | 100 AnimeInfoWidget* main_information_widget = new AnimeInfoWidget(anime, tabbed_widget); |
| 98 tabbed_widget->addTab(main_information_widget, tr("Main information")); | 101 tabbed_widget->addTab(main_information_widget, tr("Main information")); |
| 99 } | 102 } |
| 100 | 103 |
| 101 { | 104 if (anime.IsInUserList()) { |
| 102 /* My list and settings */ | 105 /* My list and settings */ |
| 103 QWidget* settings_widget = new QWidget(tabbed_widget); | 106 QWidget* settings_widget = new QWidget(tabbed_widget); |
| 104 settings_widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); | 107 settings_widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); |
| 105 | 108 |
| 106 QVBoxLayout* settings_layout = new QVBoxLayout(settings_widget); | 109 QVBoxLayout* settings_layout = new QVBoxLayout(settings_widget); |
