Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

The Menus and Toolbar

Subsections

r0.4
Image glade-menu
We now explore each of the menus in a systematic and comprehensive way. There are five main menus and four of them (excluding View) should look pretty familiar to the Gnome desktop user: File, Edit, Settings, and Help.

r0.4
Image glade-toolbar
The toolbar provides a shortcut to some of the menu items. Rather than specifically covering them separately we identify their functionality below with their corresponding menu action.

The File Menu

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.

Image glade-menu-file

New Project

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.

Open

If you have an existing Glade project you can Open it through this menu item, or through the Open button of the

Image glade-toolbar-open

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.

Save

Glade currently does not keep tabs of whether you have saved your project.

Image glade-toolbar-save

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 31.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.


Build Source Code

The File->Build Source Code menu item (and the Build button and the Ctl+W

Image glade-toolbar-build

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 31.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 31.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.

Project Options

The File->Project Options... item will bring up the Project Options dialog. See

Image glade-toolbar-options

Section 31.4.4 for details.

Exit

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).

The Edit Menu

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.

Image glade-menu-edit

Cut

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.

Copy

The Edit->Copy menu item (and its Ctl+C keyboard shortcut) is similar to Cut in placing the widget (and its children) on the clipboard, except that the widget is not removed from the canvas.

Paste

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.

Image glade-clipboard

Clear

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 View Menu

The Settings Menu

The Help Menu

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.

Image glade-menu-help

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.

r0.5
Image glade-about
The Help->About... menu item brings up the About dialog which identifies the version of Glade. This is useful if you need to report bugs or problems you are having. The copyright message identifies the owner of Glade. The author's name and email address then appear followed by a short description of the what Glade is and a ULink for its home page. The Glade About dialog is a good example of how to use the Gnome dialogs.


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. Creative Commons ShareAlike V4.