#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; void me_thread(string cmd); 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; }; class MainWindow : public Gtk::ApplicationWindow { public: MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder); MainWindow(Glib::RefPtr const& builder); void template_apps_obj(Gtk::IconView *icon, Glib::RefPtr >k_list_app); void get_builder(); void add_CSS(); void localization(); void event(); void settings(); void close_entry_app(); 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(); void select_Graphics(); void tmp_desktop(string cmd_name); void on_item_activated(const Gtk::TreeModel::Path& path); void tempalte_row(string Name, string Exec, string path , Glib::RefPtr &dtk_list); void tempate_icon_select(Gtk::IconView *icon, Glib::RefPtr >k_list); void ok_close_entry_app(); void select_Tools(); void select_Internet(); void select_Multimedia(); void select_Settings(); void select_Education(); void select_Office(); void select_Other(); void select_Development(); void select_System(); void icon_clear(); void set_icon_array(); //static void me_thread(string cmd); void unselect_icon(Gtk::IconView *icon_entry); string str_remove(std::string& source, const std::string& to_remove); vector split(const std::string &s, char delim); public: class ModelColumns : public Gtk::TreeModel::ColumnRecord { public: ModelColumns() { add(m_col_filename); add(m_col_description); add(m_col_pixbuf); add(app_name_exec); } Gtk::TreeModelColumn m_col_filename; Gtk::TreeModelColumn m_col_description; Gtk::TreeModelColumn app_name_exec; Gtk::TreeModelColumn > m_col_pixbuf; }; ModelColumns m_Columns; 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::Window *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::IconView *iconEntry; Glib::RefPtr list_Graphics; Glib::RefPtr list_Tools; Glib::RefPtr list_Internet; Glib::RefPtr list_Multimedia; Glib::RefPtr list_Settings; Glib::RefPtr list_Education; Glib::RefPtr list_Office; Glib::RefPtr list_Other; Glib::RefPtr list_Development; Glib::RefPtr list_System; public: string execute_cmd = ""; string path_file = ""; string name_app = ""; 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; int index_exec_gui_apps = 0; Gtk::IconView* array_icon[10]; }; class SettingsPlug : public Gtk::Plug{ public: Gtk::Window *window; SettingsPlug(::Window p_socketID, Glib::RefPtr builder); private: Gtk::Widget *plugBox; Gtk::Widget *parent; };