|
|
|
@ -1526,17 +1526,32 @@ void yon_monitor_set_resolutions(){
|
|
|
|
void yon_adapter_window_setup(widgets_dict *widgets){
|
|
|
|
void yon_adapter_window_setup(widgets_dict *widgets){
|
|
|
|
int size=0;
|
|
|
|
int size=0;
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->InformationOverlay),widgets->InformationCompanyLogoImage);
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->InformationOverlay),widgets->InformationCompanyLogoImage);
|
|
|
|
config_str rtn = yon_config_load(get_adapter_info,&size);
|
|
|
|
config_str rtn = yon_config_load(get_adapter_info_json,&size);
|
|
|
|
char *desc = yon_config_get_parameter(rtn,size,"description");
|
|
|
|
struct json_object *jsobject = json_tokener_parse(yon_char_parsed_to_string(rtn,size,""));{
|
|
|
|
yon_char_divide_search(desc,"=",-1);
|
|
|
|
struct json_object *item_obj = json_object_array_get_idx(jsobject, 0);
|
|
|
|
char *product = yon_config_get_parameter(rtn,size,"product");
|
|
|
|
struct json_object *unit_obj;
|
|
|
|
yon_char_divide_search(product,"=",-1);
|
|
|
|
const char *desc="";
|
|
|
|
char *vendor = yon_config_get_parameter(rtn,size,"vendor");
|
|
|
|
if (json_object_object_get_ex(item_obj, "description", &unit_obj)) {
|
|
|
|
yon_char_divide_search(vendor,"=",-1);
|
|
|
|
desc = json_object_get_string(unit_obj);
|
|
|
|
char *driver_use = yon_config_get_parameter(rtn,size,"Kernel-driver-in-use");
|
|
|
|
}
|
|
|
|
yon_char_divide_search(driver_use,"=",-1);
|
|
|
|
const char *product ="";
|
|
|
|
char *driver_all = yon_config_get_parameter(rtn,size,"Kernel-modules");
|
|
|
|
if (json_object_object_get_ex(item_obj, "product", &unit_obj)) {
|
|
|
|
yon_char_divide_search(driver_all,"=",-1);
|
|
|
|
product = json_object_get_string(unit_obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *vendor="";
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(item_obj, "vendor", &unit_obj)) {
|
|
|
|
|
|
|
|
vendor = json_object_get_string(unit_obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *driver_use="";
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(item_obj, "configuration", &unit_obj)) {
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(unit_obj, "driver", &unit_obj))
|
|
|
|
|
|
|
|
driver_use = json_object_get_string(unit_obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *driver_all="";
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(item_obj, "configuration", &unit_obj)) {
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(unit_obj, "driver", &unit_obj))
|
|
|
|
|
|
|
|
driver_all = json_object_get_string(unit_obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
char *final_text = yon_char_unite("<span size=\"12pt\"><span weight='bold' color='#1a5fb4'>",DESCRIPTION_LABEL,":</span> ",_(desc),
|
|
|
|
char *final_text = yon_char_unite("<span size=\"12pt\"><span weight='bold' color='#1a5fb4'>",DESCRIPTION_LABEL,":</span> ",_(desc),
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",VENDOR_LABEL,":</span> ",vendor,
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",VENDOR_LABEL,":</span> ",vendor,
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",MODEL_LABEL,":</span> ",product,
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",MODEL_LABEL,":</span> ",product,
|
|
|
|
@ -1562,21 +1577,33 @@ void yon_adapter_window_setup(widgets_dict *widgets){
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
gtk_widget_destroy(widgets->InformationCompanyLogoImage);
|
|
|
|
gtk_widget_destroy(widgets->InformationCompanyLogoImage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (size>5){
|
|
|
|
}
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->InformationOverlay2),widgets->InformationCompanyLogoImage2);
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->InformationOverlay2),widgets->InformationCompanyLogoImage2);
|
|
|
|
rtn=yon_char_parsed_rip(rtn,&size,0);
|
|
|
|
struct json_object *item_obj = json_object_array_get_idx(jsobject, 1);
|
|
|
|
rtn=yon_char_parsed_rip(rtn,&size,0);
|
|
|
|
if (item_obj){
|
|
|
|
rtn=yon_char_parsed_rip(rtn,&size,0);
|
|
|
|
struct json_object *unit_obj;
|
|
|
|
char *desc = yon_config_get_parameter(rtn,size,"description");
|
|
|
|
const char *desc="";
|
|
|
|
yon_char_divide_search(desc,"=",-1);
|
|
|
|
if (json_object_object_get_ex(item_obj, "description", &unit_obj)) {
|
|
|
|
char *product = yon_config_get_parameter(rtn,size,"product");
|
|
|
|
desc = json_object_get_string(unit_obj);
|
|
|
|
yon_char_divide_search(product,"=",-1);
|
|
|
|
}
|
|
|
|
char *vendor = yon_config_get_parameter(rtn,size,"vendor");
|
|
|
|
const char *product ="";
|
|
|
|
yon_char_divide_search(vendor,"=",-1);
|
|
|
|
if (json_object_object_get_ex(item_obj, "product", &unit_obj)) {
|
|
|
|
char *driver_use = yon_config_get_parameter(rtn,size,"Kernel-driver-in-use");
|
|
|
|
product = json_object_get_string(unit_obj);
|
|
|
|
yon_char_divide_search(driver_use,"=",-1);
|
|
|
|
}
|
|
|
|
char *driver_all = yon_config_get_parameter(rtn,size,"Kernel-modules");
|
|
|
|
const char *vendor="";
|
|
|
|
yon_char_divide_search(driver_all,"=",-1);
|
|
|
|
if (json_object_object_get_ex(item_obj, "vendor", &unit_obj)) {
|
|
|
|
|
|
|
|
vendor = json_object_get_string(unit_obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *driver_use="";
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(item_obj, "capabilities", &unit_obj)) {
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(unit_obj, "driver", &unit_obj))
|
|
|
|
|
|
|
|
driver_use = json_object_get_string(unit_obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *driver_all="";
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(item_obj, "capabilities", &unit_obj)) {
|
|
|
|
|
|
|
|
if (json_object_object_get_ex(unit_obj, "driver", &unit_obj))
|
|
|
|
|
|
|
|
driver_all = json_object_get_string(unit_obj);
|
|
|
|
|
|
|
|
}
|
|
|
|
char *final_text = yon_char_unite("<span size=\"12pt\"><span weight='bold' color='#1a5fb4'>",DESCRIPTION_LABEL,":</span> ",_(desc),
|
|
|
|
char *final_text = yon_char_unite("<span size=\"12pt\"><span weight='bold' color='#1a5fb4'>",DESCRIPTION_LABEL,":</span> ",_(desc),
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",VENDOR_LABEL,":</span> ",vendor,
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",VENDOR_LABEL,":</span> ",vendor,
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",MODEL_LABEL,":</span> ",product,
|
|
|
|
"\n<span weight='bold' color='#1a5fb4'>",MODEL_LABEL,":</span> ",product,
|
|
|
|
|