Changing the Application Without Recompiling

only for RuBoard - do not distribute or recompile

Changing the Application Without Recompiling

Now so you can see how this capability could be used, open up cross-window.glade in Glade and select window2. Select vbox2 (the child widget of window2) and view its properties in the Glade property editor. Change its number of rows from 3 to 4 and drop a command button in the newly created space at the bottom of vbox2. Figure 14.7 shows the resulting screen.

Figure 14.7. Add a row and button to vbox2 in Glade.
graphics/14fig07.gif

Now select the button that was just added and change its text to Quit or Quit Application, as shown in Figure 14.7. In the Properties dialog, select the Signals tab, enter clicked for the signal, and enter quit_application in the handler space, as shown in Figure 14.8.

Figure 14.8. Connect a new button clicked signal to the quit_application function.
graphics/14fig08.gif

Remember that quit_application() has already been defined in cross-window.c . The primary limitation of this method is that you have to already have the function compiled into the executable (or you have to code it and recompile).

Now run the cross- windows application without recompiling the *.c files. Figure 14.9 shows the results. Without recompiling, the Quit button has been added and can now be used to close the application.

Figure 14.9. You changed the cross-windows application user interface and added new functionality without recompiling.
graphics/14fig09.gif
only for RuBoard - do not distribute or recompile


MySQL Building User Interfaces
MySQL: Building User Interfaces (Landmark)
ISBN: 073571049X
EAN: 2147483647
Year: 2001
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net