2 #include <VP_Os/vp_os_malloc.h>
3 #include <VP_Os/vp_os_print.h>
4 #include <VP_Os/vp_os_signal.h>
6 #include <ardrone_api.h>
7 #include <config_keys.h>
8 #include <ardrone_tool/ardrone_tool_configuration.h>
10 #include "ihm_config.h"
12 ihm_config_widgets_t ihm_config = {0};
15 #undef ARDRONE_CONFIG_KEY_IMM
16 #undef ARDRONE_CONFIG_KEY_REF
17 #undef ARDRONE_CONFIG_KEY_STR
18 #include <config_keys.h>
21 static void configuration_received_callback();
22 /* These prototypes must be present, to check at compile time that the callback functions have the right number of arguments */
23 // ardrone_tool_configuration_callback send_custom_application_request_callback;
24 // ardrone_tool_configuration_callback send_custom_user_request_callback;
25 // ardrone_tool_configuration_callback send_custom_session_request_callback;
26 static void get_configuration_callback(GtkWidget *widget, gpointer data);
27 static void set_configuration_callback(GtkWidget *widget, gpointer data);
29 /*-------------------------------------------------------------------------------------------------------------*/
31 void send_custom_application_request_callback(bool_t res) { printf("Switched application config.\n"); }
33 void send_custom_application_request(GtkWidget *widget, gpointer data)
36 id = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
38 if (configuration_check_config_id(id)==C_OK)
40 printf("Requesting application user configuration <%s>\n",id);
41 ARDRONE_TOOL_CONFIGURATION_ADDEVENT(application_id, (char*)id, send_custom_application_request_callback);
42 ARDRONE_TOOL_CONFIGURATION_GET(configuration_received_callback);
45 void send_new_custom_application_request(GtkWidget *widget, gpointer data)
48 printf("reading from <%p>\n",ihm_config.new_custom_configs[CAT_APPLI].entry);
50 id = gtk_entry_get_text(GTK_ENTRY(ihm_config.new_custom_configs[CAT_APPLI].entry));
52 printf("Checking <%s>\n",id);
53 if (configuration_check_config_id(id)==C_OK)
55 printf("Creating/requesting custom application configuration <%s>\n",id);
56 ARDRONE_TOOL_CONFIGURATION_ADDEVENT(application_id, (char*)id, send_custom_application_request_callback);
57 ARDRONE_TOOL_CONFIGURATION_GET(configuration_received_callback);
61 /*-------------------------------------------------------------------------------------------------------------*/
63 void send_custom_user_request_callback(bool_t res) { printf("Switched profile config.\n"); }
65 void send_custom_user_request(GtkWidget *widget, gpointer data)
68 id = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
70 if (configuration_check_config_id(id)==C_OK)
72 printf("Requesting custom user configuration <%s>\n",id);
73 ARDRONE_TOOL_CONFIGURATION_ADDEVENT(profile_id, (char*)id, send_custom_user_request_callback);
74 ARDRONE_TOOL_CONFIGURATION_GET(configuration_received_callback);
77 void send_new_custom_user_request(GtkWidget *widget, gpointer data)
80 id = gtk_entry_get_text(GTK_ENTRY(ihm_config.new_custom_configs[CAT_USER].entry));
82 if (configuration_check_config_id(id)==C_OK)
84 printf("Creating/requesting custom user configuration <%s>\n",id);
85 ARDRONE_TOOL_CONFIGURATION_ADDEVENT(profile_id, (char*)id, send_custom_application_request_callback);
86 ARDRONE_TOOL_CONFIGURATION_GET(configuration_received_callback);
90 /*-------------------------------------------------------------------------------------------------------------*/
92 void send_custom_session_request_callback(bool_t res) { printf("Switched session config. acknowlegded by the drone.\n"); }
94 void send_custom_session_request(GtkWidget *widget, gpointer data)
97 id = gtk_combo_box_get_active_text(GTK_COMBO_BOX(widget));
99 if (configuration_check_config_id(id)==C_OK)
101 printf("Requesting custom session <%s>\n",id);
102 ARDRONE_TOOL_CONFIGURATION_ADDEVENT(session_id, (char*)id, send_custom_session_request_callback);
103 ARDRONE_TOOL_CONFIGURATION_GET(configuration_received_callback);
106 void send_new_custom_session_request(GtkWidget *widget, gpointer data)
108 const char * id = gtk_entry_get_text(GTK_ENTRY(ihm_config.new_custom_configs[CAT_SESSION].entry));
110 if (configuration_check_config_id(id)==C_OK)
112 printf("Creating/requesting custom session <%s>\n",id);
113 ARDRONE_TOOL_CONFIGURATION_ADDEVENT(session_id, (char*)id, send_custom_application_request_callback);
114 ARDRONE_TOOL_CONFIGURATION_GET(configuration_received_callback);
118 /*-------------------------------------------------------------------------------------------------------------*/
121 static void custom_configurations_received_callback(bool_t res)
127 PRINT("%s %s %i - Request success !\n",__FILE__,__FUNCTION__,__LINE__);
131 for (i=1;i<NB_CONFIG_CATEGORIES;i++)
133 PRINT("Got %i ids for category %i\n",available_configurations[i].nb_configurations,i);
135 if (available_configurations[i].nb_configurations==0)
137 gtk_combo_box_remove_text (GTK_COMBO_BOX(ihm_config.custom_config_values[i].combo),0);
138 gtk_combo_box_insert_text(GTK_COMBO_BOX(ihm_config.custom_config_values[i].combo),0,"no custom config. detected");
142 for (j=0;j<available_configurations[i].nb_configurations;j++)
144 gtk_combo_box_remove_text (GTK_COMBO_BOX(ihm_config.custom_config_values[i].combo),j);
145 gtk_combo_box_insert_text(GTK_COMBO_BOX(ihm_config.custom_config_values[i].combo),j,available_configurations[i].list[j].id);
149 //gtk_widget_show_all(ihm_config.window);
154 PRINT("%s %s %i - Request failure !\n",__FILE__,__FUNCTION__,__LINE__);
159 static void configuration_received_callback(bool_t res)
168 PRINT("%s %s\n",__FILE__,__FUNCTION__);
170 GtkRcStyle *rc_style1,*rc_style2;
171 GdkColor color1,color2,white;
176 rc_style1=gtk_rc_style_new();
177 // rc_style1->bg[GTK_STATE_NORMAL]=color1;
178 rc_style1->base[GTK_STATE_NORMAL]=color1;
179 // rc_style1->color_flags[GTK_STATE_NORMAL]|=GTK_RC_BG;
180 rc_style1->color_flags[GTK_STATE_NORMAL]|=GTK_RC_BASE;
189 rc_style2=gtk_rc_style_new();
190 //rc_style2->bg[GTK_STATE_NORMAL]=color2;
191 rc_style2->base[GTK_STATE_NORMAL]=white;
192 //rc_style2->color_flags[GTK_STATE_NORMAL]|=GTK_RC_BG;
193 rc_style2->color_flags[GTK_STATE_NORMAL]|=GTK_RC_BASE;
196 if (!GTK_IS_WIDGET(ihm_config.config_values_frame)) //{ gtk_widget_destroy(ihm_config.config_values_frame); ihm_config.config_values_frame = NULL; }
198 if (ihm_config.config_values!=NULL){ vp_os_free(ihm_config.config_values); ihm_config.config_values = NULL; }
200 ihm_config.config_values_frame = gtk_scrolled_window_new(NULL,NULL);
201 gtk_box_pack_start(GTK_BOX(ihm_config.config_frame_vbox),ihm_config.config_values_frame,TRUE, TRUE, 0);
202 ihm_config.config_values_hbox = gtk_hbox_new(FALSE,0);
203 ihm_config.config_values_vbox1 = gtk_vbox_new(FALSE,0);
204 ihm_config.config_values_vbox2 = gtk_vbox_new(FALSE,0);
205 gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW (ihm_config.config_values_frame),ihm_config.config_values_hbox);
206 gtk_box_pack_start(GTK_BOX(ihm_config.config_values_hbox),ihm_config.config_values_vbox1,TRUE, TRUE, 0);
207 gtk_box_pack_start(GTK_BOX(ihm_config.config_values_hbox),ihm_config.config_values_vbox2,TRUE, TRUE, 0);
209 #define DISPLAY(KEY,NAME,C_TYPE,RW)\
210 ihm_config.config_values = vp_os_realloc(ihm_config.config_values,(nb_values+1)*sizeof(ihm_config_value_t)); \
211 sprintf(labels,"%s:%s",KEY,CFG_STRINGIFY(NAME)); \
212 ihm_config.config_values[nb_values].label = gtk_label_new(labels); \
213 ihm_config.config_values[nb_values].value = gtk_entry_new(); \
214 ihm_config.config_values[nb_values].hbox = gtk_hbox_new(FALSE,0); \
215 if ((RW)&K_WRITE) ihm_config.config_values[nb_values].send_button = gtk_button_new_with_label("send"); else ihm_config.config_values[nb_values].send_button=NULL; \
216 gtk_box_pack_start(GTK_BOX(ihm_config.config_values_vbox1),ihm_config.config_values[nb_values].label,FALSE, FALSE, ((RW)&K_WRITE)?6:5);\
217 gtk_box_pack_start(GTK_BOX(ihm_config.config_values_vbox2),ihm_config.config_values[nb_values].hbox,FALSE, FALSE, 0);\
218 gtk_box_pack_start(GTK_BOX(ihm_config.config_values[nb_values].hbox),ihm_config.config_values[nb_values].value,TRUE, TRUE, 0);\
219 gtk_widget_modify_style(GTK_WIDGET(ihm_config.config_values[nb_values].value),rc_style2); \
220 if (ihm_config.config_values[nb_values].send_button)\
221 {gtk_box_pack_start(GTK_BOX(ihm_config.config_values[nb_values].hbox),ihm_config.config_values[nb_values].send_button,FALSE, FALSE, 0);\
222 gtk_signal_connect(GTK_OBJECT(ihm_config.config_values[nb_values].send_button), "clicked", G_CALLBACK(set_configuration_callback), NULL);}\
225 #undef ARDRONE_CONFIG_KEY_IMM
226 #undef ARDRONE_CONFIG_KEY_REF
227 #undef ARDRONE_CONFIG_KEY_STR
228 #define ARDRONE_CONFIG_KEY_IMM(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) DISPLAY(KEY,NAME,C_TYPE,RW)
229 #define ARDRONE_CONFIG_KEY_REF(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) DISPLAY(KEY,NAME,C_TYPE,RW)
230 #define ARDRONE_CONFIG_KEY_STR(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) DISPLAY(KEY,NAME,C_TYPE,RW)
231 #include <config_keys.h>
234 //sprintf(labels,"%s:%s",STRINGIFY(abc),STRINGIFY(def));
235 // sprintf(values,PRINTF_KEY(C_TYPE)),get_##NAME());
236 //gtk_entry_set_text( GTK_ENTRY(ihm_config.config_values[nb_values].value) , values );
239 //sprintf(values,PRINTF_KEY(uint32_t),123);
243 #define CONFIGURATION_GETTER(x) ardrone_control_config.x
245 #define ARDRONE_CONFIG_KEY_IMM(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) \
246 if(strcmp("" #INI_TYPE, "INI_FLOAT") == 0) { sprintf( values,"%f",(float)CONFIGURATION_GETTER(NAME)); } \
247 else if(strcmp("" #INI_TYPE, "INI_INT") == 0) { sprintf( values,"%d",(int)CONFIGURATION_GETTER(NAME)); } \
248 else if(strcmp("" #INI_TYPE, "INI_BOOLEAN") == 0) { sprintf( values,"%s",(CONFIGURATION_GETTER(NAME)) ? "TRUE" : "FALSE"); } \
249 if (strcmp(gtk_entry_get_text(GTK_ENTRY(ihm_config.config_values[i].value)),values)!=0) \
250 gtk_widget_modify_style(GTK_WIDGET(ihm_config.config_values[i].value),rc_style1); \
251 else gtk_widget_modify_style(GTK_WIDGET(ihm_config.config_values[i].value),rc_style2); \
252 gtk_entry_set_text( GTK_ENTRY(ihm_config.config_values[i].value) , values );\
255 //PRINT(" Received parameter <%s:%s> with value <%f>\n",#KEY,#NAME,(float)CONFIGURATION_GETTER(NAME) );
257 #define ARDRONE_CONFIG_KEY_REF(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) \
260 #define ARDRONE_CONFIG_KEY_STR(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) \
261 if (strcmp(gtk_entry_get_text(GTK_ENTRY(ihm_config.config_values[i].value)),CONFIGURATION_GETTER(NAME))!=0) \
262 gtk_widget_modify_style(GTK_WIDGET(ihm_config.config_values[i].value),rc_style1); \
263 else gtk_widget_modify_style(GTK_WIDGET(ihm_config.config_values[i].value),rc_style2); \
264 gtk_entry_set_text( GTK_ENTRY(ihm_config.config_values[i].value) , CONFIGURATION_GETTER(NAME) ); i++;
266 #include <config_keys.h>
268 ihm_config.nb_config_values = i;
270 gtk_widget_show_all(ihm_config.window);
271 gtk_rc_style_unref(rc_style1);
272 gtk_rc_style_unref(rc_style2);
278 static void get_configuration_callback(GtkWidget *widget, gpointer data)
280 ARDRONE_TOOL_CONFIGURATION_GET(configuration_received_callback);
283 static void set_configuration_callback(GtkWidget *widget, gpointer data)
289 //gdk_threads_enter();
291 printf("Nb config values : %i\n",ihm_config.nb_config_values);
293 for (i=0;i<ihm_config.nb_config_values;i++) { if (widget==ihm_config.config_values[i].send_button) config_index=i; }
294 if (config_index==-1) { return; }
295 GtkWidget * w = ihm_config.config_values[config_index].value;
296 textval = (char*)gtk_entry_get_text((GtkEntry*)w);
298 i=0; // Index of the scanned configuration key
300 #define ARDRONE_CONFIG_KEY_INI_FLOAT(KEY, NAME, C_TYPE) \
301 if (i==config_index){ \
302 printf("Sending configuration <%s:%s> = <%s>\n",KEY,CFG_STRINGIFY(NAME),textval); \
303 float fval; sscanf (textval, "%f", &fval); \
304 ARDRONE_TOOL_CONFIGURATION_ADDEVENT (NAME, &fval, NULL); \
306 #define ARDRONE_CONFIG_KEY_INI_DOUBLE(KEY, NAME, C_TYPE) \
307 if (i==config_index){ \
308 printf("Sending configuration <%s:%s> = <%s>\n",KEY,CFG_STRINGIFY(NAME),textval); \
309 float64_t dval; sscanf (textval, "%lf", &fdal); \
310 ARDRONE_TOOL_CONFIGURATION_ADDEVENT (NAME, &dval, NULL); \
312 #define ARDRONE_CONFIG_KEY_INT_uint32_t(KEY, NAME) \
313 if (i==config_index){ \
314 printf("Sending configuration <%s:%s> = <%s>\n",KEY,CFG_STRINGIFY(NAME),textval); \
315 uint32_t ival; sscanf (textval, "%u", &ival); \
316 ARDRONE_TOOL_CONFIGURATION_ADDEVENT (NAME, &ival, NULL); \
318 #define ARDRONE_CONFIG_KEY_INT_int32_t(KEY, NAME) \
319 if (i==config_index){ \
320 printf("Sending configuration <%s:%s> = <%s>\n",KEY,CFG_STRINGIFY(NAME),textval); \
321 int32_t ival; sscanf (textval, "%d", &ival); \
322 ARDRONE_TOOL_CONFIGURATION_ADDEVENT (NAME, &ival, NULL); \
324 #define ARDRONE_CONFIG_KEY_INI_INT(KEY, NAME, C_TYPE) \
325 ARDRONE_CONFIG_KEY_INT_##C_TYPE(KEY, NAME)
326 #define ARDRONE_CONFIG_KEY_INI_BOOLEAN(KEY, NAME, C_TYPE) \
327 if (i==config_index){ \
328 printf("Sending configuration <%s:%s> = <%s>\n",KEY,CFG_STRINGIFY(NAME),textval); \
329 bool_t bval = ((strcmp (textval, "TRUE")==0) ? TRUE : FALSE); \
330 ARDRONE_TOOL_CONFIGURATION_ADDEVENT (NAME, &bval, NULL); \
333 #define ARDRONE_CONFIG_KEY_IMM(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) \
334 ARDRONE_CONFIG_KEY_##INI_TYPE(KEY, NAME, C_TYPE);
335 /* if(i==config_index){ \
336 printf("Sending configuration <%s:%s> = <%s>\n",KEY,CFG_STRINGIFY(NAME),textval); \
337 if (strcmp("" #INI_TYPE, "INI_FLOAT") == 0) { float fval; sscanf( textval,"%f",&fval); ARDRONE_TOOL_CONFIGURATION_ADDEVENT(NAME, (C_TYPE_PTR)&fval, NULL); } \
338 else if(strcmp("" #INI_TYPE, "INI_DOUBLE") == 0) { float64_t dval; sscanf( textval, "%lf", &dval); ARDRONE_TOOL_CONFIGURATION_ADDEVENT(NAME, (C_TYPE_PTR)&dval, NULL); } \
339 else if(strcmp("" #INI_TYPE, "INI_INT") == 0) { int32_t ival = atoi(textval); ARDRONE_TOOL_CONFIGURATION_ADDEVENT(NAME, (C_TYPE_PTR)&ival, NULL); } \
340 else if(strcmp("" #INI_TYPE, "INI_BOOLEAN") == 0) { bool_t bval = ((strcmp(textval,"TRUE")==0) ? TRUE : FALSE); ARDRONE_TOOL_CONFIGURATION_ADDEVENT(NAME, (C_TYPE_PTR)&bval, NULL); } \
343 #define ARDRONE_CONFIG_KEY_REF(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) i++;
345 #define ARDRONE_CONFIG_KEY_STR(KEY, NAME, INI_TYPE, C_TYPE, C_TYPE_PTR, RW, DEFAULT, CALLBACK) \
346 if(i==config_index){ \
347 printf("Sending configuration <%s:%s> = <%s>\n",KEY,CFG_STRINGIFY(NAME),textval); \
348 ARDRONE_TOOL_CONFIGURATION_ADDEVENT(NAME, textval, NULL); \
351 #include <config_keys.h>
353 //gdk_threads_leave();
356 static void get_custom_configurations_callback(GtkWidget *widget, gpointer data)
358 printf("%s %s %i\n",__FILE__,__FUNCTION__,__LINE__);
359 ARDRONE_TOOL_CUSTOM_CONFIGURATION_GET(custom_configurations_received_callback);
360 printf("%s %s %i\n",__FILE__,__FUNCTION__,__LINE__);
365 void ihm_config_create_window()
369 if (ihm_config.window!=NULL && GTK_IS_WIDGET(ihm_config.window)) { gtk_widget_show_all(ihm_config.window); return; }
371 vp_os_memset(&ihm_config,0,sizeof(ihm_config));
374 ihm_config.window = gtk_window_new( GTK_WINDOW_TOPLEVEL);
376 /* Split the window in two halves */
377 ihm_config.panes = gtk_hbox_new(FALSE, 20);
378 gtk_container_add( GTK_CONTAINER(ihm_config.window), ihm_config.panes);
380 /* Make two vertical frames next to each other*/
381 ihm_config.config_frame = gtk_frame_new("Config");
382 ihm_config.custom_config_frame = gtk_frame_new("Custom config.");
383 gtk_box_pack_start(GTK_BOX(ihm_config.panes), ihm_config.config_frame ,TRUE, TRUE, 0);
384 gtk_box_pack_start(GTK_BOX(ihm_config.panes), ihm_config.custom_config_frame ,TRUE, TRUE, 0);
385 ihm_config.config_frame_vbox = gtk_vbox_new(FALSE,0);
386 ihm_config.custom_config_frame_vbox = gtk_vbox_new(FALSE,0);
387 gtk_container_add( GTK_CONTAINER(ihm_config.config_frame) , ihm_config.config_frame_vbox );
388 gtk_container_add( GTK_CONTAINER(ihm_config.custom_config_frame) , ihm_config.custom_config_frame_vbox );
391 ihm_config.get_config_button = gtk_button_new_with_label("Get configuration");
392 gtk_box_pack_start(GTK_BOX(ihm_config.config_frame_vbox),ihm_config.get_config_button,FALSE, FALSE, 0);
393 gtk_signal_connect(GTK_OBJECT(ihm_config.get_config_button), "clicked", G_CALLBACK(get_configuration_callback), NULL);
395 /* Custom Configs frame */
396 ihm_config.get_custom_configs_button = gtk_button_new_with_label("Get custom configurations list");
397 gtk_signal_connect(GTK_OBJECT(ihm_config.get_custom_configs_button), "clicked", G_CALLBACK(get_custom_configurations_callback), NULL);
399 ihm_config.custom_config_values[1].label = gtk_label_new("Application");
400 ihm_config.custom_config_values[2].label = gtk_label_new("User profile");
401 ihm_config.custom_config_values[3].label = gtk_label_new("Session");
403 gtk_box_pack_start(GTK_BOX(ihm_config.custom_config_frame_vbox),ihm_config.get_custom_configs_button,FALSE, FALSE, 0);
405 for (i=1;i<NB_CONFIG_CATEGORIES;i++)
407 ihm_config.custom_config_values[i].hbox = gtk_hbox_new(FALSE,0);
408 ihm_config.custom_config_values[i].combo = gtk_combo_box_new_text();
409 ihm_config.custom_config_values[i].raz_button = gtk_button_new_with_label("reset");
410 gtk_box_pack_start(GTK_BOX(ihm_config.custom_config_values[i].hbox),ihm_config.custom_config_values[i].label,FALSE,FALSE,0);
411 gtk_box_pack_start(GTK_BOX(ihm_config.custom_config_values[i].hbox),ihm_config.custom_config_values[i].combo,FALSE,FALSE,0);
412 gtk_box_pack_start(GTK_BOX(ihm_config.custom_config_values[i].hbox),ihm_config.custom_config_values[i].raz_button,FALSE,FALSE,0);
414 gtk_box_pack_start(GTK_BOX(ihm_config.custom_config_frame_vbox),ihm_config.custom_config_values[i].hbox,FALSE,FALSE,0);
416 gtk_combo_box_insert_text(GTK_COMBO_BOX(ihm_config.custom_config_values[i].combo),0,"press button to retrieve list");
419 gtk_signal_connect(GTK_OBJECT(ihm_config.custom_config_values[1].combo), "changed", G_CALLBACK(send_custom_application_request),NULL);
420 gtk_signal_connect(GTK_OBJECT(ihm_config.custom_config_values[2].combo), "changed", G_CALLBACK(send_custom_user_request),NULL);
421 gtk_signal_connect(GTK_OBJECT(ihm_config.custom_config_values[3].combo), "changed", G_CALLBACK(send_custom_session_request),NULL);
424 ihm_config.new_custom_configs[1].label = gtk_label_new("New application");
425 ihm_config.new_custom_configs[2].label = gtk_label_new("New user profile");
426 ihm_config.new_custom_configs[3].label = gtk_label_new("New session");
428 for (i=1;i<NB_CONFIG_CATEGORIES;i++)
430 ihm_config.new_custom_configs[i].hbox = gtk_hbox_new(FALSE,0);
431 ihm_config.new_custom_configs[i].entry = gtk_entry_new();
432 ihm_config.new_custom_configs[i].send_button = gtk_button_new_with_label("send");
433 gtk_box_pack_start(GTK_BOX(ihm_config.new_custom_configs[i].hbox),ihm_config.new_custom_configs[i].label,FALSE,FALSE,0);
434 gtk_box_pack_start(GTK_BOX(ihm_config.new_custom_configs[i].hbox),ihm_config.new_custom_configs[i].entry,FALSE,FALSE,0);
435 gtk_box_pack_start(GTK_BOX(ihm_config.new_custom_configs[i].hbox),ihm_config.new_custom_configs[i].send_button,FALSE,FALSE,0);
437 gtk_box_pack_start(GTK_BOX(ihm_config.custom_config_frame_vbox),ihm_config.new_custom_configs[i].hbox,FALSE,FALSE,0);
440 gtk_signal_connect(GTK_OBJECT(ihm_config.new_custom_configs[1].send_button), "clicked", G_CALLBACK(send_new_custom_application_request),NULL);
441 gtk_signal_connect(GTK_OBJECT(ihm_config.new_custom_configs[2].send_button), "clicked", G_CALLBACK(send_new_custom_user_request),NULL);
442 gtk_signal_connect(GTK_OBJECT(ihm_config.new_custom_configs[3].send_button), "clicked", G_CALLBACK(send_new_custom_session_request),NULL);
444 gtk_widget_show_all(ihm_config.window);