#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; extern string path_app; extern string app_name; extern string path_glade; extern string path_css; class CmdArgParser : public Glib::OptionGroup { public: CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help); ::Window GetSocketID() const; private: int m_socketID = 0; }; // This is what is going to be plugged into xfce4-settings-manager: // // Documented here: // // https://developer.gnome.org/gtkmm-tutorial/3.22/sec-plugs-sockets-example.html.en // class MainWindow : public Gtk::ApplicationWindow { public: MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder); MainWindow(Glib::RefPtr const& builder); void get_builder(); void add_CSS(); void localization(); void event(); void settings(); void close_start_menu(); void start_menu_entry_app(); void message_gui_close(); void activ_or_block_execute_epriority(); void open_filemaneg(); void close_filemaneg(); void get_path_filemaneg(); void open_list_app(); void start_cmd(); void changed_user(); void execute_terminal(){} void execute_another_User(){} void activ_or_block_other_user(); void change_scale_priority(); void change_spin_priority(); void pars_dir_bin(); void pars_users(); void pars_apps(); vector split(const std::string &s, char delim); public: Glib::RefPtr builder; Gtk::Button *btnFilemaneg; Gtk::Button *btnListApp; Gtk::Button *btnStart; Gtk::CheckButton *chbTerminal; Gtk::CheckButton *chbAnotherUser; Gtk::CheckButton *cbxExecuteEpriority; Gtk::ComboBoxText *cmbUser; Gtk::SpinButton *spinPriority; Gtk::Scale *scalePriority; Gtk::RadioButton *rbPkexec; Gtk::RadioButton *rbSu; Gtk::RadioButton *rbSudo; Gtk::Entry *txtCmd; Gtk::FileChooserDialog *wndChooseFileWallpaper; Gtk::Button *btnFilemangerExit; Gtk::Button *btnFilemangerOk; Gtk::Label *lblTimeEpriority; Gtk::Label *lblTimeEpriorityLow; Gtk::Label *lblTime4EpriorityHigh; Gtk::Label *lblUserName; Gtk::MessageDialog *messageError; Gtk::Button *btnMessageErrorOk; Gtk::Label *lblMessageError; Gtk::Button *btnStartMenuOK; Gtk::Button *btnStartMenuExit; Gtk::Box *boxlistProgramm; Gtk::Dialog *dialogStartMenu; Gtk::Box *boxColor; Gtk::Label *lblInfoHead; Gtk::Label *lblinfoCmd; Gtk::Label *lblInfoTime; Gtk::Label *labInfoExecutTerm; Gtk::Label *lblInfoUser; Gtk::Label *lblInfoUserOther; Gtk::Label *lblInfoUserName; Gtk::Label *lblInfoNooPriority; Gtk::Label *lblInfoExec; Gtk::Label *lblInfoPriority; Gtk::Label *lblInfoEnterProg; Gtk::Label *lblGraphics; Gtk::Label *lblTools; Gtk::Label *lblInternet; Gtk::Label *lblMultimedia; Gtk::Label *lblSettings; Gtk::Label *lblEducation; Gtk::Label *lblOffice; Gtk::Label *lblOther; Gtk::Label *lblDevelopment; Gtk::Label *lblSystem; Gtk::IconView *iconGraphics; Gtk::IconView *iconTools; Gtk::IconView *iconInternet; Gtk::IconView *iconMultimedia; Gtk::IconView *iconSettings; Gtk::IconView *iconEducation; Gtk::IconView *iconOffice; Gtk::IconView *iconOther; Gtk::IconView *iconDevelopment; Gtk::IconView *iconSystem; Gtk::ListStore *liststoreGraphics; Gtk::ListStore *liststoreTools; Gtk::ListStore *liststoreInternet; Gtk::ListStore *liststoreMultimedia; Gtk::ListStore *liststoreSettings; Gtk::ListStore *liststoreEducation; Gtk::ListStore *liststoreOffice; Gtk::ListStore *liststoreOther; Gtk::ListStore *liststoreDevelopment; Gtk::ListStore *liststoreSystem; public: string execute_cmd = ""; bool flag_pkexec = false; bool flag_su = false; bool flag_sudo = false; string path_file_name; struct struct_App{ string Name_desktop; string Name; string Exec; string Icon; string MimeType; string Type; vector Categories; }; list list_app; set set_categories; }; class SettingsPlug : public Gtk::Plug{ public: Gtk::Window *window; SettingsPlug(::Window p_socketID, Glib::RefPtr builder); private: Gtk::Widget *plugBox; Gtk::Widget *parent; };