|
39.
|
|
|
Select the label. On the General tab, set the Label field to "Name:". Set Expand and Fill to "No" for the label, but keep them as "Yes" for the entry. Set the Padding for both to 6 (also on the Packing tab).
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:124(para)
|
|
40.
|
|
|
Add the Save, Open, and New Features
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:128(title)
|
|
41.
|
|
|
<placeholder-1/> After the user types something, they may want to save it. A File->Save menu item was automatically created when the empty applicaton was created, but it's not hooked up to any code. To make Save work, we need tell the menu item what function to call and then create a function to actually do the saving.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:128(para)
|
|
42.
|
|
|
Set the Signal Handler in <application>Glade</application>
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:130(title)
|
|
43.
|
|
|
<placeholder-1/> First, we need to tell the menu item what function to call. If <application>Glade</application> is not still open, open up the application in <application>Glade</application>:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:130(para)
|
|
44.
|
|
|
Click on the file menu, and the menu opens as if the application were running.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:133(para)
|
|
45.
|
|
|
Choose the Save menu item, and it will be selected in <application>Glade</application>.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:137(para)
|
|
46.
|
|
|
In GTK+, menu items are "activated" when a user chooses the item from the menu. Since we want a function to run when the user chooses Save, we want to specify a function to respond to the activate signal from the menu item. Note the name of the menu item is "mnu_save" in the right panel. You will use this in a second.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:141(para)
|
|
47.
|
|
|
Edit the Code in Gedit
|
|
|
|
Modifier le Code dans Gedit
|
|
Translated and reviewed by
Pierre Slamich
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:142(title)
|
|
48.
|
|
|
Create the Save File Signal Handler
|
|
|
|
(no translation yet)
|
|
|
|
Located in
data/templates/ubuntu-application/help/tutorial.xml:143(title)
|