|
|
|
@ -21,12 +21,7 @@
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "ubl_settings_datetime.h"
|
|
|
|
#include "ubl_settings_datetime.h"
|
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
|
|
|
|
string str_argv_1="";
|
|
|
|
//path_app=filesystem::current_path();
|
|
|
|
|
|
|
|
//path_app+="/";
|
|
|
|
|
|
|
|
//cout << *argv[0] << endl;
|
|
|
|
|
|
|
|
//app_name=to_string(*argv[0]);
|
|
|
|
|
|
|
|
//app_name=app_name.substr(1, app_name.length());
|
|
|
|
|
|
|
|
string str_cmd_argv = "";
|
|
|
|
string str_cmd_argv = "";
|
|
|
|
for (int i=1; i<argc; i++){
|
|
|
|
for (int i=1; i<argc; i++){
|
|
|
|
str_cmd_argv+= to_string(*argv[i]) + " ";
|
|
|
|
str_cmd_argv+= to_string(*argv[i]) + " ";
|
|
|
|
@ -40,14 +35,17 @@ int main(int argc, char* argv[]) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug");
|
|
|
|
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug");
|
|
|
|
auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade");
|
|
|
|
auto builder = Gtk::Builder::create_from_file(path_glade + "ubl-settings-datetime.glade");
|
|
|
|
if (argc==1){
|
|
|
|
if (argc>1){
|
|
|
|
|
|
|
|
str_argv_1 = to_string(*argv[1]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((str_argv_1=="--help" || str_argv_1=="--lock-datetime") || (str_argv_1=="--lock-timezone" || str_argv_1=="--lock-ntp") || (str_argv_1=="--lock-update" || argc==1)){
|
|
|
|
//setlocale(LC_ALL, ".");
|
|
|
|
//setlocale(LC_ALL, ".");
|
|
|
|
//bindtextdomain(app_name.c_str(), ".");
|
|
|
|
//bindtextdomain(app_name.c_str(), ".");
|
|
|
|
//textdomain(app_name.c_str());
|
|
|
|
//textdomain(app_name.c_str());
|
|
|
|
//textdomain(app_name);
|
|
|
|
//textdomain(app_name);
|
|
|
|
cout << argv[0] << endl;
|
|
|
|
|
|
|
|
for (int i=0; i<argc; i++){
|
|
|
|
for (int i=0; i<argc; i++){
|
|
|
|
if (strcmp(argv[i],"--help")){
|
|
|
|
if (strcmp(argv[i],"--help")==0){
|
|
|
|
help();
|
|
|
|
help();
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|