sysd-manager 2.26.0

Application to empower user to manage their <b>systemd units</b> via Graphical User Interface. Not only are you able to make changes to the enablement and running status of each of the units, but you will also be able to view and modify their unit files and check the journal logs.
mod imp;
pub mod standard_output;

use crate::widget::creator::{
    PageType, UnitCreatorWindow, unit_file_creator_page::UnitFileCreatorPage,
};
use adw::prelude::NavigationPageExt;
use glib::{WeakRef, subclass::types::ObjectSubclassIsExt};
use gtk::glib::{self};

glib::wrapper! {

    pub struct CreatorPageService(ObjectSubclass<imp::CreatorPageServiceImp>)
    @extends adw::NavigationPage,  gtk::Widget,
    @implements gtk::Accessible,  gtk::Buildable,  gtk::ConstraintTarget ;
}

impl CreatorPageService {
    pub fn new(window: WeakRef<UnitCreatorWindow>, page: PageType) -> Self {
        let obj: CreatorPageService = glib::Object::new();
        obj.set_tag(Some(page.id()));
        let _ = obj.imp().window.set(window);
        // obj.imp().update_from_unit_info();
        obj
    }

    pub fn update_view(&self, page: &UnitFileCreatorPage) {
        self.imp().update_view(page);
    }

    pub fn update_from_file_content(&self, content: &str) {
        self.imp().update_from_file_content(content);
    }

    pub fn file_content(&self) -> String {
        self.imp().file_content()
    }

    pub fn update_from_unit_info(&self) {
        self.imp().update_from_unit_info();
    }

    pub fn advanced_mode(&self, advanced: bool) {
        self.imp().advanced_mode(advanced);
    }

    pub fn validate(&self) -> bool {
        self.imp().validate()
    }
}

pub const ENVIRONMENT: &str = "Environment";