Ejemplo n.º 1
0
void InitWidgetProperty(const ConfigFile *configfile)
{
	FuncInfo *funclist = g_load_func;
	WidgetInformation *lib = NULL;
	SpecialInfo *special = NULL;
	if(configfile != NULL){
		special = configfile->special_list;
	}else{
		return;
	}

	while(funclist != NULL){
		ConnectSignals(funclist);
		funclist = funclist->next;
	}
	if(special != NULL){
		lib = widget_table;
		while(lib->widget_name != NULL){
			if(0 == strcmp(lib->widget_name, "dialog")){
				break;
			}
			lib++;
		}
		if(lib->widget_name != NULL){
			while(special != NULL){
				if(special->type == 1){
					lib->ConnectSignal(g_cngplp_xml, g_cngplp_data, (gpointer *)special);
				}
				special = special->next;
			}
		}
	}
}
Ejemplo n.º 2
0
void ConnectSignals(const FuncInfo *func_list)
{
	const FuncInfo *func = func_list;
	WidgetInformation *lib = NULL;
	char *widget_type = NULL;
	WidgetInfo *widget = NULL;
	if(func != NULL){
		widget = func->widget_list;
	}else{
		return;
	}

	while(widget != NULL){
		widget_type = widget->type;
		lib = widget_table;
		if(widget_type != NULL){
			while(lib->widget_name != NULL){
				if(0 == strcmp(widget->type, lib->widget_name)){
					if(lib->ConnectSignal != NULL){
						lib->ConnectSignal(g_cngplp_xml, g_cngplp_data, (gpointer *)widget);
						break;
					}
				}
				lib++;
			}
		}
		widget = widget->next;
	}
}