Library compability update

pull/12/head
parent 8098820090
commit f23ccf5daf

@ -605,7 +605,7 @@ gboolean on_context_menu_open(GtkWidget *self,GdkEventButton *event, main_window
GtkWidget *menu_item_configuration_in_system = yon_menu_button_create(NULL,SYSTEM_CONFIGURATION_LABEL); GtkWidget *menu_item_configuration_in_system = yon_menu_button_create(NULL,SYSTEM_CONFIGURATION_LABEL);
gtk_widget_set_sensitive(menu_item_configuration_in_system,0); gtk_widget_set_sensitive(menu_item_configuration_in_system,0);
GtkWidget *menu_item_autostart_system = yon_menu_button_create("media-playback-start-symbolic",AUTOSTART_LABEL); GtkWidget *menu_item_autostart_system = yon_menu_button_create("media-playback-start-symbolic",AUTOSTART_LABEL);
GtkWidget *menu_item_launched = yon_menu_button_create("emoji-flags-symbolic",LAUNCHED_LABEL); GtkWidget *menu_item_launched = yon_menu_button_create("emoji-flags-symbolic",SYSTEM_LAUNCH_TOGGLE_LABEL);
GtkWidget *menu_item_separator2 = yon_menu_separator_create(); GtkWidget *menu_item_separator2 = yon_menu_separator_create();
GtkWidget *menu_item_reload = yon_menu_button_create("emblem-synchronizing-symbolic",SERVICE_RELOAD_LABEL); GtkWidget *menu_item_reload = yon_menu_button_create("emblem-synchronizing-symbolic",SERVICE_RELOAD_LABEL);
GtkWidget *menu_item_status = yon_menu_button_create("dialog-information-symbolic",STATUS_LABEL); GtkWidget *menu_item_status = yon_menu_button_create("dialog-information-symbolic",STATUS_LABEL);
@ -780,80 +780,13 @@ int main(int argc, char *argv[]){
local=setlocale(LC_ALL, ""); local=setlocale(LC_ALL, "");
textdomain (LocaleName); textdomain (LocaleName);
config_init(); config_init();
int option_index=0;
int show_help=0;
{
struct option long_options[] = {
{"help", 0, 0, 'h'},
{"version", 0, 0, 'V'},
{"lock-help", 0,0, 1},
{"lock-save", 0,0, 2},
{"lock-save-local", 0,0, 3},
{"lock-save-global", 0,0, 4},
{"lock-load-global", 0,0, 5},
{"socket-id", 1, 0, 's'},
{"socket-ext-id", 1,0, 'e'},
{"socket-trd-id", 1,0, 't'},
{"clear-config", 0,0, 'c'},
{ NULL, 0, NULL, 0 }
};
for (int i=0;i<argc;i++){
int argument=getopt_long(argc,argv,"hVvs:e:t:c",long_options,&option_index);
switch(argument){
case 'h':
show_help=1;
break;
case 'v':
case 'V':
printf("%s\n",VERSION_LABEL);
exit(0);
break;
case 's':
if(optarg)
main_config.socket_id=atoi(optarg);
break;
case 'e':
if(optarg)
main_config.save_socket_id=atoi(optarg);
break;
case 't':
if(optarg)
main_config.load_socket_id=atoi(optarg);
break;
case 'c': if (system(yon_char_unite("rm -rfd ", yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",NULL))){};
break;
case 1:
main_config.lock_help=1;
break;
case 2:
main_config.lock_save_local=1;
main_config.lock_save_global=1;
break;
case 3:
main_config.lock_save_local=1;
break;
case 4:
main_config.lock_save_global=1;
break;
case 5:
main_config.lock_load_global=1;
break;
}
}
if (show_help==1&&main_config.lock_help!=1){
printf("%s\n",HELP_LABEL);
exit(0);
}
}
if (getuid()!=0){
main_config.lock_load_global=1;
main_config.lock_save_global=1;
main_config.lock_save_local=1;
}
gtk_init(&argc,&argv);
yon_ubl_connect_config((_template_config*)&main_config); yon_ubl_connect_config((_template_config*)&main_config);
yon_ubl_window_init(TITLE_LABEL,TITLE_INFO_LABEL,LocaleName,CssPath,LocaleName,version_application,WIKI_LINK); yon_ubl_window_init(TITLE_LABEL,TITLE_INFO_LABEL,LocaleName,CssPath,LocaleName,version_application,WIKI_LINK);
config_str unfound = NULL;
int size=0;
yon_ubl_setup_arguments(argc,argv,&unfound,&size,NULL);
gtk_init(&argc,&argv);
template_main_window *widgets = yon_ubl_window_setup(); template_main_window *widgets = yon_ubl_window_setup();
yon_main_window_complete((main_window*)widgets); yon_main_window_complete((main_window*)widgets);
gtk_main(); gtk_main();

@ -1,6 +1,3 @@
#define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL)
#define HELP_LABEL yon_char_unite(_("ubl-settings-services version:")," ", version_application,"\n",TITLE_LABEL,"\n",_("Usage:"), " ubl-settings-services ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n\t--clear-config\t\t\t",_("Reset application settings"),"\n",NULL)
#define TITLE_LABEL _("Services and processes systemd") #define TITLE_LABEL _("Services and processes systemd")
#define TITLE_INFO_LABEL _("System services and processes configuration") #define TITLE_INFO_LABEL _("System services and processes configuration")
#define SERVICE_INFO_TITLE_LABEL _("Services and processes - service information") #define SERVICE_INFO_TITLE_LABEL _("Services and processes - service information")

@ -127,3 +127,7 @@ background:transparent;
.marginright image{ .marginright image{
margin-right: 2px; margin-right: 2px;
} }
treeview row:nth-child(odd) { background-color: #000000; }
treeview row:nth-child(even) { background-color: #ffffff; }
Loading…
Cancel
Save