diff options
Diffstat (limited to 'src/preferences/pages/stages.rs')
| -rw-r--r-- | src/preferences/pages/stages.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/preferences/pages/stages.rs b/src/preferences/pages/stages.rs index c002bdb..6f4121e 100644 --- a/src/preferences/pages/stages.rs +++ b/src/preferences/pages/stages.rs @@ -1,17 +1,18 @@ -// Copyright (C) 2024 Rubén Beltrán del Río +// Map, wardley map editor for linux +// Copyright (C) 2026 Rubén Beltrán del Río // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. -// You should have received a copy of the GNU General Public License -// along with this program. If not, see https://map.tranquil.systems. +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. use gtk::prelude::*; use relm4::Sender; @@ -28,7 +29,7 @@ pub struct StagesPage { } impl StagesPage { - pub fn new(prefs: &UserPreferences, sender: Sender<PreferencesInput>) -> Self { + pub fn new(preferences: &UserPreferences, sender: Sender<PreferencesInput>) -> Self { let container = gtk::Box::new(gtk::Orientation::Vertical, 10); container.set_margin_top(20); container.set_margin_bottom(20); @@ -119,7 +120,7 @@ impl StagesPage { sender, }; - page.populate_stages(prefs); + page.populate_stages(preferences); page } @@ -127,16 +128,16 @@ impl StagesPage { self.container.clone() } - pub fn refresh(&self, prefs: &UserPreferences) { + pub fn refresh(&self, preferences: &UserPreferences) { // Clear existing rows while let Some(child) = self.list_box.first_child() { self.list_box.remove(&child); } - self.populate_stages(prefs); + self.populate_stages(preferences); } - fn populate_stages(&self, prefs: &UserPreferences) { - for stage in &prefs.custom_stages { + fn populate_stages(&self, preferences: &UserPreferences) { + for stage in &preferences.custom_stages { let row = self.create_stage_row(stage.id, &stage.name, &stage.stage); self.list_box.append(&row); } |