chore: replace SplitButton with a separate CheckButton in service setup dialog

This commit is contained in:
Ilya Zlobintsev
2026-08-10 22:12:34 +03:00
parent e748e9f905
commit 36f57b64a1
+21 -21
View File
@@ -193,35 +193,35 @@ impl AsyncComponent for ServiceSetupDialog {
set_hexpand: true,
set_halign: gtk::Align::End,
adw::SplitButton {
set_label: &fl!(I18N, "service-start"),
connect_clicked => ServiceSetupDialogMsg::StartService,
add_css_class: "suggested-action",
#[wrap(Some)]
set_popover = &gtk::Popover {
gtk::CheckButton {
set_label: Some(&fl!(I18N, "service-autostart")),
bind: &model.autostart_on_start,
},
},
gtk::CheckButton {
set_label: Some(&fl!(I18N, "service-autostart")),
bind: &model.autostart_on_start,
#[watch]
set_visible: model.service_state != systemd::UNIT_STATE_ACTIVE,
},
adw::SplitButton {
gtk::Button {
set_label: &fl!(I18N, "service-start"),
connect_clicked => ServiceSetupDialogMsg::StartService,
add_css_class: "suggested-action",
#[watch]
set_visible: model.service_state != systemd::UNIT_STATE_ACTIVE,
},
gtk::CheckButton {
set_label: Some(&fl!(I18N, "service-autostart-disable")),
bind: &model.autostart_on_stop,
#[watch]
set_visible: model.service_state == systemd::UNIT_STATE_ACTIVE,
},
gtk::Button {
set_label: &fl!(I18N, "service-stop"),
connect_clicked => ServiceSetupDialogMsg::StopService,
#[wrap(Some)]
set_popover = &gtk::Popover {
gtk::CheckButton {
set_label: Some(&fl!(I18N, "service-autostart-disable")),
bind: &model.autostart_on_stop,
},
},
#[watch]
set_visible: model.service_state == systemd::UNIT_STATE_ACTIVE,
},