GNU/Linux Desktop Survival Guide
by Graham Williams
The Menus and Toolbar
The File menu provides the usual New Project, Open..., Save, and Exit operations. In common with all Gnome applications F3 is the keyboard shortcut to open a project from a file, Ctl+S is the shortcut to save a project to a file, and Ctl+Q is the shortcut to quit from Glade.
The New Project returns the project options to their default values (the same as when you start Glade without providing it a project file name). You will be asked to confirm that you wish to start a new project. Be sure you have saved the current project (if there is one) before you start a new project. Click the Cancel button on the popup if you have not yet saved the current project and wish to do so. Then choose New Project again. Click on the OK button to proceed.
If you have an existing Glade project you can Open it through this menu item, or through the Open button of the
toolbar, or through the F3 shortcut, or else on the command line if you start glade from a gnome-terminal. Via the menu, button, or keyboard shortcut you will be presented with a File Selection Dialog to choose the Glade project file.
Like all Gnome (actually all Gtk+) applications tab-completion is active in the File Selection Dialog. Thus you can type Pr<tab> and it will be completed to Project/gwords if that is the unique completion. For non-unique completions you will see a list of possible completions in the File list.
Glade currently does not keep tabs of whether you have saved your project.
Be sure to do so with the Save menu item or the Save button or the Ctl+S keyboard shortcut. You can do this anytime and it is useful to be in the habit of saving your project regularly. Saving the project writes the current interface to a Glade project file which stores the interface in a compressed (gzip) XML format. See Section 35.4.7 for details of the save format.
The first time a project is saved (when no project file already exists) Glade will present the Project Options dialog. This gives you an option to set the location of the project files and to set various source code options.
Each time Glade saves the project the previous version is saved into a backup file (e.g. gwords.glade.bak). Only the most recent backup is kept.
The File-->Build Source Code menu item (and the Build button and the Ctl+W
keyboard shortcut) will generate the source code that implements the interface.
The language code generated is chosen from the Project Options dialog under the General options tab (see section 35.4.4). The default is C source code which is supported natively by Glade. Generation of C++, Ada95, Perl, and Eiffel is effected through helper applications from the packages glademm (for the glade- program), gate, glade2perl, and eglade respectively. These need to be available on your system if you are to build the interface in these languages. If Glade can not find the appropriate helper application it will pop up an explanatory window and show the message “Error writing source” in the main window status bar.
See Section 35.4.3 for a description of the files generated by a build for C.
When you select to build your project source code if you have not previously saved the project the Project Options dialog will be displayed allowing you to set the project paths and other options. Otherwise Glade will silently generate the source code.
The File-->Project Options... item will bring up the Project Options dialog. See
Section 35.4.4 for details.
To exit Glade choose the File-->Exit menu or else the Ctl+Q keyboard shortcut. Glade will ask for confirmation (but it has no indication of whether you have saved the project--make sure you have saved your project).
Glade has a cut and paste facility, placing widgets into the a clipboard. The clipboard can be viewed by choosing View-->Show Clipboard. Note the shortcuts are the standard Ctl+X for Cut, Ctl+C for Copy, and Ctl+V for Paste.
The Edit-->Cut menu item (and its Ctl+X keyboard shortcut) will remove the selected widget (and all of its children widgets) from the canvas. The widget (together with its children) will be placed on the clipboard as a single item. Later on you can select this widget on the clipboard and paste it onto your canvas.
The Edit-->Copy menu item (and its Ctl+C keyboard shortcut) is similar to Cut in placing the widget (and it's children) on the clipboard, except that the widget is not removed from the canvas.
After cutting or copying a widget the Edit-->Paste menu item (and its Ctl+V keyboard shortcut) will place that widget onto the canvas to replace whatever is currently selected. This may mean that a currently selected widget will be replaced by the pasted widget. To avoid this ensure that what is currently selected is an empty place holder.
What is actually pasted at any time depends on what is selected in the clipboard. By default the most recently cut or copied widget is selected in the clipboard. You can change the selected widget in the clipboard simply by clicking on it.
The Edit-->Clear menu item will delete the selected widget from the canvas. The widget is not saved on the clipboard--it is removed permanently.
The Help menu provides access to three useful reference documents and the mandatory About... dialog. (Note that the reference documents are only available, currently, with the Gnome version of Glade.)
The Help-->Quick-Start Guide is a short document that reviews the main Glade interfaces and what happens when Glade generates source code.
The Help-->Manual is under development but provides details of all interfaces. The Help-->FAQ contains a collection of typical questions asked by new users of Glade.
Copyright © 1995-2019 Togaware Pty Ltd