parent
							
								
									111a7927cd
								
							
						
					
					
						commit
						b6fb6f9756
					
				| @ -0,0 +1,48 @@ | ||||
| #include "view_about.h" | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| view_about::view_about(/* args */) { | ||||
|     builder = Gtk::Builder::create_from_file(path_glade); | ||||
|     this->settings(); | ||||
| } | ||||
| 
 | ||||
| view_about::~view_about() { | ||||
| } | ||||
| 
 | ||||
| void view_about::lacalization() { | ||||
|     time_t now = time(0); | ||||
|     tm *ltm = localtime(&now); | ||||
|     unsigned int year = 1900 + ltm->tm_year; | ||||
|     string str_authors = string(copyright) + to_string(year);  | ||||
|     aboutWindows->set_copyright(str_authors); | ||||
|     aboutWindows->set_comments(str_setting_user); | ||||
|     aboutWindows->set_website(website); | ||||
|     aboutWindows->set_version(_(version_application.c_str())); | ||||
|     aboutWindows->set_website_label(project_Home_page); | ||||
|     headerAboutTopic->set_label(_(app_name)); | ||||
| } | ||||
| 
 | ||||
| void view_about::set_name(string app_name) { | ||||
|     app_name = app_name; | ||||
| } | ||||
| 
 | ||||
| void view_about::set_version(string version_application) { | ||||
|     version_application = version_application; | ||||
| } | ||||
| 
 | ||||
| void view_about::get_builder() { | ||||
|     builder->get_widget("btnBoxAboutDialog", btnBoxAboutDialog); | ||||
|     builder->get_widget("aboutWindows", aboutWindows); | ||||
|     builder->get_widget("headerAboutTopic", headerAboutTopic); | ||||
| } | ||||
| 
 | ||||
| void view_about::settings() { | ||||
|     this->get_builder(); | ||||
|     this->lacalization(); | ||||
|     btnBoxAboutDialog->set_visible(false); | ||||
| } | ||||
| 
 | ||||
| void view_filters::set_path_glade(string path_glade) { | ||||
|     this->path_glade = path_glade; | ||||
| } | ||||
| @ -0,0 +1,29 @@ | ||||
| #include "project_lib.h" | ||||
| #define copyright _("Copyright © UBSoft LLC, 2022 - ") | ||||
| #define str_setting_user _("Setting user quotas") | ||||
| #define website _("https://wiki.ublinux.com")
 | ||||
| #define project_Home_page _("Project Home Page")  | ||||
| class view_about | ||||
| { | ||||
| private: | ||||
|     string path_glade; | ||||
|     string version_application; | ||||
|     string app_name; | ||||
| 
 | ||||
| private: | ||||
|     Glib::RefPtr<Gtk::Builder> const& builder; | ||||
|     Gtk::AboutDialog *aboutWindows; | ||||
|     Gtk::Label *headerAboutTopic; | ||||
|     Gtk::ButtonBox *btnBoxAboutDialog; | ||||
| public: | ||||
|     view_about(/* args */); | ||||
|     ~view_about(); | ||||
|     void lacalization(); | ||||
|     void event(); | ||||
|     void get_builder(); | ||||
|     void settings(); | ||||
|     void show(); | ||||
|     void set_path_glade(string path_glade); | ||||
|     void set_name(string app_name); | ||||
|     void set_version(string version_application); | ||||
| }; | ||||
					Loading…
					
					
				
		Reference in new issue
	
	