Log application settings has been returned

pull/2/head
Ivan Yartsev 2 years ago
parent fb3ea6efc9
commit 29ebf5fd89

@ -562,40 +562,39 @@ main_window *setup_window(){
config_str log = yon_char_parse(services[i],&log_size,";"); config_str log = yon_char_parse(services[i],&log_size,";");
gtk_list_store_append(widgets->ServicesList,&iter); gtk_list_store_append(widgets->ServicesList,&iter);
gtk_list_store_set(widgets->ServicesList,&iter,0,0,1,0,2,log[0],3,log[1],-1); gtk_list_store_set(widgets->ServicesList,&iter,0,0,1,0,2,log[0],3,log[1],-1);
// yon_char_parsed_free(log,log_size);
} }
// yon_char_parsed_free(services,service_size); config_str dirs = yon_config_load(logrotate_config_command,&dirs_size);
// config_str dirs = yon_config_load(logrotate_config_command,&dirs_size); for (int i=0;i<dirs_size;i++){
// for (int i=0;i<dirs_size;i++){ int filesize;
// int filesize; gboolean bracket_found=0;
// gboolean bracket_found=0; yon_char_divide_search_self(dirs[i],"\n",-1);
// yon_char_divide_search_self(dirs[i],"\n",-1); config_str file = yon_file_open(yon_char_append(logrotate_config_path,dirs[i]),&filesize);
// config_str file = yon_file_open(yon_char_append(logrotate_config_path,dirs[i]),&filesize); for (int j=0;j<filesize;j++){
// for (int j=0;j<filesize;j++){ file[j]=yon_char_divide_search(file[j],"\n",-1);
// file[i]=yon_char_divide_search(file[j],"\n",-1); if (file[j][0]!='#'&&bracket_found==0&&strcmp(file[j],"")){
// if (file[i][0]!='#'&&bracket_found==0&&strcmp(file[i],"")){ if (strstr(file[j],"{")) {
// if (strstr(file[i],"{")) { bracket_found = 1;
// bracket_found = 1; yon_char_divide_search_self(file[j],"{",-1);
// yon_char_divide_search_self(file[i],"{",-1); if (!cname) cname = file[j];
// if (!cname) cname = file[i]; continue;
// continue; }
// } if (!cname)
// if (!cname) cname = file[j];
// cname = file[i]; } else if (file[j][0]!='#'&&bracket_found==1&&strcmp(file[j],"")) {
// } else if (file[i][0]!='#'&&bracket_found==1&&strcmp(file[i],"")) { if (!strstr(file[j],"}"))
// if (!strstr(file[i],"}")) cparams = yon_char_unite(cparams,",",file[j],NULL);
// cparams = yon_char_unite(cparams,",",file[i],NULL); else if (strstr(file[j],"}")) break;
// else if (strstr(file[i],"}")) break; }
// } }
// } if (!cname) continue;
// cname = yon_char_replace(cname, " ", "\n"); cname = yon_char_replace(cname, " ", "\n");
// if (cname[strlen(cname)-1]=='\n') cname[strlen(cname)-1]='\0'; if (cname[strlen(cname)-1]=='\n') cname[strlen(cname)-1]='\0';
// gtk_list_store_append(main_config.logrotate_apps_list,&iter); gtk_list_store_append(main_config.logrotate_apps_list,&iter);
// gtk_list_store_set(main_config.logrotate_apps_list,&iter,0,dirs[i],1,cname,2,cparams,-1); gtk_list_store_set(main_config.logrotate_apps_list,&iter,0,dirs[i],1,cname,2,cparams,-1);
// free(cname); free(cname);
// cname=NULL; cname=NULL;
// cparams=""; cparams="";
// } }
/* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */ /* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */

@ -312,9 +312,21 @@
<object class="GtkTreeView"> <object class="GtkTreeView">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="headers-visible">False</property>
<child internal-child="selection"> <child internal-child="selection">
<object class="GtkTreeSelection"/> <object class="GtkTreeSelection"/>
</child> </child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Path</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>

@ -927,6 +927,8 @@ translated and supported by community.</property>
</child> </child>
<child> <child>
<object class="GtkTreeViewColumn"> <object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Status</property> <property name="title" translatable="yes">Status</property>
<child> <child>
<object class="GtkCellRendererToggle"/> <object class="GtkCellRendererToggle"/>
@ -938,6 +940,8 @@ translated and supported by community.</property>
</child> </child>
<child> <child>
<object class="GtkTreeViewColumn"> <object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Autostart</property> <property name="title" translatable="yes">Autostart</property>
<child> <child>
<object class="GtkCellRendererToggle"/> <object class="GtkCellRendererToggle"/>
@ -949,6 +953,8 @@ translated and supported by community.</property>
</child> </child>
<child> <child>
<object class="GtkTreeViewColumn"> <object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Service</property> <property name="title" translatable="yes">Service</property>
<child> <child>
<object class="GtkCellRendererText"/> <object class="GtkCellRendererText"/>
@ -960,6 +966,8 @@ translated and supported by community.</property>
</child> </child>
<child> <child>
<object class="GtkTreeViewColumn"> <object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Description</property> <property name="title" translatable="yes">Description</property>
<child> <child>
<object class="GtkCellRendererText"/> <object class="GtkCellRendererText"/>

Loading…
Cancel
Save