Hi Savio, The code is not that bad for a prototype, but GUIs in C are generally unnecessarily difficult. The efficiency and performance of C is not necessary for an administrative GUI. I suspect if you rewrite it in a more high-level language such as Python or Ruby, you'll pay an up-front rewrite cost but save yourself a lot of trouble with maintenance and debugging in the long run, and learn a new language on the way. It's certainly worth mastering C, but that should happen with low level code, not brute-forcing arbitrary projects into C.
Best of luck in your development efforts! -- Dmitri Nikulin Centre for Synchrotron Science Monash University Victoria 3800, Australia