~ubuntu-branches/ubuntu/natty/quickly/natty

« back to all changes in this revision

Viewing changes to data/templates/ubuntu-pygame/help/po/ga.po

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-03-29 19:00:48 UTC
  • mfrom: (8.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100329190048-olhobq492x3xnztz
Tags: 0.3.90-0ubuntu1
* New release:
  Quickly core:
  - check now that --template has one argument
  - -- enables to give options to templates (unknown options and arguments
    are still given to templates but -- specify explicity what to give to
    templates commands like -h, --version...)
  - check and enable recreation of the credential if user deletes it on
    Launchpad
  - Use realpath so that we can symlink to the binary in trunk.
    (Jonathan Lange)
  - project_path_not_found is raised when data_path_not_found should be
    (originated from Philip Peitsch's patch). (LP: #497688)
  - importing command in one template from another template is now possible
    support as well "all" keyword to import all commands from a template
    into another one (take care of overridden commands too)
    (LP: #452306, #487301)
  - add an apport hook to get installed templates (LP: #411127)
  - enable option completion for templates
  - handle now version upgrade, launching script for templates and handling
    versionning on them
  - change getstarted wording (LP: #486180) - Grant
  - Quickly ship now "version" tag instead of "format" tag
  - add some templatetools to check X display
  - if a commands exit with 4, do not show "ERROR:" (case of wrong command
    usage, for instance)
  - Rewrote importing module in both bin/quickly and ubuntu-project binary
  - Add get_camel_case_name() and get_sentence_name() to templatetools
  - Refactor some code in pre_create hook()
  - Now dashes and spaces support in project name! Dealing with python and
    packaging issues for you. (LP: #493130)
  - Provide Quickly API (LP: #426480)
  - Fix some issues in the man page
  ubuntu-application Template:
  - Enabling upload to team or user ppa, as well as any ppa.
    Use --ppa ppaname or --ppa team/ppaname
    .quickly file can be used as well with ppa = ppaname or
    ppa = team/ppaname (LP: #470192)
    ppa completion is also available
  - Change BSD header by full license
  - Add MIT license
  - Fixes an error when launchpad display name contains unicode character
    (Petar Vasić)
  - Fix typo in quickly help save (Petar Vasić)
  - Adds logo.png as logo property in about dialog (LP: #478389)
    (Petar Vasić)
  - Remove lp-project-change command and add configure command.
    configure lp-project [project_name] to set/reset lp project binded to
    your Quickly project
    ppa <ppa name> to set a default ppa with your project
  - Fix ~/.selected-editor being ignored (LP: #484730)
  - Fix wrong shell completion when in a template (it wrongly proposed
    all commands followed by templates)
  - Check if we have a X display available before running "run" or launching
    GUI in "create" command.
  - add -- support in quickly run to pass options like --help, --version so
    that Quickly core don't take them.
  - enable preferences save call being called multiple times (Philip Peitsch)
  - Use realpath so that we can symlink to the binary in trunk.
  - Fixed some errors in the tutorial (Brian) (LP: #499356)
  - Fix missing import sys in setup.py (Philip Peitsch) (LP: #499712)
  - rename ubuntu-project to ubuntu-application
  - enhance quickly license (no more Copyright file, only one AUTHORS file)
    personal license needs COPYING file now (and the header will be copied in
    every files). No more # needed in those files too. Some other little
    refactoring too (LP: #469330)
  - autolicence by default on first share/release (with LP info and on GPL-3)
  - change versionning support in ubuntu application: (LP: #476814)
   + quickly share just adds -publicX to current version where X is bumped
     at each "quicky share" execution
   + quickly release remove -publicX (if any) and release with current YY.MM.
     If there is already a release with that version, it will be YY.MM.1, 
     then YY.MM.2
  - add accelerators to menu items (jens persson)
  - set correctly title dialog (Philip Peitsch) (LP: #501999)
  - about dialog box is now fully automated: (LP: #478414)
   + update copyright, authors, license (when licensing)
   + version (when sharing and releasing)
   + homepage (when changing launchpad project: release and configure)
  - add an 'add' command. $ quickly dialog … is now $ quickly add dialog …
    (LP: #438320)
  - enable automatic release and milestone built in LP, releasing and pushing
    upstream tarball (LP: #470344)
  - automatic collect and publish changelog message from commits and save
    messages used during devlopment. (LP: #476572)
  - add i18n to boiler plate (LP: #423529)
  - enable adding manual depdencies to quickly project (LP: #474639)
  - enable configure its own bzr branch and resetting parent branch even once
    already configured (quickly configure bzr <branch-path>)
  - now recommends seahorse-plugins to have a graphical prompt for signing
    package
  - rename quickly glade to quickly design (LP: #528664)
  - create command is now more flexible and enable people to inherit from
    other template more easily
  - add translation domain to gtkbuilder and fix some items that shouldn't
    been translatable (Łukasz Jernaś)
  - add apport and launchpadintegration to new and existing project once
    bounded to LP (Philip Peitsch)
  - fix spelling mistake "connexion" (Łukasz Jernaś) (LP: #532667)
  - the ubuntu-application tutorial is now internationalized and use docbook
    format. Translators, it's yours! (Shane Fagan) (LP: #525168)
  - package/share/release are now more quiet and only print something on error
    warning as a summary as with unfound packages, and so on (LP: #482915)
  - new algorithm to select good email automatically. Try to get the preferred
    email and update the AUTHOR file with it.
  - test GPG key and create one automatically if none is available. The
    corresponding public key availabity in launchpad is also checked.
    (LP: #427730, #408993)
  - add devscripts as a dependency (bug #465833), will fix all the depends
    mess later
  - bump python-distutils-extra (>= 2.18bzr1)
  ubuntu-cli Template:
  - first release using import command feature (no command written into the
    template itself). This is a basic ubuntu CLI application
  ubuntu-pygame Template:
  - first release using import command feature. python-pygame added as a
    depends
* debian/control:
  - renamed and separate in multiple packages to get a -common used with
    Quickly widgets (LP: #519633)
  - suggests python-quickly-widgets

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
msgid ""
 
2
msgstr ""
 
3
"Project-Id-Version: PACKAGE VERSION\n"
 
4
"POT-Creation-Date: 2010-03-04 15:41+0000\n"
 
5
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 
6
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 
7
"Language-Team: LANGUAGE <LL@li.org>\n"
 
8
"MIME-Version: 1.0\n"
 
9
"Content-Type: text/plain; charset=UTF-8\n"
 
10
"Content-Transfer-Encoding: 8bit\n"
 
11
 
 
12
#: quickly-ubuntu-application-tutorial.xml:13(firstname)
 
13
msgid "Shane"
 
14
msgstr ""
 
15
 
 
16
#: quickly-ubuntu-application-tutorial.xml:14(surname)
 
17
msgid "Fagan"
 
18
msgstr ""
 
19
 
 
20
#: quickly-ubuntu-application-tutorial.xml:17(firstname)
 
21
msgid "Rick"
 
22
msgstr ""
 
23
 
 
24
#: quickly-ubuntu-application-tutorial.xml:18(surname)
 
25
msgid "Spencer"
 
26
msgstr ""
 
27
 
 
28
#: quickly-ubuntu-application-tutorial.xml:20(corpauthor)
 
29
msgid "Canonical ltd"
 
30
msgstr ""
 
31
 
 
32
#: quickly-ubuntu-application-tutorial.xml:24(date) quickly-ubuntu-application-tutorial.xml:29(invpartnumber)
 
33
msgid "2010"
 
34
msgstr ""
 
35
 
 
36
#: quickly-ubuntu-application-tutorial.xml:30(title)
 
37
msgid "<application>Quickly</application> 0.4 User Guide"
 
38
msgstr ""
 
39
 
 
40
#: quickly-ubuntu-application-tutorial.xml:35(title)
 
41
msgid "About This Guide"
 
42
msgstr "Maidir leis an treoir"
 
43
 
 
44
#: quickly-ubuntu-application-tutorial.xml:36(para)
 
45
msgid "<application>Quickly</application> is a set of choices about writing apps for Ubuntu. Out of all the wonderful richness and variety of programming for Linux, <application>Quickly</application> make some very opinionated choices about what tools to use, and how to combine them. The criteria for these choices was to make it easy and fun to write and release Linux applications, even if it's your first time trying, but also in a way that delivers the full power and flexibility of the platform. One benefit of these choices, is that it's also easier to write tools that make it even easier and more fun. So <application>Quickly</application> is also a set of commands."
 
46
msgstr ""
 
47
 
 
48
#: quickly-ubuntu-application-tutorial.xml:39(link) quickly-ubuntu-application-tutorial.xml:45(title)
 
49
msgid "Getting Started"
 
50
msgstr ""
 
51
 
 
52
#: quickly-ubuntu-application-tutorial.xml:46(para)
 
53
msgid "Welcome to the <application>Quickly</application> tutorial. In this guide you will learn how to get started using <application>Quickly</application>."
 
54
msgstr ""
 
55
 
 
56
#: quickly-ubuntu-application-tutorial.xml:49(application) quickly-ubuntu-application-tutorial.xml:52(application) quickly-ubuntu-application-tutorial.xml:55(application) quickly-ubuntu-application-tutorial.xml:65(application) quickly-ubuntu-application-tutorial.xml:80(application) quickly-ubuntu-application-tutorial.xml:87(application) quickly-ubuntu-application-tutorial.xml:142(application) quickly-ubuntu-application-tutorial.xml:170(application) quickly-ubuntu-application-tutorial.xml:182(application) quickly-ubuntu-application-tutorial.xml:238(application) quickly-ubuntu-application-tutorial.xml:260(application) quickly-ubuntu-application-tutorial.xml:280(application) quickly-ubuntu-application-tutorial.xml:325(application) quickly-ubuntu-application-tutorial.xml:349(application) quickly-ubuntu-application-tutorial.xml:361(application) quickly-ubuntu-application-tutorial.xml:367(application) quickly-ubuntu-application-tutorial.xml:453(application) quickly-ubuntu-application-tutorial.xml:477(application) quickly-ubuntu-application-tutorial.xml:482(application) quickly-ubuntu-application-tutorial.xml:514(application) quickly-ubuntu-application-tutorial.xml:691(application) quickly-ubuntu-application-tutorial.xml:702(application) quickly-ubuntu-application-tutorial.xml:713(application) quickly-ubuntu-application-tutorial.xml:822(application) quickly-ubuntu-application-tutorial.xml:881(application) quickly-ubuntu-application-tutorial.xml:896(application) quickly-ubuntu-application-tutorial.xml:899(application) quickly-ubuntu-application-tutorial.xml:907(application) quickly-ubuntu-application-tutorial.xml:924(application) quickly-ubuntu-application-tutorial.xml:928(application) quickly-ubuntu-application-tutorial.xml:953(application) quickly-ubuntu-application-tutorial.xml:963(application) quickly-ubuntu-application-tutorial.xml:976(application) quickly-ubuntu-application-tutorial.xml:985(application) quickly-ubuntu-application-tutorial.xml:1024(application) quickly-ubuntu-application-tutorial.xml:1041(application) quickly-ubuntu-application-tutorial.xml:1076(application) quickly-ubuntu-application-tutorial.xml:1086(application) quickly-ubuntu-application-tutorial.xml:1102(application) quickly-ubuntu-application-tutorial.xml:1121(application) quickly-ubuntu-application-tutorial.xml:1121(application) quickly-ubuntu-application-tutorial.xml:1124(application)
 
57
msgid "Quickly"
 
58
msgstr ""
 
59
 
 
60
#: quickly-ubuntu-application-tutorial.xml:49(link)
 
61
msgid "Introduction to <placeholder-1/> Part 1"
 
62
msgstr ""
 
63
 
 
64
#: quickly-ubuntu-application-tutorial.xml:52(link)
 
65
msgid "Introduction to <placeholder-1/> Part 2"
 
66
msgstr ""
 
67
 
 
68
#: quickly-ubuntu-application-tutorial.xml:55(link)
 
69
msgid "Introduction to <placeholder-1/> Part 3"
 
70
msgstr ""
 
71
 
 
72
#: quickly-ubuntu-application-tutorial.xml:61(title)
 
73
msgid "Introduction to <application>Quickly</application> Part 1"
 
74
msgstr ""
 
75
 
 
76
#: quickly-ubuntu-application-tutorial.xml:62(para)
 
77
msgid "This part 1 of the <application>Quickly</application> tutorial. This part is will introduce some key <application>Quickly</application> commands, editing a user interface in Glade, and editing code in Gedit. This part of the tutorial will familiarize you with these three tools, and how they work together with python and pygtk so that you can <application>Quickly</application> build applications."
 
78
msgstr ""
 
79
 
 
80
#: quickly-ubuntu-application-tutorial.xml:64(title)
 
81
msgid "Creating a <application>Quickly</application> Project"
 
82
msgstr ""
 
83
 
 
84
#: quickly-ubuntu-application-tutorial.xml:64(para)
 
85
msgid "<placeholder-1/>Creating an empty but working program couldn't be simpler. First, open a terminal window to type commands into. When it's open, type the command:"
 
86
msgstr ""
 
87
 
 
88
#: quickly-ubuntu-application-tutorial.xml:65(code)
 
89
msgid "<placeholder-1/> create ubuntu-application jotty"
 
90
msgstr ""
 
91
 
 
92
#: quickly-ubuntu-application-tutorial.xml:69(para)
 
93
msgid "This will create a jotty sub directory containing a complete directory tree and files for an empty python application. The command finishes by running the newly created empty application."
 
94
msgstr ""
 
95
 
 
96
#: quickly-ubuntu-application-tutorial.xml:73(title)
 
97
msgid "Testing the Empty Application"
 
98
msgstr ""
 
99
 
 
100
#: quickly-ubuntu-application-tutorial.xml:73(para)
 
101
msgid "<placeholder-1/> They are populated and set up, and you can resize the window. Notice that <application>Quickly</application> inferred that the application title is \"Jotty\". Only a few of menu items do anything in the empty application, Help-&gt;About, Edit-&gt;Preferences, and File-&gt;Quit."
 
102
msgstr ""
 
103
 
 
104
#: quickly-ubuntu-application-tutorial.xml:77(title)
 
105
msgid "Running the Application"
 
106
msgstr ""
 
107
 
 
108
#: quickly-ubuntu-application-tutorial.xml:77(para)
 
109
msgid "<placeholder-1/> Close the application by closing the window or using the Quit command. Since the empty application isn't installed into Ubuntu yet, you can't start the application from the application menu yet. To start the applicaton, use the terminal to first cd into the new subdirectory, and then use \"<application>Quickly</application> run\" to start the program."
 
110
msgstr ""
 
111
 
 
112
#: quickly-ubuntu-application-tutorial.xml:79(code)
 
113
msgid "cd jotty"
 
114
msgstr ""
 
115
 
 
116
#: quickly-ubuntu-application-tutorial.xml:80(code) quickly-ubuntu-application-tutorial.xml:181(code) quickly-ubuntu-application-tutorial.xml:1075(code)
 
117
msgid "<placeholder-1/> run"
 
118
msgstr ""
 
119
 
 
120
#: quickly-ubuntu-application-tutorial.xml:84(title)
 
121
msgid "Editing an Application"
 
122
msgstr ""
 
123
 
 
124
#: quickly-ubuntu-application-tutorial.xml:85(title)
 
125
msgid "Edit the User Interface in Glade"
 
126
msgstr ""
 
127
 
 
128
#: quickly-ubuntu-application-tutorial.xml:85(para)
 
129
msgid "<placeholder-1/><application>Quickly</application> programs use Glade to edit the user interface. Start Glade with <application>Quickly</application> in order to set up Glade for editing the empty applicaton. Don't start glade directly, or it won't load the necessary catalogue files for editing the classes that were automaticaly generated by <application>Quickly</application>."
 
130
msgstr ""
 
131
 
 
132
#: quickly-ubuntu-application-tutorial.xml:87(code) quickly-ubuntu-application-tutorial.xml:142(code) quickly-ubuntu-application-tutorial.xml:481(code) quickly-ubuntu-application-tutorial.xml:896(code) quickly-ubuntu-application-tutorial.xml:924(code) quickly-ubuntu-application-tutorial.xml:962(code)
 
133
msgid "<placeholder-1/> design"
 
134
msgstr ""
 
135
 
 
136
#: quickly-ubuntu-application-tutorial.xml:91(para)
 
137
msgid "Glade will open with the project loaded up and ready to edit."
 
138
msgstr ""
 
139
 
 
140
#: quickly-ubuntu-application-tutorial.xml:95(para)
 
141
msgid "Use the Project Menu to choose \"JottytWindow.ui\" for editing."
 
142
msgstr ""
 
143
 
 
144
#: quickly-ubuntu-application-tutorial.xml:99(para)
 
145
msgid "We want to create a text area for typing into. There are some default Widgets added to the Window. We won't need these so we'll start with deleting them. Click on the label, and press delete, and it will disappear from the window."
 
146
msgstr ""
 
147
 
 
148
#: quickly-ubuntu-application-tutorial.xml:106(para)
 
149
msgid "Do the same with the image widget. This leave us two free slots."
 
150
msgstr ""
 
151
 
 
152
#: quickly-ubuntu-application-tutorial.xml:110(para)
 
153
msgid "We'll use the bottom slot to add a TextView widget for the user to type into. In the toolbox, click on the TextView widget. Then click in the empty slot."
 
154
msgstr ""
 
155
 
 
156
#: quickly-ubuntu-application-tutorial.xml:114(para)
 
157
msgid "Make sure you save the file in Glade, or your changes won't take! Then run the application from terminal again. The window now has a place where the user can type."
 
158
msgstr ""
 
159
 
 
160
#: quickly-ubuntu-application-tutorial.xml:118(para)
 
161
msgid "Now we'll add the entry field for the title, and also a label for it. We'll use the top empty slot for that. First, click on Horizontal Box (HBox) from the \"Containers\" section of the pallette, and then click on the top slot. A dialog box will open, tell it that you want two items."
 
162
msgstr ""
 
163
 
 
164
#: quickly-ubuntu-application-tutorial.xml:122(para)
 
165
msgid "The HBox is a container that arranges it's children horizontally. Add a label to the empty left hand box, and a Text Entry to the right hand one."
 
166
msgstr ""
 
167
 
 
168
#: quickly-ubuntu-application-tutorial.xml:126(para)
 
169
msgid "Before going on, let's clean up the UI just a tad here. Select the new HBox from the treeview in the inspector window. Then go to the Packing tab, and set Expand and Fill to \"No\"."
 
170
msgstr ""
 
171
 
 
172
#: quickly-ubuntu-application-tutorial.xml:130(para)
 
173
msgid "Go to the General tab, and set spacing to 5."
 
174
msgstr ""
 
175
 
 
176
#: quickly-ubuntu-application-tutorial.xml:134(para)
 
177
msgid "Select the label. On the general tab, set \"Label\" to \"Name:\". Set expand and fill to \"no\" for the label, but keep it \"yes\" for the entry. Set the padding for both to 5 (also on the Packing tab)."
 
178
msgstr ""
 
179
 
 
180
#: quickly-ubuntu-application-tutorial.xml:138(title)
 
181
msgid "Add the Save, Open, and New Features"
 
182
msgstr ""
 
183
 
 
184
#: quickly-ubuntu-application-tutorial.xml:138(para)
 
185
msgid "<placeholder-1/> After the user types something, they may want to save it. A File-&gt;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."
 
186
msgstr ""
 
187
 
 
188
#: quickly-ubuntu-application-tutorial.xml:140(title)
 
189
msgid "Set the Signal Handler in Glade"
 
190
msgstr ""
 
191
 
 
192
#: quickly-ubuntu-application-tutorial.xml:140(para)
 
193
msgid "<placeholder-1/> To tell the menu item what function to call. If glade is not still open, open up the application in glade:"
 
194
msgstr ""
 
195
 
 
196
#: quickly-ubuntu-application-tutorial.xml:143(para)
 
197
msgid "Click on the file menu, and the menu opens as if the application were running."
 
198
msgstr ""
 
199
 
 
200
#: quickly-ubuntu-application-tutorial.xml:147(para)
 
201
msgid "Choose the Save menu item, and it will be selected in Glade."
 
202
msgstr ""
 
203
 
 
204
#: quickly-ubuntu-application-tutorial.xml:151(para)
 
205
msgid "Then choose the \"Signals\" tab of the properties window."
 
206
msgstr ""
 
207
 
 
208
#: quickly-ubuntu-application-tutorial.xml:155(para)
 
209
msgid "In pygtk, 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. We'll call the function \"save_file\". Simply type the function name into the box for the activate signal.Make sure to save the glade file."
 
210
msgstr ""
 
211
 
 
212
#: quickly-ubuntu-application-tutorial.xml:159(para)
 
213
msgid "Note that you will need to setup the \"open_file\" signal and the \"new_file\" signal as well when you get to those functions later."
 
214
msgstr ""
 
215
 
 
216
#: quickly-ubuntu-application-tutorial.xml:160(title)
 
217
msgid "Edit the Code in Gedit"
 
218
msgstr ""
 
219
 
 
220
#: quickly-ubuntu-application-tutorial.xml:161(title)
 
221
msgid "Set Up Tabs Correctly"
 
222
msgstr ""
 
223
 
 
224
#: quickly-ubuntu-application-tutorial.xml:161(para)
 
225
msgid "<placeholder-1/> Note a major gotcha here. In python spaces and tabs are totally different, but they look just the same in an editor. So being indented one tab stop is not the same as being indented four spaces, even though they might look the same. And indentation level is very important in python. You will get a lot of errors if you mix tab indentation with space indentation. Your generated project follows the python standard of using four spaces for each indentation level. So you'll either have to hit the space bar four time every time you indent, or set up your editor to use the right number of spaces for tabs."
 
226
msgstr ""
 
227
 
 
228
#: quickly-ubuntu-application-tutorial.xml:163(para)
 
229
msgid "The upshot is that you should take a moment to set up your Gedit (or whatever editor you are using) to use spaces for tabs. In Gedit, select Preferences from the Edit menu, and choose the Editor tab. Then set Tab width to 4, and turn on \"Insert spaces instead of tabs\". Your preferences should look like this:"
 
230
msgstr ""
 
231
 
 
232
#: quickly-ubuntu-application-tutorial.xml:167(title)
 
233
msgid "Create the Save File Signal Handler"
 
234
msgstr ""
 
235
 
 
236
#: quickly-ubuntu-application-tutorial.xml:167(para)
 
237
msgid "<placeholder-1/> Now you're ready to write some code. Of course just telling the glade file what signal to emit won't make the file actually save, because we haven't created the \"save_file\" function yet. The code for JottyWindow is stored in the file jotty. jotty is a special python file that is the entry point for your application. Other python files in your application have the \".py\" suffix."
 
238
msgstr ""
 
239
 
 
240
#: quickly-ubuntu-application-tutorial.xml:169(para)
 
241
msgid "Use the <application>Quickly</application> edit command to start editing your code files:"
 
242
msgstr ""
 
243
 
 
244
#: quickly-ubuntu-application-tutorial.xml:170(code) quickly-ubuntu-application-tutorial.xml:899(code) quickly-ubuntu-application-tutorial.xml:928(code) quickly-ubuntu-application-tutorial.xml:952(code)
 
245
msgid "<placeholder-1/> edit"
 
246
msgstr ""
 
247
 
 
248
#: quickly-ubuntu-application-tutorial.xml:171(para)
 
249
msgid "This will open the default Ubuntu text editor \"Gedit\" with any python files in the python directory."
 
250
msgstr ""
 
251
 
 
252
#: quickly-ubuntu-application-tutorial.xml:175(para)
 
253
msgid "JottyWindow.ui is now expecting to find a function JottyWindow.save_file(), so we simply add one to the JottyWindow class in the jotty file right under the on_destroy funtion.:"
 
254
msgstr ""
 
255
 
 
256
#: quickly-ubuntu-application-tutorial.xml:177(code)
 
257
msgid "def save_file(self, widget, data=None): print \"save\""
 
258
msgstr ""
 
259
 
 
260
#: quickly-ubuntu-application-tutorial.xml:179(para)
 
261
msgid "This will print the word \"save\" to the terminal when run. The method signature is the standard signature expected in a signal handler. If you are new to python, be sure to copy the indentations exactly, as the indentation level is very important in python."
 
262
msgstr ""
 
263
 
 
264
#: quickly-ubuntu-application-tutorial.xml:180(para)
 
265
msgid "Save the file, and run it again:"
 
266
msgstr ""
 
267
 
 
268
#: quickly-ubuntu-application-tutorial.xml:184(para)
 
269
msgid "Choose \"File-&gt;Save\" from the menu, and you'll see the word \"save\" printing out interminal. That's all there is to hookig up the functions!"
 
270
msgstr ""
 
271
 
 
272
#: quickly-ubuntu-application-tutorial.xml:188(title)
 
273
msgid "Implementing Save"
 
274
msgstr ""
 
275
 
 
276
#: quickly-ubuntu-application-tutorial.xml:188(para)
 
277
msgid "<placeholder-1/> Now we'll write a little code in the signal handler to actually save the text. Because we want it to be easy for users to do things like syncronize their Jotty documents between computers, back it up, etc... we'll use couchdb as our backend, and we'll use desktopcouch for our api. Note that if you are not interested in learning about how to save to and read from couchdb, you can just snipe the code. Mostly likely you already have everything you need installed when you installed <application>Quickly</application>. But, you may need to install couchdb, desktopcouch, and the desktopcouch records api. The fastest way to do this is from the terminal:"
 
278
msgstr ""
 
279
 
 
280
#: quickly-ubuntu-application-tutorial.xml:191(code)
 
281
msgid "sudo apt-get install python-desktopcouch-records"
 
282
msgstr ""
 
283
 
 
284
#: quickly-ubuntu-application-tutorial.xml:194(para)
 
285
msgid "This will install the api, and everything you need for the api to run. After desktopcouch is installed, you can write the code. The code will do the following:"
 
286
msgstr ""
 
287
 
 
288
#: quickly-ubuntu-application-tutorial.xml:197(para)
 
289
msgid "Import the stuff you'll need from desktopcouch."
 
290
msgstr ""
 
291
 
 
292
#: quickly-ubuntu-application-tutorial.xml:200(para)
 
293
msgid "Get a reference to the couchdb database to save into."
 
294
msgstr ""
 
295
 
 
296
#: quickly-ubuntu-application-tutorial.xml:203(para)
 
297
msgid "Get the title of the document and the text from the user interface."
 
298
msgstr ""
 
299
 
 
300
#: quickly-ubuntu-application-tutorial.xml:206(para)
 
301
msgid "Check if there is already a document with the same title, and if so overwrite it."
 
302
msgstr ""
 
303
 
 
304
#: quickly-ubuntu-application-tutorial.xml:209(para)
 
305
msgid "If there is not a document already, create one."
 
306
msgstr ""
 
307
 
 
308
#: quickly-ubuntu-application-tutorial.xml:212(title)
 
309
msgid "Import the stuff you'll need from python-desktopcouch-records."
 
310
msgstr ""
 
311
 
 
312
#: quickly-ubuntu-application-tutorial.xml:212(para)
 
313
msgid "<placeholder-1/> Add these import statements along with the other imports to the top of the jotty file:"
 
314
msgstr ""
 
315
 
 
316
#: quickly-ubuntu-application-tutorial.xml:214(code)
 
317
msgid "from desktopcouch.records.server import CouchDatabase from desktopcouch.records.record import Record"
 
318
msgstr ""
 
319
 
 
320
#: quickly-ubuntu-application-tutorial.xml:216(title)
 
321
msgid "Get a Reference to the Database"
 
322
msgstr ""
 
323
 
 
324
#: quickly-ubuntu-application-tutorial.xml:216(para)
 
325
msgid "<placeholder-1/> Desktopcouch will set up a database for us, or create a new one if it's needed. We'll use \"jotty\" for the name of the database. Since we want this line to run every time the Jotty Window is created, put it at the end of the finish_initializing function:"
 
326
msgstr ""
 
327
 
 
328
#: quickly-ubuntu-application-tutorial.xml:218(code)
 
329
msgid "self.database = CouchDatabase(\"jotty\", create=True)"
 
330
msgstr ""
 
331
 
 
332
#: quickly-ubuntu-application-tutorial.xml:221(para)
 
333
msgid "Now that we have an instance-wide reference to the database, we'll add code to the save_file function to run whenever the Save command is issued."
 
334
msgstr ""
 
335
 
 
336
#: quickly-ubuntu-application-tutorial.xml:222(para)
 
337
msgid "Here's the code to pull the title out of the title entry:"
 
338
msgstr ""
 
339
 
 
340
#: quickly-ubuntu-application-tutorial.xml:224(code)
 
341
msgid "#get the title for the note title = self.builder.get_object(\"entry1\").get_text()"
 
342
msgstr ""
 
343
 
 
344
#: quickly-ubuntu-application-tutorial.xml:226(title)
 
345
msgid "Here's the code to get pull the text out of the TextView:"
 
346
msgstr ""
 
347
 
 
348
#: quickly-ubuntu-application-tutorial.xml:226(para)
 
349
msgid "<placeholder-1/> In pygtk, TextView widgets have a text buffer that stores the text. So you ask the TextView for it's TextBuffer, and then you ask the TextBuffer for the text. You use iters to determine from which part of the text buffer you want text. Since we want all the text, it's easy to just get the start and end iters."
 
350
msgstr ""
 
351
 
 
352
#: quickly-ubuntu-application-tutorial.xml:229(code)
 
353
msgid "#get the string buff = self.builder.get_object(\"textview1\").get_buffer() start_iter = buff.get_start_iter() end_iter = buff.get_end_iter() text = buff.get_text(start_iter,end_iter)"
 
354
msgstr ""
 
355
 
 
356
#: quickly-ubuntu-application-tutorial.xml:235(title)
 
357
msgid "Saving a document to Couchdb"
 
358
msgstr ""
 
359
 
 
360
#: quickly-ubuntu-application-tutorial.xml:235(para)
 
361
msgid "<placeholder-1/> A record in couch is essentially a python dictionary with some extra key/value pairs to make the database work. So we can save the document to couch like this:"
 
362
msgstr ""
 
363
 
 
364
#: quickly-ubuntu-application-tutorial.xml:238(code)
 
365
msgid "record_type = \"http://wiki.ubuntu.com/<placeholder-1/>/JottyDoc\" new_rec = Record({\"record_type\": record_type,\"title\":title, \"text\":text}) self.database.put(new_rec)"
 
366
msgstr ""
 
367
 
 
368
#: quickly-ubuntu-application-tutorial.xml:241(para)
 
369
msgid "The \"record_type\" field is not strictly required, but among other things, it makes it easy to fetch the documents later. By convention, we use a url to specify the record type. This provides a place for other developers to go to read about the record type. The description only needs to be human readable. Couchdb is not a typed database, so don't expect that the url will have any kind of schema definition or anything. You can use whatever url you want, and put whatever you want at that URL."
 
370
msgstr ""
 
371
 
 
372
#: quickly-ubuntu-application-tutorial.xml:242(title)
 
373
msgid "Check for a pre-existing note with the same title"
 
374
msgstr ""
 
375
 
 
376
#: quickly-ubuntu-application-tutorial.xml:242(para)
 
377
msgid "<placeholder-1/> Before we just write the new document though, we have to take note of the fact that couch will allow you to create as many documents as you want with the same title. We probably don't want this, so we we'll have to write a little code to check if there is already a document in couch with the same title, and if there is, update that document rather than create a new one."
 
378
msgstr ""
 
379
 
 
380
#: quickly-ubuntu-application-tutorial.xml:244(para)
 
381
msgid "In CouchDB, you don't do a lot of data processing in the database like you would with a relational database. To be most efficient, we could use the desktopcouch API to create a view in CouchDB, but it's probably simplest just to do the necessary processing on the client for now. To do this, we'll use a desktopcouch function to retrieve all of the records of a specified record type."
 
382
msgstr ""
 
383
 
 
384
#: quickly-ubuntu-application-tutorial.xml:245(para)
 
385
msgid "To find and update documents with a matching title we will:"
 
386
msgstr ""
 
387
 
 
388
#: quickly-ubuntu-application-tutorial.xml:248(para) quickly-ubuntu-application-tutorial.xml:308(para)
 
389
msgid "Retrieve all of the documents with the CouchDatabase.get_records function."
 
390
msgstr ""
 
391
 
 
392
#: quickly-ubuntu-application-tutorial.xml:251(para) quickly-ubuntu-application-tutorial.xml:311(para)
 
393
msgid "Check each of the returned records for a matching title."
 
394
msgstr ""
 
395
 
 
396
#: quickly-ubuntu-application-tutorial.xml:254(para)
 
397
msgid "If there is a match, update the record using the CouchDatabase.update_fields function and return."
 
398
msgstr ""
 
399
 
 
400
#: quickly-ubuntu-application-tutorial.xml:257(para)
 
401
msgid "This all may sound very weird, but in code, it's not quite so complicated:"
 
402
msgstr ""
 
403
 
 
404
#: quickly-ubuntu-application-tutorial.xml:259(code)
 
405
msgid "#get all the records record_type = \"http://wiki.ubuntu.com/<placeholder-1/>/JottyDoc\" results = self.database.get_records(record_type = record_type,create_view = True) #update a record that has the same title for result in results: document = result.value if document[\"title\"] == title: key = document[\"_id\"] self.database.update_fields(key, {\"text\":text}) return"
 
406
msgstr ""
 
407
 
 
408
#: quickly-ubuntu-application-tutorial.xml:269(para)
 
409
msgid "So the whole function should look like this:"
 
410
msgstr ""
 
411
 
 
412
#: quickly-ubuntu-application-tutorial.xml:271(code)
 
413
msgid "def save_file(self, widget, data=None): #get the title for the note title = self.builder.get_object(\"entry1\").get_text() #get the text to save buff = self.builder.get_object(\"textview1\").get_buffer() start_iter = buff.get_start_iter() end_iter = buff.get_end_iter() text = buff.get_text(start_iter,end_iter) #get all the records record_type = \"http://wiki.ubuntu.com/<placeholder-1/>/JottyDoc\" results = self.database.get_records(record_type = record_type,create_view = True) #update a record that has the same title for result in results: document = result.value if document[\"title\"] == title: key = result.key self.database.update_fields(key, {\"text\":text}) return #if no records had the title, create it new_rec = Record({\"record_type\":record_type,\"title\":title, \"text\":text}) self.database.put_record(new_rec)"
 
414
msgstr ""
 
415
 
 
416
#: quickly-ubuntu-application-tutorial.xml:293(para)
 
417
msgid "Couchdb makes it really easy to see if your save function is working. You can just point your web browser at it and explore the database:"
 
418
msgstr ""
 
419
 
 
420
#: quickly-ubuntu-application-tutorial.xml:294(para)
 
421
msgid "file:///home/your_user_name&gt;/.local/share/desktop-couch/couchdb.html"
 
422
msgstr ""
 
423
 
 
424
#: quickly-ubuntu-application-tutorial.xml:298(para)
 
425
msgid "If you are redirected to a page that doesn't work, you probably just need to clear your browser cache and try again."
 
426
msgstr ""
 
427
 
 
428
#: quickly-ubuntu-application-tutorial.xml:299(title)
 
429
msgid "Implementing Open and New"
 
430
msgstr ""
 
431
 
 
432
#: quickly-ubuntu-application-tutorial.xml:299(para)
 
433
msgid "<placeholder-1/> To open a saved document, the user will type the title of the document that they want to open in the text entry, and choose \"Open\" from the main menu. If there is no matching document there, it will just clear out the text view, ready for input. This is probably not too intuitive, so we'll add a dialog box for prompting the user for the title, but that's for later in the tutorial. For now, we'll just use the same text entry field."
 
434
msgstr ""
 
435
 
 
436
#: quickly-ubuntu-application-tutorial.xml:301(title)
 
437
msgid "Implementing Open is essentially the reverse of Save:"
 
438
msgstr ""
 
439
 
 
440
#: quickly-ubuntu-application-tutorial.xml:301(para)
 
441
msgid "<placeholder-1/> Follow these steps:"
 
442
msgstr ""
 
443
 
 
444
#: quickly-ubuntu-application-tutorial.xml:305(para)
 
445
msgid "Add the open_file signal to the menu item in Glade."
 
446
msgstr ""
 
447
 
 
448
#: quickly-ubuntu-application-tutorial.xml:314(para)
 
449
msgid "If there is a match, pull out the text and display it in the text view."
 
450
msgstr ""
 
451
 
 
452
#: quickly-ubuntu-application-tutorial.xml:317(para)
 
453
msgid "So the open_file function looks like so:"
 
454
msgstr ""
 
455
 
 
456
#: quickly-ubuntu-application-tutorial.xml:319(code)
 
457
msgid "def open_file(self, widget, data=None): #get the name of the document to open title = self.builder.get_object(\"entry1\").get_text() text = \"\" #get all the records record_type = \"http://wiki.ubuntu.com/<placeholder-1/>/JottyDoc\" results = self.database.get_records(record_type = record_type,create_view = True) #get the text if there is a matching title for result in results: document = result.value if document[\"title\"] == title: text = document[\"text\"] #set the UI to display the string buff = self.builder.get_object(\"textview1\").get_buffer() buff.set_text(text)"
 
458
msgstr ""
 
459
 
 
460
#: quickly-ubuntu-application-tutorial.xml:337(title)
 
461
msgid "Implement New"
 
462
msgstr ""
 
463
 
 
464
#: quickly-ubuntu-application-tutorial.xml:337(para)
 
465
msgid "<placeholder-1/> First, add the new_file signal to the menu item in Glade, then add this code to clear out the text:"
 
466
msgstr ""
 
467
 
 
468
#: quickly-ubuntu-application-tutorial.xml:340(code)
 
469
msgid "def new_file(self, widget, data=None): self.builder.get_object(\"entry1\").set_text(\"Note Title\") buff = self.builder.get_object(\"textview1\").get_buffer() buff.set_text(\"\")"
 
470
msgstr ""
 
471
 
 
472
#: quickly-ubuntu-application-tutorial.xml:344(para)
 
473
msgid "To make them work, add these functions to the JottyWindow class, and save. Then go back and connect the functions to the activate signals for the Open and New menu items."
 
474
msgstr ""
 
475
 
 
476
#: quickly-ubuntu-application-tutorial.xml:345(ulink)
 
477
msgid "Complete jotty file"
 
478
msgstr ""
 
479
 
 
480
#: quickly-ubuntu-application-tutorial.xml:346(title)
 
481
msgid "Saving Your Work"
 
482
msgstr ""
 
483
 
 
484
#: quickly-ubuntu-application-tutorial.xml:346(para)
 
485
msgid "<placeholder-1/> When <application>Quickly</application> created your application, it automatically added it to Bazaar, a source code versioning system. You can use Bazaar to roll back mistake, see code history, compare versions, etc... <application>Quickly</application> has a convenience function for backing up your work:"
 
486
msgstr ""
 
487
 
 
488
#: quickly-ubuntu-application-tutorial.xml:348(code)
 
489
msgid "<placeholder-1/> save \"First working version of Jotty\""
 
490
msgstr ""
 
491
 
 
492
#: quickly-ubuntu-application-tutorial.xml:351(para)
 
493
msgid "This will call <code>bzr add</code> and then <code>bzr commit -m [your message]</code> for you."
 
494
msgstr ""
 
495
 
 
496
#: quickly-ubuntu-application-tutorial.xml:354(title)
 
497
msgid "Introduction to <application>Quickly</application> Part 2"
 
498
msgstr ""
 
499
 
 
500
#: quickly-ubuntu-application-tutorial.xml:355(para)
 
501
msgid "In part 1, we created an application that can read and write text files, and persist them in the couchdb backend. However, the application has a hideous usability flaw, in the text box for specifying titles when saving and opening files is very confusing. In part 2, we'll fix that by adding a save and an open dialog."
 
502
msgstr ""
 
503
 
 
504
#: quickly-ubuntu-application-tutorial.xml:357(title)
 
505
msgid "Creating a <application>Quickly</application> Dialog"
 
506
msgstr ""
 
507
 
 
508
#: quickly-ubuntu-application-tutorial.xml:358(title)
 
509
msgid "Creating the Empty Dialog"
 
510
msgstr ""
 
511
 
 
512
#: quickly-ubuntu-application-tutorial.xml:358(para)
 
513
msgid "<placeholder-1/> It's simple to add an empty, but working dialog to your project. Simply specify the name of the new dialog, and it will be added automatically. Assuming that you are in the jotty project directory:"
 
514
msgstr ""
 
515
 
 
516
#: quickly-ubuntu-application-tutorial.xml:360(code)
 
517
msgid "<placeholder-1/> dialog save"
 
518
msgstr ""
 
519
 
 
520
#: quickly-ubuntu-application-tutorial.xml:363(para)
 
521
msgid "This will add the dialog to your project."
 
522
msgstr ""
 
523
 
 
524
#: quickly-ubuntu-application-tutorial.xml:364(title) quickly-ubuntu-application-tutorial.xml:479(title)
 
525
msgid "Editing the New Dialog"
 
526
msgstr ""
 
527
 
 
528
#: quickly-ubuntu-application-tutorial.xml:364(para)
 
529
msgid "<placeholder-1/> To edit the UI for the dialog, you'll need to load it into Glade again. If you already have an instance of glade running, you might want to go ahead and close it first, as it may get confusing if you have more than one open at a time. After closing glade, simply open it again:"
 
530
msgstr ""
 
531
 
 
532
#: quickly-ubuntu-application-tutorial.xml:366(code)
 
533
msgid "<placeholder-1/> Design"
 
534
msgstr ""
 
535
 
 
536
#: quickly-ubuntu-application-tutorial.xml:369(para)
 
537
msgid "Then use the project menu to switch to newly created SaveDialog.ui file."
 
538
msgstr ""
 
539
 
 
540
#: quickly-ubuntu-application-tutorial.xml:373(para)
 
541
msgid "Then add some widgets for the UI. Start with a Vertical Box (VBox) with two items. Put a label in the top, and an HBox in the bottom slot. In the HBox, add a label and an edit widget, just like you did for JottyWindow in part 1. Set the padding and expand properties as well."
 
542
msgstr ""
 
543
 
 
544
#: quickly-ubuntu-application-tutorial.xml:377(title)
 
545
msgid "Code the Dialog"
 
546
msgstr ""
 
547
 
 
548
#: quickly-ubuntu-application-tutorial.xml:377(para)
 
549
msgid "<placeholder-1/> You can use the \"<application>Quickly</application> edit\" command to open the SaveDialog.py file. This dialog needs very little additional code to work. Essentially, you just need a way to retrieve the string specified by the user. We'll add a qiuck accessor method for this:"
 
550
msgstr ""
 
551
 
 
552
#: quickly-ubuntu-application-tutorial.xml:380(code)
 
553
msgid "@property def title_text(self): return self.builder.get_object(\"entry1\").get_text()"
 
554
msgstr ""
 
555
 
 
556
#: quickly-ubuntu-application-tutorial.xml:383(para)
 
557
msgid "We don't need to write any code for the Ok and Cancel buttons, as they were automatically hooked up by <application>Quickly</application> when it created the dialog."
 
558
msgstr ""
 
559
 
 
560
#: quickly-ubuntu-application-tutorial.xml:384(para)
 
561
msgid "Before we go on to invoking the dialog, delete HBox from JottyWindow that holds the text entry and label, as we won't be needing those."
 
562
msgstr ""
 
563
 
 
564
#: quickly-ubuntu-application-tutorial.xml:388(title)
 
565
msgid "Calling the Save Dialog"
 
566
msgstr ""
 
567
 
 
568
#: quickly-ubuntu-application-tutorial.xml:388(para)
 
569
msgid "<placeholder-1/> To use the dialog in JottyWindow, we need to follow these steps:"
 
570
msgstr ""
 
571
 
 
572
#: quickly-ubuntu-application-tutorial.xml:392(para)
 
573
msgid "Import SaveDialog in JottyWindow"
 
574
msgstr ""
 
575
 
 
576
#: quickly-ubuntu-application-tutorial.xml:395(para)
 
577
msgid "In the save_file function, create an instance of SaveDialog"
 
578
msgstr ""
 
579
 
 
580
#: quickly-ubuntu-application-tutorial.xml:398(para) quickly-ubuntu-application-tutorial.xml:558(para)
 
581
msgid "Run the Dialog"
 
582
msgstr ""
 
583
 
 
584
#: quickly-ubuntu-application-tutorial.xml:401(para)
 
585
msgid "Get the String"
 
586
msgstr ""
 
587
 
 
588
#: quickly-ubuntu-application-tutorial.xml:404(para) quickly-ubuntu-application-tutorial.xml:564(para)
 
589
msgid "Destroy the dialog"
 
590
msgstr ""
 
591
 
 
592
#: quickly-ubuntu-application-tutorial.xml:408(title)
 
593
msgid "Importing the SaveDialog"
 
594
msgstr ""
 
595
 
 
596
#: quickly-ubuntu-application-tutorial.xml:408(para)
 
597
msgid "<placeholder-1/> Add the SaveDialog to the list of the imported modules at the top of the bin file of your project, so it looks like this:"
 
598
msgstr ""
 
599
 
 
600
#: quickly-ubuntu-application-tutorial.xml:410(code)
 
601
msgid "from jotty import AboutJottyDialog, PreferencesJottyDialog, SaveDialog"
 
602
msgstr ""
 
603
 
 
604
#: quickly-ubuntu-application-tutorial.xml:414(title) quickly-ubuntu-application-tutorial.xml:583(title)
 
605
msgid "Create an instance of the dialog and run it"
 
606
msgstr ""
 
607
 
 
608
#: quickly-ubuntu-application-tutorial.xml:414(para)
 
609
msgid "<placeholder-1/> When the user chooses Save, we want to open the SaveDialog and collect the title of the note from the user. So we need to modify our save_file function."
 
610
msgstr ""
 
611
 
 
612
#: quickly-ubuntu-application-tutorial.xml:417(para)
 
613
msgid "To create an instance of the dialog, use the NewSaveDialog() function in the SaveDialog module. It's important that you don't create an instance of SaveDialog directly, as it won't have a chance to load up it's UI that way, and it won't work. So whenever you use a <application>Quickly</application> dialog, do it like this:"
 
614
msgstr ""
 
615
 
 
616
#: quickly-ubuntu-application-tutorial.xml:418(code)
 
617
msgid "saver = SaveDialog.NewSaveDialog()"
 
618
msgstr ""
 
619
 
 
620
#: quickly-ubuntu-application-tutorial.xml:421(para)
 
621
msgid "To make the dialog appear, simply use the run() method. However, we want to check the result, so we'll need to store that in a variable. After it runs, we want to collect the string from the user, like this:"
 
622
msgstr ""
 
623
 
 
624
#: quickly-ubuntu-application-tutorial.xml:422(code)
 
625
msgid "result = saver.run() title = saver.title_text"
 
626
msgstr ""
 
627
 
 
628
#: quickly-ubuntu-application-tutorial.xml:426(title)
 
629
msgid "Clean up the dialog"
 
630
msgstr ""
 
631
 
 
632
#: quickly-ubuntu-application-tutorial.xml:426(para)
 
633
msgid "<placeholder-1/> We need to tell the dialog to not show itself anymore. We could call saver.hide() to make it hide, but since we don't need it hanging around, we'll just destroy it. Before we go on, though, we need to ensure that the user actually wants to save, so if we didn't get the Ok result, we should just return out of the function:"
 
634
msgstr ""
 
635
 
 
636
#: quickly-ubuntu-application-tutorial.xml:429(code)
 
637
msgid "saver.destroy() if result != gtk.RESPONSE_OK: return"
 
638
msgstr ""
 
639
 
 
640
#: quickly-ubuntu-application-tutorial.xml:433(para)
 
641
msgid "Since we're now getting the title from the dialog instead of the text entry, we should delete the line of the code that sents it from entry1. So except for the addition of the dialog code, the save_file function looks pretty much the same as it did in part 1:"
 
642
msgstr ""
 
643
 
 
644
#: quickly-ubuntu-application-tutorial.xml:436(code)
 
645
msgid "def save_file(self, widget, data=None): #get the titel from the user saver = SaveDialog.NewSaveDialog() result = saver.run() title = saver.title_text saver.destroy() if result != gtk.RESPONSE_OK: return #get the text to save buff = self.builder.get_object(\"textview1\").get_buffer() start_iter = buff.get_start_iter() end_iter = buff.get_end_iter() text = buff.get_text(start_iter,end_iter) #get all the records record_type = \"http://wiki.ubuntu.com/<placeholder-1/>/JottyDoc\" results = self.database.get_records(record_type = record_type,create_view = True) #update a record that has the same title for result in results: record = result.value if record[\"title\"] == title: key = result.key self.database.update_fields(key, {\"text\":text}) return #if no records had the title, create it new_rec = Record({\"record_type\":record_type,\"title\":title, \"text\":text}) self.database.put_record(new_rec)"
 
646
msgstr ""
 
647
 
 
648
#: quickly-ubuntu-application-tutorial.xml:467(para)
 
649
msgid "Now when we choose save, we get the SaveDialog instead:"
 
650
msgstr ""
 
651
 
 
652
#: quickly-ubuntu-application-tutorial.xml:472(title)
 
653
msgid "Creating a Dialog with a CouchGrid"
 
654
msgstr ""
 
655
 
 
656
#: quickly-ubuntu-application-tutorial.xml:472(para)
 
657
msgid "<placeholder-1/> We'll use a similar approach in the Open dialog that we did with Save. However, there is one big difference, we want to provide the user with a list of documents that you could choose to open. We'll use a widget called CouchGrid, which is included in the desktopcouch api for this."
 
658
msgstr ""
 
659
 
 
660
#: quickly-ubuntu-application-tutorial.xml:475(title)
 
661
msgid "Create the Open Dialog"
 
662
msgstr ""
 
663
 
 
664
#: quickly-ubuntu-application-tutorial.xml:476(code)
 
665
msgid "<placeholder-1/> dialog open"
 
666
msgstr ""
 
667
 
 
668
#: quickly-ubuntu-application-tutorial.xml:479(para)
 
669
msgid "<placeholder-1/> Start out by closing, and then reopening glade again:"
 
670
msgstr ""
 
671
 
 
672
#: quickly-ubuntu-application-tutorial.xml:484(para)
 
673
msgid "Start by adding a VBox and a label in the same manner as in the Save Dialog above. Leave an empty space in the VBox. We will use code to put the CouchGrid there."
 
674
msgstr ""
 
675
 
 
676
#: quickly-ubuntu-application-tutorial.xml:488(title)
 
677
msgid "Coding the Open Dialog"
 
678
msgstr ""
 
679
 
 
680
#: quickly-ubuntu-application-tutorial.xml:489(title)
 
681
msgid "Creating and Adding a CouchGrid"
 
682
msgstr ""
 
683
 
 
684
#: quickly-ubuntu-application-tutorial.xml:489(para)
 
685
msgid "<placeholder-1/> It just takes a little bit of code to add a CouchGrid to the dialog. We need to:"
 
686
msgstr ""
 
687
 
 
688
#: quickly-ubuntu-application-tutorial.xml:493(para)
 
689
msgid "Import the CouchGrid class."
 
690
msgstr ""
 
691
 
 
692
#: quickly-ubuntu-application-tutorial.xml:496(para)
 
693
msgid "Create a CouchGrid pointing at the jotty database, and the desired record type."
 
694
msgstr ""
 
695
 
 
696
#: quickly-ubuntu-application-tutorial.xml:499(para)
 
697
msgid "Add the CouchGrid to the dialog."
 
698
msgstr ""
 
699
 
 
700
#: quickly-ubuntu-application-tutorial.xml:503(title)
 
701
msgid "Import the CouchGrid class"
 
702
msgstr ""
 
703
 
 
704
#: quickly-ubuntu-application-tutorial.xml:503(para)
 
705
msgid "<placeholder-1/> CouchGrid is part of the desktopcouch records api, so we import it like this:"
 
706
msgstr ""
 
707
 
 
708
#: quickly-ubuntu-application-tutorial.xml:505(code)
 
709
msgid "from desktopcouch.records.couchgrid import CouchGrid"
 
710
msgstr ""
 
711
 
 
712
#: quickly-ubuntu-application-tutorial.xml:508(title)
 
713
msgid "Create the CouchGrid"
 
714
msgstr ""
 
715
 
 
716
#: quickly-ubuntu-application-tutorial.xml:508(para)
 
717
msgid "<placeholder-1/> A CouchGrid needs to know three things, the name of the database, the name of the record type, and the name of the keys to use. \"keys\" is a list of fields that the widget will display, and by default will also use the same text for the heading of any columns. This set up should be done in the OpenDialog's finish_initalizing function. All this is easily done in code like this:"
 
718
msgstr ""
 
719
 
 
720
#: quickly-ubuntu-application-tutorial.xml:512(code)
 
721
msgid "database = \"jotty\" keys = [\"title\"] record_type = \"http://wiki.ubuntu.com/<placeholder-1/>/JottyDoc\" self.couchgrid = CouchGrid(database, record_type=record_type,keys=keys)"
 
722
msgstr ""
 
723
 
 
724
#: quickly-ubuntu-application-tutorial.xml:516(title)
 
725
msgid "Add the CouchGrid to the Dialog"
 
726
msgstr ""
 
727
 
 
728
#: quickly-ubuntu-application-tutorial.xml:516(para)
 
729
msgid "<placeholder-1/> we added the VBox to the dialog, we left an open space at the bottom. We'll use this by \"packing\" the CouchGrid into the VBox. We need to show it as well. So add the following lines to the finish_initializing function as well:"
 
730
msgstr ""
 
731
 
 
732
#: quickly-ubuntu-application-tutorial.xml:520(code)
 
733
msgid "self.couchgrid.show() self.builder.get_object(\"vbox1\").pack_end(self.couchgrid)"
 
734
msgstr ""
 
735
 
 
736
#: quickly-ubuntu-application-tutorial.xml:523(title)
 
737
msgid "Create the get_selection function"
 
738
msgstr ""
 
739
 
 
740
#: quickly-ubuntu-application-tutorial.xml:523(para)
 
741
msgid "<placeholder-1/> The dialog still needs a bit more code to work. It needs to return the user's selection, if there is one. To do this, we need to ask the CouchGrid what is selected. This is easy using the widgets selected_record_ids function. But the CouchGrid supports multiple selection, so we'll do the following:"
 
742
msgstr ""
 
743
 
 
744
#: quickly-ubuntu-application-tutorial.xml:527(para)
 
745
msgid "Use a decorator to define the function as a property accessor."
 
746
msgstr ""
 
747
 
 
748
#: quickly-ubuntu-application-tutorial.xml:530(para)
 
749
msgid "Get all the selected record ids."
 
750
msgstr ""
 
751
 
 
752
#: quickly-ubuntu-application-tutorial.xml:533(para)
 
753
msgid "If none are selected, return None."
 
754
msgstr ""
 
755
 
 
756
#: quickly-ubuntu-application-tutorial.xml:536(para)
 
757
msgid "Pick the first one and return it."
 
758
msgstr ""
 
759
 
 
760
#: quickly-ubuntu-application-tutorial.xml:539(para)
 
761
msgid "So the function to add to OpenDialog looks like this:"
 
762
msgstr ""
 
763
 
 
764
#: quickly-ubuntu-application-tutorial.xml:541(code)
 
765
msgid "@property def selected_record_id(self): ids = self.couchgrid.selected_record_ids if len(ids) &lt; 1: return None else: return ids[0]"
 
766
msgstr ""
 
767
 
 
768
#: quickly-ubuntu-application-tutorial.xml:548(title)
 
769
msgid "Using the Open Dialog"
 
770
msgstr ""
 
771
 
 
772
#: quickly-ubuntu-application-tutorial.xml:548(para)
 
773
msgid "<placeholder-1/> Now we want to use the Open Dialog in the JottyWindow open_file function. To use it,we'll follow these steps:"
 
774
msgstr ""
 
775
 
 
776
#: quickly-ubuntu-application-tutorial.xml:552(para)
 
777
msgid "Import OpenDialog in JottyWindow"
 
778
msgstr ""
 
779
 
 
780
#: quickly-ubuntu-application-tutorial.xml:555(para)
 
781
msgid "In the open_file function, create an instance of OpenDialog"
 
782
msgstr ""
 
783
 
 
784
#: quickly-ubuntu-application-tutorial.xml:561(para)
 
785
msgid "Get the id for the selected title."
 
786
msgstr ""
 
787
 
 
788
#: quickly-ubuntu-application-tutorial.xml:567(para)
 
789
msgid "Check the response before proceeding"
 
790
msgstr ""
 
791
 
 
792
#: quickly-ubuntu-application-tutorial.xml:570(para) quickly-ubuntu-application-tutorial.xml:600(title)
 
793
msgid "Use the id to get the record from CouchDB"
 
794
msgstr ""
 
795
 
 
796
#: quickly-ubuntu-application-tutorial.xml:573(para) quickly-ubuntu-application-tutorial.xml:609(title)
 
797
msgid "Update the UI"
 
798
msgstr ""
 
799
 
 
800
#: quickly-ubuntu-application-tutorial.xml:577(title)
 
801
msgid "Import OpenDialog"
 
802
msgstr ""
 
803
 
 
804
#: quickly-ubuntu-application-tutorial.xml:577(para)
 
805
msgid "<placeholder-1/> Just like the SaveDialog, add the import line to the list of imports:"
 
806
msgstr ""
 
807
 
 
808
#: quickly-ubuntu-application-tutorial.xml:579(code)
 
809
msgid "from jotty import AboutJottyDialog, PreferencesJottyDialog, SaveDialog, OpenDialog"
 
810
msgstr ""
 
811
 
 
812
#: quickly-ubuntu-application-tutorial.xml:583(para)
 
813
msgid "<placeholder-1/> So now we're ready to call the dialog from the JottyWindow's open_file function. Creating the OpenDialog is exactly the same as creating the SaveDialog, except we also want to tell it to load the titles before we run it:"
 
814
msgstr ""
 
815
 
 
816
#: quickly-ubuntu-application-tutorial.xml:586(code)
 
817
msgid "opener = OpenDialog.NewOpenDialog() result = opener.run()"
 
818
msgstr ""
 
819
 
 
820
#: quickly-ubuntu-application-tutorial.xml:589(title)
 
821
msgid "Get the id for the selected title"
 
822
msgstr ""
 
823
 
 
824
#: quickly-ubuntu-application-tutorial.xml:589(para)
 
825
msgid "<placeholder-1/> Now use the property that we created to retrieve the title and text from the dialog. Don't forget to check the response type before going on."
 
826
msgstr ""
 
827
 
 
828
#: quickly-ubuntu-application-tutorial.xml:592(code)
 
829
msgid "rec_id = opener.selected_record_id #close the dialog, and check whether to proceed opener.destroy() if result != gtk.RESPONSE_OK: return"
 
830
msgstr ""
 
831
 
 
832
#: quickly-ubuntu-application-tutorial.xml:600(para)
 
833
msgid "<placeholder-1/> If nothing was selected, we'll just return. Otherwise, we'll retrieve the record from CouchDB and pull out the text for the document:"
 
834
msgstr ""
 
835
 
 
836
#: quickly-ubuntu-application-tutorial.xml:603(code)
 
837
msgid "#get the record from CouchDB and extract the text if rec_id == None: return record = self.database.get_record(rec_id) text = record[\"text\"]"
 
838
msgstr ""
 
839
 
 
840
#: quickly-ubuntu-application-tutorial.xml:609(para)
 
841
msgid "<placeholder-1/> Now just put the text into the texview:"
 
842
msgstr ""
 
843
 
 
844
#: quickly-ubuntu-application-tutorial.xml:612(code)
 
845
msgid "#set the UI to display the string buff = self.builder.get_object(\"textview1\").get_buffer() buff.set_text(text)"
 
846
msgstr ""
 
847
 
 
848
#: quickly-ubuntu-application-tutorial.xml:615(para)
 
849
msgid "That's all there is to it. So the whole open_file function looks like this:"
 
850
msgstr ""
 
851
 
 
852
#: quickly-ubuntu-application-tutorial.xml:617(code)
 
853
msgid "def open_file(self, widget, data=None): #run the open dialog opener = OpenDialog.NewOpenDialog() result = opener.run() #get the record id from the dialog rec_id = opener.selected_record_id #close the dialog, and check whether to proceed opener.destroy() if result != gtk.RESPONSE_OK: return #get the record from CouchDB and extract the text if rec_id == None: return record = self.database.get_record(rec_id) text = record[\"text\"] #set the UI to display the string buff = self.builder.get_object(\"textview1\").get_buffer() buff.set_text(text)"
 
854
msgstr ""
 
855
 
 
856
#: quickly-ubuntu-application-tutorial.xml:639(para)
 
857
msgid "Now users get a nice open dialog:"
 
858
msgstr ""
 
859
 
 
860
#: quickly-ubuntu-application-tutorial.xml:644(para)
 
861
msgid "However, the application is not complete. There are a few things left for you to do:"
 
862
msgstr ""
 
863
 
 
864
#: quickly-ubuntu-application-tutorial.xml:647(para)
 
865
msgid "Set the title of the JottyWindow to display the note title. Try self.set_text(title)."
 
866
msgstr ""
 
867
 
 
868
#: quickly-ubuntu-application-tutorial.xml:650(para)
 
869
msgid "The Save command works more like \"Save As\". The application probably shouldn't pop up a SaveDialog every time you want to save. If it's already been saved, you probably just want to save it, but use a SaveDialog when the user choose Save As, or is saving a document for the first time."
 
870
msgstr ""
 
871
 
 
872
#: quickly-ubuntu-application-tutorial.xml:653(para)
 
873
msgid "The OpenDialog should probably return when the user double clicks on an item in the list. Try connecting to the \"select-cursor-row\" signal on the TreeView, and calling self.response(gtk.RESPONSE_OK) in the handler."
 
874
msgstr ""
 
875
 
 
876
#: quickly-ubuntu-application-tutorial.xml:656(para)
 
877
msgid "Perhaps the Ok button in the OpenDialog should be disabled if nothing is selected. Try setting the \"sensitivity\" in Glade, and the set_sensitive function for the Ok button."
 
878
msgstr ""
 
879
 
 
880
#: quickly-ubuntu-application-tutorial.xml:659(para)
 
881
msgid "It would be more consistent for the Open and Close dialogs to have \"Open\" and \"Close\" for buttons instead of \"Ok\". You can set a different type in the properties window in Glade."
 
882
msgstr ""
 
883
 
 
884
#: quickly-ubuntu-application-tutorial.xml:662(para)
 
885
msgid "Loading every document into the open dialog is probably a bit inefficient. Perhaps storing the document id and using that to retrieve the document would be a better implementation."
 
886
msgstr ""
 
887
 
 
888
#: quickly-ubuntu-application-tutorial.xml:668(title)
 
889
msgid "Introduction to <application>Quickly</application> Part 3"
 
890
msgstr ""
 
891
 
 
892
#: quickly-ubuntu-application-tutorial.xml:669(para)
 
893
msgid "In parts 1 and 2, we showed how to create a simple Ubuntu application using <application>Quickly</application>. This section will cover how to package an application so that it is easy for you to share, and easy for other people to install."
 
894
msgstr ""
 
895
 
 
896
#: quickly-ubuntu-application-tutorial.xml:670(title)
 
897
msgid "License your Application"
 
898
msgstr ""
 
899
 
 
900
#: quickly-ubuntu-application-tutorial.xml:670(para)
 
901
msgid "<placeholder-1/> It's important to license your code so users and other programmers know their rights in terms of redistributing or modifying it. To <application>Quickly</application> grant a GPL license to your code, simply:"
 
902
msgstr ""
 
903
 
 
904
#: quickly-ubuntu-application-tutorial.xml:674(para)
 
905
msgid "Specify your name and email address in the Copyright file."
 
906
msgstr ""
 
907
 
 
908
#: quickly-ubuntu-application-tutorial.xml:677(para)
 
909
msgid "Run the \"license\" command."
 
910
msgstr ""
 
911
 
 
912
#: quickly-ubuntu-application-tutorial.xml:681(title)
 
913
msgid "Specify your name and email"
 
914
msgstr ""
 
915
 
 
916
#: quickly-ubuntu-application-tutorial.xml:681(para)
 
917
msgid "<placeholder-1/> When <application>Quickly</application> created your ubuntu application, it added a file named Copyright in the top level of the directory. Open this file in your text editor, and modify the top line so it has your name and email included. Be sure not to modify other lines as it will interfere with the next step. For example, I would change the entire file to look like this:"
 
918
msgstr ""
 
919
 
 
920
#: quickly-ubuntu-application-tutorial.xml:684(code)
 
921
msgid "# Copyright (C) 2009 Rick Spencer rick.spencer@canonical.com ### BEGIN AUTOMATIC LICENSE GENERATION ### END AUTOMATIC LICENSE GENERATION"
 
922
msgstr ""
 
923
 
 
924
#: quickly-ubuntu-application-tutorial.xml:688(title)
 
925
msgid "Run the \"License\" Command"
 
926
msgstr ""
 
927
 
 
928
#: quickly-ubuntu-application-tutorial.xml:688(para)
 
929
msgid "<placeholder-1/> By default, <application>Quickly</application> will use a GPL 3 license for your project. To use this license, use this command:"
 
930
msgstr ""
 
931
 
 
932
#: quickly-ubuntu-application-tutorial.xml:690(code) quickly-ubuntu-application-tutorial.xml:712(code)
 
933
msgid "<placeholder-1/> license"
 
934
msgstr ""
 
935
 
 
936
#: quickly-ubuntu-application-tutorial.xml:693(para)
 
937
msgid "This will add the GPL 3 license to all of your code files that you've added to your project using <application>Quickly</application>."
 
938
msgstr ""
 
939
 
 
940
#: quickly-ubuntu-application-tutorial.xml:694(para)
 
941
msgid "Keep in mind a couple of things:"
 
942
msgstr ""
 
943
 
 
944
#: quickly-ubuntu-application-tutorial.xml:697(para)
 
945
msgid "This is a one way trip. Once you license the project, changes to the license must be done manually."
 
946
msgstr ""
 
947
 
 
948
#: quickly-ubuntu-application-tutorial.xml:700(para)
 
949
msgid "If you prefer a GPL 2 license, you can specify that when you issue the license command:"
 
950
msgstr ""
 
951
 
 
952
#: quickly-ubuntu-application-tutorial.xml:701(code)
 
953
msgid "<placeholder-1/> license GPL-2"
 
954
msgstr ""
 
955
 
 
956
#: quickly-ubuntu-application-tutorial.xml:706(para)
 
957
msgid "<application>Quickly</application> doesn't care what license you use, but only knows natively what files and headers to include for BSD, GPL-2, GPL-3, LGPL-2 and LGPL-3. If you prefer another license, you can simply add whatever you license you like by adding your own license in the Copyright file:"
 
958
msgstr ""
 
959
 
 
960
#: quickly-ubuntu-application-tutorial.xml:708(code)
 
961
msgid "### BEGIN AUTOMATIC LICENSE GENERATION # My personal license here ### END AUTOMATIC LICENSE GENERATION"
 
962
msgstr ""
 
963
 
 
964
#: quickly-ubuntu-application-tutorial.xml:711(para)
 
965
msgid "and then run:"
 
966
msgstr ""
 
967
 
 
968
#: quickly-ubuntu-application-tutorial.xml:715(para)
 
969
msgid "to license every files."
 
970
msgstr ""
 
971
 
 
972
#: quickly-ubuntu-application-tutorial.xml:718(para)
 
973
msgid "If you've added code files or other files to your project manually, you will need to add the license to those files manually or add those tags at the beginning of the file:"
 
974
msgstr ""
 
975
 
 
976
#: quickly-ubuntu-application-tutorial.xml:720(code)
 
977
msgid "### BEGIN LICENSE ### END LICENSE"
 
978
msgstr ""
 
979
 
 
980
#: quickly-ubuntu-application-tutorial.xml:725(title)
 
981
msgid "Translate Your Application"
 
982
msgstr ""
 
983
 
 
984
#: quickly-ubuntu-application-tutorial.xml:725(para)
 
985
msgid "<placeholder-1/> To allow for users from other countries to use your application you may want to translate it. Glade automatically creates a pot file for you but to translate strings in your code you have to:"
 
986
msgstr ""
 
987
 
 
988
#: quickly-ubuntu-application-tutorial.xml:727(code)
 
989
msgid "import gettext"
 
990
msgstr ""
 
991
 
 
992
#: quickly-ubuntu-application-tutorial.xml:728(code)
 
993
msgid "gettext.gettext(\"What you want translated\")"
 
994
msgstr ""
 
995
 
 
996
#: quickly-ubuntu-application-tutorial.xml:730(title)
 
997
msgid "Specify Application Settings"
 
998
msgstr ""
 
999
 
 
1000
#: quickly-ubuntu-application-tutorial.xml:730(para)
 
1001
msgid "<placeholder-1/> You should personalize your application a little before creating the archive. This is very easy to do, as all of the files that you need have already been created, and only need a few lines changed to make them your own. To do this you should:"
 
1002
msgstr ""
 
1003
 
 
1004
#: quickly-ubuntu-application-tutorial.xml:734(para)
 
1005
msgid "Personalize the Application Icon"
 
1006
msgstr ""
 
1007
 
 
1008
#: quickly-ubuntu-application-tutorial.xml:735(para) quickly-ubuntu-application-tutorial.xml:749(title)
 
1009
msgid "Edit the Desktop File"
 
1010
msgstr ""
 
1011
 
 
1012
#: quickly-ubuntu-application-tutorial.xml:736(para)
 
1013
msgid "Edit the setup.py File"
 
1014
msgstr ""
 
1015
 
 
1016
#: quickly-ubuntu-application-tutorial.xml:739(title)
 
1017
msgid "Personalize your Application Icon"
 
1018
msgstr ""
 
1019
 
 
1020
#: quickly-ubuntu-application-tutorial.xml:739(para)
 
1021
msgid "<placeholder-1/> When users install your application, Ubuntu will display an icon next to it in the menus. You can create your own icon or edit the file called \"icon.png\" in the media directory (jotty/data/media). Ubuntu comes with a great image editing program called \"Gimp.\" So you can go:"
 
1022
msgstr ""
 
1023
 
 
1024
#: quickly-ubuntu-application-tutorial.xml:741(code)
 
1025
msgid "gimp data/media/icon.png"
 
1026
msgstr ""
 
1027
 
 
1028
#: quickly-ubuntu-application-tutorial.xml:747(para)
 
1029
msgid "If you don't personalize the icon, it's ok, your app will just have the default icon, such as in the image below."
 
1030
msgstr ""
 
1031
 
 
1032
#: quickly-ubuntu-application-tutorial.xml:749(para)
 
1033
msgid "<placeholder-1/> By default, <application>Quickly</application> Ubuntu applications are classified as \"utilities\", so they show up under the Accessories menu in Ubuntu. If we wanted to make Jotty show up in another category, we can do this by editing the desktop file. A desktop file is a file that describes your application to a Linux desktop. The file \"jottydesktop.in\" was automatically created in the jotty project directory. To change Jotty from a Utility to an Office application, edit jotty.desktop.in and change this:"
 
1034
msgstr ""
 
1035
 
 
1036
#: quickly-ubuntu-application-tutorial.xml:753(code)
 
1037
msgid "[Desktop Entry] Name=Jotty Comment=Jotty application Categories=GNOME;Utility; Exec=jotty Icon=jotty Terminal=false Type=Application"
 
1038
msgstr ""
 
1039
 
 
1040
#: quickly-ubuntu-application-tutorial.xml:763(para)
 
1041
msgid "to this:"
 
1042
msgstr ""
 
1043
 
 
1044
#: quickly-ubuntu-application-tutorial.xml:767(code)
 
1045
msgid "[Desktop Entry] Name=Jotty Comment=Jotty application Categories=GNOME;Office; Exec=jotty Icon=jotty Terminal=false Type=Application"
 
1046
msgstr ""
 
1047
 
 
1048
#: quickly-ubuntu-application-tutorial.xml:775(para)
 
1049
msgid "There are lots more categories that you can use, all defined by the FreeDesktop spec. You can see the complete list in the <ulink url=\"http://standards.freedesktop.org/menu-spec/latest/apa.html\">menu spec</ulink>."
 
1050
msgstr ""
 
1051
 
 
1052
#: quickly-ubuntu-application-tutorial.xml:779(title)
 
1053
msgid "Edit Setup.py"
 
1054
msgstr ""
 
1055
 
 
1056
#: quickly-ubuntu-application-tutorial.xml:778(para)
 
1057
msgid "<placeholder-1/> Finally, you should include some information in the setup.py file to tell your users a little about yourself. The setup.py file was created for you, just like the desktop file. Most of of the setup.py file shouldn't be modified, as it is just boiler plate that makes your application work properly after it has been installed. However, there is a section at the bottom of the setup.py file that you should edit to describe yourself and the application."
 
1058
msgstr ""
 
1059
 
 
1060
#: quickly-ubuntu-application-tutorial.xml:782(para)
 
1061
msgid "So I would change this section:"
 
1062
msgstr ""
 
1063
 
 
1064
#: quickly-ubuntu-application-tutorial.xml:786(code)
 
1065
msgid "DistUtilsExtra.auto.setup( name='jotty', version='0.1', license='GPL v3', #author='Your Name', #author_email='email@ubuntu.com', #description='UI for managing …', #long_description='Here a longer description', #url='https://launchpad.net/jotty', cmdclass={'install': InstallAndUpdateDataDirectory} )"
 
1066
msgstr ""
 
1067
 
 
1068
#: quickly-ubuntu-application-tutorial.xml:798(para)
 
1069
msgid "To look like this:"
 
1070
msgstr ""
 
1071
 
 
1072
#: quickly-ubuntu-application-tutorial.xml:802(code)
 
1073
msgid "DistUtilsExtra.auto.setup( name='jotty', version='0.1', license='GPL v3', author='Rick Spencer', author_email='rick.spencer@canonical.com', description='Note taking application', long_description='Note taking application that uses CouchDB as the backend to support easy replication across users and computers.', #url='https://launchpad.net/jotty', cmdclass={'install': InstallAndUpdateDataDirectory} )"
 
1074
msgstr ""
 
1075
 
 
1076
#: quickly-ubuntu-application-tutorial.xml:813(para)
 
1077
msgid "Note that the license has already been set up for you. author and author_email are updated each time you connect to Launchpad (with <application>Quickly</application> release or <application>Quickly</application> share) with your Launchpad real name and preferred email adress."
 
1078
msgstr ""
 
1079
 
 
1080
#: quickly-ubuntu-application-tutorial.xml:814(para)
 
1081
msgid "Notice that Jotty doesn't have a web page yet, so I just left that line commented out. Also, you don't have to increment version number as <application>Quickly</application> share and <application>Quickly</application> release commands will make it for you.."
 
1082
msgstr ""
 
1083
 
 
1084
#: quickly-ubuntu-application-tutorial.xml:818(title)
 
1085
msgid "Create and Test the Debian Archive"
 
1086
msgstr ""
 
1087
 
 
1088
#: quickly-ubuntu-application-tutorial.xml:818(para)
 
1089
msgid "<placeholder-1/> After personalizing the project, we are now ready to create the package. This is easily done by issuing the package command:"
 
1090
msgstr ""
 
1091
 
 
1092
#: quickly-ubuntu-application-tutorial.xml:821(code) quickly-ubuntu-application-tutorial.xml:1023(code)
 
1093
msgid "<placeholder-1/> package"
 
1094
msgstr ""
 
1095
 
 
1096
#: quickly-ubuntu-application-tutorial.xml:824(para)
 
1097
msgid "This command will take a little while to discover dependencies and create all the required archives, etc... It will also report some errors as we haven't created a PGP key, for instance. None the less, when it is done, the package will be created. Using the file browser, you can see the created package next to the project directory:"
 
1098
msgstr ""
 
1099
 
 
1100
#: quickly-ubuntu-application-tutorial.xml:828(para)
 
1101
msgid "Right now, the specific file we are interested in is \"jotty_0.1_all.deb\". To test it out, double click on it, to open it in Ubuntu's graphical installer program:"
 
1102
msgstr ""
 
1103
 
 
1104
#: quickly-ubuntu-application-tutorial.xml:832(para)
 
1105
msgid "Click \"Install Package\" to see how it installs onto your desktop. After chugging for a bit, you'll see that it is installed in the Applications-&gt;Office menu. If you customized your icon, you'll see that the menu uses your custom icon as well."
 
1106
msgstr ""
 
1107
 
 
1108
#: quickly-ubuntu-application-tutorial.xml:836(title)
 
1109
msgid "Now that you have a package"
 
1110
msgstr ""
 
1111
 
 
1112
#: quickly-ubuntu-application-tutorial.xml:836(para)
 
1113
msgid "<placeholder-1/> Now that you've packaged your application, you can share the .deb file. However, if your users install their application this way, and you update the application, your users will have to find this out and resinstall. This hassle can be avoided in Ubuntu by using Personal Package Archives (or PPAs). Distrubuting your applications in this manner is covered in section 4 (not yet available)."
 
1114
msgstr ""
 
1115
 
 
1116
#: quickly-ubuntu-application-tutorial.xml:840(title)
 
1117
msgid "<application>Quickly</application>: <application>Quickly</application> Command Reference"
 
1118
msgstr ""
 
1119
 
 
1120
#: quickly-ubuntu-application-tutorial.xml:841(para)
 
1121
msgid "The ubuntu-application template template contains the following commands."
 
1122
msgstr ""
 
1123
 
 
1124
#: quickly-ubuntu-application-tutorial.xml:844(xref) quickly-ubuntu-application-tutorial.xml:877(title) quickly-ubuntu-application-tutorial.xml:878(title)
 
1125
msgid "create"
 
1126
msgstr ""
 
1127
 
 
1128
#: quickly-ubuntu-application-tutorial.xml:847(xref) quickly-ubuntu-application-tutorial.xml:904(title) quickly-ubuntu-application-tutorial.xml:905(title)
 
1129
msgid "dialog"
 
1130
msgstr ""
 
1131
 
 
1132
#: quickly-ubuntu-application-tutorial.xml:850(xref) quickly-ubuntu-application-tutorial.xml:949(title) quickly-ubuntu-application-tutorial.xml:950(title)
 
1133
msgid "edit"
 
1134
msgstr ""
 
1135
 
 
1136
#: quickly-ubuntu-application-tutorial.xml:853(xref)
 
1137
msgid "design"
 
1138
msgstr ""
 
1139
 
 
1140
#: quickly-ubuntu-application-tutorial.xml:856(xref) quickly-ubuntu-application-tutorial.xml:973(title) quickly-ubuntu-application-tutorial.xml:974(title)
 
1141
msgid "help"
 
1142
msgstr ""
 
1143
 
 
1144
#: quickly-ubuntu-application-tutorial.xml:859(xref) quickly-ubuntu-application-tutorial.xml:982(title) quickly-ubuntu-application-tutorial.xml:983(title)
 
1145
msgid "license"
 
1146
msgstr ""
 
1147
 
 
1148
#: quickly-ubuntu-application-tutorial.xml:862(xref) quickly-ubuntu-application-tutorial.xml:1021(title) quickly-ubuntu-application-tutorial.xml:1022(title)
 
1149
msgid "package"
 
1150
msgstr ""
 
1151
 
 
1152
#: quickly-ubuntu-application-tutorial.xml:865(xref) quickly-ubuntu-application-tutorial.xml:1038(title) quickly-ubuntu-application-tutorial.xml:1039(title)
 
1153
msgid "release"
 
1154
msgstr ""
 
1155
 
 
1156
#: quickly-ubuntu-application-tutorial.xml:868(xref) quickly-ubuntu-application-tutorial.xml:1073(title) quickly-ubuntu-application-tutorial.xml:1074(title)
 
1157
msgid "run"
 
1158
msgstr ""
 
1159
 
 
1160
#: quickly-ubuntu-application-tutorial.xml:871(xref) quickly-ubuntu-application-tutorial.xml:1083(title) quickly-ubuntu-application-tutorial.xml:1084(title)
 
1161
msgid "save"
 
1162
msgstr ""
 
1163
 
 
1164
#: quickly-ubuntu-application-tutorial.xml:874(xref) quickly-ubuntu-application-tutorial.xml:1098(title) quickly-ubuntu-application-tutorial.xml:1100(title)
 
1165
msgid "share"
 
1166
msgstr ""
 
1167
 
 
1168
#: quickly-ubuntu-application-tutorial.xml:878(para) quickly-ubuntu-application-tutorial.xml:905(para) quickly-ubuntu-application-tutorial.xml:950(para) quickly-ubuntu-application-tutorial.xml:961(para) quickly-ubuntu-application-tutorial.xml:974(para) quickly-ubuntu-application-tutorial.xml:983(para) quickly-ubuntu-application-tutorial.xml:1022(para) quickly-ubuntu-application-tutorial.xml:1039(para) quickly-ubuntu-application-tutorial.xml:1074(para) quickly-ubuntu-application-tutorial.xml:1084(para) quickly-ubuntu-application-tutorial.xml:1099(para)
 
1169
msgid "<placeholder-1/> Usage:"
 
1170
msgstr ""
 
1171
 
 
1172
#: quickly-ubuntu-application-tutorial.xml:880(code)
 
1173
msgid "<placeholder-1/> create ubuntu-application path/to/project_name"
 
1174
msgstr ""
 
1175
 
 
1176
#: quickly-ubuntu-application-tutorial.xml:882(para)
 
1177
msgid "where \"project_name\" is one or more words separated by an underscore and path/to can be any existing path."
 
1178
msgstr ""
 
1179
 
 
1180
#: quickly-ubuntu-application-tutorial.xml:885(para)
 
1181
msgid "This will create and run a new project, including Python code, Glade files, and packaging files to make the project work. After creating the project, get started by:"
 
1182
msgstr ""
 
1183
 
 
1184
#: quickly-ubuntu-application-tutorial.xml:891(para)
 
1185
msgid "Changing your working directory to the new project:"
 
1186
msgstr ""
 
1187
 
 
1188
#: quickly-ubuntu-application-tutorial.xml:893(code)
 
1189
msgid "cd path/to/project_name"
 
1190
msgstr ""
 
1191
 
 
1192
#: quickly-ubuntu-application-tutorial.xml:895(para)
 
1193
msgid "Edit the UI with Glade:"
 
1194
msgstr ""
 
1195
 
 
1196
#: quickly-ubuntu-application-tutorial.xml:898(para)
 
1197
msgid "Edit the Python code:"
 
1198
msgstr ""
 
1199
 
 
1200
#: quickly-ubuntu-application-tutorial.xml:907(code)
 
1201
msgid "<placeholder-1/> dialog dialog_name"
 
1202
msgstr ""
 
1203
 
 
1204
#: quickly-ubuntu-application-tutorial.xml:908(para)
 
1205
msgid "where dialog_name is one or more words seperated with underscore"
 
1206
msgstr ""
 
1207
 
 
1208
#: quickly-ubuntu-application-tutorial.xml:909(para)
 
1209
msgid "This will create:"
 
1210
msgstr ""
 
1211
 
 
1212
#: quickly-ubuntu-application-tutorial.xml:913(para)
 
1213
msgid "A subclass of gtk.Dialog called DialogNameDialog in the module DialogNameDialog.py"
 
1214
msgstr ""
 
1215
 
 
1216
#: quickly-ubuntu-application-tutorial.xml:916(para)
 
1217
msgid "A glade file called DialogNameDialog.ui in the ui directory"
 
1218
msgstr ""
 
1219
 
 
1220
#: quickly-ubuntu-application-tutorial.xml:919(para)
 
1221
msgid "A catalog file called dialog_name_dialog.xml also in the ui directory"
 
1222
msgstr ""
 
1223
 
 
1224
#: quickly-ubuntu-application-tutorial.xml:922(para)
 
1225
msgid "To edit the UI for the dialog, run:"
 
1226
msgstr ""
 
1227
 
 
1228
#: quickly-ubuntu-application-tutorial.xml:926(para)
 
1229
msgid "To edit the behavior, run:"
 
1230
msgstr ""
 
1231
 
 
1232
#: quickly-ubuntu-application-tutorial.xml:929(para)
 
1233
msgid "To use the dialog you have to invoke it from another python file:"
 
1234
msgstr ""
 
1235
 
 
1236
#: quickly-ubuntu-application-tutorial.xml:933(code)
 
1237
msgid "Import the dialog import DialogNameDialog"
 
1238
msgstr ""
 
1239
 
 
1240
#: quickly-ubuntu-application-tutorial.xml:937(code)
 
1241
msgid "Create an instance of the dialog dialog = DialogNameDialog.NewDialogNameDialog()"
 
1242
msgstr ""
 
1243
 
 
1244
#: quickly-ubuntu-application-tutorial.xml:941(code)
 
1245
msgid "Run the dialog and hide the dialog result = dialog.run() dialog.hide()"
 
1246
msgstr ""
 
1247
 
 
1248
#: quickly-ubuntu-application-tutorial.xml:954(para)
 
1249
msgid "A convenience command to open all of your python files in your project directory in your default editor, ready for editing."
 
1250
msgstr ""
 
1251
 
 
1252
#: quickly-ubuntu-application-tutorial.xml:960(title) quickly-ubuntu-application-tutorial.xml:961(title)
 
1253
msgid "glade"
 
1254
msgstr ""
 
1255
 
 
1256
#: quickly-ubuntu-application-tutorial.xml:964(para)
 
1257
msgid "Opens Glade UI editor so that you can edit the UI for dialogs and windows in your project. Note that you *must* open Glade in this manner for <application>Quickly</application> to work. If you try to open Glade directly, and the open the UI files, Glade will throw errors and won't open the files."
 
1258
msgstr ""
 
1259
 
 
1260
#: quickly-ubuntu-application-tutorial.xml:975(code)
 
1261
msgid "<placeholder-1/> help"
 
1262
msgstr ""
 
1263
 
 
1264
#: quickly-ubuntu-application-tutorial.xml:977(para)
 
1265
msgid "Opens a web browser with the help index."
 
1266
msgstr ""
 
1267
 
 
1268
#: quickly-ubuntu-application-tutorial.xml:984(code)
 
1269
msgid "<placeholder-1/> license &lt;Your_Licence="
 
1270
msgstr ""
 
1271
 
 
1272
#: quickly-ubuntu-application-tutorial.xml:986(para)
 
1273
msgid "Adds license to project files. Before using this command, you should:"
 
1274
msgstr ""
 
1275
 
 
1276
#: quickly-ubuntu-application-tutorial.xml:990(para)
 
1277
msgid "run <application>Quickly</application> save in case something goes wrong"
 
1278
msgstr ""
 
1279
 
 
1280
#: quickly-ubuntu-application-tutorial.xml:993(para)
 
1281
msgid "Edit the file Copyright to include your authorship."
 
1282
msgstr ""
 
1283
 
 
1284
#: quickly-ubuntu-application-tutorial.xml:995(para)
 
1285
msgid "If you want to put your own <application>Quickly</application> unsupported Licence, remove and replace the tags ### BEGIN AUTOMATIC LICENCE GENERATION and ### END AUTOMATIC LICENCE GENERATION in it by your own licence."
 
1286
msgstr ""
 
1287
 
 
1288
#: quickly-ubuntu-application-tutorial.xml:999(para)
 
1289
msgid "Executes either <code><application>Quickly</application> license</code> or <code><application>Quickly</application> licence &lt;License=</code> where &lt;License= can be either: - GPL-3 (default) - GPL-2"
 
1290
msgstr ""
 
1291
 
 
1292
#: quickly-ubuntu-application-tutorial.xml:1006(para)
 
1293
msgid "This will modify the Copyright file with the chosen licence (with GPL-3 by default). Updating previous chosen Licence if needed. If you previously removed the tags to add your own licence, it will leave it pristine. If no name is attributed to the Copyright, it will try to retrieve it from Launchpad (in <application>Quickly</application> release or <application>Quickly</application> share command only)"
 
1294
msgstr ""
 
1295
 
 
1296
#: quickly-ubuntu-application-tutorial.xml:1012(para)
 
1297
msgid "Finally, this will copy the Copyright at the head of every files."
 
1298
msgstr ""
 
1299
 
 
1300
#: quickly-ubuntu-application-tutorial.xml:1014(para)
 
1301
msgid "Note that if you don't run <application>Quickly</application> licence before calling <application>Quickly</application> release or <application>Quickly</application> share, this one will execute it for you and guess the copyright holder from your launchpad account if you didn't update it."
 
1302
msgstr ""
 
1303
 
 
1304
#: quickly-ubuntu-application-tutorial.xml:1025(para)
 
1305
msgid "Creates a debian file (deb) from your project. Before running the package command you can edit the Icon and Category entry of *.desktop.in file, where * is the name of your project."
 
1306
msgstr ""
 
1307
 
 
1308
#: quickly-ubuntu-application-tutorial.xml:1029(para)
 
1309
msgid "Note that if you didn't run <application>Quickly</application> release, <application>Quickly</application> share or <application>Quickly</application> change-lp-project you may miss the name, email in setup.py. You can edit them if you don't want to use any of these commands afterwards. Those changes are not a mandatory at all for testing purpose."
 
1310
msgstr ""
 
1311
 
 
1312
#: quickly-ubuntu-application-tutorial.xml:1040(code)
 
1313
msgid "<placeholder-1/> release"
 
1314
msgstr ""
 
1315
 
 
1316
#: quickly-ubuntu-application-tutorial.xml:1042(para)
 
1317
msgid "Posts a release of your project to a PPA on launchpad so that users can install the application on their system."
 
1318
msgstr ""
 
1319
 
 
1320
#: quickly-ubuntu-application-tutorial.xml:1045(para)
 
1321
msgid "You can also execute: <code><application>Quickly</application> release &lt;release_number=</code> of you don't want to use current release_number. The release_number must be a number."
 
1322
msgstr ""
 
1323
 
 
1324
#: quickly-ubuntu-application-tutorial.xml:1049(para)
 
1325
msgid "<code><application>Quickly</application> release &lt;release_number=</code> notes about changes where \"notes about changes\" is optional text describing what changes were made since the last save"
 
1326
msgstr ""
 
1327
 
 
1328
#: quickly-ubuntu-application-tutorial.xml:1053(para)
 
1329
msgid "Before running <application>Quickly</application> release, you should: create your account and a project page on http://launchpad.net. You also have to add a PPA to your launchpad account."
 
1330
msgstr ""
 
1331
 
 
1332
#: quickly-ubuntu-application-tutorial.xml:1057(para)
 
1333
msgid "Name, email and version setup.py will be automatically changed. (version will be &lt;current_release= and bzr will commit and tagged. Once the release is done, &lt;current_release= will be incremented by 0.1 to be ready for next release."
 
1334
msgstr ""
 
1335
 
 
1336
#: quickly-ubuntu-application-tutorial.xml:1062(para)
 
1337
msgid "If you previously used <application>Quickly</application> shared &lt;current_release=~publicX will be dropped to release &lt;current_release= version (&lt;current_release=~publicX &lt;current_release=) You can modify the description and long description if you wish."
 
1338
msgstr ""
 
1339
 
 
1340
#: quickly-ubuntu-application-tutorial.xml:1067(para)
 
1341
msgid "You can run <code><application>Quickly</application> package</code> and test your package to make sure it installs as expected. (This is not mandatory)"
 
1342
msgstr ""
 
1343
 
 
1344
#: quickly-ubuntu-application-tutorial.xml:1077(para)
 
1345
msgid "Runs your application. This is the best way to try test it out while you are developing it. It starts up the main project window."
 
1346
msgstr ""
 
1347
 
 
1348
#: quickly-ubuntu-application-tutorial.xml:1085(code)
 
1349
msgid "<placeholder-1/> save notes about changes"
 
1350
msgstr ""
 
1351
 
 
1352
#: quickly-ubuntu-application-tutorial.xml:1087(para)
 
1353
msgid "where \"notes about changes\" is optional text describing what changes were made since the last save."
 
1354
msgstr ""
 
1355
 
 
1356
#: quickly-ubuntu-application-tutorial.xml:1090(para)
 
1357
msgid "This command commits all changes since the last save to bzr. Note that it does not push changes to any back up location. If you need revert or otherwise use the revision control, use bzr directly: <code>bzr help</code>"
 
1358
msgstr ""
 
1359
 
 
1360
#: quickly-ubuntu-application-tutorial.xml:1101(code)
 
1361
msgid "<placeholder-1/> share"
 
1362
msgstr ""
 
1363
 
 
1364
#: quickly-ubuntu-application-tutorial.xml:1103(para)
 
1365
msgid "Updates your PPA with the the latest saved project changes."
 
1366
msgstr ""
 
1367
 
 
1368
#: quickly-ubuntu-application-tutorial.xml:1105(para)
 
1369
msgid "Before running <application>Quickly</application> release, you should: create your account on http://launchpad.net. You also have to add a PPA to your launchpad account."
 
1370
msgstr ""
 
1371
 
 
1372
#: quickly-ubuntu-application-tutorial.xml:1109(para)
 
1373
msgid "Name, email and version setup.py will be automatically changed. (version will be &lt;current_release~publicX= where X will be incremented at each <application>Quickly</application> share execution) You can modify the description and long description if you wish."
 
1374
msgstr ""
 
1375
 
 
1376
#: quickly-ubuntu-application-tutorial.xml:1119(title)
 
1377
msgid "Links"
 
1378
msgstr ""
 
1379
 
 
1380
#: quickly-ubuntu-application-tutorial.xml:1121(link)
 
1381
msgid "<placeholder-1/>: <placeholder-2/> Command Reference"
 
1382
msgstr ""
 
1383
 
 
1384
#: quickly-ubuntu-application-tutorial.xml:1124(ulink)
 
1385
msgid "Blog post on <placeholder-1/>"
 
1386
msgstr ""
 
1387
 
 
1388
#: quickly-ubuntu-application-tutorial.xml:1127(ulink)
 
1389
msgid "Language: Python Language Reference"
 
1390
msgstr ""
 
1391
 
 
1392
#: quickly-ubuntu-application-tutorial.xml:1130(ulink)
 
1393
msgid "Core Library: Python 2.6 Library Reference"
 
1394
msgstr ""
 
1395
 
 
1396
#: quickly-ubuntu-application-tutorial.xml:1133(ulink)
 
1397
msgid "UI Library: PyGtk"
 
1398
msgstr ""
 
1399
 
 
1400
#: quickly-ubuntu-application-tutorial.xml:1136(ulink)
 
1401
msgid "Database: CouchDB Reference"
 
1402
msgstr ""
 
1403
 
 
1404
#: quickly-ubuntu-application-tutorial.xml:1139(ulink)
 
1405
msgid "UI Editing: Glade User Documenation"
 
1406
msgstr ""
 
1407
 
 
1408
#: quickly-ubuntu-application-tutorial.xml:1142(ulink)
 
1409
msgid "Editor: Gedit Help"
 
1410
msgstr ""
 
1411
 
 
1412
#: quickly-ubuntu-application-tutorial.xml:1145(ulink)
 
1413
msgid "Version Control: Bazaar"
 
1414
msgstr ""
 
1415
 
 
1416
#. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2
 
1417
#: quickly-ubuntu-application-tutorial.xml:0(None)
 
1418
msgid "translator-credits"
 
1419
msgstr ""
 
1420