Part 5a

Checking Machine State

Add some Buttons

  1. Open up gui4.glade and save as gui5.glade. Go to the DRO tab and add a third column to table1.

    Your project should look like this now.

    images/gui-05-01.png
  2. Add a Button to each of the new cells. Change the button Label: to:

    1. Top Button = Home X

    2. Middle Button = Home Y

    3. Bottom Button = Home Z

    Your project should look like this now.

    images/gui-05-02.png
  3. Next change the Name: for each button to:

    1. Top Button = home_x

    2. Middle Button = home_y

    3. Bottom Button = home_z

  4. Next add GtkButton clicked signal handlers and don’t forget to press the Enter key after each one.

    1. Top Button = on_home_x_clicked

    2. Middle Button = on_home_y_clicked

    3. Bottom Button = on_home_z_clicked

    Your project should look like this now.

    images/gui-05-03.png
  5. One last thing we will do is remove the test_error button from the button bar as it will not be needed.

    Your project should look like this now.

    images/gui-05-04.png