Autoglade Tutorial
From Codtech
Under construction
Contents |
[edit]
Introduction
[...]
[edit]
name overloading
To describe the behavior of some components name overloading is used to be able to insert this from Glade GUI designer.
This commands are currently supported
| command | args | description | mywidget:auto:init: | env | gconf | registry | initialize widget value | mywidget1:auto:show: | mywidget2[,...] | show or hide the specified widgets | mywidget1:auto:sensitize: | mywidget2[,...] | sensitize or desensitize the specified widgets | mywidget:auto:dump | name | dump values as name | mywidget1:auto:property: | mywidget2:prop:val | set property prop with value val | mywidget:auto:exec: | command:args | exec command | mywidget:auto: | method:args | invoke method |
|---|
[edit]
Autoglade command line mode
[edit]
Mandatory hello world
[edit]
Glade interface
Design the GUI in glade
There's two things to take into account
- assign label1:auto:init:env as label1's name. This tells autoglade that we want this label be initialized from the environent variale label1 and enable Markup.
- set the response ID of the close button to -7 (gtk.RESPONSE_CLOSE). This is to obtain the correct exit value from autoglade.
[edit]
Run it
Now
$ export label1='<big><big>Hello Autoglade !</big></big>' $ autoglade hello_world_1.glade
and you'll get
[edit]
More interesting hello world
[edit]
Glade interface
Design the GUI in glade
There's some things to take into account, as before
- assign label1:auto:init:env as label1's name. This tells autoglade that we want this label be initialized from the environment variable label1 and enable Markup.
- set the response ID of the close button to -7 (gtk.RESPONSE_CLOSE). This is to obtain the correct exit value from autoglade.
- assign image1:auto:init:env as image1's name. This tells autoglade that we want this label be initialized from the environment variable image1 and also set Edit Type as Filename.
[edit]
Run it
Now
$ export image1=/usr/share/ubuntu-artwork/img/headerlogo.png $ export label1='<big><big>Hello Autoglade !</big></big>' $ autoglade hello_world_1.glade
and you'll get



