-1

I'm making a gui in Glade and GTK in c language. I have two buttons 'start' and 'update'. Start button start the functionalities and update button update the values. I have made handlers for both and everything is working fine. But if I click on update button before clicking on start button, my program starts. I want that update button should funciton only after start button is clicked. for this I'll have to check condition of start button in update button handlers. How to do this?

Mohamad Shiralizadeh
  • 8,329
  • 6
  • 58
  • 93
Abhinav Rawat
  • 43
  • 1
  • 8

1 Answers1

1

Instead of checking the condition of the start button, I would suggest graying out the update button to begin with (gtk_widget_set_sensitive()) and un-graying it in the start button's clicked handler.

ptomato
  • 56,175
  • 13
  • 112
  • 165