mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
widgets: Be consistent with setup_ function names
This commit is contained in:
parent
530b228d5d
commit
61a4d6f8f2
10 changed files with 20 additions and 22 deletions
|
@ -132,7 +132,7 @@ impl AccountAddDialog {
|
|||
|
||||
dialog.imp().model.set(model).unwrap();
|
||||
dialog.setup_signals();
|
||||
dialog.setup_widgets();
|
||||
dialog.setup_widget();
|
||||
dialog
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ impl AccountAddDialog {
|
|||
self.validate();
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
imp.provider_completion
|
||||
.set_model(Some(&imp.model.get().unwrap().completion_model()));
|
||||
|
|
|
@ -167,7 +167,7 @@ mod imp {
|
|||
fn constructed(&self, obj: &Self::Type) {
|
||||
self.parent_constructed(obj);
|
||||
obj.setup_receiver();
|
||||
obj.setup_widgets();
|
||||
obj.setup_widget();
|
||||
}
|
||||
|
||||
fn dispose(&self, _obj: &Self::Type) {
|
||||
|
@ -271,11 +271,9 @@ impl Camera {
|
|||
);
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
|
||||
self.set_state(CameraState::NotFound);
|
||||
|
||||
imp.picture.set_paintable(Some(&imp.paintable));
|
||||
|
||||
imp.previous
|
||||
|
|
|
@ -60,7 +60,7 @@ impl CameraPage {
|
|||
pub fn new(actions: gio::SimpleActionGroup) -> Self {
|
||||
let page = glib::Object::new::<Self>(&[]).expect("Failed to create CameraPage");
|
||||
page.imp().actions.set(actions).unwrap();
|
||||
page.setup_widgets();
|
||||
page.setup_widget();
|
||||
page
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ impl CameraPage {
|
|||
}
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
let actions = imp.actions.get().unwrap();
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ impl PasswordPage {
|
|||
pub fn new(actions: gio::SimpleActionGroup) -> Self {
|
||||
let page = glib::Object::new::<Self>(&[]).expect("Failed to create PasswordPage");
|
||||
page.imp().actions.set(actions).unwrap();
|
||||
page.setup_widgets();
|
||||
page.setup_widget();
|
||||
page.setup_actions();
|
||||
page
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ impl PasswordPage {
|
|||
get_action!(imp.actions.get().unwrap(), @save_password).set_enabled(is_valid);
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
|
||||
imp.status_page.set_icon_name(Some(config::APP_ID));
|
||||
|
|
|
@ -158,7 +158,7 @@ impl PreferencesWindow {
|
|||
pub fn new(model: ProvidersModel) -> Self {
|
||||
let window = glib::Object::new::<Self>(&[]).expect("Failed to create PreferencesWindow");
|
||||
window.imp().model.set(model).unwrap();
|
||||
window.setup_widgets();
|
||||
window.setup_widget();
|
||||
window
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ impl PreferencesWindow {
|
|||
self.set_property("has-set-password", &state)
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
|
||||
let style_manager = adw::StyleManager::default();
|
||||
|
|
|
@ -100,11 +100,11 @@ impl ProvidersDialog {
|
|||
let dialog =
|
||||
glib::Object::new::<ProvidersDialog>(&[]).expect("Failed to create ProvidersDialog");
|
||||
|
||||
dialog.setup_widgets(model);
|
||||
dialog.setup_widget(model);
|
||||
dialog
|
||||
}
|
||||
|
||||
fn setup_widgets(&self, model: ProvidersModel) {
|
||||
fn setup_widget(&self, model: ProvidersModel) {
|
||||
let imp = self.imp();
|
||||
|
||||
imp.filter_model.set_model(Some(&model));
|
||||
|
|
|
@ -69,7 +69,7 @@ mod imp {
|
|||
impl ObjectImpl for ProviderImage {
|
||||
fn constructed(&self, obj: &Self::Type) {
|
||||
self.parent_constructed(obj);
|
||||
obj.setup_widgets();
|
||||
obj.setup_widget();
|
||||
}
|
||||
|
||||
fn properties() -> &'static [ParamSpec] {
|
||||
|
@ -248,7 +248,7 @@ impl ProviderImage {
|
|||
self.property("provider")
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
let receiver = imp.receiver.borrow_mut().take().unwrap();
|
||||
receiver.attach(
|
||||
|
|
|
@ -46,7 +46,7 @@ mod imp {
|
|||
impl ObjectImpl for ProvidersList {
|
||||
fn constructed(&self, obj: &Self::Type) {
|
||||
self.parent_constructed(obj);
|
||||
obj.setup_widgets();
|
||||
obj.setup_widget();
|
||||
}
|
||||
|
||||
fn signals() -> &'static [Signal] {
|
||||
|
@ -121,7 +121,7 @@ impl ProvidersList {
|
|||
self.imp().filter_model.set_filter(Some(&accounts_filter));
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
|
||||
let sort_model = gtk::SortListModel::new(Some(&imp.filter_model), Some(&imp.sorter));
|
||||
|
|
|
@ -158,7 +158,7 @@ mod imp {
|
|||
|
||||
fn constructed(&self, obj: &Self::Type) {
|
||||
self.parent_constructed(obj);
|
||||
obj.setup_widgets();
|
||||
obj.setup_widget();
|
||||
obj.action_set_enabled("providers.save", false);
|
||||
}
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ impl ProviderPage {
|
|||
self.imp().name_entry.clone()
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
imp.algorithm_comborow
|
||||
.set_model(Some(&imp.algorithms_model));
|
||||
|
|
|
@ -99,7 +99,7 @@ mod imp {
|
|||
|
||||
fn constructed(&self, obj: &Self::Type) {
|
||||
self.parent_constructed(obj);
|
||||
obj.setup_widgets();
|
||||
obj.setup_widget();
|
||||
}
|
||||
}
|
||||
impl WidgetImpl for ProviderRow {}
|
||||
|
@ -134,7 +134,7 @@ impl ProviderRow {
|
|||
imp.progress_icon.set_progress(progress_fraction as f32);
|
||||
}
|
||||
|
||||
fn setup_widgets(&self) {
|
||||
fn setup_widget(&self) {
|
||||
let imp = self.imp();
|
||||
let provider = self.provider();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue