Mercurial > hg > fxanalyse
comparison FXAnalyse.c @ 40:50544ecfcfc7
Handle application quit just once
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Fri, 05 Oct 2012 12:59:32 +0200 |
parents | 2e1b3148d6e6 |
children | dcc305411dcc |
comparison
equal
deleted
inserted
replaced
39:2e1b3148d6e6 | 40:50544ecfcfc7 |
---|---|
321 if (panel==AllanMath5.AllanPanel) { SetCtrlVal(MainPanel,PANEL_CHECKBOX_MATH5ALLAN, FALSE) ; } ; | 321 if (panel==AllanMath5.AllanPanel) { SetCtrlVal(MainPanel,PANEL_CHECKBOX_MATH5ALLAN, FALSE) ; } ; |
322 | 322 |
323 return ; | 323 return ; |
324 } | 324 } |
325 | 325 |
326 | |
327 | |
328 | |
329 | |
330 int CVICALLBACK QuitCallback (int panel, int control, int event, | 326 int CVICALLBACK QuitCallback (int panel, int control, int event, |
331 void *callbackData, int eventData1, int eventData2) | 327 void *callbackData, int eventData1, int eventData2) |
332 { | 328 { |
333 switch (event) | 329 switch (event) |
334 { | 330 { |
335 case EVENT_COMMIT: | 331 case EVENT_COMMIT: |
336 QuitUserInterface (0); | 332 QuitUserInterface (0); |
337 mupRelease(MathParser1); | 333 mupRelease(MathParser1); |
338 mupRelease(MathParser2); | 334 mupRelease(MathParser2); |
339 mupRelease(MathParser3); | 335 mupRelease(MathParser3); |
340 mupRelease(MathParser4); | 336 mupRelease(MathParser4); |
341 mupRelease(MathParser5); | 337 mupRelease(MathParser5); |
342 break; | 338 break; |
343 case EVENT_RIGHT_CLICK: | 339 } |
344 | |
345 break; | |
346 } | |
347 return 0; | 340 return 0; |
348 } | 341 } |
349 | 342 |
350 int CVICALLBACK CB_OnEventMain(int panel, int event, void *callbackData, int eventData1, int eventData2) | 343 int CVICALLBACK CB_OnEventMain(int panel, int event, void *callbackData, int eventData1, int eventData2) |
351 { | 344 { |
352 int ActiveControl ; | 345 int ActiveControl ; |
353 int StepIndex ; | 346 int StepIndex ; |
354 double Step ; | 347 double Step ; |
355 | 348 |
356 switch (event) { | 349 switch (event) { |
357 case EVENT_CLOSE: | |
358 QuitUserInterface (0); | |
359 mupRelease(MathParser1); | |
360 mupRelease(MathParser2); | |
361 mupRelease(MathParser3); | |
362 break; | |
363 case EVENT_KEYPRESS: | 350 case EVENT_KEYPRESS: |
364 switch (eventData1) // ie the code of the key which has been stroke | 351 switch (eventData1) // ie the code of the key which has been stroke |
365 { | 352 { |
366 case VAL_RIGHT_ARROW_VKEY : | 353 case VAL_RIGHT_ARROW_VKEY : |
367 ActiveControl = GetActiveCtrl(panel); | 354 ActiveControl = GetActiveCtrl(panel); |