[gnome-devel-docs] Updated Czech translation
- From: Marek Černocký <mcernocky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-devel-docs] Updated Czech translation
- Date: Fri, 2 Mar 2018 11:28:55 +0000 (UTC)
commit 284bac7df6a4d61b77badf8baca485fb1710f31b
Author: Marek Cernocky <marek_cernocky conel cz>
Date: Fri Mar 2 12:28:34 2018 +0100
Updated Czech translation
platform-demos/cs/cs.po | 4649 +++++++++++++++++++++-----------------------
platform-overview/cs/cs.po | 159 +-
2 files changed, 2287 insertions(+), 2521 deletions(-)
---
diff --git a/platform-demos/cs/cs.po b/platform-demos/cs/cs.po
index 79b060c..28dbf03 100644
--- a/platform-demos/cs/cs.po
+++ b/platform-demos/cs/cs.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gnome-devel-docs\n"
-"POT-Creation-Date: 2017-08-05 14:26+0000\n"
+"POT-Creation-Date: 2017-12-04 19:32+0000\n"
"PO-Revision-Date: 2017-08-06 10:15+0200\n"
"Last-Translator: Marek Černocký <marek manet cz>\n"
"Language-Team: Czech <gnome-cs-list gnome org>\n"
@@ -196,36 +196,33 @@ msgstr ""
"základní kód, který aplikace vyžaduje a tak se s ním setkáte často."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:43 C/comboboxtext.js.page:31
-#: C/textview.js.page:39
+#: C/02_welcome_to_the_grid.js.page:43
#, no-wrap
msgid ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
msgstr ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
#. (itstool) path: section/p
#: C/02_welcome_to_the_grid.js.page:49
msgid ""
"This part always goes at the start of your code. Depending on what you'll be "
"doing with it, you may want to declare more imports here. What we're writing "
-"today is pretty basic, so these are all we need; Gtk for the widgets, and "
-"Lang so we can use Lang.bind to connect our application's activate and "
-"startup signals to the requisite functions."
+"today is pretty basic, so these are all we need; Gtk for the widgets, using "
+"the stable '3.0' API."
msgstr ""
"Tato část je vždy na začátku kódu. V závislosti na tom, co přesně hodláte "
"dělat, zde můžete deklarovat i další importy. To, co píšeme teď, je docela "
-"jednoduché, takže nám to bude stačit takto. Gtk pro widgety a Lang, abychom "
-"mohli použít <code>Lang.bind</code> k napojení signálů <code>\"activate\"</"
-"code> a <code>\"startup\"</code> naší aplikace k požadovaným funkcím."
+"jednoduché, takže nám to bude stačit takto. Gtk pro widgety používající "
+"stabilní API 3.0."
#. (itstool) path: section/p
#: C/02_welcome_to_the_grid.js.page:50
@@ -237,53 +234,49 @@ msgstr "Když už o tom mluvíme:"
#, no-wrap
msgid ""
"\n"
-"const WelcomeToTheGrid = new Lang.Class({\n"
-" Name: 'Welcome to the Grid',\n"
-"\n"
+"class WelcomeToTheGrid {\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
-"const WelcomeToTheGrid = new Lang.Class({\n"
-" Name: 'Welcome to the Grid',\n"
-"\n"
+"class WelcomeToTheGrid {\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
" },\n"
"\n"
-" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
-" this._window.present();\n"
+" // Funkce zpětného volání pro signál \"activate\" zobrazující okno při aktivaci\n"
+" _onActivate: function () {\n"
+" this._window.present ();\n"
" },\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
+" _onStartup: function () {\n"
" this._buildUI ();\n"
" },\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:74
+#: C/02_welcome_to_the_grid.js.page:72
msgid ""
"This is the start of the application itself, and the _init function which "
"creates it. It tells _buildUI to create an ApplicationWindow, which we're "
@@ -296,7 +289,7 @@ msgstr ""
"říká, aby se zobrazilo, kdykoliv je potřeba."
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:75
+#: C/02_welcome_to_the_grid.js.page:73
msgid ""
"This part, again, is pretty much copy-and-paste, but you always want to give "
"your application a unique name."
@@ -305,12 +298,12 @@ msgstr ""
"je potřeba dát aplikaci vždy jedinečný název."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:77
+#: C/02_welcome_to_the_grid.js.page:75
#, no-wrap
msgid ""
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -321,7 +314,7 @@ msgid ""
msgstr ""
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -331,7 +324,7 @@ msgstr ""
" title: \"Welcome to the Grid\"});\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:88
+#: C/02_welcome_to_the_grid.js.page:86
msgid ""
"Finally, we start off the _buildUI function by creating a new "
"ApplicationWindow. We specify that it goes with this application, that it "
@@ -345,12 +338,12 @@ msgstr ""
"uvnitř. Rovněž ji přidělíme název, který se objeví v záhlaví okna."
#. (itstool) path: section/title
-#: C/02_welcome_to_the_grid.js.page:92
+#: C/02_welcome_to_the_grid.js.page:90
msgid "Reaching into the GTK+ toolbox"
msgstr "Po čem sáhnout do nástrojové sady GTK+"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:93
+#: C/02_welcome_to_the_grid.js.page:91
msgid ""
"What widgets should we use? Well, let's say we want to write an application "
"that looks like this:"
@@ -363,7 +356,7 @@ msgstr ""
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:95
+#: C/02_welcome_to_the_grid.js.page:93
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_01.png' md5='3fdc22d361cf801f71557fdc76ae5b49'"
@@ -371,7 +364,7 @@ msgstr ""
"external ref='media/02_jsgrid_01.png' md5='3fdc22d361cf801f71557fdc76ae5b49'"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:97
+#: C/02_welcome_to_the_grid.js.page:95
msgid ""
"We're going to need, at the very least, a picture and a text label to go "
"with it. Let's start with the picture:"
@@ -379,7 +372,7 @@ msgstr ""
"K tomu budeme potřebovat aspoň obrázek a textový popisek. Začněme obrázkem:"
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:98
+#: C/02_welcome_to_the_grid.js.page:96
#, no-wrap
msgid ""
"\n"
@@ -391,7 +384,7 @@ msgstr ""
" this._image = new Gtk.Image ({ file: \"gnome-image.png\" });\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:103
+#: C/02_welcome_to_the_grid.js.page:101
msgid ""
"You can download the image file used in this example <link href=\"https://"
"live.gnome.org/TarynFox?action=AttachFile&do=get&target=gnome-image."
@@ -404,7 +397,7 @@ msgstr ""
"který píšete."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:105
+#: C/02_welcome_to_the_grid.js.page:103
#, no-wrap
msgid ""
"\n"
@@ -416,7 +409,7 @@ msgstr ""
" this._label = new Gtk.Label ({ label: \"Welcome to GNOME, too!\" });\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:109
+#: C/02_welcome_to_the_grid.js.page:107
msgid ""
"That code adds in the label beneath. You can see how we create widgets, "
"here; each one is a part of Gtk, and we can give it properties that "
@@ -431,7 +424,7 @@ msgstr ""
"<code>label</code> na větu, kterou chceme mít pod obrázkem."
#. (itstool) path: note/p
-#: C/02_welcome_to_the_grid.js.page:110
+#: C/02_welcome_to_the_grid.js.page:108
msgid ""
"Yes, it sounds redundant for a Label to have a label property, but it's not. "
"Other widgets that contain text have a label property, so it's "
@@ -442,7 +435,7 @@ msgstr ""
"code>, takže kvůli <em>jednotnosti</em> je tomu tak i u widgetu Label."
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:111
+#: C/02_welcome_to_the_grid.js.page:109
msgid ""
"We can't just add these widgets to our window in order, though, the same way "
"HTML elements appear in the order you write them. That's because an "
@@ -453,7 +446,7 @@ msgstr ""
"ApplicationWindow může obsahovat jen jeden widget."
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:112
+#: C/02_welcome_to_the_grid.js.page:110
msgid ""
"How do we get around that? By making that one widget a container widget, "
"which can hold more than one widget and organize them inside it. Behold: The "
@@ -463,7 +456,7 @@ msgstr ""
"widget a umí je uspořádat. Pohleďte: mřížka."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:113
+#: C/02_welcome_to_the_grid.js.page:111
#, no-wrap
msgid ""
"\n"
@@ -475,7 +468,7 @@ msgstr ""
" this._grid = new Gtk.Grid ();\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:118
+#: C/02_welcome_to_the_grid.js.page:116
msgid ""
"We're not giving it any properties yet. Those will come later, as we learn "
"how to use the Grid's powers. First, let's attach the Image and Label we "
@@ -486,7 +479,7 @@ msgstr ""
"obrázek a popisek."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:119
+#: C/02_welcome_to_the_grid.js.page:117
#, no-wrap
msgid ""
"\n"
@@ -500,7 +493,7 @@ msgstr ""
" this._grid.attach (this._label, 0, 1, 1, 1);\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:125
+#: C/02_welcome_to_the_grid.js.page:123
msgid ""
"This code looks awfully complicated, but it's not. Here's what those numbers "
"mean:"
@@ -509,7 +502,7 @@ msgstr ""
"jednotlivá čísla znamenají:"
#. (itstool) path: item/p
-#: C/02_welcome_to_the_grid.js.page:127
+#: C/02_welcome_to_the_grid.js.page:125
msgid ""
"The <em>first</em> number is what left-to-right position to put things in, "
"starting from 0. Any widget that uses a 0 here goes all the way to the left."
@@ -518,7 +511,7 @@ msgstr ""
"widget umístit, počínaje od 0. Widget, který použije 0, patří úplně doleva."
#. (itstool) path: item/p
-#: C/02_welcome_to_the_grid.js.page:128
+#: C/02_welcome_to_the_grid.js.page:126
msgid ""
"The <em>second</em> number is what top-to-bottom position to put a given "
"widget in, starting from 0. The Label goes beneath the Image, so we give the "
@@ -529,7 +522,7 @@ msgstr ""
"Image dostane pozici 0 a Label pozici 1."
#. (itstool) path: item/p
-#: C/02_welcome_to_the_grid.js.page:129
+#: C/02_welcome_to_the_grid.js.page:127
msgid ""
"The <em>third</em> and <em>fourth</em> numbers are how many columns and rows "
"a widget should take up. We'll see how these work in a minute."
@@ -538,7 +531,7 @@ msgstr ""
"okupovat. Za minutku uvidíme, jak to funguje."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:132
+#: C/02_welcome_to_the_grid.js.page:130
#, no-wrap
msgid ""
"\n"
@@ -549,7 +542,7 @@ msgid ""
" this._window.show_all();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new WelcomeToTheGrid ();\n"
@@ -563,14 +556,14 @@ msgstr ""
" this._window.show_all();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new WelcomeToTheGrid ();\n"
"app.application.run (ARGV);\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:146
+#: C/02_welcome_to_the_grid.js.page:144
msgid ""
"Now that we've created the Grid and attached all our widgets to it, we add "
"it to the window and tell the window to show itself, as the last part of the "
@@ -583,7 +576,7 @@ msgstr ""
"spuštěním."
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:147
+#: C/02_welcome_to_the_grid.js.page:145
msgid ""
"Save your application as welcome_to_the_grid.js. Then, to run your "
"application just open a terminal, go to the directory where your application "
@@ -594,7 +587,7 @@ msgstr ""
"aplikace, a napíšete:"
#. (itstool) path: section/screen
-#: C/02_welcome_to_the_grid.js.page:148
+#: C/02_welcome_to_the_grid.js.page:146
#, no-wrap
msgid " <output style=\"prompt\">$ </output>gjs welcome_to_the_grid.js "
msgstr " <output style=\"prompt\">$ </output>gjs welcome_to_the_grid.js "
@@ -604,7 +597,7 @@ msgstr " <output style=\"prompt\">$ </output>gjs welcome_to_the_grid.js "
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:150
+#: C/02_welcome_to_the_grid.js.page:148
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_02.png' md5='07db86b0043ba5c3c24a90d7322bd81e'"
@@ -612,7 +605,7 @@ msgstr ""
"external ref='media/02_jsgrid_02.png' md5='07db86b0043ba5c3c24a90d7322bd81e'"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:152
+#: C/02_welcome_to_the_grid.js.page:150
msgid ""
"There we go! But wait. That doesn't look right. Why is the Label crammed up "
"next to the Image like that? That doesn't look as nice, and it makes it "
@@ -623,12 +616,12 @@ msgstr ""
"můžeme udělat?"
#. (itstool) path: section/title
-#: C/02_welcome_to_the_grid.js.page:156
+#: C/02_welcome_to_the_grid.js.page:154
msgid "Tweaking the Grid"
msgstr "Vyladění mřížky"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:158
+#: C/02_welcome_to_the_grid.js.page:156
msgid ""
"One thing we can do, is we can give the Label a margin_top property when we "
"create it. This works sort of like setting a margin for an HTML element "
@@ -639,7 +632,7 @@ msgstr ""
"„margin“ u prvků HTML pomocí stylování CSS."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:159
+#: C/02_welcome_to_the_grid.js.page:157
#, no-wrap
msgid ""
"\n"
@@ -655,7 +648,7 @@ msgstr ""
" margin_top: 20 });\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:166
+#: C/02_welcome_to_the_grid.js.page:164
msgid ""
"Of course, if we do that then if we replace the Label with something else -- "
"or add in another widget -- then we have to repeat the margin_top on it too. "
@@ -670,7 +663,7 @@ msgstr ""
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:167
+#: C/02_welcome_to_the_grid.js.page:165
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_03.png' md5='817351e73c687d47253c56ed06b6629f'"
@@ -678,7 +671,7 @@ msgstr ""
"external ref='media/02_jsgrid_03.png' md5='817351e73c687d47253c56ed06b6629f'"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:169
+#: C/02_welcome_to_the_grid.js.page:167
msgid ""
"We could give the Image a margin_bottom property, but that won't work when "
"the new Label is in a separate column. So how about we try this instead:"
@@ -688,7 +681,7 @@ msgstr ""
"to místo toho zkusit takto:"
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:170
+#: C/02_welcome_to_the_grid.js.page:168
#, no-wrap
msgid ""
"\n"
@@ -702,14 +695,14 @@ msgstr ""
" row_spacing: 20 });\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:176
+#: C/02_welcome_to_the_grid.js.page:174
msgid ""
"That makes it so that there are always 20 pixels of space in between each "
"horizontal row."
msgstr "To zajistí, že vodorovně mezi všemi řádky bude vždy prostor 20 pixelů."
#. (itstool) path: note/p
-#: C/02_welcome_to_the_grid.js.page:177
+#: C/02_welcome_to_the_grid.js.page:175
msgid ""
"Yes, you can also set the column_spacing property on a Grid, or the "
"margin_left and margin_right properties on any widget. Try them out, if you "
@@ -720,12 +713,12 @@ msgstr ""
"libovolného widgetu. Jestli chcete, vyzkoušejte si to!"
#. (itstool) path: section/title
-#: C/02_welcome_to_the_grid.js.page:181
+#: C/02_welcome_to_the_grid.js.page:179
msgid "Adding more widgets"
msgstr "Přidání dalších widgetů"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:183
+#: C/02_welcome_to_the_grid.js.page:181
msgid ""
"If we did want to add a second Label, how would we do it so that it actually "
"looked like it belonged there? One way is to center the Image on top, so "
@@ -739,7 +732,7 @@ msgstr ""
"přijdou vhod:"
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:184
+#: C/02_welcome_to_the_grid.js.page:182
#, no-wrap
msgid ""
"\n"
@@ -763,7 +756,7 @@ msgstr ""
" this._grid.attach (this._labelTwo, 1, 1, 1, 1);\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:195
+#: C/02_welcome_to_the_grid.js.page:193
msgid ""
"After we create the second Label, we attach it to the Grid to the right of "
"the first Label. Remember, the first two numbers count columns and rows from "
@@ -778,7 +771,7 @@ msgstr ""
"aby byl napravo od prvního."
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:196
+#: C/02_welcome_to_the_grid.js.page:194
msgid ""
"Note the number 2 in the attach statement for the Image. That's what does "
"the trick here. That number is how many columns the Image spans, remember? "
@@ -793,7 +786,7 @@ msgstr ""
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:197
+#: C/02_welcome_to_the_grid.js.page:195
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_04.png' md5='eeaead27cee2851877fc3cfe66177f07'"
@@ -801,12 +794,12 @@ msgstr ""
"external ref='media/02_jsgrid_04.png' md5='eeaead27cee2851877fc3cfe66177f07'"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:199
+#: C/02_welcome_to_the_grid.js.page:197
msgid "There are two things you should take note of, here."
msgstr "Jsou zde dvě věci, které byste měli vzít na vědomí."
#. (itstool) path: item/p
-#: C/02_welcome_to_the_grid.js.page:201
+#: C/02_welcome_to_the_grid.js.page:199
msgid ""
"Setting the Image to span two columns doesn't stretch the picture itself "
"horizontally. Instead, it stretches the invisible box taken up by the Image "
@@ -817,7 +810,7 @@ msgstr ""
"oba sloupce a obrázek pak umístí do středu tohoto boxu."
#. (itstool) path: item/p
-#: C/02_welcome_to_the_grid.js.page:202
+#: C/02_welcome_to_the_grid.js.page:200
msgid ""
"Even though we've set the Grid's row_spacing and the ApplicationWindow's "
"border_width properties, we haven't yet set anything that puts a border in "
@@ -832,7 +825,7 @@ msgstr ""
"důvod k tomu, držet popisky oddělené."
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:205
+#: C/02_welcome_to_the_grid.js.page:203
msgid ""
"There are at least three ways we can get around that last one. First, we can "
"set a margin_left or margin_right on one of the Labels:"
@@ -846,7 +839,7 @@ msgstr ""
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:206
+#: C/02_welcome_to_the_grid.js.page:204
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_05.png' md5='a3ad12f432d5977fc1f66302ad5b7498'"
@@ -854,14 +847,14 @@ msgstr ""
"external ref='media/02_jsgrid_05.png' md5='a3ad12f432d5977fc1f66302ad5b7498'"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:208
+#: C/02_welcome_to_the_grid.js.page:206
msgid "Second, we can set the Grid's column_homogeneous property to true."
msgstr ""
"Zadruhé můžeme nastavit vlastnost mřížky <code>column_homogenous</code> na "
"<code>true</code>."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:209
+#: C/02_welcome_to_the_grid.js.page:207
#, no-wrap
msgid ""
"\n"
@@ -877,7 +870,7 @@ msgstr ""
" row_spacing: 20 });\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:216
+#: C/02_welcome_to_the_grid.js.page:214
msgid "That makes it look something like this:"
msgstr "Ve výsledku to bude vypadat nějak takto:"
@@ -886,7 +879,7 @@ msgstr "Ve výsledku to bude vypadat nějak takto:"
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:217
+#: C/02_welcome_to_the_grid.js.page:215
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_06.png' md5='450e48dbf6b8f5ce1c208e4812e1714b'"
@@ -894,7 +887,7 @@ msgstr ""
"external ref='media/02_jsgrid_06.png' md5='450e48dbf6b8f5ce1c208e4812e1714b'"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:219
+#: C/02_welcome_to_the_grid.js.page:217
msgid ""
"And third, we can set the Grid's column_spacing property, the same way we "
"set its row_spacing."
@@ -903,7 +896,7 @@ msgstr ""
"stejným způsobem jako její vlastnost <code>row_spacing</code>."
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:220
+#: C/02_welcome_to_the_grid.js.page:218
#, no-wrap
msgid ""
"\n"
@@ -919,7 +912,7 @@ msgstr ""
" row_spacing: 20 });\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:226
+#: C/02_welcome_to_the_grid.js.page:224
msgid "That makes it look like this:"
msgstr "Ve výsledku to bude vypadat takto:"
@@ -928,7 +921,7 @@ msgstr "Ve výsledku to bude vypadat takto:"
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:227
+#: C/02_welcome_to_the_grid.js.page:225
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_07.png' md5='0b304d70728903fbb2601d55bf00fdb9'"
@@ -936,12 +929,12 @@ msgstr ""
"external ref='media/02_jsgrid_07.png' md5='0b304d70728903fbb2601d55bf00fdb9'"
#. (itstool) path: section/title
-#: C/02_welcome_to_the_grid.js.page:231
+#: C/02_welcome_to_the_grid.js.page:229
msgid "Using stock images"
msgstr "Používání standardních obrázků"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:233
+#: C/02_welcome_to_the_grid.js.page:231
msgid ""
"GNOME has a lot of stock images on hand already, that we can use if we don't "
"feel like creating our own or if we want a universally-recognized icon. "
@@ -953,7 +946,7 @@ msgstr ""
"ten normální:"
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:234
+#: C/02_welcome_to_the_grid.js.page:232
#, no-wrap
msgid ""
"\n"
@@ -971,7 +964,7 @@ msgstr ""
" this._icon = new Gtk.Image ({ stock: 'gtk-about' });\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:241
+#: C/02_welcome_to_the_grid.js.page:239
msgid ""
"After that, we attach it to the Grid to the left of the first Label. (We "
"aren't using the second one for this example.)"
@@ -980,7 +973,7 @@ msgstr ""
"nevyužijeme druhý popisek.)"
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:242
+#: C/02_welcome_to_the_grid.js.page:240
#, no-wrap
msgid ""
"\n"
@@ -996,7 +989,7 @@ msgstr ""
" this._grid.attach (this._label, 1, 1, 1, 1);\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:248
+#: C/02_welcome_to_the_grid.js.page:246
msgid "That gives us this, when we run it:"
msgstr "Po spuštění dostaneme něco takového:"
@@ -1005,7 +998,7 @@ msgstr "Po spuštění dostaneme něco takového:"
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/02_welcome_to_the_grid.js.page:249
+#: C/02_welcome_to_the_grid.js.page:247
msgctxt "_"
msgid ""
"external ref='media/02_jsgrid_08.png' md5='78890beb47bd11360154b8ca4d50d1ff'"
@@ -1013,7 +1006,7 @@ msgstr ""
"external ref='media/02_jsgrid_08.png' md5='78890beb47bd11360154b8ca4d50d1ff'"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:251
+#: C/02_welcome_to_the_grid.js.page:249
msgid ""
"That's what the stock \"About\" icon looks like. You can see a list of all "
"the stock items starting with gtk-about in <link href=\"https://developer."
@@ -1031,7 +1024,7 @@ msgstr ""
"tuto část zkopírovat, když chcete použít ikonu vedle ní."
#. (itstool) path: note/p
-#: C/02_welcome_to_the_grid.js.page:252
+#: C/02_welcome_to_the_grid.js.page:250
msgid ""
"We put single quotes around 'gtk-about' here because, unlike text strings "
"that have double quotes around them, that part will never need to be "
@@ -1047,19 +1040,19 @@ msgstr ""
"rozhraní."
#. (itstool) path: section/title
-#: C/02_welcome_to_the_grid.js.page:257 C/03_getting_the_signal.js.page:338
+#: C/02_welcome_to_the_grid.js.page:255 C/03_getting_the_signal.js.page:336
#: C/hellognome.js.page:187
msgid "What's next?"
msgstr "A co dál?"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:258
+#: C/02_welcome_to_the_grid.js.page:256
msgid ""
"Before we go on to the next tutorial, let's try something a little different:"
msgstr "Než přikročíme k další lekci, zkusme něco udělat trochu jinak:"
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:259
+#: C/02_welcome_to_the_grid.js.page:257
#, no-wrap
msgid ""
"\n"
@@ -1083,7 +1076,7 @@ msgstr ""
" this._grid.attach (this._button, 1, 1, 1, 1);\n"
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:270
+#: C/02_welcome_to_the_grid.js.page:268
msgid ""
"That's right, we turned the Label into a Button just by changing the name! "
"If you run the application and click on it, though, you'll find that it "
@@ -1097,7 +1090,7 @@ msgstr ""
"xref=\"03_getting_the_signal.js\">naší následující lekci</link>."
#. (itstool) path: section/p
-#: C/02_welcome_to_the_grid.js.page:271
+#: C/02_welcome_to_the_grid.js.page:269
msgid ""
"If you like, feel free to spend some time experimenting with Grids, Labels, "
"and Images, including stock images."
@@ -1106,7 +1099,7 @@ msgstr ""
"popisky a obrázky, včetně standardních obrázků."
#. (itstool) path: note/p
-#: C/02_welcome_to_the_grid.js.page:272
+#: C/02_welcome_to_the_grid.js.page:270
msgid ""
"One trick you can use to make more complex layouts is to nest Grids inside "
"of each other. This lets you group together related widgets, and rearrange "
@@ -1119,7 +1112,7 @@ msgstr ""
"ukázkový kód k widgetu <link xref=\"radiobutton.js\">RadioButton</link>."
#. (itstool) path: section/title
-#: C/02_welcome_to_the_grid.js.page:276 C/checkbutton.js.page:131
+#: C/02_welcome_to_the_grid.js.page:274 C/checkbutton.js.page:130
#: C/comboboxtext.js.page:171 C/combobox.js.page:228 C/hellognome.js.page:194
#: C/messagedialog.js.page:184 C/radiobutton.js.page:269 C/scale.js.page:203
#: C/spinbutton.js.page:194 C/statusbar.js.page:216 C/switch.js.page:259
@@ -1129,40 +1122,37 @@ msgid "Complete code sample"
msgstr "Úplný kód ukázky"
#. (itstool) path: section/code
-#: C/02_welcome_to_the_grid.js.page:277
+#: C/02_welcome_to_the_grid.js.page:275
#, no-wrap
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const WelcomeToTheGrid = new Lang.Class({\n"
-" Name: 'Welcome to the Grid',\n"
+"class WelcomeToTheGrid {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -1213,7 +1203,7 @@ msgid ""
" this._window.show_all();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new WelcomeToTheGrid ();\n"
@@ -1221,35 +1211,34 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const WelcomeToTheGrid = new Lang.Class({\n"
-" Name: 'Welcome to the Grid',\n"
+"class WelcomeToTheGrid {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
" },\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
" },\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
" },\n"
"\n"
"\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -1300,7 +1289,7 @@ msgstr ""
" this._window.show_all();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new WelcomeToTheGrid ();\n"
@@ -1373,7 +1362,7 @@ msgstr "Zde je úplně základní příklad:"
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/03_getting_the_signal.js.page:37 C/03_getting_the_signal.js.page:351
+#: C/03_getting_the_signal.js.page:37 C/03_getting_the_signal.js.page:349
msgctxt "_"
msgid ""
"external ref='media/03_jssignal_01.png' "
@@ -1429,88 +1418,84 @@ msgid ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// We start out with 0 cookies\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
-"\n"
+"class GettingTheSignal {\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// Začneme s 0 koláčky\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
-"\n"
+"class GettingTheSignal {\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:73
+#: C/03_getting_the_signal.js.page:71
msgid ""
-"Take a look at the part that uses our application's connect method and Lang."
-"bind, to connect its activate and startup signals to the functions that "
-"present the window and build the UI. We're going to do the same thing with "
-"our Button when we get to it, except that we're going to connect its "
-"\"clicked\" signal instead."
+"Take a look at the part that uses our application's connect method and bind, "
+"to connect its activate and startup signals to the functions that present "
+"the window and build the UI. We're going to do the same thing with our "
+"Button when we get to it, except that we're going to connect its \"clicked\" "
+"signal instead."
msgstr ""
"Podívejte se na část, která používá metodu <code>connect</code> naší "
-"aplikace a <code>Lang.bind</code> k připojení jejích signálů <code>\"activate"
+"aplikace a <code>bind</code> k připojení jejích signálů <code>\"activate"
"\"</code> a <code>\"startup\"</code> na funkce, které představují okno a "
"sestaví uživatelské rozhraní. To stejné se chystáme udělat s naším "
"tlačítkem, až jej budeme mít, akorát napojovaný signál bude tentokrát <code>"
"\"clicked\"</code>."
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:77
+#: C/03_getting_the_signal.js.page:75
msgid "Click the button"
msgstr "Kliknutí na tlačítko"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:79
+#: C/03_getting_the_signal.js.page:77
msgid ""
"As usual, we'll put all the code to create our Button and other widgets "
"inside the _buildUI function, which is called when the application starts up."
@@ -1519,24 +1504,24 @@ msgstr ""
"funkce <code>_buildUI</code>, která je volána, když se aplikace spouští."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:80
+#: C/03_getting_the_signal.js.page:78
#, no-wrap
msgid ""
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
msgstr ""
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:85
+#: C/03_getting_the_signal.js.page:83
msgid "First, we create the window itself:"
msgstr "Nejprve vytvoříme vlastní okno:"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:86
+#: C/03_getting_the_signal.js.page:84
#, no-wrap
msgid ""
"\n"
@@ -1558,7 +1543,7 @@ msgstr ""
" title: \"Click the button to get a cookie!\"});\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:95
+#: C/03_getting_the_signal.js.page:93
msgid ""
"Note that we've set its default_height and default_width properties. These "
"let us control how tall and wide the ApplicationWindow will be, in pixels."
@@ -1568,7 +1553,7 @@ msgstr ""
"široké bude okno ApplicationWindow."
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:96
+#: C/03_getting_the_signal.js.page:94
msgid ""
"Next, we'll create the Label that shows us the number of cookies. We can use "
"the cookies variable as part of the Label's label property."
@@ -1578,7 +1563,7 @@ msgstr ""
"code> popisku."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:97
+#: C/03_getting_the_signal.js.page:95
#, no-wrap
msgid ""
"\n"
@@ -1592,7 +1577,7 @@ msgstr ""
" label: \"Number of cookies: \" + cookies });\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:103
+#: C/03_getting_the_signal.js.page:101
msgid ""
"Now we'll create the Button. We set its label property to show the text that "
"we want on the Button, and we connect its \"clicked\" signal to a function "
@@ -1606,7 +1591,7 @@ msgstr ""
"konstrukci uživatelského rozhraní naší aplikace."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:104
+#: C/03_getting_the_signal.js.page:102
#, no-wrap
msgid ""
"\n"
@@ -1614,17 +1599,17 @@ msgid ""
" this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
"\n"
" // Connect the cookie button to the function that handles clicking it\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
msgstr ""
"\n"
" // Vytvoří tlačítko na koláčky\n"
" this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
"\n"
" // Napojí tlačítko na koláčky k funkci, která zpracovává jeho kliknutí\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:111
+#: C/03_getting_the_signal.js.page:109
msgid ""
"Finally, we create a Grid, attach the Label and Button to it, add it to the "
"window and tell the window to show itself and its contents. That's all we "
@@ -1641,7 +1626,7 @@ msgstr ""
"můžete připojit do mřížky způsobem, který jej umístí dolů."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:112
+#: C/03_getting_the_signal.js.page:110
#, no-wrap
msgid ""
"\n"
@@ -1661,7 +1646,7 @@ msgid ""
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
"\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
" // Vytvoří mřížku, do které se vše uspořádá\n"
@@ -1680,10 +1665,10 @@ msgstr ""
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
"\n"
-" },\n"
+" }\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:131
+#: C/03_getting_the_signal.js.page:129
msgid ""
"Now, we write the _getACookie function. Whenever our Button sends out its "
"\"clicked\" signal, the code in this function will run. In this case, all it "
@@ -1697,7 +1682,7 @@ msgstr ""
"code> widgetu <code>Label</code>."
#. (itstool) path: note/p
-#: C/03_getting_the_signal.js.page:132
+#: C/03_getting_the_signal.js.page:130
msgid ""
"Many widgets have the same properties and methods. Both Labels and Buttons, "
"for instance, have a label property that says what text is inside them, and "
@@ -1712,7 +1697,7 @@ msgstr ""
"jak nějaký widget funguje, zároveň se to učíte i o ostatních podobných."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:133
+#: C/03_getting_the_signal.js.page:131
#, no-wrap
msgid ""
"\n"
@@ -1724,7 +1709,7 @@ msgid ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
msgstr ""
"\n"
" _getACookie: function() {\n"
@@ -1735,10 +1720,10 @@ msgstr ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:145
+#: C/03_getting_the_signal.js.page:143
msgid ""
"Finally, we run the application, using the same kind of code as in our last "
"tutorial."
@@ -1746,7 +1731,7 @@ msgstr ""
"Nakonec spustíme aplikaci pomocí stejného druhu kódu, jako v poslední lekci."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:146
+#: C/03_getting_the_signal.js.page:144
#, no-wrap
msgid ""
"\n"
@@ -1760,12 +1745,12 @@ msgstr ""
"app.application.run (ARGV);\n"
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:154
+#: C/03_getting_the_signal.js.page:152
msgid "Flip the switch"
msgstr "Přepnutí vypínače"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:155
+#: C/03_getting_the_signal.js.page:153
msgid ""
"Buttons aren't the only input widgets in our GTK+ toolbox. We can also use "
"switches, like the one in this example. Switches don't have a label "
@@ -1782,7 +1767,7 @@ msgstr ""
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/03_getting_the_signal.js.page:157 C/03_getting_the_signal.js.page:357
+#: C/03_getting_the_signal.js.page:155 C/03_getting_the_signal.js.page:355
msgctxt "_"
msgid ""
"external ref='media/03_jssignal_02.png' "
@@ -1792,7 +1777,7 @@ msgstr ""
"md5='ba941390fbafc4a0f653c8f70bca92c0'"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:159
+#: C/03_getting_the_signal.js.page:157
msgid ""
"A Switch has two positions, Off and On. When a Switch is turned on, its text "
"and background color change, so you can tell which position it's in."
@@ -1801,7 +1786,7 @@ msgstr ""
"a barva pozadí se změní, takže poznáte, ve které poloze je."
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:161
+#: C/03_getting_the_signal.js.page:159
msgid ""
"You may have seen Switches like these in GNOME's accessibility menu, which "
"let you turn features like large text and the on-screen keyboard on and off. "
@@ -1817,7 +1802,7 @@ msgstr ""
"tlačítko nic."
#. (itstool) path: note/p
-#: C/03_getting_the_signal.js.page:162
+#: C/03_getting_the_signal.js.page:160
msgid ""
"You can get to the accessibility menu by clicking on the outline of a human, "
"near your name in the upper-right corner of the screen."
@@ -1826,12 +1811,12 @@ msgstr ""
"ikonami v pravém horním rohu obrazovky."
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:163
+#: C/03_getting_the_signal.js.page:161
msgid "Here's how we create the Switch:"
msgstr "Zde vytvoříme widget Switch:"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:164
+#: C/03_getting_the_signal.js.page:162
#, no-wrap
msgid ""
"\n"
@@ -1843,7 +1828,7 @@ msgstr ""
" this._cookieSwitch = new Gtk.Switch ();\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:169
+#: C/03_getting_the_signal.js.page:167
msgid ""
"We don't actually need to connect the Switch to anything. All we need to do "
"is write an if statement in our _getACookie function, to check to see if the "
@@ -1857,19 +1842,19 @@ msgstr ""
"<code>\"notify::active\"</code> nějak takto:"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:170
+#: C/03_getting_the_signal.js.page:168
#, no-wrap
msgid ""
"\n"
" // Connect the switch to the function that handles it\n"
-" this._cookieSwitch.connect ('notify::active', Lang.bind (this, this._cookieDispenser));\n"
+" this._cookieSwitch.connect ('notify::active', this._cookieDispenser.bind(this));\n"
msgstr ""
"\n"
" // Napojí vypínač k funkci, která jej obsluhuje\n"
-" this._cookieSwitch.connect ('notify::active', Lang.bind (this, this._cookieDispenser));\n"
+" this._cookieSwitch.connect ('notify::active', this._cookieDispenser.bind(this));\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:175
+#: C/03_getting_the_signal.js.page:173
msgid ""
"A Switch is set to the off position by default. If we wanted the Switch to "
"start out turned on, we would set the value of its active property to true "
@@ -1880,7 +1865,7 @@ msgstr ""
"vlastnosti <code>active</code> na <code>true</code>."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:176
+#: C/03_getting_the_signal.js.page:174
#, no-wrap
msgid ""
"\n"
@@ -1890,7 +1875,7 @@ msgstr ""
" this._cookieSwitch = new Gtk.Switch ({ active: true });\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:180
+#: C/03_getting_the_signal.js.page:178
msgid ""
"Let's just create it normally, though, and then create the Label that goes "
"with it. We want the Switch and the Label to be kept right next to each "
@@ -1904,7 +1889,7 @@ msgstr ""
"Zde máte, jak vypadá kód, který toto vše vytvoří:"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:181
+#: C/03_getting_the_signal.js.page:179
#, no-wrap
msgid ""
"\n"
@@ -1942,12 +1927,12 @@ msgstr ""
" this._switchGrid.attach (this._cookieSwitch, 1, 0, 1, 1);\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:199
+#: C/03_getting_the_signal.js.page:197
msgid "And now we arrange everything in the larger Grid like so."
msgstr "A nyní obdobně vše uspořádáme ve větší mřížce."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:200
+#: C/03_getting_the_signal.js.page:198
#, no-wrap
msgid ""
"\n"
@@ -1963,7 +1948,7 @@ msgstr ""
" this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:207
+#: C/03_getting_the_signal.js.page:205
msgid ""
"Now we change the _getACookie function so that it checks to see if the "
"cookie dispenser is turned on. We do that by using the Switch's get_active "
@@ -1976,7 +1961,7 @@ msgstr ""
"když je vypínač vypnutý."
#. (itstool) path: note/p
-#: C/03_getting_the_signal.js.page:208
+#: C/03_getting_the_signal.js.page:206
msgid ""
"When a method is used in an if statement like this, the code inside the if "
"statement is executed if the method returns true."
@@ -1985,11 +1970,11 @@ msgstr ""
"uvnitř výrazu proveden, pokud metoda vrátí <code>true</code>."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:209
+#: C/03_getting_the_signal.js.page:207
#, no-wrap
msgid ""
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Is the cookie dispenser turned on?\n"
" if (this._cookieSwitch.get_active()) {\n"
@@ -2003,7 +1988,7 @@ msgid ""
" }\n"
msgstr ""
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Je automat na koláčky zapnutý?\n"
" if (this._cookieSwitch.get_active()) {\n"
@@ -2017,12 +2002,12 @@ msgstr ""
" }\n"
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:227
+#: C/03_getting_the_signal.js.page:225
msgid "Tuning the radio"
msgstr "Ladění rádia"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:229
+#: C/03_getting_the_signal.js.page:227
msgid ""
"Another type of input widget we can use is called the RadioButton. You "
"create them in groups, and then only one RadioButton in a group can be "
@@ -2043,7 +2028,7 @@ msgstr ""
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/03_getting_the_signal.js.page:231 C/03_getting_the_signal.js.page:363
+#: C/03_getting_the_signal.js.page:229 C/03_getting_the_signal.js.page:361
msgctxt "_"
msgid ""
"external ref='media/03_jssignal_03.png' "
@@ -2053,7 +2038,7 @@ msgstr ""
"md5='49ecf251b0bf57543c8d79a77b6f306d'"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:233
+#: C/03_getting_the_signal.js.page:231
msgid ""
"First off, let's change our ApplicationWindow's name and increase its "
"border_width property, so that our widgets aren't packed in too tightly. The "
@@ -2066,7 +2051,7 @@ msgstr ""
"pixelů mezi widgetem a hranou okna."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:234
+#: C/03_getting_the_signal.js.page:232
#, no-wrap
msgid ""
"\n"
@@ -2090,7 +2075,7 @@ msgstr ""
" title: \"Choose the one that says 'cookie'!\"});\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:245
+#: C/03_getting_the_signal.js.page:243
msgid ""
"After that, we create the RadioButtons. Remember how they're created in "
"groups? The way we do that, is we set each new RadioButton's group property "
@@ -2101,7 +2086,7 @@ msgstr ""
"nastavíme vlastnost <code>group</code> na název jiného skupinového přepínače."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:246
+#: C/03_getting_the_signal.js.page:244
#, no-wrap
msgid ""
"\n"
@@ -2121,7 +2106,7 @@ msgstr ""
" group: this._cookieRadio });\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:255
+#: C/03_getting_the_signal.js.page:253
msgid ""
"Next, we create a Grid for the RadioButtons. Remember, we don't have to "
"arrange things in Grids in the same order that we create them in."
@@ -2130,7 +2115,7 @@ msgstr ""
"nemusíte do mřížky uspořádat ve stejném pořadí, v jakém jste je vytvořili."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:256
+#: C/03_getting_the_signal.js.page:254
#, no-wrap
msgid ""
"\n"
@@ -2148,7 +2133,7 @@ msgstr ""
" this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:264
+#: C/03_getting_the_signal.js.page:262
msgid ""
"Normally, the RadioButton that's selected by default is the one that's the "
"name of the group. We want the first \"Not cookie\" button to be selected by "
@@ -2159,14 +2144,14 @@ msgstr ""
"přepínač „Not cookie“, takže použijeme metodu <code>set_active</code>."
#. (itstool) path: note/p
-#: C/03_getting_the_signal.js.page:265
+#: C/03_getting_the_signal.js.page:263
msgid "We could also set its active property to true when we create it."
msgstr ""
"Jeho vlastnost <code>active</code> můžeme nastavit na <code>true</code> také "
"při jeho vytváření."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:266
+#: C/03_getting_the_signal.js.page:264
#, no-wrap
msgid ""
"\n"
@@ -2179,12 +2164,12 @@ msgstr ""
" this._notCookieOne.set_active (true);\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:271
+#: C/03_getting_the_signal.js.page:269
msgid "Now we arrange everything in our main Grid like usual ..."
msgstr "Nyní vše jako obvykle uspořádáme v naší hlavní mřížce…"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:272
+#: C/03_getting_the_signal.js.page:270
#, no-wrap
msgid ""
"\n"
@@ -2200,7 +2185,7 @@ msgstr ""
" this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:279
+#: C/03_getting_the_signal.js.page:277
msgid ""
"And then we change our _getACookie function to test to see if the cookie "
"button is the one that's selected."
@@ -2209,11 +2194,11 @@ msgstr ""
"je vybrán přepínač s koláčkem."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:280
+#: C/03_getting_the_signal.js.page:278
#, no-wrap
msgid ""
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Did you select \"cookie\" instead of \"not cookie\"?\n"
" if (this._cookieRadio.get_active()) {\n"
@@ -2227,7 +2212,7 @@ msgid ""
" }\n"
msgstr ""
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Vybrali jste „cookie“ místo „not cookie“?\n"
" if (this._cookieRadio.get_active()) {\n"
@@ -2241,12 +2226,12 @@ msgstr ""
" }\n"
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:298
+#: C/03_getting_the_signal.js.page:296
msgid "Can you spell \"cookie\"?"
msgstr "Umíte hláskovat „cookie“?"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:300
+#: C/03_getting_the_signal.js.page:298
msgid ""
"The last input widget we're going to cover is the Entry widget, which is "
"used for single-line text entry."
@@ -2255,7 +2240,7 @@ msgstr ""
"(vstupní pole), který se používá jako jednořádkové vstupní pole."
#. (itstool) path: note/p
-#: C/03_getting_the_signal.js.page:301
+#: C/03_getting_the_signal.js.page:299
msgid ""
"If you need to be able to enter in a whole paragraph or more, like if you "
"are building a text editor, you'll want to look at the much more "
@@ -2270,7 +2255,7 @@ msgstr ""
#. the file changes, the md5 hash will change to let you know you need to
#. update your localized copy. The msgstr is not used at all. Set it to
#. whatever you like once you have updated your copy of the file.
-#: C/03_getting_the_signal.js.page:302 C/03_getting_the_signal.js.page:369
+#: C/03_getting_the_signal.js.page:300 C/03_getting_the_signal.js.page:367
msgctxt "_"
msgid ""
"external ref='media/03_jssignal_04.png' "
@@ -2280,12 +2265,12 @@ msgstr ""
"md5='dfc5221ca15ca9fba7d3c76a73804e2d'"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:304
+#: C/03_getting_the_signal.js.page:302
msgid "After we change the window's name, we create the Entry widget."
msgstr "Po té, co změníme název okna, vytvoříme widget <code>Entry</code>."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:305
+#: C/03_getting_the_signal.js.page:303
#, no-wrap
msgid ""
"\n"
@@ -2297,12 +2282,12 @@ msgstr ""
" this._spellCookie = new Gtk.Entry ();\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:310
+#: C/03_getting_the_signal.js.page:308
msgid "Next, we arrange everything in the Grid ..."
msgstr "Následně vše uspořádáme do mřížky…"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:311
+#: C/03_getting_the_signal.js.page:309
#, no-wrap
msgid ""
"\n"
@@ -2318,7 +2303,7 @@ msgstr ""
" this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:318
+#: C/03_getting_the_signal.js.page:316
msgid ""
"And now we modify _getACookie's if statement again, using the Entry's "
"get_text method to retrieve the text that you entered into it and see if you "
@@ -2334,7 +2319,7 @@ msgstr ""
"zadaný text na malá písmena."
#. (itstool) path: note/p
-#: C/03_getting_the_signal.js.page:319
+#: C/03_getting_the_signal.js.page:317
msgid ""
"An Entry widget doesn't have a label property, which is a set text string "
"that the user can't change. (You can't normally change the label on a "
@@ -2347,11 +2332,11 @@ msgstr ""
"vlastnost <code>text</code>, která mění to, co uživatel píše."
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:320
+#: C/03_getting_the_signal.js.page:318
#, no-wrap
msgid ""
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Did you spell \"cookie\" correctly?\n"
" if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
@@ -2365,7 +2350,7 @@ msgid ""
" }\n"
msgstr ""
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Vyhláskovali jste „cookie“ správně?\n"
" if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
@@ -2379,7 +2364,7 @@ msgstr ""
" }\n"
#. (itstool) path: section/p
-#: C/03_getting_the_signal.js.page:339
+#: C/03_getting_the_signal.js.page:337
msgid ""
"Keep reading, if you'd like to see the complete code for each version of our "
"cookie maker application."
@@ -2388,7 +2373,7 @@ msgstr ""
"koláčky, čtěte dál."
#. (itstool) path: note/p
-#: C/03_getting_the_signal.js.page:340
+#: C/03_getting_the_signal.js.page:338
msgid ""
"The main JavaScript tutorials page has <link xref=\"beginner.js#buttons"
"\">more detailed code samples</link> for each input widget, including "
@@ -2399,53 +2384,50 @@ msgstr ""
"několika, které zde rozebrané nejsou."
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:345
+#: C/03_getting_the_signal.js.page:343
msgid "Complete code samples"
msgstr "Celý kód ukázky"
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:350
+#: C/03_getting_the_signal.js.page:348
msgid "Code sample with Button"
msgstr "Ukázkový kód s widgetem Button"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:352
+#: C/03_getting_the_signal.js.page:350
#, no-wrap
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// We start out with 0 cookies\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -2463,7 +2445,7 @@ msgid ""
" this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
"\n"
" // Connect the cookie button to the function that handles clicking it\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
"\n"
" // Create a grid to arrange everything inside\n"
" this._grid = new Gtk.Grid ({\n"
@@ -2481,11 +2463,9 @@ msgid ""
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Increase the number of cookies by 1 and update the label\n"
" cookies++;\n"
@@ -2493,7 +2473,7 @@ msgid ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new GettingTheSignal ();\n"
@@ -2501,38 +2481,35 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// Začneme s 0 koláčky\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -2550,7 +2527,7 @@ msgstr ""
" this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
"\n"
" // Připojí tlačítko na koláčky k funkci, která zpracovává jeho kliknutí\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
"\n"
" // Vytvoří mřížku, do které se vše uspořádá\n"
" this._grid = new Gtk.Grid ({\n"
@@ -2568,11 +2545,9 @@ msgstr ""
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Zvýší počet koláčků o 1 a aktualizuje popisek\n"
" cookies++;\n"
@@ -2580,55 +2555,52 @@ msgstr ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new GettingTheSignal ();\n"
"app.application.run (ARGV);\n"
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:356
+#: C/03_getting_the_signal.js.page:354
msgid "Code sample with Switch"
msgstr "Ukázkový kód s widgetem Switch"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:358
+#: C/03_getting_the_signal.js.page:356
#, no-wrap
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// We start out with 0 cookies\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -2647,7 +2619,7 @@ msgid ""
" label: \"Get a cookie\" });\n"
"\n"
" // Connect the cookie button to the function that handles clicking it\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
"\n"
" // Create the switch that controls whether or not you can win\n"
" this._cookieSwitch = new Gtk.Switch ();\n"
@@ -2682,11 +2654,9 @@ msgid ""
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Is the cookie dispenser turned on?\n"
" if (this._cookieSwitch.get_active()) {\n"
@@ -2699,7 +2669,7 @@ msgid ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new GettingTheSignal ();\n"
@@ -2707,38 +2677,35 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// Začneme s 0 koláčky\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -2757,7 +2724,7 @@ msgstr ""
" label: \"Get a cookie\" });\n"
"\n"
" // Připojí tlačítko na koláčky k funkci, která zpracovává jeho kliknutí\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
"\n"
" // Vytvoří vypínač, který řídí, jestli můžete vyhrát nebo ne\n"
" this._cookieSwitch = new Gtk.Switch ();\n"
@@ -2792,11 +2759,9 @@ msgstr ""
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Je automat na koláčky zapnutý?\n"
" if (this._cookieSwitch.get_active()) {\n"
@@ -2809,55 +2774,52 @@ msgstr ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new GettingTheSignal ();\n"
"app.application.run (ARGV);\n"
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:362
+#: C/03_getting_the_signal.js.page:360
msgid "Code sample with RadioButton"
msgstr "Ukázkový kód s widgetem RadioButton"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:364
+#: C/03_getting_the_signal.js.page:362
#, no-wrap
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// We start out with 0 cookies\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -2889,7 +2851,7 @@ msgid ""
" label: \"Get a cookie\" });\n"
"\n"
" // Connect the cookie button to the function that handles clicking it\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
"\n"
" // Create the label\n"
" this._cookieLabel = new Gtk.Label ({\n"
@@ -2912,11 +2874,9 @@ msgid ""
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Did you select \"cookie\" instead of \"not cookie\"?\n"
" if (this._cookieRadio.get_active()) {\n"
@@ -2929,7 +2889,7 @@ msgid ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new GettingTheSignal ();\n"
@@ -2937,38 +2897,34 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// Začneme s 0 koláčky\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -2993,7 +2949,6 @@ msgstr ""
" this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);\n"
"\n"
" // Nastaví, že skupinový přepínač, které bude nahoře, bude ve\n"
-" // výchozím stavu aktivní\n"
" this._notCookieOne.set_active (true);\n"
"\n"
" // Vytvoří tlačítko na koláčky\n"
@@ -3001,7 +2956,7 @@ msgstr ""
" label: \"Get a cookie\" });\n"
"\n"
" // Napojí tlačítko na koláčky k funkci, která zpracovává jeho kliknutí\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
"\n"
" // Vytvoří popisek\n"
" this._cookieLabel = new Gtk.Label ({\n"
@@ -3024,11 +2979,9 @@ msgstr ""
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Vybrali jste „cookie“ místo „not cookie“?\n"
" if (this._cookieRadio.get_active()) {\n"
@@ -3041,55 +2994,52 @@ msgstr ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new GettingTheSignal ();\n"
"app.application.run (ARGV);\n"
#. (itstool) path: section/title
-#: C/03_getting_the_signal.js.page:368
+#: C/03_getting_the_signal.js.page:366
msgid "Code sample with Entry"
msgstr "Ukázkový kód s widgetem Entry"
#. (itstool) path: section/code
-#: C/03_getting_the_signal.js.page:370
+#: C/03_getting_the_signal.js.page:368
#, no-wrap
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// We start out with 0 cookies\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -3108,7 +3058,7 @@ msgid ""
" label: \"Get a cookie\" });\n"
"\n"
" // Connect the cookie button to the function that handles clicking it\n"
-" this._cookieButton.connect ('clicked', Lang.bind (this, this._getACookie));\n"
+" this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
"\n"
" // Create the label\n"
" this._cookieLabel = new Gtk.Label ({\n"
@@ -3131,11 +3081,9 @@ msgid ""
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Did you spell \"cookie\" correctly?\n"
" if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
@@ -3148,7 +3096,7 @@ msgid ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new GettingTheSignal ();\n"
@@ -3156,35 +3104,32 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
"// Začneme s 0 koláčky\n"
"var cookies = 0;\n"
"\n"
-"const GettingTheSignal = new Lang.Class({\n"
-" Name: 'Getting the Signal',\n"
+"class GettingTheSignal {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
" _buildUI: function() {\n"
@@ -3229,11 +3174,9 @@ msgstr ""
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _getACookie: function() {\n"
+" _getACookie() {\n"
"\n"
" // Vyhláskovali jste „cookie“ správně?\n"
" if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
@@ -3246,7 +3189,7 @@ msgstr ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new GettingTheSignal ();\n"
@@ -3757,39 +3700,39 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const AboutDialogExample = new Lang.Class({\n"
-" Name: 'AboutDialog Example',\n"
+"class AboutDialogExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
-" this.application = new Gtk.Application({\n"
-" application_id: 'org.example.jsaboutdialog',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jsaboutdialog',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal creates the menu and builds the UI\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
" this._buildUI();\n"
-" },\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function(){\n"
+" _buildUI() {\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -3799,10 +3742,10 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Create the application menu\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"About\", 'app.about');\n"
" menu.append(\"Quit\",'app.quit');\n"
@@ -3810,22 +3753,16 @@ msgid ""
"\n"
" // Create the \"About\" menu option and have it call the _showAbout() function\n"
" let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" // Create the \"Quit\" menu option and have it close the window\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
+" }\n"
"\n"
-" _showAbout: function() {\n"
+" _showAbout() {\n"
"\n"
" // String arrays of the names of the people involved in the project\n"
" var authors = [\"GNOME Documentation Team\"];\n"
@@ -3852,7 +3789,7 @@ msgid ""
" aboutDialog.destroy();\n"
" });\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new AboutDialogExample();\n"
@@ -3860,39 +3797,39 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const AboutDialogExample = new Lang.Class({\n"
-" Name: 'AboutDialog Example',\n"
+"class AboutDialogExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
-" this.application = new Gtk.Application({\n"
-" application_id: 'org.example.jsaboutdialog',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jsaboutdialog',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
" this._buildUI();\n"
-" },\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function(){\n"
+" _buildUI() {\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -3902,10 +3839,10 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Vytvoří aplikační nabídku\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"About\", 'app.about');\n"
" menu.append(\"Quit\",'app.quit');\n"
@@ -3913,22 +3850,16 @@ msgstr ""
"\n"
" // Vytvoří položku nabídky „About“ a dá ji za úkol volat funkci _showAbout()\n"
" let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" // Vytvoří položku nabídky „Quit“ a dá ji za úkol zavřít okno\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
+" }\n"
"\n"
-" _showAbout: function() {\n"
+" _showAbout() {\n"
"\n"
" // Pole řetězců se jmény lidí, kteří se podílejí na projektu\n"
" var authors = [\"GNOME Documentation Team\"];\n"
@@ -3955,7 +3886,7 @@ msgstr ""
" aboutDialog.destroy();\n"
" });\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new AboutDialogExample();\n"
@@ -3992,7 +3923,7 @@ msgstr ""
"html\">Gtk.AboutDialog</link>"
#. (itstool) path: item/p
-#: C/aboutdialog.js.page:32 C/button.js.page:31 C/checkbutton.js.page:138
+#: C/aboutdialog.js.page:32 C/button.js.page:31 C/checkbutton.js.page:137
#: C/comboboxtext.js.page:181 C/combobox.js.page:238 C/dialog.js.page:30
#: C/entry.js.page:30 C/grid.js.page:34 C/GtkApplicationWindow.js.page:31
#: C/image.js.page:32 C/label.js.page:30 C/linkbutton.js.page:30
@@ -4009,7 +3940,7 @@ msgstr ""
"html\">Gtk.Application</link>"
#. (itstool) path: item/p
-#: C/aboutdialog.js.page:33 C/button.js.page:32 C/checkbutton.js.page:139
+#: C/aboutdialog.js.page:33 C/button.js.page:32 C/checkbutton.js.page:138
#: C/comboboxtext.js.page:182 C/combobox.js.page:239 C/dialog.js.page:31
#: C/entry.js.page:31 C/grid.js.page:35 C/GtkApplicationWindow.js.page:32
#: C/image.js.page:33 C/label.js.page:31 C/linkbutton.js.page:31
@@ -5168,39 +5099,39 @@ msgstr "Widget tlačítko, který po kliknutí změní svůj popisek."
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ButtonExample = new Lang.Class ({\n"
-" Name: 'Button Example',\n"
+"class ButtonExample {\n"
"\n"
" /* Create the application itself\n"
" This boilerplate code is needed to build any GTK+ application. */\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jsbutton',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsbutton',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal initializes menus and builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -5214,17 +5145,17 @@ msgid ""
" this._window.add (this.Button);\n"
"\n"
" // Bind it to a function that says what to do when the button is clicked\n"
-" this.Button.connect (\"clicked\", Lang.bind(this, this._clickHandler));\n"
+" this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Here's the function that says what happens when the button is clicked\n"
-" _clickHandler: function () {\n"
+" _clickHandler() {\n"
" this.Button.set_label (\"Clicked!\");\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ButtonExample ();\n"
@@ -5232,39 +5163,39 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ButtonExample = new Lang.Class ({\n"
-" Name: 'Button Example',\n"
+"class ButtonExample {\n"
"\n"
" /* Vytvoří vlastní aplikaci\n"
" Tento základní kód je zapotřebí k sestavení kterékoliv aplikace GTK+. */\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jsbutton',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsbutton',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -5278,17 +5209,17 @@ msgstr ""
" this._window.add (this.Button);\n"
"\n"
" // Napojí jej na funkci, která říká, co udělat, když je na tlačítko kliknuto\n"
-" this.Button.connect (\"clicked\", Lang.bind(this, this._clickHandler));\n"
+" this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Zde je funkce, která říká, co se stalo, když bylo na tlačítko kliknuto\n"
-" _clickHandler: function () {\n"
+" _clickHandler() {\n"
" this.Button.set_label (\"Clicked!\");\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ButtonExample ();\n"
@@ -5668,34 +5599,36 @@ msgstr "Kalkulačka – tlačítka jsou umístěna do vodorovných widgetů Butt
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ButtonBoxExample = new Lang.Class ({\n"
-" Name: 'ButtonBox Example',\n"
+"class ButtonBoxExample {\n"
"\n"
" // Create the application itthis\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application({ application_id: 'org.example.jsbuttonbox' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jsbuttonbox'\n"
+" });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Create the application window\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -5721,17 +5654,17 @@ msgid ""
" this.buttons = [ 7, 8, 9, '/', 4, 5, 6, '*', 1, 2, 3, '-', 'C', 0, '=', '+' ];\n"
" \n"
" // each row is a ButtonBox, attached to the grid \n"
-" for (i = 0; i < 4; i++) {\n"
+" for (let i = 0; i < 4; i++) {\n"
" this.hbox = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL);\n"
" this.hbox.set_spacing(5);\n"
" this.grid.attach(this.hbox, 0, i + 1, 1, 1);\n"
" // each ButtonBox has 4 buttons, connected to the callback function\n"
-" for (j= 0; j < 4; j++) {\n"
+" for (let j= 0; j < 4; j++) {\n"
" this.button = new Gtk.Button();\n"
" this.buttonLabel = (this.buttons[i * 4 + j].toString());\n"
" this.button.set_label(this.buttonLabel);\n"
" this.button.set_can_focus(false);\n"
-" this.button.connect(\"clicked\", Lang.bind(this, this._buttonClicked, this.button));\n"
+" this.button.connect(\"clicked\", this._buttonClicked.bind(this));\n"
" this.hbox.add(this.button);\n"
" }\n"
" }\n"
@@ -5745,10 +5678,10 @@ msgid ""
" // add the grid to the window\n"
" this.window.add(this.grid);\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // callback function for all the buttons\n"
-" _buttonClicked: function(button) {\n"
+" _buttonClicked(button) {\n"
" this.button = button;\n"
" // for the operations\n"
" if (this.button.get_label() == '+') {\n"
@@ -5813,9 +5746,9 @@ msgid ""
" this.secondNumber = this.number;\n"
" this.entry.set_text(this.number.toString());\n"
" }\n"
-" },\n"
+" }\n"
"\n"
-" _doOperation: function() {\n"
+" _doOperation() {\n"
" if (this.operation == \"plus\") {\n"
" this.firstNumber += this.secondNumber;\n"
" } else if (this.operation == \"minus\") {\n"
@@ -5841,7 +5774,7 @@ msgid ""
" this.entry.set_text(\"error\");\n"
" }\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ButtonBoxExample();\n"
@@ -5849,34 +5782,36 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ButtonBoxExample = new Lang.Class ({\n"
-" Name: 'ButtonBox Example',\n"
+"class ButtonBoxExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application({ application_id: 'org.example.jsbuttonbox' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jsbuttonbox'\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Vytvoří okno aplikace\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -5902,17 +5837,17 @@ msgstr ""
" this.buttons = [ 7, 8, 9, '/', 4, 5, 6, '*', 1, 2, 3, '-', 'C', 0, '=', '+' ];\n"
" \n"
" // Každý řádek je ButtonBox připojený do mřížky\n"
-" for (i = 0; i < 4; i++) {\n"
+" for (let i = 0; i < 4; i++) {\n"
" this.hbox = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL);\n"
" this.hbox.set_spacing(5);\n"
" this.grid.attach(this.hbox, 0, i + 1, 1, 1);\n"
" // Každý ButtonBox má 4 tlačítka napojená na funkci zpětného volání\n"
-" for (j= 0; j < 4; j++) {\n"
+" for (let j= 0; j < 4; j++) {\n"
" this.button = new Gtk.Button();\n"
" this.buttonLabel = (this.buttons[i * 4 + j].toString());\n"
" this.button.set_label(this.buttonLabel);\n"
" this.button.set_can_focus(false);\n"
-" this.button.connect(\"clicked\", Lang.bind(this, this._buttonClicked, this.button));\n"
+" this.button.connect(\"clicked\", this._buttonClicked.bind(this));\n"
" this.hbox.add(this.button);\n"
" }\n"
" }\n"
@@ -5926,10 +5861,10 @@ msgstr ""
" // Přídá mřížku do okna\n"
" this.window.add(this.grid);\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro všechna tlačítka\n"
-" _buttonClicked: function(button) {\n"
+" _buttonClicked(button) {\n"
" this.button = button;\n"
" // Pro početní operace\n"
" if (this.button.get_label() == '+') {\n"
@@ -5994,9 +5929,9 @@ msgstr ""
" this.secondNumber = this.number;\n"
" this.entry.set_text(this.number.toString());\n"
" }\n"
-" },\n"
+" }\n"
"\n"
-" _doOperation: function() {\n"
+" _doOperation() {\n"
" if (this.operation == \"plus\") {\n"
" this.firstNumber += this.secondNumber;\n"
" } else if (this.operation == \"minus\") {\n"
@@ -6022,7 +5957,7 @@ msgstr ""
" this.entry.set_text(\"error\");\n"
" }\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ButtonBoxExample();\n"
@@ -6825,27 +6760,27 @@ msgid "Libraries to import"
msgstr "Importované knihovny"
#. (itstool) path: section/code
-#: C/checkbutton.js.page:29 C/messagedialog.js.page:32 C/radiobutton.js.page:29
-#: C/scale.js.page:29 C/spinbutton.js.page:32 C/statusbar.js.page:29
-#: C/switch.js.page:36 C/togglebutton.js.page:29
+#: C/checkbutton.js.page:29
#, no-wrap
msgid ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
msgstr ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
#. (itstool) path: section/p
-#: C/checkbutton.js.page:36 C/comboboxtext.js.page:37 C/combobox.js.page:41
+#: C/checkbutton.js.page:37 C/comboboxtext.js.page:37 C/combobox.js.page:42
#: C/messagedialog.js.page:39 C/radiobutton.js.page:36 C/scale.js.page:36
#: C/spinbutton.js.page:39 C/statusbar.js.page:36 C/switch.js.page:43
#: C/textview.js.page:45 C/togglebutton.js.page:36
@@ -6860,7 +6795,7 @@ msgstr ""
"začátku."
#. (itstool) path: section/title
-#: C/checkbutton.js.page:40 C/comboboxtext.js.page:41 C/combobox.js.page:45
+#: C/checkbutton.js.page:41 C/comboboxtext.js.page:41 C/combobox.js.page:46
#: C/messagedialog.js.page:43 C/radiobutton.js.page:40 C/scale.js.page:40
#: C/spinbutton.js.page:43 C/statusbar.js.page:40 C/switch.js.page:47
#: C/textview.js.page:49 C/togglebutton.js.page:40
@@ -6869,63 +6804,59 @@ msgid "Creating the application window"
msgstr "Vytvoření okna aplikace"
#. (itstool) path: section/code
-#: C/checkbutton.js.page:41
+#: C/checkbutton.js.page:42
#, no-wrap
msgid ""
"\n"
-"const CheckButtonExample = new Lang.Class({\n"
-" Name: 'CheckButton Example',\n"
-"\n"
+"class CheckButtonExample {\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jscheckbutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
-"const CheckButtonExample = new Lang.Class({\n"
-" Name: 'CheckButton Example',\n"
-"\n"
+"class CheckButtonExample {\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jscheckbutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\", která zobrazí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\", která sestaví uživatelské rozhraní\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
-" },\n"
+" }\n"
#. (itstool) path: section/p
-#: C/checkbutton.js.page:67
+#: C/checkbutton.js.page:66
msgid ""
"All the code for this sample goes in the CheckButtonExample class. The above "
"code creates a <link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/"
@@ -6938,12 +6869,12 @@ msgstr ""
"ve kterém budou."
#. (itstool) path: section/code
-#: C/checkbutton.js.page:68
+#: C/checkbutton.js.page:67
#, no-wrap
msgid ""
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -6956,7 +6887,7 @@ msgid ""
msgstr ""
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -6968,7 +6899,7 @@ msgstr ""
" title: \"CheckButton Example\"});\n"
#. (itstool) path: section/p
-#: C/checkbutton.js.page:81
+#: C/checkbutton.js.page:80
msgid ""
"The _buildUI function is where we put all the code to create the "
"application's user interface. The first step is creating a new <link href="
@@ -6981,12 +6912,12 @@ msgstr ""
"kterého vložíme všechny naše widgety."
#. (itstool) path: section/title
-#: C/checkbutton.js.page:85
+#: C/checkbutton.js.page:84
msgid "Creating the checkbutton"
msgstr "Vytvoření widgetu CheckButton"
#. (itstool) path: section/code
-#: C/checkbutton.js.page:86
+#: C/checkbutton.js.page:85
#, no-wrap
msgid ""
"\n"
@@ -6998,7 +6929,7 @@ msgid ""
" this._button.set_active (true);\n"
"\n"
" // Connect the button to a function that does something when it's toggled\n"
-" this._button.connect (\"toggled\", Lang.bind (this, this._toggledCB));\n"
+" this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
msgstr ""
"\n"
" // Vytvoří zaškrtávací políčko\n"
@@ -7009,10 +6940,10 @@ msgstr ""
" this._button.set_active (true);\n"
"\n"
" // Napojí zaškrtávací políčko k funkci, která při přepnutí něco udělá\n"
-" this._button.connect (\"toggled\", Lang.bind (this, this._toggledCB));\n"
+" this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
#. (itstool) path: section/p
-#: C/checkbutton.js.page:97
+#: C/checkbutton.js.page:96
msgid ""
"This code creates the checkbutton itself. The label next to the checkbutton "
"is created by giving the checkbutton the \"label\" property and assigning a "
@@ -7029,21 +6960,21 @@ msgstr ""
"se funkce <code>_toggledCB</code>."
#. (itstool) path: section/code
-#: C/checkbutton.js.page:98 C/radiobutton.js.page:170
+#: C/checkbutton.js.page:97
#, no-wrap
msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
#. (itstool) path: section/p
-#: C/checkbutton.js.page:103
+#: C/checkbutton.js.page:102
msgid ""
"This code finishes up creating the UI, by telling the window to show itself "
"and all child widgets (which is just the checkbutton in this case)."
@@ -7053,16 +6984,16 @@ msgstr ""
"zaškrtávací políčko)."
#. (itstool) path: section/title
-#: C/checkbutton.js.page:107
+#: C/checkbutton.js.page:106
msgid "Function which handles the checkbutton's toggling"
msgstr "Funkce, která zpracovává přepnutí zaškrtávacího políčka"
#. (itstool) path: section/code
-#: C/checkbutton.js.page:108
+#: C/checkbutton.js.page:107
#, no-wrap
msgid ""
"\n"
-" _toggledCB: function () {\n"
+" _toggledCB() {\n"
"\n"
" // Make the window title appear or disappear when the checkbox is toggled\n"
" if (this._button.get_active() == true)\n"
@@ -7072,10 +7003,10 @@ msgid ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
msgstr ""
"\n"
-" _toggledCB: function () {\n"
+" _toggledCB() {\n"
"\n"
" // Zobrazí a skryje obsah záhlaví okna při přepnutí zaškrtávacího políčka\n"
" if (this._button.get_active() == true)\n"
@@ -7085,10 +7016,10 @@ msgstr ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
#. (itstool) path: section/p
-#: C/checkbutton.js.page:121
+#: C/checkbutton.js.page:120
msgid ""
"If the checkbutton is toggled from on to off, we want the window title to "
"disappear. If it's toggled from off to on, we want it to reappear. We can "
@@ -7103,7 +7034,7 @@ msgstr ""
"code>, který zavolá metodu <code>get_active()</code> zaškrtávacího políčka."
#. (itstool) path: section/code
-#: C/checkbutton.js.page:122
+#: C/checkbutton.js.page:121
#, no-wrap
msgid ""
"\n"
@@ -7117,7 +7048,7 @@ msgstr ""
"app.application.run (ARGV);\n"
#. (itstool) path: section/p
-#: C/checkbutton.js.page:127
+#: C/checkbutton.js.page:126
msgid ""
"Finally, we create a new instance of the finished CheckButtonExample class, "
"and set the application running."
@@ -7126,44 +7057,42 @@ msgstr ""
"aplikaci spustíme."
#. (itstool) path: section/code
-#: C/checkbutton.js.page:132
+#: C/checkbutton.js.page:131
#, no-wrap
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const CheckButtonExample = new Lang.Class({\n"
-" Name: 'CheckButton Example',\n"
+"class CheckButtonExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jscheckbutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -7182,15 +7111,13 @@ msgid ""
" this._button.set_active (true);\n"
"\n"
" // Connect the button to a function that does something when it's toggled\n"
-" this._button.connect (\"toggled\", Lang.bind (this, this._toggledCB));\n"
+" this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _toggledCB: function () {\n"
+" _toggledCB() {\n"
"\n"
" // Make the window title appear or disappear when the checkbox is toggled\n"
" if (this._button.get_active() == true)\n"
@@ -7200,7 +7127,7 @@ msgid ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new CheckButtonExample ();\n"
@@ -7208,39 +7135,37 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const CheckButtonExample = new Lang.Class({\n"
-" Name: 'CheckButton Example',\n"
+"class CheckButtonExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jscheckbutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -7259,7 +7184,7 @@ msgstr ""
" this._button.set_active (true);\n"
"\n"
" // Napojí zaškrtávací políčko k funkci, která při přepnutí něco udělá\n"
-" this._button.connect (\"toggled\", Lang.bind (this, this._toggledCB));\n"
+" this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
@@ -7277,14 +7202,14 @@ msgstr ""
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new CheckButtonExample ();\n"
"app.application.run (ARGV);\n"
#. (itstool) path: section/title
-#: C/checkbutton.js.page:136 C/comboboxtext.js.page:176 C/combobox.js.page:233
+#: C/checkbutton.js.page:135 C/comboboxtext.js.page:176 C/combobox.js.page:233
#: C/messagedialog.js.page:189 C/radiobutton.js.page:274 C/scale.js.page:208
#: C/spinbutton.js.page:199 C/statusbar.js.page:221 C/switch.js.page:264
#: C/textview.js.page:248 C/togglebutton.js.page:153
@@ -7293,7 +7218,7 @@ msgid "In-depth documentation"
msgstr "Dokumentace jdoucí do hloubky"
#. (itstool) path: item/p
-#: C/checkbutton.js.page:140
+#: C/checkbutton.js.page:139
msgid ""
"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.CheckButton."
"html\">Gtk.CheckButton</link>"
@@ -7629,35 +7554,36 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gdk = imports.gi.Gdk;\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ColorbuttonExample = new Lang.Class ({\n"
-" Name: 'Colorbutton Example',\n"
+"class ColorbuttonExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({ application_id: 'org.example.jscolorbutton' });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -7674,7 +7600,7 @@ msgid ""
" this.color.blue = 1.0;\n"
" this.color.alpha = 0.5;\n"
" this.button.set_rgba(this.color);\n"
-" this.button.connect(\"color-set\", Lang.bind(this, this.onColorChosen));\n"
+" this.button.connect(\"color-set\", this.onColorChosen.bind(this));\n"
" this.label = new Gtk.Label();\n"
" this.label.set_text(\"Click to choose a color\");\n"
"\n"
@@ -7683,13 +7609,13 @@ msgid ""
" grid.attach(this.label, 0, 1, 2, 1);\n"
" this.window.add(grid);\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" onColorChosen: function() {\n"
-" let colorName = this.color.to_string();\n"
-" this.label.set_text(\"You chose the color \" + colorName);\n"
+" onColorChosen() {\n"
+" let colorName = this.color.to_string();\n"
+" this.label.set_text(\"You chose the color \" + colorName);\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ColorbuttonExample ();\n"
@@ -7697,35 +7623,36 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gdk = imports.gi.Gdk;\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ColorbuttonExample = new Lang.Class ({\n"
-" Name: 'Colorbutton Example',\n"
+"class ColorbuttonExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({ application_id: 'org.example.jscolorbutton' });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -7742,7 +7669,7 @@ msgstr ""
" this.color.blue = 1.0;\n"
" this.color.alpha = 0.5;\n"
" this.button.set_rgba(this.color);\n"
-" this.button.connect(\"color-set\", Lang.bind(this, this.onColorChosen));\n"
+" this.button.connect(\"color-set\", this.onColorChosen.bind(this));\n"
" this.label = new Gtk.Label();\n"
" this.label.set_text(\"Click to choose a color\");\n"
"\n"
@@ -7751,13 +7678,13 @@ msgstr ""
" grid.attach(this.label, 0, 1, 2, 1);\n"
" this.window.add(grid);\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" onColorChosen: function() {\n"
-" let colorName = this.color.to_string();\n"
-" this.label.set_text(\"You chose the color \" + colorName);\n"
+" onColorChosen() {\n"
+" let colorName = this.color.to_string();\n"
+" this.label.set_text(\"You chose the color \" + colorName);\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ColorbuttonExample ();\n"
@@ -8119,6 +8046,22 @@ msgstr ""
"jednodušším, kdykoliv to použití dovolí, <code>ComboBoxText</code>."
#. (itstool) path: section/code
+#: C/comboboxtext.js.page:31 C/textview.js.page:39
+#, no-wrap
+msgid ""
+"\n"
+"#!/usr/bin/gjs\n"
+"\n"
+"const Gtk = imports.gi.Gtk;\n"
+"const Lang = imports.lang;\n"
+msgstr ""
+"\n"
+"#!/usr/bin/gjs\n"
+"\n"
+"const Gtk = imports.gi.Gtk;\n"
+"const Lang = imports.lang;\n"
+
+#. (itstool) path: section/code
#: C/comboboxtext.js.page:42
#, no-wrap
msgid ""
@@ -8184,7 +8127,7 @@ msgstr ""
"ve kterém budou."
#. (itstool) path: section/code
-#: C/comboboxtext.js.page:67 C/combobox.js.page:71
+#: C/comboboxtext.js.page:67
#, no-wrap
msgid ""
"\n"
@@ -8462,7 +8405,7 @@ msgstr ""
"řekneme oknu, ať se zobrazí."
#. (itstool) path: section/code
-#: C/comboboxtext.js.page:151 C/combobox.js.page:208
+#: C/comboboxtext.js.page:151
#, no-wrap
msgid ""
"\n"
@@ -8524,36 +8467,33 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ComboBoxTextExample = new Lang.Class ({\n"
-" Name: 'ComboBoxText Example',\n"
+"class ComboBoxTextExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.jscomboboxtext'});\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -8573,18 +8513,16 @@ msgid ""
" this._comboBoxText.set_active (0);\n"
"\n"
" // Connect the combobox's 'changed' signal to our callback function\n"
-" this._comboBoxText.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
+" this._comboBoxText.connect ('changed', this._onComboChanged.bind(this));\n"
"\n"
" // Add the combobox to the window\n"
" this._window.add (this._comboBoxText);\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onComboChanged: function () {\n"
+" _onComboChanged() {\n"
"\n"
" // The responses we'll use for our messagedialog\n"
" let responses = [\"\",\n"
@@ -8605,23 +8543,21 @@ msgid ""
" text: responses[activeItem]});\n"
"\n"
" // Connect the OK button to a handler function\n"
-" this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
+" this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
"\n"
" // Show the messagedialog\n"
" this._popUp.show();\n"
" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onDialogResponse: function () {\n"
+" _onDialogResponse() {\n"
"\n"
" this._popUp.destroy ();\n"
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ComboBoxTextExample ();\n"
@@ -8629,36 +8565,33 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ComboBoxTextExample = new Lang.Class ({\n"
-" Name: 'ComboBoxText Example',\n"
+"class ComboBoxTextExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.jscomboboxtext'});\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -8678,18 +8611,16 @@ msgstr ""
" this._comboBoxText.set_active (0);\n"
"\n"
" // Napojí signál \"changed\" od rozbalovacího seznamu k naší funkci zpětnoho volání\n"
-" this._comboBoxText.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
+" this._comboBoxText.connect ('changed', this._onComboChanged.bind(this));\n"
"\n"
" // Přidá rozbalovací seznam do okna\n"
" this._window.add (this._comboBoxText);\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onComboChanged: function () {\n"
+" _onComboChanged() {\n"
"\n"
" // Reakce, které použijeme v našem dialogovém okně se zprávou\n"
" let responses = [\"\",\n"
@@ -8710,23 +8641,21 @@ msgstr ""
" text: responses[activeItem]});\n"
"\n"
" // Napojí tlačítko OK na obslušnou funkci\n"
-" this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
+" this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
"\n"
" // Zobrazí dialogové okno se zprávou\n"
" this._popUp.show();\n"
" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onDialogResponse: function () {\n"
+" _onDialogResponse() {\n"
"\n"
" this._popUp.destroy ();\n"
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ComboBoxTextExample ();\n"
@@ -9028,68 +8957,68 @@ msgid ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
msgstr ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
#. (itstool) path: section/code
-#: C/combobox.js.page:46
+#: C/combobox.js.page:47
#, no-wrap
msgid ""
"\n"
-"const ComboBoxExample = new Lang.Class ({\n"
-" Name: 'ComboBox Example',\n"
+"class ComboBoxExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.jscombobox'});\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
-"const ComboBoxExample = new Lang.Class ({\n"
-" Name: 'ComboBox Example',\n"
+"class ComboBoxExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.jscombobox'});\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\", která zobrazí okno při aktivaci\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\", která sestaví uživatelské rozhraní\n"
-" _onStartup: function () {\n"
+" _onStartup() {\n"
" this._buildUI ();\n"
-" },\n"
+" }\n"
#. (itstool) path: section/p
#: C/combobox.js.page:70
@@ -9104,6 +9033,34 @@ msgstr ""
"gjs/Gtk.Application.html\">Gtk.Application</link> pro naše widgety a okno, "
"ve kterém budou."
+#. (itstool) path: section/code
+#: C/combobox.js.page:71
+#, no-wrap
+msgid ""
+"\n"
+" // Build the application's UI\n"
+" _buildUI() {\n"
+"\n"
+" // Create the application window\n"
+" this._window = new Gtk.ApplicationWindow ({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Welcome to GNOME\",\n"
+" default_width: 200,\n"
+" border_width: 10 });\n"
+msgstr ""
+"\n"
+" // Sestaví uživatelské rozhraní aplikace\n"
+" _buildUI() {\n"
+"\n"
+" // Vytvoří okno aplikace\n"
+" this._window = new Gtk.ApplicationWindow ({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Welcome to GNOME\",\n"
+" default_width: 200,\n"
+" border_width: 10 });\n"
+
#. (itstool) path: section/title
#: C/combobox.js.page:87 C/treeview_simple_liststore.js.page:94
msgid "Creating the ListStore"
@@ -9363,14 +9320,14 @@ msgid ""
" this._comboBox.set_active (0);\n"
"\n"
" // Connect the combobox's 'changed' signal to our callback function\n"
-" this._comboBox.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
+" this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
msgstr ""
"\n"
" // Nastavení prvního řádku v rozbalovacím seznamu, aby byl aktivní po spuštění\n"
" this._comboBox.set_active (0);\n"
"\n"
" // Napojení signálu „changed“ od rozbalovacího seznamu na naši funkci zpětného volání\n"
-" this._comboBox.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
+" this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
#. (itstool) path: section/p
#: C/combobox.js.page:156
@@ -9398,7 +9355,7 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
" // Přidá rozbalovací seznam do okna\n"
@@ -9406,7 +9363,7 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
#. (itstool) path: section/p
#: C/combobox.js.page:166
@@ -9422,7 +9379,7 @@ msgstr ""
#, no-wrap
msgid ""
"\n"
-" _selected: function () {\n"
+" _selected() {\n"
"\n"
" // The silly pseudohaiku that we'll use for our messagedialog\n"
" let haiku = [\"\",\n"
@@ -9431,7 +9388,7 @@ msgid ""
" \"A moment in time\\na memory on the breeze\\nthese things can't be saved.\"];\n"
msgstr ""
"\n"
-" _selected: function () {\n"
+" _selected() {\n"
"\n"
" // Bláznivá pseudohaiku, kterou použijeme do dialogového okna se zprávou\n"
" let haiku = [\"\",\n"
@@ -9472,13 +9429,13 @@ msgid ""
" text: haiku[activeItem]});\n"
"\n"
" // Connect the OK button to a handler function\n"
-" this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
+" this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
"\n"
" // Show the messagedialog\n"
" this._popUp.show();\n"
" }\n"
"\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
" // Která položka v rozbalovacím seznamu je aktivní?\n"
@@ -9494,13 +9451,13 @@ msgstr ""
" text: haiku[activeItem]});\n"
"\n"
" // Napojí tlačítko OK na zpracující funkci\n"
-" this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
+" this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
"\n"
" // Zobrazí dialogové okno se zprávou\n"
" this._popUp.show();\n"
" }\n"
"\n"
-" },\n"
+" }\n"
#. (itstool) path: section/p
#: C/combobox.js.page:204
@@ -9529,6 +9486,28 @@ msgstr ""
"<code>get_active_text</code>, která vrací celý text ve vybrané položce."
#. (itstool) path: section/code
+#: C/combobox.js.page:208
+#, no-wrap
+msgid ""
+"\n"
+" _onDialogResponse() {\n"
+"\n"
+" this._popUp.destroy ();\n"
+"\n"
+" }\n"
+"\n"
+"};\n"
+msgstr ""
+"\n"
+" _onDialogResponse() {\n"
+"\n"
+" this._popUp.destroy ();\n"
+"\n"
+" }\n"
+"\n"
+"};\n"
+
+#. (itstool) path: section/code
#: C/combobox.js.page:219
#, no-wrap
msgid ""
@@ -9557,37 +9536,35 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ComboBoxExample = new Lang.Class ({\n"
-" Name: 'ComboBox Example',\n"
+"class ComboBoxExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.jscombobox'});\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -9638,18 +9615,16 @@ msgid ""
" this._comboBox.set_active (0);\n"
"\n"
" // Connect the combobox's 'changed' signal to our callback function\n"
-" this._comboBox.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
+" this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
"\n"
" // Add the combobox to the window\n"
" this._window.add (this._comboBox);\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _onComboChanged: function () {\n"
+" _onComboChanged() {\n"
"\n"
" // The silly pseudohaiku that we'll use for our messagedialog\n"
" let haiku = [\"\",\n"
@@ -9670,23 +9645,21 @@ msgid ""
" text: haiku[activeItem]});\n"
"\n"
" // Connect the OK button to a handler function\n"
-" this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
+" this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
"\n"
" // Show the messagedialog\n"
" this._popUp.show();\n"
" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onDialogResponse: function () {\n"
+" _onDialogResponse() {\n"
"\n"
" this._popUp.destroy ();\n"
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ComboBoxExample ();\n"
@@ -9694,37 +9667,35 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ComboBoxExample = new Lang.Class ({\n"
-" Name: 'ComboBox Example',\n"
+"class ComboBoxExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.jscombobox'});\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\", která zobrazí okno při aktivaci\n"
-" _onActivate: function () {\n"
+" _onActivate() {\n"
" this._window.present ();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\", která sestaví uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -9775,18 +9746,16 @@ msgstr ""
" this._comboBox.set_active (0);\n"
"\n"
" // Napojí signály „changed“ od rozbalovacího seznamu na naši funkci zpětného volání\n"
-" this._comboBox.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
+" this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
"\n"
" // Přidá rozbalovací seznam do okna\n"
" this._window.add (this._comboBox);\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onComboChanged: function () {\n"
+" _onComboChanged() {\n"
"\n"
" // Bláznivá pseudohaiku, kterou použijeme do dialogového okna se zprávou\n"
" let haiku = [\"\",\n"
@@ -9807,23 +9776,21 @@ msgstr ""
" text: haiku[activeItem]});\n"
"\n"
" // Napojí tlačítko OK na zpracující funkci\n"
-" this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
+" this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
"\n"
" // Zobrazí dialogové okno se zprávou\n"
" this._popUp.show();\n"
" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onDialogResponse: function () {\n"
+" _onDialogResponse() {\n"
"\n"
" this._popUp.destroy ();\n"
"\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ComboBoxExample ();\n"
@@ -11006,38 +10973,38 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const DialogExample = new Lang.Class ({\n"
-" Name: 'Dialog Example',\n"
+"class DialogExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jsdialog',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsdialog',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -11051,13 +11018,13 @@ msgid ""
" this._window.add (this._button);\n"
"\n"
" // Bind it to the function that creates the dialog\n"
-" this._button.connect (\"clicked\", Lang.bind(this, this._createDialog));\n"
+" this._button.connect (\"clicked\", this._createDialog.bind(this));\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _createDialog: function () {\n"
+" _createDialog() {\n"
"\n"
" // Create the dialog\n"
" this._dialog = new Gtk.Dialog ({ transient_for: this._window,\n"
@@ -11075,18 +11042,18 @@ msgid ""
" this._actionArea.add (this._OKButton);\n"
"\n"
" // Connect the button to the function that handles what it does\n"
-" this._OKButton.connect (\"clicked\", Lang.bind (this, this._OKHandler));\n"
+" this._OKButton.connect (\"clicked\", this._OKHandler.bind(this));\n"
"\n"
" this._dialog.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _OKHandler: function (dialog, response_id) {\n"
+" _OKHandler(dialog, response_id) {\n"
"\n"
" // Destroy the dialog\n"
" this._dialog.destroy();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new DialogExample ();\n"
@@ -11094,38 +11061,38 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const DialogExample = new Lang.Class ({\n"
-" Name: 'Dialog Example',\n"
+"class DialogExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jsdialog',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsdialog',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
-" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -11139,7 +11106,7 @@ msgstr ""
" this._window.add (this._button);\n"
"\n"
" // Napojí jej na funkci, který vytvoří dialogové okno\n"
-" this._button.connect (\"clicked\", Lang.bind(this, this._createDialog));\n"
+" this._button.connect (\"clicked\", this._createDialog.bind(this));\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
@@ -11163,18 +11130,18 @@ msgstr ""
" this._actionArea.add (this._OKButton);\n"
"\n"
" // Napojí tlačítko na funkci, které se bude starat o to, co se má udělat does\n"
-" this._OKButton.connect (\"clicked\", Lang.bind (this, this._OKHandler));\n"
+" this._OKButton.connect (\"clicked\", this._OKHandler.bind(this));\n"
"\n"
" this._dialog.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _OKHandler: function (dialog, response_id) {\n"
+" _OKHandler(dialog, response_id) {\n"
"\n"
" // Zlikviduje dialogové okno\n"
" this._dialog.destroy();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new DialogExample ();\n"
@@ -11779,40 +11746,38 @@ msgstr "Tato aplikace vás přivítá jménem ve vyskakovacím okně."
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const EntryExample = new Lang.Class({\n"
-" Name: 'Entry Example',\n"
+"class EntryExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsentry',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -11828,15 +11793,13 @@ msgid ""
" this._window.add(this.entry);\n"
"\n"
" // Connect the text entry box to a function that responds to what you type in\n"
-" this.entry.connect(\"activate\", Lang.bind (this, this._hello));\n"
+" this.entry.connect(\"activate\", this._hello.bind(this));\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _hello: function() {\n"
+" _hello() {\n"
"\n"
" // Create a popup dialog to greet the person who types in their name\n"
" this._greeter = new Gtk.MessageDialog ({\n"
@@ -11851,14 +11814,14 @@ msgid ""
" this._greeter.show();\n"
"\n"
" // Bind the OK button to the function that closes the popup\n"
-" this._greeter.connect (\"response\", Lang.bind(this, this._okClicked));\n"
-" },\n"
+" this._greeter.connect (\"response\", this._okClicked.bind(this));\n"
+" }\n"
"\n"
-" _okClicked: function () {\n"
+" _okClicked() {\n"
" this._greeter.destroy();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new EntryExample ();\n"
@@ -11866,40 +11829,38 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const EntryExample = new Lang.Class({\n"
-" Name: 'Entry Example',\n"
+"class EntryExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsentry',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -11915,15 +11876,13 @@ msgstr ""
" this._window.add(this.entry);\n"
"\n"
" // Napojí textové vstupní pole na funkci, která reaguje na to, co napíšete\n"
-" this.entry.connect(\"activate\", Lang.bind (this, this._hello));\n"
+" this.entry.connect(\"activate\", this._hello.bind(this));\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _hello: function() {\n"
+" _hello() {\n"
"\n"
" // Vytvoří vyskakovací dialogové okno, které přivítá osobu, co napsala své jméno\n"
" this._greeter = new Gtk.MessageDialog ({\n"
@@ -11938,14 +11897,14 @@ msgstr ""
" this._greeter.show();\n"
"\n"
" // Napojí tlačítko OK na funkci, která zavírá dialogové okno\n"
-" this._greeter.connect (\"response\", Lang.bind(this, this._okClicked));\n"
-" },\n"
+" this._greeter.connect (\"response\", this._okClicked.bind(this));\n"
+" }\n"
"\n"
-" _okClicked: function () {\n"
+" _okClicked() {\n"
" this._greeter.destroy();\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new EntryExample ();\n"
@@ -13769,33 +13728,32 @@ msgstr "FontChooserWidget (výběr písma) s funkcí zpětného volání."
msgid ""
"//!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const FontChooserWidgetExample = new Lang.Class ({\n"
-" Name: 'Font Chooser Widget Example',\n"
+"class FontChooserWidgetExample {\n"
"\n"
" // Create the application itthis\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({ application_id: 'org.example.fontchooserwidget' });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Create the application window\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -13811,19 +13769,19 @@ msgid ""
" this.fontChooser.set_preview_text(\"This is an example of preview text!\");\n"
"\n"
" // connect signal from the font chooser to the callback function\n"
-" this.fontChooser.connect(\"notify::font\", Lang.bind(this, this._fontCb));\n"
+" this.fontChooser.connect(\"notify::font\", this._fontCb.bind(this));\n"
"\n"
" // add the font chooser to the window\n"
" this.window.add(this.fontChooser);\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // callback function:\n"
-" _fontCb: function() {\n"
+" _fontCb() {\n"
" // print in the terminal\n"
" print(\"You chose the font \" + this.fontChooser.get_font());\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new FontChooserWidgetExample();\n"
@@ -13831,33 +13789,32 @@ msgid ""
msgstr ""
"//!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const FontChooserWidgetExample = new Lang.Class ({\n"
-" Name: 'Font Chooser Widget Example',\n"
+"class FontChooserWidgetExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({ application_id: 'org.example.fontchooserwidget' });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Vytvoří okno aplikace\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -13867,25 +13824,25 @@ msgstr ""
" border_width: 10 });\n"
"\n"
" this.fontChooser = new Gtk.FontChooserWidget();\n"
-" // Výchozí písmo\n"
+" // Výchozí font\n"
" this.fontChooser.set_font(\"Sans\");\n"
-" // Text pro náhled písma\n"
+" // Text pro náhled fontu\n"
" this.fontChooser.set_preview_text(\"This is an example of preview text!\");\n"
"\n"
-" // Napojí signál od výběru písma na funkci zpětného volání\n"
-" this.fontChooser.connect(\"notify::font\", Lang.bind(this, this._fontCb));\n"
+" // Napojí signál od výběru fontu na funkci zpětného volání\n"
+" this.fontChooser.connect(\"notify::font\", this._fontCb.bind(this));\n"
"\n"
-" // Přidá výběr písma do okna\n"
+" // Přidá výběr fontu do okna\n"
" this.window.add(this.fontChooser);\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání\n"
-" _fontCb: function() {\n"
+" _fontCb() {\n"
" // Výpis do terminálu\n"
" print(\"You chose the font \" + this.fontChooser.get_font());\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new FontChooserWidgetExample();\n"
@@ -14342,28 +14299,28 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" //create the application\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" //connect to 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" //create the UI (in this case it's just the ApplicationWindow\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Welcome to GNOME\" });\n"
@@ -14373,18 +14330,18 @@ msgid ""
"\n"
" //show the window and all child widgets (none in this case)\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _showNew: function() {\n"
-" print (\"This doesn't do anything. It is only a demonstration.\");\n"
-" },\n"
+" _showNew() {\n"
+" print(\"This doesn't do anything. It is only a demonstration.\");\n"
+" }\n"
"\n"
-" _showAbout: function() {\n"
-" print (\"No AboutDialog here. This is only a demonstration.\");\n"
-" },\n"
+" _showAbout() {\n"
+" print(\"No AboutDialog here. This is only a demonstration.\");\n"
+" }\n"
"\n"
" //create the menu items and connect the signals to the callback functions.\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"New\",'app.new');\n"
" menu.append(\"About\", 'app.about');\n"
@@ -14392,39 +14349,30 @@ msgid ""
" this.application.set_app_menu(menu);\n"
"\n"
" let newAction = new Gio.SimpleAction ({ name: 'new' });\n"
-" newAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showNew();\n"
-" }));\n"
+" newAction.connect('activate', () => { this._showNew(); });\n"
" this.application.add_action(newAction);\n"
"\n"
" let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
+" }\n"
"\n"
" //callback function for 'activate' signal\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" //callback function for 'startup' signal\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" //You must call _initMenus() before calling _buildUI().\n"
" this._initMenus();\n"
" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"//run the application\n"
"let app = new Application ();\n"
@@ -14432,28 +14380,28 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" // Vytvoří aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Vytvoří uživatelské rozhraní (v tomto případě jen ApplicationWindow)\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Welcome to GNOME\" });\n"
@@ -14463,18 +14411,18 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety (v tomto případě žádné nejsou)\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _showNew: function() {\n"
-" print (\"This doesn't do anything. It is only a demonstration.\");\n"
-" },\n"
+" _showNew() {\n"
+" print(\"This doesn't do anything. It is only a demonstration.\");\n"
+" }\n"
"\n"
-" _showAbout: function() {\n"
-" print (\"No AboutDialog here. This is only a demonstration.\");\n"
-" },\n"
+" _showAbout() {\n"
+" print(\"No AboutDialog here. This is only a demonstration.\");\n"
+" }\n"
"\n"
" // Vytvoří položky nabídky a napojí signály na funkce zpětného volání\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"New\",'app.new');\n"
" menu.append(\"About\", 'app.about');\n"
@@ -14482,39 +14430,30 @@ msgstr ""
" this.application.set_app_menu(menu);\n"
"\n"
" let newAction = new Gio.SimpleAction ({ name: 'new' });\n"
-" newAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showNew();\n"
-" }));\n"
+" newAction.connect('activate', () => { this._showNew(); });\n"
" this.application.add_action(newAction);\n"
"\n"
" let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\"\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\"\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" //You must call _initMenus() before calling _buildUI().\n"
" this._initMenus();\n"
" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new Application ();\n"
@@ -15303,42 +15242,39 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const GridExample = new Lang.Class ({\n"
-" Name: 'Grid Example',\n"
+"class GridExample {\n"
"\n"
" /* Create the application itself\n"
" This boilerplate code is needed to build any GTK+ application. */\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jsgrid',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsgrid',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal initializes menus and builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -15351,7 +15287,7 @@ msgid ""
" // Create the widgets inside the grid\n"
" this.progressBar = new Gtk.ProgressBar ();\n"
" this.Button = new Gtk.Button ({ label: \"Button\" });\n"
-" this.Button.connect (\"clicked\", Lang.bind(this, this._clickHandler));\n"
+" this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
"\n"
" // Assemble the grid\n"
" this._window.add (this.Grid);\n"
@@ -15360,15 +15296,15 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Here's the function that says what happens when the button is clicked\n"
-" _clickHandler: function () {\n"
+" _clickHandler() {\n"
" this.progressBar.pulse ();\n"
" }\n"
"\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new GridExample ();\n"
@@ -15376,42 +15312,39 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const GridExample = new Lang.Class ({\n"
-" Name: 'Grid Example',\n"
+"class GridExample {\n"
"\n"
" /* Vytvoří vlastní aplikaci\n"
" This boilerplate code is needed to build any GTK+ application. */\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jsgrid',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsgrid',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -15424,7 +15357,7 @@ msgstr ""
" // Vytvoří widgety v mřížce\n"
" this.progressBar = new Gtk.ProgressBar ();\n"
" this.Button = new Gtk.Button ({ label: \"Button\" });\n"
-" this.Button.connect (\"clicked\", Lang.bind(this, this._clickHandler));\n"
+" this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
"\n"
" // Sestaví mřížku\n"
" this._window.add (this.Grid);\n"
@@ -15433,15 +15366,15 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Zde je funkce, která říká, co se stane, když je na tlačítko kliknuto\n"
-" _clickHandler: function () {\n"
+" _clickHandler() {\n"
" this.progressBar.pulse ();\n"
" }\n"
"\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new GridExample ();\n"
@@ -15917,29 +15850,29 @@ msgid ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" //create the application\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" //connect to 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" //create the UI (in this case it's just the ApplicationWindow\n"
-" _buildUI: function () {\n"
-" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
+" _buildUI() {\n"
+" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Welcome to GNOME\" });\n"
"\n"
@@ -15948,18 +15881,18 @@ msgid ""
"\n"
" //show the window and all child widgets (none in this case)\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" //callback function for 'activate' signal\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" //callback function for 'startup' signal\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"//run the application\n"
"let app = new Application ();\n"
@@ -15968,29 +15901,29 @@ msgstr ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" // Vytvoří aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Vytvoří uživatelské rozhraní (v tomto případě jen ApplicationWindow)\n"
-" _buildUI: function () {\n"
-" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
+" _buildUI() {\n"
+" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Welcome to GNOME\" });\n"
"\n"
@@ -15999,18 +15932,18 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety (v tomto případě žádné nejsou)\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\"\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\"\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new Application ();\n"
@@ -20301,35 +20234,35 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"const Webkit = imports.gi.WebKit;\n"
"\n"
-"const HelloGNOME = new Lang.Class ({\n"
-" Name: 'Hello GNOME',\n"
+"class HelloGNOME {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ();\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -20351,9 +20284,9 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new HelloGNOME ();\n"
@@ -20361,35 +20294,35 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"const Webkit = imports.gi.WebKit;\n"
"\n"
-"const HelloGNOME = new Lang.Class ({\n"
-" Name: 'Hello GNOME',\n"
+"class HelloGNOME {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application ();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazující okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -20411,9 +20344,9 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new HelloGNOME ();\n"
@@ -20836,42 +20769,40 @@ msgstr "Celý soubor:"
msgid ""
"#!/usr/bin/gjs\n"
"\n"
-"const Lang = imports.lang;\n"
+"imports.gi.versions.Gtk = '3.0'\n"
"const Gtk = imports.gi.Gtk;\n"
"\n"
-"const Application = new Lang.Class({\n"
-" //A Class requires an explicit Name parameter. This is the Class Name.\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" //create the application\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" //connect to 'activate' and 'startup' signals to handlers.\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" //create the UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" title: \"Hello World!\" });\n"
" this._window.set_default_size(200, 200);\n"
" this.label = new Gtk.Label({ label: \"Hello World\" });\n"
" this._window.add(this.label);\n"
-" },\n"
+" }\n"
"\n"
" //handler for 'activate' signal\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" //show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" //handler for 'startup' signal\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"//run the application\n"
"let app = new Application();\n"
@@ -20879,42 +20810,40 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
-"const Lang = imports.lang;\n"
+"imports.gi.versions.Gtk = '3.0'\n"
"const Gtk = imports.gi.Gtk;\n"
"\n"
-"const Application = new Lang.Class({\n"
-" // Třída vyžaduje výslovné nastavení vlastnosti Name. Jedná se o název třídy.\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" // Vytvoří aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k jejich obsluze.\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Vytvoří uživatelské rozhraní\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" title: \"Hello World!\" });\n"
" this._window.set_default_size(200, 200);\n"
" this.label = new Gtk.Label({ label: \"Hello World\" });\n"
" this._window.add(this.label);\n"
-" },\n"
+" }\n"
"\n"
" // Obsluha pro signál \"activate\"\n"
-" _onActivate: function() {\n"
-" // Zobrazí okno a všchny jeho synovské widgety\n"
+" _onActivate() {\n"
+" //show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
" // Obsluha pro signál \"startup\"\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new Application();\n"
@@ -22089,60 +22018,57 @@ msgstr "Image (JavaScript)"
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
-"\n"
-"const ImageExample = new Lang.Class ({\n"
-"\tName: 'Image Example',\n"
-"\n"
-"\t/* Create the application itself\n"
-"\t This boilerplate code is needed to build any GTK+ application. */\n"
-" _init: function () {\n"
-" \t this.application = new Gtk.Application ({\n"
-" \t application_id: 'org.example.jsimage',\n"
-" \t flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" \t });\n"
-"\n"
-"\t// Connect 'activate' and 'startup' signals to the callback functions\n"
-"\tthis.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-"\tthis.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-"\t},\n"
-"\n"
-"\t// Callback function for 'activate' signal presents windows when active\n"
-"\t_onActivate: function () {\n"
-"\t\tthis._window.present ();\n"
-"\t},\n"
-"\n"
-"\t// Callback function for 'startup' signal initializes menus and builds the UI\n"
-"\t_onStartup: function () {\n"
-"\t\tthis._buildUI ();\n"
-"\t},\n"
"\n"
+"class ImageExample {\n"
"\n"
+" /* Create the application itself\n"
+" This boilerplate code is needed to build any GTK+ application. */\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsimage',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
-"\t// Build the application's UI\n"
-"\t_buildUI: function () {\n"
+" // Callback function for 'activate' signal presents windows when active\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
-"\t\t// Create the application window\n"
-" \tthis._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-" \t window_position: Gtk.WindowPosition.CENTER,\n"
-" \t title: \"Welcome to GNOME\",\n"
-" \t default_height: 300,\n"
-" \t default_width: 300 });\n"
+" // Callback function for 'startup' signal initializes menus and builds the UI\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
-"\t\t// Create the label\n"
-"\t\tthis.jsimage = new Gtk.Image ({file: \"gnome-image.png\"});\n"
-"\t\tthis._window.add (this.jsimage);\n"
+" // Build the application's UI\n"
+" _buildUI() {\n"
"\n"
-" \t \t// Show the window and all child widgets\n"
-" \t \tthis._window.show_all();\n"
-"\t}\n"
+" // Create the application window\n"
+" this._window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Welcome to GNOME\",\n"
+" default_height: 300,\n"
+" default_width: 300\n"
+" });\n"
"\n"
+" // Create the label\n"
+" this.jsimage = new Gtk.Image ({file: \"gnome-image.png\"});\n"
+" this._window.add (this.jsimage);\n"
"\n"
-"});\n"
+" // Show the window and all child widgets\n"
+" this._window.show_all();\n"
+" }\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ImageExample ();\n"
@@ -22150,60 +22076,57 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
-"\n"
-"const ImageExample = new Lang.Class ({\n"
-"\tName: 'Image Example',\n"
-"\n"
-"\t/* Vytvoří vlastní aplikaci\n"
-"\t Tento základní kód je zapotřebí k sestavení kterékoliv aplikace GTK+. */\n"
-"\t_init: function () {\n"
-"\t this.application = new Gtk.Application ({\n"
-"\t application_id: 'org.example.jsimage',\n"
-"\t flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-"\t });\n"
-"\n"
-"\t// Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-"\tthis.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-"\tthis.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-"\t},\n"
-"\n"
-"\t// Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-"\t_onActivate: function () {\n"
-"\t\tthis._window.present ();\n"
-"\t},\n"
-"\n"
-"\t// Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-"\t_onStartup: function () {\n"
-"\t\tthis._buildUI ();\n"
-"\t},\n"
"\n"
+"class ImageExample {\n"
"\n"
+" /* Vytvoří vlastní aplikaci\n"
+" This boilerplate code is needed to build any GTK+ application. */\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jsimage',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
+" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
-"\t// Sestaví uživatelské rozhraní aplikace\n"
-"\t_buildUI: function () {\n"
+" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
-"\t\t// Vytvoří okno aplikace\n"
-"\t\tthis._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-"\t\t window_position: Gtk.WindowPosition.CENTER,\n"
-"\t\t title: \"Welcome to GNOME\",\n"
-"\t\t default_height: 300,\n"
-"\t\t default_width: 300 });\n"
+" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
-"\t\t// Vytvoří popisek\n"
-"\t\tthis.jsimage = new Gtk.Image ({file: \"gnome-image.png\"});\n"
-"\t\tthis._window.add (this.jsimage);\n"
+" // Sestaví uživatelské rozhraní aplikace\n"
+" _buildUI() {\n"
"\n"
-"\t\t// Zobrazí okno a všechny jeho synovské widgety\n"
-"\t\tthis._window.show_all();\n"
-"\t}\n"
+" // Vytvoří okno aplikace\n"
+" this._window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Welcome to GNOME\",\n"
+" default_height: 300,\n"
+" default_width: 300\n"
+" });\n"
"\n"
+" // Vytvoří popisek\n"
+" this.label = new Gtk.Label ({label: \"Hello GNOME!\"});\n"
+" this._window.add (this.label);\n"
"\n"
-"});\n"
+" // Zobrazí okno a všechny jeho synovské widgety\n"
+" this._window.show_all();\n"
+" }\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ImageExample ();\n"
@@ -25998,60 +25921,59 @@ msgstr "Popisek zobrazující přátelskou zprávu."
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const LabelExample = new Lang.Class ({\n"
-" Name: 'Label Example',\n"
+"class LabelExample {\n"
"\n"
" /* Create the application itself\n"
" This boilerplate code is needed to build any GTK+ application. */\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jslabel',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jslabel',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal initializes menus and builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
-" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"Welcome to GNOME\",\n"
-" default_height: 100,\n"
-" default_width: 200 });\n"
+" this._window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Welcome to GNOME\",\n"
+" default_height: 100,\n"
+" default_width: 200\n"
+" });\n"
"\n"
" // Create the label\n"
-" this.label = new Gtk.Label ({label: \"Hello GNOME!\"});\n"
-" this._window.add (this.label);\n"
+" this.label = new Gtk.Label({ label: \"Hello GNOME!\" });\n"
+" this._window.add(this.label);\n"
"\n"
-" // Show the window and all child widgets\n"
-" this._window.show_all();\n"
+" // Show the window and all child widgets\n"
+" this._window.show_all();\n"
" }\n"
"\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new LabelExample ();\n"
@@ -26059,60 +25981,59 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const LabelExample = new Lang.Class ({\n"
-" Name: 'Label Example',\n"
+"class LabelExample {\n"
"\n"
" /* Vytvoří vlastní aplikaci\n"
" This boilerplate code is needed to build any GTK+ application. */\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jslabel',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
-" });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application ({\n"
+" application_id: 'org.example.jslabel',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
-" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"Welcome to GNOME\",\n"
-" default_height: 100,\n"
-" default_width: 200 });\n"
+" this._window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Welcome to GNOME\",\n"
+" default_height: 100,\n"
+" default_width: 200\n"
+" });\n"
"\n"
" // Vytvoří popisek\n"
-" this.label = new Gtk.Label ({label: \"Hello GNOME!\"});\n"
-" this._window.add (this.label);\n"
+" this.label = new Gtk.Label({ label: \"Hello GNOME!\" });\n"
+" this._window.add(this.label);\n"
"\n"
-" // Zobrazí okno a všechny jeho synovské widgety\n"
-" this._window.show_all();\n"
+" // Zobrazí okno a všechny jeho synovské widgety\n"
+" this._window.show_all();\n"
" }\n"
"\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new LabelExample ();\n"
@@ -26620,38 +26541,38 @@ msgstr "Tlačítko, které odkazuje na live.gnome.org."
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const LinkButtonExample = new Lang.Class ({\n"
-" Name: 'LinkButton Example',\n"
+"class LinkButtonExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jslinkbutton',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jslinkbutton',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal initializes menus and builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -26667,8 +26588,8 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"});\n"
+" }\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new LinkButtonExample ();\n"
@@ -26676,38 +26597,38 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const LinkButtonExample = new Lang.Class ({\n"
-" Name: 'LinkButton Example',\n"
+"class LinkButtonExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jslinkbutton',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jslinkbutton',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({ application: this.application,\n"
@@ -26723,8 +26644,8 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"});\n"
+" }\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new LinkButtonExample ();\n"
@@ -30038,26 +29959,28 @@ msgstr "Anna Zacchi"
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" //create the application\n"
-" _init: function() {\n"
-" this.application = new Gtk.Application ({ application_id: 'org.example.myapp',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.myapp',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
-" //connect to 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" //connect to 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" //create the UI (in this case it's just the ApplicationWindow)\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"MenuButton Example\" });\n"
@@ -30068,7 +29991,7 @@ msgid ""
"\n"
" this._menuButton = new Gtk.MenuButton();\n"
" this.grid.attach(this._menuButton, 0, 0, 1, 1 );\n"
-" this.menu = new Gtk.Menu.new_from_model(this.menuModel);\n"
+" this.menu = Gtk.Menu.new_from_model(this.menuModel);\n"
"\n"
" this.menu.show();\n"
" this._menuButton.set_menu_model (this.menuModel);\n"
@@ -30076,37 +29999,28 @@ msgid ""
" this._menuButton.show();\n"
"\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _showNew: function() {\n"
-" print(\"You clicked \\\"New\\\"\");\n"
-" },\n"
+" _showNew() {\n"
+" print(\"You clicked \\\"New\\\"\");\n"
+" }\n"
"\n"
-" _showAbout: function() {\n"
+" _showAbout() {\n"
" print(\"You clicked \\\"About\\\"\");\n"
-" },\n"
+" }\n"
"\n"
" //create the menu items and connect the signals to the callback functions.\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let newAction = new Gio.SimpleAction({ name: 'new' });\n"
-" newAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showNew();\n"
-" }));\n"
+" newAction.connect('activate', () => { this._showNew(); });\n"
" this.application.add_action(newAction);\n"
"\n"
" let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" let quitAction = new Gio.SimpleAction({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
"\n"
" this.menuModel = new Gio.Menu();\n"
@@ -30124,20 +30038,20 @@ msgid ""
" this.menuItemQuit = Gio.MenuItem.new(\"Quit\", 'app.quit');\n"
" this.subMenu.append_item(this.menuItemQuit);\n"
" this.menuModel.append_item(this.fileMenuItem);\n"
-" },\n"
+" }\n"
"\n"
" //callback function for 'activate' signal\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" //callback function for 'startup' signal\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" //You must call _initMenus() before calling _buildUI().\n"
" this._initMenus();\n"
" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"//run the application\n"
"let app = new Application();\n"
@@ -30145,26 +30059,28 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" // Vytvoří aplikaci\n"
-" _init: function() {\n"
-" this.application = new Gtk.Application ({ application_id: 'org.example.myapp',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.myapp',\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Vytvoří uživatelské rozhraní (v tomto případě jen ApplicationWindow)\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"MenuButton Example\" });\n"
@@ -30175,7 +30091,7 @@ msgstr ""
"\n"
" this._menuButton = new Gtk.MenuButton();\n"
" this.grid.attach(this._menuButton, 0, 0, 1, 1 );\n"
-" this.menu = new Gtk.Menu.new_from_model(this.menuModel);\n"
+" this.menu = Gtk.Menu.new_from_model(this.menuModel);\n"
"\n"
" this.menu.show();\n"
" this._menuButton.set_menu_model (this.menuModel);\n"
@@ -30183,37 +30099,28 @@ msgstr ""
" this._menuButton.show();\n"
"\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _showNew: function() {\n"
-" print(\"You clicked \\\"New\\\"\");\n"
-" },\n"
+" _showNew() {\n"
+" print(\"You clicked \\\"New\\\"\");\n"
+" }\n"
"\n"
-" _showAbout: function() {\n"
+" _showAbout() {\n"
" print(\"You clicked \\\"About\\\"\");\n"
-" },\n"
+" }\n"
"\n"
" // Vytvoří položky nabídky a napojí signály na funkce zpětného volání\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let newAction = new Gio.SimpleAction({ name: 'new' });\n"
-" newAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showNew();\n"
-" }));\n"
+" newAction.connect('activate', () => { this._showNew(); });\n"
" this.application.add_action(newAction);\n"
"\n"
" let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" let quitAction = new Gio.SimpleAction({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
"\n"
" this.menuModel = new Gio.Menu();\n"
@@ -30231,20 +30138,20 @@ msgstr ""
" this.menuItemQuit = Gio.MenuItem.new(\"Quit\", 'app.quit');\n"
" this.subMenu.append_item(this.menuItemQuit);\n"
" this.menuModel.append_item(this.fileMenuItem);\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\"\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\"\n"
-" _onStartup: function() {\n"
-" //You must call _initMenus() before calling _buildUI().\n"
+" _onStartup() {\n"
+" //Před voláním _buildUI() musíte zavolat _initMenus()\n"
" this._initMenus();\n"
" this._buildUI();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new Application();\n"
@@ -31946,6 +31853,26 @@ msgstr ""
"vhodný způsob, jak zobrazit obyčejnou zprávu a tlačítka."
#. (itstool) path: section/code
+#: C/messagedialog.js.page:32 C/radiobutton.js.page:29 C/scale.js.page:29
+#: C/spinbutton.js.page:32 C/statusbar.js.page:29 C/switch.js.page:36
+#: C/togglebutton.js.page:29
+#, no-wrap
+msgid ""
+"\n"
+"#!/usr/bin/gjs\n"
+"\n"
+"const Gio = imports.gi.Gio;\n"
+"const Gtk = imports.gi.Gtk;\n"
+"const Lang = imports.lang;\n"
+msgstr ""
+"\n"
+"#!/usr/bin/gjs\n"
+"\n"
+"const Gio = imports.gi.Gio;\n"
+"const Gtk = imports.gi.Gtk;\n"
+"const Lang = imports.lang;\n"
+
+#. (itstool) path: section/code
#: C/messagedialog.js.page:44
#, no-wrap
msgid ""
@@ -32324,61 +32251,60 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const MessageDialogExample = new Lang.Class ({\n"
-" Name: 'MessageDialog Example',\n"
+"class MessageDialogExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsmessagedialog',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE });\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal initializes menus and builds the UI\n"
-" _onStartup: function () {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
-" this._window = new Gtk.ApplicationWindow ({\n"
+" this._window = new Gtk.ApplicationWindow({\n"
" application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Gtk.MessageDialog Example\",\n"
" default_height: 200,\n"
-" default_width: 400 });\n"
+" default_width: 400\n"
+" });\n"
"\n"
" // Create a silly warning message and add it to the window\n"
-" this.warningLabel = new Gtk.Label ({\n"
-" label: \"This application goes boom! (Not really.)\"});\n"
+" this.warningLabel = new Gtk.Label({\n"
+" label: \"This application goes boom! (Not really.)\"\n"
+" });\n"
" this._window.add (this.warningLabel);\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Build the application menu, including the button that calls the dialog\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"Message\",'app.message');\n"
" menu.append(\"Quit\",'app.quit');\n"
@@ -32386,24 +32312,16 @@ msgid ""
"\n"
" // This pops up a MessageDialog when \"Message\" is clicked in the menu\n"
" let messageAction = new Gio.SimpleAction ({ name: 'message' });\n"
-" messageAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showMessageDialog();\n"
-" }));\n"
+" messageAction.connect('activate', () => { this._showMessageDialog(); });\n"
" this.application.add_action(messageAction);\n"
"\n"
" // This closes the window when \"Quit\" is clicked in the menu\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _showMessageDialog: function () {\n"
+" _showMessageDialog() {\n"
"\n"
" // Create a modal MessageDialog whose parent is the window\n"
" this._messageDialog = new Gtk.MessageDialog ({\n"
@@ -32413,14 +32331,12 @@ msgid ""
" message_type: Gtk.MessageType.WARNING,\n"
" text: \"This action will cause the universe to stop existing.\" });\n"
"\n"
-" this._messageDialog.connect ('response', Lang.bind(this, this._response_cb));\n"
+" this._messageDialog.connect ('response', this._response_cb.bind(this));\n"
" this._messageDialog.show();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Callback function (aka signal handler) for the response signal\n"
-" _response_cb: function (messagedialog, response_id) {\n"
+" _response_cb(messagedialog, response_id) {\n"
"\n"
" // A simple switch that changes the main window's label\n"
" switch (response_id) {\n"
@@ -32438,8 +32354,7 @@ msgid ""
" this._messageDialog.destroy();\n"
"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new MessageDialogExample ();\n"
@@ -32447,61 +32362,60 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const MessageDialogExample = new Lang.Class ({\n"
-" Name: 'MessageDialog Example',\n"
+"class MessageDialogExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsmessagedialog',\n"
-" flags: Gio.ApplicationFlags.FLAGS_NONE });\n"
+" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
-" this._window = new Gtk.ApplicationWindow ({\n"
+" this._window = new Gtk.ApplicationWindow({\n"
" application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Gtk.MessageDialog Example\",\n"
" default_height: 200,\n"
-" default_width: 400 });\n"
+" default_width: 400\n"
+" });\n"
"\n"
" // Vytvoří bláznivou varovnou zprávu a přidá ji do okna\n"
-" this.warningLabel = new Gtk.Label ({\n"
-" label: \"This application goes boom! (Not really.)\"});\n"
+" this.warningLabel = new Gtk.Label({\n"
+" label: \"This application goes boom! (Not really.)\"\n"
+" });\n"
" this._window.add (this.warningLabel);\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Sestaví aplikační nabídku, včetně položky, které volá dialogové okno\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"Message\",'app.message');\n"
" menu.append(\"Quit\",'app.quit');\n"
@@ -32509,24 +32423,16 @@ msgstr ""
"\n"
" // Tímto se zobrazí MessageDialog, když je v nabídce kliknuto na Message\n"
" let messageAction = new Gio.SimpleAction ({ name: 'message' });\n"
-" messageAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showMessageDialog();\n"
-" }));\n"
+" messageAction.connect('activate', () => { this._showMessageDialog(); });\n"
" this.application.add_action(messageAction);\n"
"\n"
" // Tímto se zavře okno, když je v nabídce kliknuto na Quit\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _showMessageDialog: function () {\n"
+" _showMessageDialog() {\n"
"\n"
" // Vytvoří modální MessageDialog, jehož rodičem je okno\n"
" this._messageDialog = new Gtk.MessageDialog ({\n"
@@ -32536,14 +32442,12 @@ msgstr ""
" message_type: Gtk.MessageType.WARNING,\n"
" text: \"This action will cause the universe to stop existing.\" });\n"
"\n"
-" this._messageDialog.connect ('response', Lang.bind(this, this._response_cb));\n"
+" this._messageDialog.connect ('response', this._response_cb.bind(this));\n"
" this._messageDialog.show();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Funkce zpětného volání (neboli obsluha signálu) pro reagování na signál\n"
-" _response_cb: function (messagedialog, response_id) {\n"
+" _response_cb(messagedialog, response_id) {\n"
"\n"
" // Jednoduchý rozdělovač, který mění název v záhlaví hlavního okna\n"
" switch (response_id) {\n"
@@ -32561,8 +32465,7 @@ msgstr ""
" this._messageDialog.destroy();\n"
"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new MessageDialogExample ();\n"
@@ -34017,33 +33920,32 @@ msgstr "Paned (JavaScript)"
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const PanedExample = new Lang.Class ({\n"
-" Name: 'Paned Example',\n"
+"class PanedExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({ application_id: 'org.example.panedexample' });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Create the application window\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -34071,7 +33973,7 @@ msgid ""
" this.window.add(this.paned)\n"
" this.window.show_all();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new PanedExample();\n"
@@ -34079,33 +33981,32 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const PanedExample = new Lang.Class ({\n"
-" Name: 'Paned Example',\n"
+"class PanedExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({ application_id: 'org.example.panedexample' });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Vytvoří okno aplikace\n"
" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
@@ -34133,7 +34034,7 @@ msgstr ""
" this.window.add(this.paned)\n"
" this.window.show_all();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new PanedExample();\n"
@@ -35680,40 +35581,38 @@ msgstr "Tento PrograssBar ze zastavuje a spouští zmáčknutím libovolné klá
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ProgressBarExample = new Lang.Class({\n"
-" Name: 'ProgressBar Example',\n"
+"class ProgressBarExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsprogressbar',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
@@ -35727,34 +35626,34 @@ msgid ""
" this._window.add(this.progressBar);\n"
"\n"
" // Start the function that pulses the bar every 100 milliseconds\n"
-" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, Lang.bind(this, this._barPulse));\n"
+" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
+" this._barPulse.bind(this));\n"
"\n"
" // Connect a keypress event to the function that toggles the bar to start or stop pulsing\n"
-" this._window.connect(\"key-press-event\", Lang.bind(this, this._onKeyPress));\n"
+" this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Pulse the progressbar (unless it has been disabled by a keypress)\n"
-" _barPulse: function() {\n"
+" _barPulse() {\n"
" this.progressBar.pulse();\n"
" return true;\n"
-" },\n"
+" }\n"
"\n"
" // Start or stop the progressbar when a key is pressed\n"
-" _onKeyPress: function() {\n"
+" _onKeyPress() {\n"
" if (this.sourceID == 0)\n"
-" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, Lang.bind(this,
this._barPulse));\n"
+" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
+" this._barPulse.bind(this));\n"
" else {\n"
" GLib.source_remove(this.sourceID);\n"
" this.sourceID = 0;\n"
" }\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ProgressBarExample ();\n"
@@ -35762,40 +35661,38 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ProgressBarExample = new Lang.Class({\n"
-" Name: 'ProgressBar Example',\n"
+"class ProgressBarExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsprogressbar',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
@@ -35809,34 +35706,34 @@ msgstr ""
" this._window.add(this.progressBar);\n"
"\n"
" // Spustí funkci, která pulzuje ukazatelem průběhu každých 100 milisekund\n"
-" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, Lang.bind(this, this._barPulse));\n"
+" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
+" this._barPulse.bind(this));\n"
"\n"
" // Napojí událost zmáčknutí klávesy na funkci, která přepíná pulzování ukazatele průběhu\n"
-" this._window.connect(\"key-press-event\", Lang.bind(this, this._onKeyPress));\n"
+" this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
" // Pulzuje ukazatelem průběhu (pokud nebyl zakázán zmáčknutím klávesy)\n"
-" _barPulse: function() {\n"
+" _barPulse() {\n"
" this.progressBar.pulse();\n"
" return true;\n"
-" },\n"
+" }\n"
"\n"
" // Spustí a zastaví ukazatel průběhu při zmáčknátí klávesy\n"
-" _onKeyPress: function() {\n"
+" _onKeyPress() {\n"
" if (this.sourceID == 0)\n"
-" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, Lang.bind(this,
this._barPulse));\n"
+" this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
+" this._barPulse.bind(this));\n"
" else {\n"
" GLib.source_remove(this.sourceID);\n"
" this.sourceID = 0;\n"
" }\n"
" }\n"
"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ProgressBarExample ();\n"
@@ -36927,6 +36824,20 @@ msgstr ""
"Když máme skupinové přepínače uspořádané, vložíme je do třetí, hlavní, "
"mřížky spolu s tlačítkem <gui>OK</gui>. Tu pak připojíme do okna."
+#. (itstool) path: section/code
+#: C/radiobutton.js.page:170
+#, no-wrap
+msgid ""
+"\n"
+" // Show the window and all child widgets\n"
+" this._window.show_all();\n"
+" },\n"
+msgstr ""
+"\n"
+" // Zobrazí okno a všechny jeho synovské widgety\n"
+" this._window.show_all();\n"
+" },\n"
+
#. (itstool) path: section/p
#: C/radiobutton.js.page:176
msgid ""
@@ -37158,39 +37069,37 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const RadioButtonExample = new Lang.Class({\n"
-" Name: 'RadioButton Example',\n"
+"class RadioButtonExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsradiobutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -37226,7 +37135,7 @@ msgid ""
" halign: Gtk.Align.END });\n"
"\n"
" // Connect the button to the function which handles clicking it\n"
-" this._okButton.connect ('clicked', Lang.bind (this, this._okClicked));\n"
+" this._okButton.connect ('clicked', this._okClicked.bind(this));\n"
"\n"
" // Create a grid to put the \"place\" items in\n"
" this._places = new Gtk.Grid ();\n"
@@ -37263,11 +37172,9 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _okClicked: function () {\n"
+" _okClicked() {\n"
"\n"
" // Create a popup that shows a silly message\n"
" this._travel = new Gtk.MessageDialog ({\n"
@@ -37281,13 +37188,11 @@ msgid ""
" this._travel.show();\n"
"\n"
" // Bind the OK button to the function that closes the popup\n"
-" this._travel.connect (\"response\", Lang.bind (this, this._clearTravelPopUp));\n"
-"\n"
-" },\n"
-"\n"
+" this._travel.connect (\"response\", this._clearTravelPopUp.bind(this));\n"
"\n"
+" }\n"
"\n"
-" _messageText: function() {\n"
+" _messageText() {\n"
"\n"
" // Create a silly message for the popup depending on what you selected\n"
" var stringMessage = \"\";\n"
@@ -37328,18 +37233,12 @@ msgid ""
"\n"
" return stringMessage;\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-"\n"
-" _clearTravelPopUp: function () {\n"
+" }\n"
"\n"
+" _clearTravelPopUp() {\n"
" this._travel.destroy();\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new RadioButtonExample ();\n"
@@ -37347,39 +37246,37 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const RadioButtonExample = new Lang.Class({\n"
-" Name: 'RadioButton Example',\n"
+"class RadioButtonExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsradiobutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -37415,7 +37312,7 @@ msgstr ""
" halign: Gtk.Align.END });\n"
"\n"
" // Napojí tlačítko na funkci, která zpracovává kliknutí na něj\n"
-" this._okButton.connect ('clicked', Lang.bind (this, this._okClicked));\n"
+" this._okButton.connect ('clicked', this._okClicked.bind(this));\n"
"\n"
" // Vytvoří mřížku pro položky v seznamu „místa“\n"
" this._places = new Gtk.Grid ();\n"
@@ -37452,11 +37349,9 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _okClicked: function () {\n"
+" _okClicked() {\n"
"\n"
" // Vytvoří vyskakovací dialogové okno, které zobrazí bláznivou zprávu\n"
" this._travel = new Gtk.MessageDialog ({\n"
@@ -37470,13 +37365,11 @@ msgstr ""
" this._travel.show();\n"
"\n"
" // Napojí tlačítko OK na funkci, která zavře vyskakovací dialogové okno\n"
-" this._travel.connect (\"response\", Lang.bind (this, this._clearTravelPopUp));\n"
-"\n"
-" },\n"
-"\n"
+" this._travel.connect (\"response\", this._clearTravelPopUp.bind(this));\n"
"\n"
+" }\n"
"\n"
-" _messageText: function() {\n"
+" _messageText() {\n"
"\n"
" // Vytvoří bláznivou zprávu pro dialogové okno podle toho, co jste vybrali\n"
" var stringMessage = \"\";\n"
@@ -37517,18 +37410,12 @@ msgstr ""
"\n"
" return stringMessage;\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-"\n"
-" _clearTravelPopUp: function () {\n"
+" }\n"
"\n"
+" _clearTravelPopUp() {\n"
" this._travel.destroy();\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new RadioButtonExample ();\n"
@@ -39848,38 +39735,36 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ScaleExample = new Lang.Class({\n"
-" Name: 'Scale Example',\n"
+"class ScaleExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsscale'\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -39920,8 +39805,8 @@ msgid ""
" wrap: true});\n"
"\n"
" // Connect the two scales to functions which recalculate the label\n"
-" this._hScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
-" this._vScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
+" this._hScale.connect (\"value-changed\", this._recalc.bind(this));\n"
+" this._vScale.connect (\"value-changed\", this._recalc.bind(this));\n"
"\n"
" // Create a grid to arrange things in\n"
" this._UIGrid = new Gtk.Grid ({\n"
@@ -39940,11 +39825,9 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _recalc: function() {\n"
+" _recalc() {\n"
"\n"
" // Figure out what the product of the two scales' values is\n"
" var product = (this._hScale.get_value() * this._vScale.get_value());\n"
@@ -39966,10 +39849,8 @@ msgid ""
"\n"
" // Set ._label's new text\n"
" this._label.set_label (String (product) + \" penguins on the iceberg. \" + comment);\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ScaleExample ();\n"
@@ -39977,38 +39858,36 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ScaleExample = new Lang.Class({\n"
-" Name: 'Scale Example',\n"
+"class ScaleExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsscale'\n"
" });\n"
"\n"
-" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -40050,8 +39929,8 @@ msgstr ""
" wrap: true});\n"
"\n"
" // Napojí dvě stupnice na funkci, která přepočítává údaj pro popisek\n"
-" this._hScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
-" this._vScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
+" this._hScale.connect (\"value-changed\", this._recalc.bind(this));\n"
+" this._vScale.connect (\"value-changed\", this._recalc.bind(this));\n"
"\n"
" // Vytvoří mřížku pro uspořádání věcí\n"
" this._UIGrid = new Gtk.Grid ({\n"
@@ -40070,11 +39949,9 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _recalc: function() {\n"
+" _recalc() {\n"
"\n"
" // Zjistí, jaký je součin hodnot ze dvou stupnic\n"
" var product = (this._hScale.get_value() * this._vScale.get_value());\n"
@@ -40096,10 +39973,8 @@ msgstr ""
"\n"
" // Nastaví nový text pro ._label\n"
" this._label.set_label (String (product) + \" penguins on the iceberg. \" + comment);\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ScaleExample ();\n"
@@ -40788,41 +40663,45 @@ msgstr "ScrolledWindow (JavaScript)"
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ScrolledWindowExample = new Lang.Class ({\n"
-" Name: 'ScrolledWindow Example',\n"
+"class ScrolledWindowExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application({ application_id: 'org.example.jscrolledwindow' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jscrolledwindow'\n"
+" });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Create the application window\n"
-" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"ScrolledWindow Example\",\n"
-" default_width: 200,\n"
-" default_height: 200,\n"
-" border_width: 10 });\n"
+" this.window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"ScrolledWindow Example\",\n"
+" default_width: 200,\n"
+" default_height: 200,\n"
+" border_width: 10\n"
+" });\n"
" // the scrolledwindow\n"
" this.scrolledWindow = new Gtk.ScrolledWindow();\n"
" this.scrolledWindow.set_border_width(10);\n"
@@ -40839,7 +40718,7 @@ msgid ""
" this.window.add(this.scrolledWindow);\n"
" this.window.show_all();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ScrolledWindowExample();\n"
@@ -40847,41 +40726,45 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ScrolledWindowExample = new Lang.Class ({\n"
-" Name: 'ScrolledWindow Example',\n"
+"class ScrolledWindowExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application({ application_id: 'org.example.jscrolledwindow' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jscrolledwindow'\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
" // Vytvoří okno aplikace\n"
-" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"ScrolledWindow Example\",\n"
-" default_width: 200,\n"
-" default_height: 200,\n"
-" border_width: 10 });\n"
+" this.window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"ScrolledWindow Example\",\n"
+" default_width: 200,\n"
+" default_height: 200,\n"
+" border_width: 10\n"
+" });\n"
" // Okno s posuvníky\n"
" this.scrolledWindow = new Gtk.ScrolledWindow();\n"
" this.scrolledWindow.set_border_width(10);\n"
@@ -40898,7 +40781,7 @@ msgstr ""
" this.window.add(this.scrolledWindow);\n"
" this.window.show_all();\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ScrolledWindowExample();\n"
@@ -42531,38 +42414,36 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const SpinButtonExample = new Lang.Class({\n"
-" Name: 'SpinButton Example',\n"
+"class SpinButtonExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsspinbutton'\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -42573,7 +42454,7 @@ msgid ""
"\n"
" // Create the first spinbutton using a function\n"
" this._kittens = Gtk.SpinButton.new_with_range (1, 9001, 1);\n"
-" this._kittens.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
+" this._kittens.connect (\"value-changed\", this._newValue.bind(this));\n"
"\n"
" // Create an adjustment to use for the second spinbutton\n"
" this._adjustment = new Gtk.Adjustment ({\n"
@@ -42585,7 +42466,7 @@ msgid ""
"\n"
" // Create the second spinbutton\n"
" this._tuna = new Gtk.SpinButton ({ adjustment: this._adjustment });\n"
-" this._tuna.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
+" this._tuna.connect (\"value-changed\", this._newValue.bind(this));\n"
"\n"
" // this._tuna.set_digits (1);\n"
" // this._tuna.set_wrap (true);\n"
@@ -42625,19 +42506,14 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _newValue: function () {\n"
+" }\n"
"\n"
+" _newValue() {\n"
" // Update the label which shows how many cans there are per kitten\n"
" this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()))\n"
" this._lastLabel.set_label (\"That's \" + this.perKitten + \" can(s) of tuna per kitten.\");\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new SpinButtonExample ();\n"
@@ -42645,38 +42521,36 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const SpinButtonExample = new Lang.Class({\n"
-" Name: 'SpinButton Example',\n"
+"class SpinButtonExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsspinbutton'\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
-" this._window.present();\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -42687,7 +42561,7 @@ msgstr ""
"\n"
" // Vytvoří pomocí funkce první číselník\n"
" this._kittens = Gtk.SpinButton.new_with_range (1, 9001, 1);\n"
-" this._kittens.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
+" this._kittens.connect (\"value-changed\", this._newValue.bind(this));\n"
"\n"
" // Vytvoří přizpůsobení, které se použije pro druhý číselník\n"
" this._adjustment = new Gtk.Adjustment ({\n"
@@ -42699,7 +42573,7 @@ msgstr ""
"\n"
" // Vytvoří druhý číselník\n"
" this._tuna = new Gtk.SpinButton ({ adjustment: this._adjustment });\n"
-" this._tuna.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
+" this._tuna.connect (\"value-changed\", this._newValue.bind(this));\n"
"\n"
" // this._tuna.set_digits (1);\n"
" // this._tuna.set_wrap (true);\n"
@@ -42739,19 +42613,14 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _newValue: function () {\n"
+" }\n"
"\n"
+" _newValue() {\n"
" // Aktualizuje popisek, který zobrazuje kolik konzerv připadá na jednu kočku\n"
" this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()))\n"
" this._lastLabel.set_label (\"That's \" + this.perKitten + \" can(s) of tuna per kitten.\");\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new SpinButtonExample ();\n"
@@ -43326,68 +43195,66 @@ msgstr "Spinner (JavaScript)"
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
"const Gdk = imports.gi.Gdk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const SpinnerExample = new Lang.Class ({\n"
-" Name: 'Spinner Example',\n"
+"class SpinnerExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsspinner',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
-" this._window = new Gtk.ApplicationWindow ({\n"
+" this._window = new Gtk.ApplicationWindow({\n"
" application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Spinner Example\",\n"
" default_height: 200,\n"
" default_width: 200,\n"
-" border_width: 30 });\n"
+" border_width: 30\n"
+" });\n"
"\n"
" // Create a spinner which starts spinning automatically\n"
" this._spinner = new Gtk.Spinner ({active: true});\n"
" this._window.add (this._spinner);\n"
"\n"
" // Connect a keypress event to the function that makes it start or stop spinning\n"
-" this._window.connect(\"key-press-event\", Lang.bind(this, this._onKeyPress));\n"
+" this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onKeyPress: function(widget, event) {\n"
+" _onKeyPress(widget, event) {\n"
"\n"
" // Get the value of the key that was pressed\n"
-" let keyval = event.get_keyval()[1];\n"
+" let [, keyval] = event.get_keyval();\n"
"\n"
" // If it was the spacebar, toggle the spinner to start or stop\n"
" if (keyval == Gdk.KEY_space) {\n"
@@ -43397,9 +43264,7 @@ msgid ""
" this._spinner.start();\n"
" }\n"
" }\n"
-"\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new SpinnerExample ();\n"
@@ -43407,68 +43272,66 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
"const Gdk = imports.gi.Gdk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const SpinnerExample = new Lang.Class ({\n"
-" Name: 'Spinner Example',\n"
+"class SpinnerExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsspinner',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
-" this._window = new Gtk.ApplicationWindow ({\n"
+" this._window = new Gtk.ApplicationWindow({\n"
" application: this.application,\n"
" window_position: Gtk.WindowPosition.CENTER,\n"
" title: \"Spinner Example\",\n"
" default_height: 200,\n"
" default_width: 200,\n"
-" border_width: 30 });\n"
+" border_width: 30\n"
+" });\n"
"\n"
" // Vytvoří káču která se začne automaticky točit\n"
" this._spinner = new Gtk.Spinner ({active: true});\n"
" this._window.add (this._spinner);\n"
"\n"
" // Napojít událost zmáčknutí klávesy na funkci, která spustí nebo zastaví otáčení\n"
-" this._window.connect(\"key-press-event\", Lang.bind(this, this._onKeyPress));\n"
+" this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onKeyPress: function(widget, event) {\n"
+" _onKeyPress(widget, event) {\n"
"\n"
" // Získá hodnotu klávesy, která byla zmáčknuta\n"
-" let keyval = event.get_keyval()[1];\n"
+" let [, keyval] = event.get_keyval();\n"
"\n"
" // Pokud se jedná o mezerník, přepne stav káči spuštěno/zastaveno\n"
" if (keyval == Gdk.KEY_space) {\n"
@@ -43478,9 +43341,7 @@ msgstr ""
" this._spinner.start();\n"
" }\n"
" }\n"
-"\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new SpinnerExample ();\n"
@@ -44605,39 +44466,37 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const StatusbarExample = new Lang.Class({\n"
-" Name: 'Statusbar Example',\n"
+"class StatusbarExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsstatusbar',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -44654,19 +44513,19 @@ msgid ""
" // Create the main button\n"
" this._clickMe = new Gtk.Button ({\n"
" label: \"Click Me!\" });\n"
-" this._clickMe.connect (\"clicked\", Lang.bind (this, this._clicked));\n"
+" this._clickMe.connect (\"clicked\", this._clicked.bind(this));\n"
"\n"
" // Create the back button\n"
" this._backButton = new Gtk.Button ({\n"
" label: \"gtk-go-back\",\n"
" use_stock: true });\n"
-" this._backButton.connect (\"clicked\", Lang.bind (this, this._back));\n"
+" this._backButton.connect (\"clicked\", this._back.bind(this));\n"
"\n"
" // Create the clear button\n"
" this._clearButton = new Gtk.Button ({\n"
" label: \"gtk-clear\",\n"
" use_stock: true });\n"
-" this._clearButton.connect (\"clicked\", Lang.bind (this, this._clear));\n"
+" this._clearButton.connect (\"clicked\", this._clear.bind(this));\n"
"\n"
" // Put the buttons in a grid\n"
" this._grid = new Gtk.Grid ({\n"
@@ -44707,35 +44566,27 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _clicked: function() {\n"
+" _clicked() {\n"
"\n"
" // Increment the number of clicks by 1\n"
" this.Clicks++;\n"
"\n"
" // Update the statusbar with the new number of clicks\n"
" this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
+" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _back: function () {\n"
+" _back() {\n"
"\n"
" // If there have been any clicks, decrement by 1 and remove last statusbar update\n"
" if (this.Clicks > 0 ) {\n"
" this.Clicks--;\n"
" this._statusbar.pop (this.ContextID);\n"
" };\n"
+" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _clear: function () {\n"
+" _clear() {\n"
"\n"
" // Reset the number of clicks\n"
" this.Clicks = 0;\n"
@@ -44745,10 +44596,8 @@ msgid ""
"\n"
" // Reset the statusbar's message\n"
" this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new StatusbarExample ();\n"
@@ -44756,39 +44605,37 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const StatusbarExample = new Lang.Class({\n"
-" Name: 'Statusbar Example',\n"
+"class StatusbarExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsstatusbar',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -44805,19 +44652,19 @@ msgstr ""
" // Vytvoří hlavní tlačítko\n"
" this._clickMe = new Gtk.Button ({\n"
" label: \"Click Me!\" });\n"
-" this._clickMe.connect (\"clicked\", Lang.bind (this, this._clicked));\n"
+" this._clickMe.connect (\"clicked\", this._clicked.bind(this));\n"
"\n"
-" // Vytvoří tlačítko Undo\n"
+" // Vytvoří tlačítko Back\n"
" this._backButton = new Gtk.Button ({\n"
" label: \"gtk-go-back\",\n"
" use_stock: true });\n"
-" this._backButton.connect (\"clicked\", Lang.bind (this, this._back));\n"
+" this._backButton.connect (\"clicked\", this._back.bind(this));\n"
"\n"
" // Vytvoří tlačítko Clear\n"
" this._clearButton = new Gtk.Button ({\n"
" label: \"gtk-clear\",\n"
" use_stock: true });\n"
-" this._clearButton.connect (\"clicked\", Lang.bind (this, this._clear));\n"
+" this._clearButton.connect (\"clicked\", this._clear.bind(this));\n"
"\n"
" // Vloží tlačítka do mřížky\n"
" this._grid = new Gtk.Grid ({\n"
@@ -44828,11 +44675,12 @@ msgstr ""
" this._grid.attach_next_to (this._clearButton, this._clickMe, Gtk.PositionType.RIGHT, 1, 1);\n"
"\n"
" // Vloží mřížku do většího rámu, který vyplní většinu okna\n"
-" this._topFrame = new Gtk.Frame ({\n"
-" border_width: 20,\n"
-" height_request: 90,\n"
-" width_request: 300});\n"
-" this._topFrame.add (this._grid);\n"
+" this._grid = new Gtk.Grid ({\n"
+" halign: Gtk.Align.CENTER,\n"
+" valign: Gtk.Align.CENTER });\n"
+" this._grid.attach (this._backButton, 0, 0, 1, 1);\n"
+" this._grid.attach_next_to (this._clickMe, this._backButton, Gtk.PositionType.RIGHT, 1, 1);\n"
+" this._grid.attach_next_to (this._clearButton, this._clickMe, Gtk.PositionType.RIGHT, 1, 1);\n"
"\n"
" // Vytvoří stavovou lištu\n"
" this._statusbar = new Gtk.Statusbar();\n"
@@ -44858,35 +44706,27 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _clicked: function() {\n"
+" _clicked() {\n"
"\n"
" // Zvýší počet kliknutí o 1\n"
" this.Clicks++;\n"
"\n"
" // Aktualizuje stavovou lištu na nový počet kliknutí\n"
" this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
+" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _back: function () {\n"
+" _back() {\n"
"\n"
" // Pokud bylo kliknuto, sníží o 1 a odstraní poslední aktualizaci stavové lišty\n"
" if (this.Clicks > 0 ) {\n"
" this.Clicks--;\n"
" this._statusbar.pop (this.ContextID);\n"
" };\n"
+" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _clear: function () {\n"
+" _clear() {\n"
"\n"
" // Vynuluje počet kliknutí\n"
" this.Clicks = 0;\n"
@@ -44896,10 +44736,8 @@ msgstr ""
"\n"
" // Nataví výchozí zprávu ve stavové liště\n"
" this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new StatusbarExample ();\n"
@@ -46497,39 +46335,37 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const SwitchExample = new Lang.Class({\n"
-" Name: 'Switch Example',\n"
+"class SwitchExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsswitch'\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal creates the menu and builds the UI\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -46548,7 +46384,7 @@ msgid ""
"\n"
" // Create the first switch and set its default position\n"
" this._flySwitch = new Gtk.Switch ({active: false});\n"
-" this._flySwitch.connect ('notify::active', Lang.bind (this, this._switchFlip));\n"
+" this._flySwitch.connect ('notify::active', this._switchFlip.bind(this));\n"
"\n"
" // Create a label for the second switch\n"
" this._birdLabel = new Gtk.Label ({\n"
@@ -46557,7 +46393,7 @@ msgid ""
"\n"
" // Create the second switch\n"
" this._birdSwitch = new Gtk.Switch ({active: false});\n"
-" this._birdSwitch.connect ('notify::active', Lang.bind (this, this._switchFlip));\n"
+" this._birdSwitch.connect ('notify::active', this._switchFlip.bind(this));\n"
"\n"
" // Create a grid for the labels and switches beneath the picture\n"
" this._UIGrid = new Gtk.Grid ({\n"
@@ -46585,33 +46421,27 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _switchFlip: function() {\n"
+" _switchFlip() {\n"
"\n"
" // Change the picture depending on which switches are flipped\n"
" if (this._flySwitch.get_active()) {\n"
"\n"
-" if (this._birdSwitch.get_active()) this._image.set_from_file (\"muteswan.png\");\n"
-"\n"
-" else this._image.set_from_file (\"fruitbat.png\");\n"
-" }\n"
-"\n"
-" else {\n"
-"\n"
-" if (this._birdSwitch.get_active()) this._image.set_from_file (\"gentoopenguin.png\");\n"
-"\n"
-" else this._image.set_from_file (\"redfox.png\");\n"
+" if (this._birdSwitch.get_active())\n"
+" this._image.set_from_file (\"muteswan.png\");\n"
+" else\n"
+" this._image.set_from_file (\"fruitbat.png\");\n"
+" } else {\n"
"\n"
+" if (this._birdSwitch.get_active())\n"
+" this._image.set_from_file (\"gentoopenguin.png\");\n"
+" else\n"
+" this._image.set_from_file (\"redfox.png\");\n"
" }\n"
+" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
"\n"
" // Build the application's menu so we can have an \"About\" button\n"
" let menu = new Gio.Menu();\n"
@@ -46621,24 +46451,16 @@ msgid ""
"\n"
" // Bind the \"About\" button to the _showAbout() function\n"
" let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" // Bind the \"Quit\" button to the function that closes the window\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _showAbout: function () {\n"
+" _showAbout() {\n"
"\n"
" // String arrays of the names of the people involved in the project\n"
" var artists = ['Rob Lee http://en.wikipedia.org/wiki/File:Fuzzy_Freddy.png', 'Ken Funakoshi
http://en.wikipedia.org/wiki/File:Pygoscelis_papua_-Nagasaki_Penguin_Aquarium_-swimming_underwater-8a.png',
'Shek Graham http://www.flickr.com/photos/shekgraham/127431519/in/photostream/', 'Mindaugas Urbonas
http://commons.wikimedia.org/wiki/File:Mute_Swan-Mindaugas_Urbonas.png'];\n"
@@ -46668,8 +46490,7 @@ msgid ""
" aboutDialog.destroy();\n"
" });\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new SwitchExample ();\n"
@@ -46677,39 +46498,37 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const SwitchExample = new Lang.Class({\n"
-" Name: 'Switch Example',\n"
+"class SwitchExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jsswitch'\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -46737,7 +46556,7 @@ msgstr ""
"\n"
" // Vytvoří druhý vypínač\n"
" this._birdSwitch = new Gtk.Switch ({active: false});\n"
-" this._birdSwitch.connect ('notify::active', Lang.bind (this, this._switchFlip));\n"
+" this._birdSwitch.connect ('notify::active', this._switchFlip.bind(this));\n"
"\n"
" // Vytvoří mřížku pro popisky a vypínače pod obrázkem\n"
" this._UIGrid = new Gtk.Grid ({\n"
@@ -46765,33 +46584,27 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _switchFlip: function() {\n"
+" _switchFlip() {\n"
"\n"
" // Změní obrázek podle toho, v jaké poloze je vypínač\n"
" if (this._flySwitch.get_active()) {\n"
"\n"
-" if (this._birdSwitch.get_active()) this._image.set_from_file (\"muteswan.png\");\n"
-"\n"
-" else this._image.set_from_file (\"fruitbat.png\");\n"
-" }\n"
-"\n"
-" else {\n"
-"\n"
-" if (this._birdSwitch.get_active()) this._image.set_from_file (\"gentoopenguin.png\");\n"
-"\n"
-" else this._image.set_from_file (\"redfox.png\");\n"
+" if (this._birdSwitch.get_active())\n"
+" this._image.set_from_file (\"muteswan.png\");\n"
+" else\n"
+" this._image.set_from_file (\"fruitbat.png\");\n"
+" } else {\n"
"\n"
+" if (this._birdSwitch.get_active())\n"
+" this._image.set_from_file (\"gentoopenguin.png\");\n"
+" else\n"
+" this._image.set_from_file (\"redfox.png\");\n"
" }\n"
+" }\n"
"\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _initMenus: function() {\n"
+" _initMenus() {\n"
"\n"
" // Sestaví aplikační nabídku, takže můžeme mít tlačítko „About“\n"
" let menu = new Gio.Menu();\n"
@@ -46801,24 +46614,16 @@ msgstr ""
"\n"
" // Napojí tlačítko „About“ na funkci _showAbout()\n"
" let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
-" aboutAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._showAbout();\n"
-" }));\n"
+" aboutAction.connect('activate', () => { this._showAbout(); });\n"
" this.application.add_action(aboutAction);\n"
"\n"
" // Napojí tlačítko „Quit“ na funkci, která zavírá okno\n"
" let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _showAbout: function () {\n"
+" _showAbout() {\n"
"\n"
" // Pole řetězců se jmény lidí, kteří se podílejí na projektu\n"
" var artists = ['Rob Lee http://en.wikipedia.org/wiki/File:Fuzzy_Freddy.png', 'Ken Funakoshi
http://en.wikipedia.org/wiki/File:Pygoscelis_papua_-Nagasaki_Penguin_Aquarium_-swimming_underwater-8a.png',
'Shek Graham http://www.flickr.com/photos/shekgraham/127431519/in/photostream/', 'Mindaugas Urbonas
http://commons.wikimedia.org/wiki/File:Mute_Swan-Mindaugas_Urbonas.png'];\n"
@@ -46848,8 +46653,7 @@ msgstr ""
" aboutDialog.destroy();\n"
" });\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new SwitchExample ();\n"
@@ -47992,36 +47796,34 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const TextViewExample = new Lang.Class ({\n"
-" Name: 'TextView Example',\n"
+"class TextViewExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jstextview' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jstextview'\n"
+" });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -48071,7 +47873,7 @@ msgid ""
" halign: Gtk.Align.END,\n"
" margin_top: 20,\n"
" label: \"Send\" });\n"
-" this._send.connect ('clicked', Lang.bind (this, this._chat));\n"
+" this._send.connect ('clicked', this._chat.bind(this));\n"
"\n"
" // Create a grid that will have the other grid on top and the button on bottom\n"
" this._mainGrid = new Gtk.Grid ({\n"
@@ -48087,11 +47889,9 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _chat: function () {\n"
+" _chat() {\n"
"\n"
" // Create a random number to determine what the penguin says\n"
" this.number = Math.floor ((Math.random() * 3) + 1);\n"
@@ -48136,10 +47936,8 @@ msgid ""
"\n"
" // Give focus back to the textview so you don't have to click it again\n"
" this._textView.has_focus = true;\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new TextViewExample ();\n"
@@ -48147,36 +47945,34 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const TextViewExample = new Lang.Class ({\n"
-" Name: 'TextView Example',\n"
+"class TextViewExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
-" application_id: 'org.example.jstextview' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jstextview'\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function () {\n"
-" this._window.present ();\n"
-" },\n"
+" _onActivate() {\n"
+" this._window.present();\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow ({\n"
@@ -48227,7 +48023,7 @@ msgstr ""
" halign: Gtk.Align.END,\n"
" margin_top: 20,\n"
" label: \"Send\" });\n"
-" this._send.connect ('clicked', Lang.bind (this, this._chat));\n"
+" this._send.connect ('clicked', this._chat.bind(this));\n"
"\n"
" // Vytvoří mřížku pro poddružnou mřížku nahoře a tlačítko dole\n"
" this._mainGrid = new Gtk.Grid ({\n"
@@ -48243,11 +48039,9 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _chat: function () {\n"
+" _chat() {\n"
"\n"
" // Vytvoří náhodné číslo, které určí, co tučňák řekne\n"
" this.number = Math.floor ((Math.random() * 3) + 1);\n"
@@ -48292,10 +48086,8 @@ msgstr ""
"\n"
" // Předá zaměření zpět textovému zobrazení, abyste do něj nemuseli znovu klikat\n"
" this._textView.has_focus = true;\n"
-"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new TextViewExample ();\n"
@@ -49421,39 +49213,37 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ToggleButtonExample = new Lang.Class({\n"
-" Name: 'ToggleButton Example',\n"
+"class ToggleButtonExample {\n"
"\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jstogglebutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -49469,7 +49259,7 @@ msgid ""
"\n"
" // Create the togglebutton that starts and stops the spinner\n"
" this._toggleButton = new Gtk.ToggleButton ({label: \"Start/Stop\"});\n"
-" this._toggleButton.connect ('toggled', Lang.bind (this, this._onToggle));\n"
+" this._toggleButton.connect ('toggled', this._onToggle.bind(this));\n"
"\n"
" // Create a grid and put everything in it\n"
" this._grid = new Gtk.Grid ({\n"
@@ -49483,11 +49273,9 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
+" }\n"
"\n"
-"\n"
-" _onToggle: function() {\n"
+" _onToggle() {\n"
"\n"
" // Start or stop the spinner\n"
" if (this._toggleButton.get_active ())\n"
@@ -49495,8 +49283,7 @@ msgid ""
" else this._spinner.stop ();\n"
"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new ToggleButtonExample ();\n"
@@ -49504,39 +49291,37 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const ToggleButtonExample = new Lang.Class({\n"
-" Name: 'ToggleButton Example',\n"
+"class ToggleButtonExample {\n"
"\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jstogglebutton',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
@@ -49552,7 +49337,7 @@ msgstr ""
"\n"
" // Vytvoří ToggleButton, které spouští a zastavuje káču\n"
" this._toggleButton = new Gtk.ToggleButton ({label: \"Start/Stop\"});\n"
-" this._toggleButton.connect ('toggled', Lang.bind (this, this._onToggle));\n"
+" this._toggleButton.connect ('toggled', this._onToggle.bind(this));\n"
"\n"
" // Vytvoří mřížku a vše do ní vloží\n"
" this._grid = new Gtk.Grid ({\n"
@@ -49566,11 +49351,9 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
+" }\n"
"\n"
-" _onToggle: function() {\n"
+" _onToggle() {\n"
"\n"
" // Spustí nebo zastaví káču\n"
" if (this._toggleButton.get_active ())\n"
@@ -49578,8 +49361,7 @@ msgstr ""
" else this._spinner.stop ();\n"
"\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new ToggleButtonExample ();\n"
@@ -50428,34 +50210,37 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gdk = imports.gi.Gdk;\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" //create the application\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" //connect to 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" //create the UI (in this case it's just the ApplicationWindow\n"
-" _buildUI: function() {\n"
-" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"Toolbar Example\",\n"
-" default_height: 200,\n"
-" default_width: 400 });\n"
+" _buildUI() {\n"
+" this._window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Toolbar Example\",\n"
+" default_height: 200,\n"
+" default_width: 400\n"
+" });\n"
"\n"
" this._grid = new Gtk.Grid();\n"
" this._window.add(this._grid);\n"
@@ -50468,21 +50253,21 @@ msgid ""
" //show the toolbar and window\n"
" this._toolbar.show();\n"
" this._window.show();\n"
-" },\n"
+" }\n"
"\n"
" //callback function for 'activate' signal\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" //callback function for 'startup' signal\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
" this._buildUI();\n"
-" },\n"
+" }\n"
"\n"
" //create the toolbar, its toolbuttons and their actions\n"
-" _createToolbar: function() {\n"
+" _createToolbar() {\n"
"\n"
" this._toolbar = new Gtk.Toolbar();\n"
" this._toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
@@ -50491,13 +50276,10 @@ msgid ""
" //Using actions allows you to add them to the app menu\n"
" //without duplicating code.\n"
" let newAction = new Gio.SimpleAction({ name: 'new'});\n"
-" newAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._newCB();\n"
-" }));\n"
+" newAction.connect('activate', () => { this._newCB(); });\n"
" this.application.add_action(newAction);//note: this action is added to the app\n"
"\n"
-" this._newButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
+" this._newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
" this._newButton.is_important = true;\n"
" this._toolbar.add(this._newButton);\n"
" this._newButton.show();\n"
@@ -50505,13 +50287,10 @@ msgid ""
"\n"
" //create the \"Open\" ToolButton and its SimpleAction\n"
" let openAction = new Gio.SimpleAction({ name: 'open'});\n"
-" openAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._openCB();\n"
-" }));\n"
+" openAction.connect('activate', () => { this._openCB(); });\n"
" this.application.add_action(openAction);\n"
"\n"
-" this._openButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
+" this._openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
" this._openButton.is_important = true;\n"
" this._toolbar.add(this._openButton);\n"
" this._openButton.show();\n"
@@ -50519,13 +50298,10 @@ msgid ""
"\n"
" //create the \"Undo\" ToolButton and its SimpleAction\n"
" let undoAction = new Gio.SimpleAction({ name: 'undo'});\n"
-" undoAction.connect('activate', Lang.bind (this,\n"
-" function() {\n"
-" this._undoCB();\n"
-" }));\n"
+" undoAction.connect('activate', () => { this._undoCB(); });\n"
" this._window.add_action(undoAction);//note this action is added to the window\n"
"\n"
-" this._undoButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
+" this._undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
" this._undoButton.is_important = true;\n"
" this._toolbar.add(this._undoButton);\n"
" this._undoButton.show();\n"
@@ -50533,26 +50309,25 @@ msgid ""
"\n"
" //create the \"Fullscreen\" ToolButton and its SimpleAction\n"
" let fullscreenToggleAction = new Gio.SimpleAction ({ name: 'fullscreenToggle' });\n"
-" fullscreenToggleAction.connect ('activate', Lang.bind (this,\n"
-" function () {\n"
-" this._fullscreenToggleCB();\n"
-" }));\n"
+" fullscreenToggleAction.connect('activate', () => {\n"
+" this._fullscreenToggleCB();\n"
+" });\n"
" this._window.add_action(fullscreenToggleAction);\n"
"\n"
-" this._fullscreenButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
+" this._fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
" this._fullscreenButton.is_important = true;\n"
" this._toolbar.add(this._fullscreenButton);\n"
" this._fullscreenButton.show();\n"
" this._fullscreenButton.action_name = \"win.fullscreenToggle\";\n"
"\n"
" //create the \"leaveFullscreen\" ToolButton, and set the action name to \"win.fullscreenToggle\"\n"
-" this._leaveFullscreenButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
+" this._leaveFullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
" this._leaveFullscreenButton.is_important = true;\n"
" this._toolbar.add(this._leaveFullscreenButton);\n"
" this._leaveFullscreenButton.action_name = \"win.fullscreenToggle\";\n"
-" },\n"
+" }\n"
"\n"
-" _initMenus: function () {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"New\", 'app.new');\n"
" menu.append(\"Open\", 'app.open');\n"
@@ -50561,38 +50336,34 @@ msgid ""
" this.application.set_app_menu(menu);\n"
"\n"
" let quitAction = new Gio.SimpleAction({name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
+" }\n"
"\n"
-" _newCB: function() {\n"
+" _newCB() {\n"
" print(\"You clicked 'New'.\");\n"
-" },\n"
+" }\n"
"\n"
-" _openCB: function() {\n"
+" _openCB() {\n"
" print(\"You clicked 'Open'.\");\n"
-" },\n"
+" }\n"
"\n"
-" _undoCB:function () {\n"
+" _undoCB() {\n"
" print (\"You clicked 'Undo'.\");\n"
-" },\n"
+" }\n"
"\n"
-" _fullscreenToggleCB: function() {\n"
+" _fullscreenToggleCB() {\n"
" if ((this._window.get_window().get_state() & Gdk.WindowState.FULLSCREEN) != 0 ) {\n"
" this._window.unfullscreen();\n"
" this._leaveFullscreenButton.hide();\n"
" this._fullscreenButton.show();\n"
-" }\n"
-" else {\n"
+" } else {\n"
" this._window.fullscreen();\n"
" this._fullscreenButton.hide();\n"
" this._leaveFullscreenButton.show();\n"
" }\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"//run the application\n"
"let app = new Application();\n"
@@ -50600,34 +50371,37 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gdk = imports.gi.Gdk;\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"\n"
-"const Application = new Lang.Class({\n"
-" Name: 'Application',\n"
+"class Application {\n"
"\n"
" // Vytvoří aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Vytvoří uživatelské rozhraní (v tomto případě jen ApplicationWindow)\n"
-" _buildUI: function() {\n"
-" this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"Toolbar Example\",\n"
-" default_height: 200,\n"
-" default_width: 400 });\n"
+" _buildUI() {\n"
+" this._window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Toolbar Example\",\n"
+" default_height: 200,\n"
+" default_width: 400\n"
+" });\n"
"\n"
" this._grid = new Gtk.Grid();\n"
" this._window.add(this._grid);\n"
@@ -50640,21 +50414,21 @@ msgstr ""
" // Zobrazí nástrojovou lištu a okno\n"
" this._toolbar.show();\n"
" this._window.show();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\"\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\"\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" this._initMenus();\n"
" this._buildUI();\n"
-" },\n"
+" }\n"
"\n"
" // Vytvoří nástrojovou lištu, její tlačítka a její akce\n"
-" _createToolbar: function() {\n"
+" _createToolbar() {\n"
"\n"
" this._toolbar = new Gtk.Toolbar();\n"
" this._toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
@@ -50663,27 +50437,21 @@ msgstr ""
" // Použití akce vám umožní přidat jej do aplikační nabídky \n"
" // bez duplikování kódu.\n"
" let newAction = new Gio.SimpleAction({ name: 'new'});\n"
-" newAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._newCB();\n"
-" }));\n"
-" this.application.add_action(newAction); // Tato akce je přidáno do aplikace\n"
+" newAction.connect('activate', () => { this._newCB(); });\n"
+" this.application.add_action(newAction);//note: this action is added to the app\n"
"\n"
-" this._newButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
+" this._newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
" this._newButton.is_important = true;\n"
" this._toolbar.add(this._newButton);\n"
" this._newButton.show();\n"
" this._newButton.action_name = \"app.new\";\n"
"\n"
-" // Vytvoří nástrojové tlačítko „Opem“ a jeho SimpleAction\n"
+" // Vytvoří nástrojové tlačítko „Open“ a jeho SimpleAction\n"
" let openAction = new Gio.SimpleAction({ name: 'open'});\n"
-" openAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._openCB();\n"
-" }));\n"
+" openAction.connect('activate', () => { this._openCB(); });\n"
" this.application.add_action(openAction);\n"
"\n"
-" this._openButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
+" this._openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
" this._openButton.is_important = true;\n"
" this._toolbar.add(this._openButton);\n"
" this._openButton.show();\n"
@@ -50691,13 +50459,10 @@ msgstr ""
"\n"
" // Vytvoří nástrojové tlačítko „Undo“ a jeho SimpleAction.\n"
" let undoAction = new Gio.SimpleAction({ name: 'undo'});\n"
-" undoAction.connect('activate', Lang.bind (this,\n"
-" function() {\n"
-" this._undoCB();\n"
-" }));\n"
-" this._window.add_action(undoAction); // Tato akce je přidáno do okna\n"
+" undoAction.connect('activate', () => { this._undoCB(); });\n"
+" this._window.add_action(undoAction);//note this action is added to the window\n"
"\n"
-" this._undoButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
+" this._undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
" this._undoButton.is_important = true;\n"
" this._toolbar.add(this._undoButton);\n"
" this._undoButton.show();\n"
@@ -50705,26 +50470,25 @@ msgstr ""
"\n"
" // Vytvoří nástrojové tlačítko „Fullscreen“ a a jeho SimpleAction\n"
" let fullscreenToggleAction = new Gio.SimpleAction ({ name: 'fullscreenToggle' });\n"
-" fullscreenToggleAction.connect ('activate', Lang.bind (this,\n"
-" function () {\n"
-" this._fullscreenToggleCB();\n"
-" }));\n"
+" fullscreenToggleAction.connect('activate', () => {\n"
+" this._fullscreenToggleCB();\n"
+" });\n"
" this._window.add_action(fullscreenToggleAction);\n"
"\n"
-" this._fullscreenButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
+" this._fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
" this._fullscreenButton.is_important = true;\n"
" this._toolbar.add(this._fullscreenButton);\n"
" this._fullscreenButton.show();\n"
" this._fullscreenButton.action_name = \"win.fullscreenToggle\";\n"
"\n"
" // Vytvoří nástrojové tlačítko „leaveFullscreen“ a nastaví název akce na „win.fullscreenToggle“\n"
-" this._leaveFullscreenButton = new Gtk.ToolButton.new_from_stock(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
+" this._leaveFullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
" this._leaveFullscreenButton.is_important = true;\n"
" this._toolbar.add(this._leaveFullscreenButton);\n"
" this._leaveFullscreenButton.action_name = \"win.fullscreenToggle\";\n"
-" },\n"
+" }\n"
"\n"
-" _initMenus: function () {\n"
+" _initMenus() {\n"
" let menu = new Gio.Menu();\n"
" menu.append(\"New\", 'app.new');\n"
" menu.append(\"Open\", 'app.open');\n"
@@ -50733,38 +50497,34 @@ msgstr ""
" this.application.set_app_menu(menu);\n"
"\n"
" let quitAction = new Gio.SimpleAction({name: 'quit' });\n"
-" quitAction.connect('activate', Lang.bind(this,\n"
-" function() {\n"
-" this._window.destroy();\n"
-" }));\n"
+" quitAction.connect('activate', () => { this._window.destroy(); });\n"
" this.application.add_action(quitAction);\n"
-" },\n"
+" }\n"
"\n"
-" _newCB: function() {\n"
+" _newCB() {\n"
" print(\"You clicked 'New'.\");\n"
-" },\n"
+" }\n"
"\n"
-" _openCB: function() {\n"
+" _openCB() {\n"
" print(\"You clicked 'Open'.\");\n"
-" },\n"
+" }\n"
"\n"
-" _undoCB:function () {\n"
+" _undoCB() {\n"
" print (\"You clicked 'Undo'.\");\n"
-" },\n"
+" }\n"
"\n"
-" _fullscreenToggleCB: function() {\n"
+" _fullscreenToggleCB() {\n"
" if ((this._window.get_window().get_state() & Gdk.WindowState.FULLSCREEN) != 0 ) {\n"
" this._window.unfullscreen();\n"
" this._leaveFullscreenButton.hide();\n"
" this._fullscreenButton.show();\n"
-" }\n"
-" else {\n"
+" } else {\n"
" this._window.fullscreen();\n"
" this._fullscreenButton.hide();\n"
" this._leaveFullscreenButton.show();\n"
" }\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new Application();\n"
@@ -53254,44 +53014,48 @@ msgstr ""
msgid ""
"//!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gdk = imports.gi.Gdk;\n"
"const GLib = imports.gi.GLib;\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk; \n"
-"const Lang = imports.lang;\n"
-"\n"
-"const TooltipExample = new Lang.Class ({\n"
-" Name: 'Tooltip Example',\n"
"\n"
+"class TooltipExample {\n"
" // Create the application \n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({ application_id: 'org.example.jstooltip' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jstooltip'\n"
+" });\n"
"\n"
" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents windows when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Create the application window\n"
-" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"Toolbar with Tooltips Example\",\n"
-" default_width: 400,\n"
-" default_height: 200,\n"
-" border_width: 10 });\n"
+" this.window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Toolbar with Tooltips Example\",\n"
+" default_width: 400,\n"
+" default_height: 200,\n"
+" border_width: 10\n"
+" });\n"
"\n"
" this.grid = new Gtk.Grid();\n"
"\n"
@@ -53304,25 +53068,26 @@ msgid ""
" this.window.add(this.grid);\n"
"\n"
" this._newAction = new Gio.SimpleAction({ name: \"new\" });\n"
-" this._newAction.connect(\"activate\", Lang.bind(this, this._newCallback));\n"
+" this._newAction.connect(\"activate\", this._newCallback.bind(this));\n"
" this.window.add_action(this._newAction);\n"
"\n"
" this._openAction = new Gio.SimpleAction({ name: \"open\" });\n"
-" this._openAction.connect(\"activate\", Lang.bind(this, this._openCallback));\n"
+" this._openAction.connect(\"activate\", this._openCallback.bind(this));\n"
" this.window.add_action(this._openAction);\n"
"\n"
" this._undoAction = new Gio.SimpleAction({ name: \"undo\" });\n"
-" this._undoAction.connect(\"activate\", Lang.bind(this, this._undoCallback));\n"
+" this._undoAction.connect(\"activate\", this._undoCallback.bind(this));\n"
" this.window.add_action(this._undoAction);\n"
"\n"
" this._fullScreenAction = new Gio.SimpleAction({ name: \"fullscreenToggle\" });\n"
-" this._fullScreenAction.connect(\"activate\", Lang.bind(this, this._fullScreenCallback));\n"
+" this._fullScreenAction.connect(\"activate\",\n"
+" this._fullScreenCallback.bind(this));\n"
" this.window.add_action(this._fullScreenAction);\n"
"\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _createToolbar: function(){\n"
+" _createToolbar() {\n"
" this.toolbar = new Gtk.Toolbar();\n"
" this.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
"\n"
@@ -53351,7 +53116,7 @@ msgid ""
" this.undoButton.set_property(\"has-tooltip\", true);\n"
" // connect to the callback function that for the tooltip\n"
" // with the signal \"query-tooltip\"\n"
-" this.undoButton.connect(\"query-tooltip\", Lang.bind(this, this._undoTooltipCallback));\n"
+" this.undoButton.connect(\"query-tooltip\", this._undoTooltipCallback.bind(this));\n"
" this.undoButton.set_is_important(true);\n"
" this.toolbar.insert(this.undoButton, 2);\n"
" this.undoButton.show();\n"
@@ -53364,31 +53129,31 @@ msgid ""
" this.fullscreenButton.set_action_name(\"win.fullscreenToggle\");\n"
"\n"
" return this.toolbar;\n"
-" },\n"
+" }\n"
"\n"
-" _newCallback: function(action, parameter) {\n"
+" _newCallback(action, parameter) {\n"
" print(\"You clicked \\\"New\\\".\");\n"
-" },\n"
+" }\n"
"\n"
-" _openCallback: function(action, parameter) {\n"
+" _openCallback(action, parameter) {\n"
" print(\"You clicked \\\"Open\\\".\");\n"
-" },\n"
+" }\n"
"\n"
" // the callback function for the tooltip of the \"undo\" button\n"
-" _undoTooltipCallback: function(widget, x, y, keyboard_mode, tooltip) {\n"
+" _undoTooltipCallback(widget, x, y, keyboard_mode, tooltip) {\n"
" // set the text for the tooltip\n"
" tooltip.set_text(\"Undo your last action\");\n"
" // set an icon fot the tooltip\n"
" tooltip.set_icon_from_stock(Gtk.STOCK_UNDO, Gtk.IconSize.MENU);\n"
" // show the tooltip\n"
" return true;\n"
-" },\n"
+" }\n"
"\n"
-" _undoCallback: function(action, parameter) {\n"
+" _undoCallback(action, parameter) {\n"
" print(\"You clicked \\\"Undo\\\".\");\n"
-" },\n"
+" }\n"
"\n"
-" _fullScreenCallback: function() {\n"
+" _fullScreenCallback() {\n"
" if ((this.window.get_window().get_state() & Gdk.WindowState.FULLSCREEN) != 0 ){\n"
" this.fullscreenButton.set_stock_id(Gtk.STOCK_FULLSCREEN);\n"
" this.fullscreenButton.set_tooltip_text(\"Make your window fullscreen\");\n"
@@ -53399,7 +53164,7 @@ msgid ""
" this.window.fullscreen();\n"
" }\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new TooltipExample ();\n"
@@ -53407,44 +53172,48 @@ msgid ""
msgstr ""
"//!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gdk = '3.0';\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gdk = imports.gi.Gdk;\n"
"const GLib = imports.gi.GLib;\n"
"const Gio = imports.gi.Gio;\n"
"const Gtk = imports.gi.Gtk; \n"
-"const Lang = imports.lang;\n"
-"\n"
-"const TooltipExample = new Lang.Class ({\n"
-" Name: 'Tooltip Example',\n"
"\n"
+"class TooltipExample {\n"
" // Vytvoří aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({ application_id: 'org.example.jstooltip' });\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
+" application_id: 'org.example.jstooltip'\n"
+" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this.window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function () {\n"
-" this._buildUI ();\n"
-" },\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function () {\n"
+" _buildUI() {\n"
"\n"
" // Vytvoří okno aplikace\n"
-" this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
-" window_position: Gtk.WindowPosition.CENTER,\n"
-" title: \"Toolbar with Tooltips Example\",\n"
-" default_width: 400,\n"
-" default_height: 200,\n"
-" border_width: 10 });\n"
+" this.window = new Gtk.ApplicationWindow({\n"
+" application: this.application,\n"
+" window_position: Gtk.WindowPosition.CENTER,\n"
+" title: \"Toolbar with Tooltips Example\",\n"
+" default_width: 400,\n"
+" default_height: 200,\n"
+" border_width: 10\n"
+" });\n"
"\n"
" this.grid = new Gtk.Grid();\n"
"\n"
@@ -53457,25 +53226,26 @@ msgstr ""
" this.window.add(this.grid);\n"
"\n"
" this._newAction = new Gio.SimpleAction({ name: \"new\" });\n"
-" this._newAction.connect(\"activate\", Lang.bind(this, this._newCallback));\n"
+" this._newAction.connect(\"activate\", this._newCallback.bind(this));\n"
" this.window.add_action(this._newAction);\n"
"\n"
" this._openAction = new Gio.SimpleAction({ name: \"open\" });\n"
-" this._openAction.connect(\"activate\", Lang.bind(this, this._openCallback));\n"
+" this._openAction.connect(\"activate\", this._openCallback.bind(this));\n"
" this.window.add_action(this._openAction);\n"
"\n"
" this._undoAction = new Gio.SimpleAction({ name: \"undo\" });\n"
-" this._undoAction.connect(\"activate\", Lang.bind(this, this._undoCallback));\n"
+" this._undoAction.connect(\"activate\", this._undoCallback.bind(this));\n"
" this.window.add_action(this._undoAction);\n"
"\n"
" this._fullScreenAction = new Gio.SimpleAction({ name: \"fullscreenToggle\" });\n"
-" this._fullScreenAction.connect(\"activate\", Lang.bind(this, this._fullScreenCallback));\n"
+" this._fullScreenAction.connect(\"activate\",\n"
+" this._fullScreenCallback.bind(this));\n"
" this.window.add_action(this._fullScreenAction);\n"
"\n"
" this.window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _createToolbar: function(){\n"
+" _createToolbar() {\n"
" this.toolbar = new Gtk.Toolbar();\n"
" this.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
"\n"
@@ -53504,7 +53274,7 @@ msgstr ""
" this.undoButton.set_property(\"has-tooltip\", true);\n"
" // Napojí funkci zpětného volání pro vysvětlivku\n"
" // se signálem „query-tooltip“\n"
-" this.undoButton.connect(\"query-tooltip\", Lang.bind(this, this._undoTooltipCallback));\n"
+" this.undoButton.connect(\"query-tooltip\", this._undoTooltipCallback.bind(this));\n"
" this.undoButton.set_is_important(true);\n"
" this.toolbar.insert(this.undoButton, 2);\n"
" this.undoButton.show();\n"
@@ -53517,31 +53287,31 @@ msgstr ""
" this.fullscreenButton.set_action_name(\"win.fullscreenToggle\");\n"
"\n"
" return this.toolbar;\n"
-" },\n"
+" }\n"
"\n"
-" _newCallback: function(action, parameter) {\n"
+" _newCallback(action, parameter) {\n"
" print(\"You clicked \\\"New\\\".\");\n"
-" },\n"
+" }\n"
"\n"
-" _openCallback: function(action, parameter) {\n"
+" _openCallback(action, parameter) {\n"
" print(\"You clicked \\\"Open\\\".\");\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro vysvětlivku tlačítka „undo“\n"
-" _undoTooltipCallback: function(widget, x, y, keyboard_mode, tooltip) {\n"
+" _undoTooltipCallback(widget, x, y, keyboard_mode, tooltip) {\n"
" // Nastaví text pro vysvětlivku\n"
" tooltip.set_text(\"Undo your last action\");\n"
" // Nastaví ikonu pro vysvětlivku\n"
" tooltip.set_icon_from_stock(Gtk.STOCK_UNDO, Gtk.IconSize.MENU);\n"
" // Zobrazí vysvětlivku\n"
" return true;\n"
-" },\n"
+" }\n"
"\n"
-" _undoCallback: function(action, parameter) {\n"
+" _undoCallback(action, parameter) {\n"
" print(\"You clicked \\\"Undo\\\".\");\n"
-" },\n"
+" }\n"
"\n"
-" _fullScreenCallback: function() {\n"
+" _fullScreenCallback() {\n"
" if ((this.window.get_window().get_state() & Gdk.WindowState.FULLSCREEN) != 0 ){\n"
" this.fullscreenButton.set_stock_id(Gtk.STOCK_FULLSCREEN);\n"
" this.fullscreenButton.set_tooltip_text(\"Make your window fullscreen\");\n"
@@ -53552,7 +53322,7 @@ msgstr ""
" this.window.fullscreen();\n"
" }\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new TooltipExample ();\n"
@@ -55811,40 +55581,36 @@ msgstr ""
msgid ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"const Pango = imports.gi.Pango;\n"
"\n"
-"const TreeViewExample = new Lang.Class({\n"
-" Name: 'TreeView Example with Simple ListStore',\n"
-"\n"
+"class TreeViewExample {\n"
" // Create the application itself\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jstreeviewsimpleliststore'\n"
" });\n"
"\n"
-" // Connect 'activate' and 'startup' signals to the callback functions\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" // Connect 'activate' and 'startup' signals to the callback functions\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Callback function for 'activate' signal presents window when active\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Callback function for 'startup' signal builds the UI\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Build the application's UI\n"
-" _buildUI: function() {\n"
-"\n"
+" _buildUI() {\n"
" // Create the application window\n"
" this._window = new Gtk.ApplicationWindow({\n"
" application: this.application,\n"
@@ -55923,7 +55689,7 @@ msgid ""
" this.selection = this._treeView.get_selection();\n"
"\n"
" // When something new is selected, call _on_changed\n"
-" this.selection.connect ('changed', Lang.bind (this, this._onSelectionChanged));\n"
+" this.selection.connect ('changed', this._onSelectionChanged.bind(this));\n"
"\n"
" // Create a grid to organize everything in\n"
" this._grid = new Gtk.Grid;\n"
@@ -55937,12 +55703,9 @@ msgid ""
"\n"
" // Show the window and all child widgets\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _onSelectionChanged: function () {\n"
+" }\n"
"\n"
+" _onSelectionChanged() {\n"
" // Grab a treeiter pointing to the current selection\n"
" let [ isSelected, model, iter ] = this.selection.get_selected();\n"
"\n"
@@ -55951,11 +55714,10 @@ msgid ""
" this._listStore.get_value (iter, 0) + \" \" +\n"
" this._listStore.get_value (iter, 1) + \" \" +\n"
" this._listStore.get_value (iter, 2) + \"\\n\" +\n"
-" this._listStore.get_value (iter, 3));\n"
-"\n"
+" this._listStore.get_value (iter, 3)\n"
+" );\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Run the application\n"
"let app = new TreeViewExample ();\n"
@@ -55963,40 +55725,36 @@ msgid ""
msgstr ""
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const GObject = imports.gi.GObject;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
"const Pango = imports.gi.Pango;\n"
"\n"
-"const TreeViewExample = new Lang.Class({\n"
-" Name: 'TreeView Example with Simple ListStore',\n"
-"\n"
+"class TreeViewExample {\n"
" // Vytvoří vlastní aplikaci\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application({\n"
" application_id: 'org.example.jstreeviewsimpleliststore'\n"
" });\n"
"\n"
" // Napojí signály \"activate\" a \"startup\" k funkcím zpětného volání\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\" zobrazujicí okno při aktivaci\n"
-" _onActivate: function() {\n"
+" _onActivate() {\n"
" this._window.present();\n"
-" },\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"startup\" sestavující uživatelské rozhraní\n"
-" _onStartup: function() {\n"
-" this._buildUI ();\n"
-" },\n"
-"\n"
-"\n"
+" _onStartup() {\n"
+" this._buildUI();\n"
+" }\n"
"\n"
" // Sestaví uživatelské rozhraní aplikace\n"
-" _buildUI: function() {\n"
-"\n"
+" _buildUI() {\n"
" // Vytvoří okno aplikace\n"
" this._window = new Gtk.ApplicationWindow({\n"
" application: this.application,\n"
@@ -56075,7 +55833,7 @@ msgstr ""
" this.selection = this._treeView.get_selection();\n"
"\n"
" // Když je vybráno něco nového, zavolá _on_changed\n"
-" this.selection.connect ('changed', Lang.bind (this, this._onSelectionChanged));\n"
+" this.selection.connect ('changed', this._onSelectionChanged.bind(this));\n"
"\n"
" // Vytvoří mřížku, do které vše uspořádáme\n"
" this._grid = new Gtk.Grid;\n"
@@ -56089,12 +55847,9 @@ msgstr ""
"\n"
" // Zobrazí okno a všechny jeho synovské widgety\n"
" this._window.show_all();\n"
-" },\n"
-"\n"
-"\n"
-"\n"
-" _onSelectionChanged: function () {\n"
+" }\n"
"\n"
+" _onSelectionChanged() {\n"
" // Získá iteraci stromového zobrazení ukazující na aktuální výběr\n"
" let [ isSelected, model, iter ] = this.selection.get_selected();\n"
"\n"
@@ -56103,11 +55858,10 @@ msgstr ""
" this._listStore.get_value (iter, 0) + \" \" +\n"
" this._listStore.get_value (iter, 1) + \" \" +\n"
" this._listStore.get_value (iter, 2) + \"\\n\" +\n"
-" this._listStore.get_value (iter, 3));\n"
-"\n"
+" this._listStore.get_value (iter, 3)\n"
+" );\n"
" }\n"
-"\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new TreeViewExample ();\n"
@@ -58825,42 +58579,40 @@ msgid ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
-"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
"\n"
+"class Application {\n"
" //create the application\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" }\n"
"\n"
" //callback function for 'activate' signal\n"
-" _onActivate: function () {\n"
-"\n"
-" MyWindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
-" MyWindow.title = \"Welcome to GNOME\";\n"
+" _onActivate() {\n"
+" let myWindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
+" myWindow.title = \"Welcome to GNOME\";\n"
"\n"
" /* Here are a few ways we can customize our window.\n"
" Try uncommenting them or changing their values! */\n"
-" //MyWindow.set_default_size (400,200);\n"
-" //MyWindow.set_has_resize_grip (false);\n"
-" //MyWindow.set_opacity (0.5);\n"
-" //MyWindow.maximize ();\n"
+" //myWindow.set_default_size (400,200);\n"
+" //myWindow.set_has_resize_grip (false);\n"
+" //myWindow.set_opacity (0.5);\n"
+" //myWindow.maximize ();\n"
"\n"
" //show the window and all child widgets (none in this case)\n"
-" MyWindow.show_all();\n"
-" this.application.add_window(MyWindow);\n"
+" myWindow.show_all();\n"
+" this.application.add_window(myWindow);\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"//run the application\n"
"let app = new Application ();\n"
@@ -58869,42 +58621,41 @@ msgstr ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
+"imports.gi.versions.Gtk = '3.0';\n"
+"\n"
"const Gio = imports.gi.Gio;\n"
"const GLib = imports.gi.GLib;\n"
"const Gtk = imports.gi.Gtk;\n"
-"const Lang = imports.lang;\n"
-"\n"
-"const Application = new Lang.Class ({\n"
-" Name: 'Application',\n"
"\n"
+"class Application {\n"
" // Vytvoří aplikaci\n"
-" _init: function () {\n"
-" this.application = new Gtk.Application ({\n"
+" constructor() {\n"
+" constructor() {\n"
+" this.application = new Gtk.Application({\n"
" application_id: 'org.example.myapp',\n"
" flags: Gio.ApplicationFlags.FLAGS_NONE\n"
" });\n"
"\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" }\n"
"\n"
" // Funkce zpětného volání pro signál \"activate\"\n"
-" _onActivate: function () {\n"
-"\n"
-" MyWindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
-" MyWindow.title = \"Welcome to GNOME\";\n"
+" _onActivate() {\n"
+" let myWindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
+" myWindow.title = \"Welcome to GNOME\";\n"
"\n"
" /* Zde je pár způsobů, jak si okno přizpůsobit.\n"
" Zkuste zrušit jeji zakomentování a jejich hodnoty! */\n"
-" //MyWindow.set_default_size (400,200);\n"
-" //MyWindow.set_has_resize_grip (false);\n"
-" //MyWindow.set_opacity (0.5);\n"
-" //MyWindow.maximize ();\n"
+" //myWindow.set_default_size (400,200);\n"
+" //myWindow.set_has_resize_grip (false);\n"
+" //myWindow.set_opacity (0.5);\n"
+" //myWindow.maximize ();\n"
"\n"
" // Zobrazí okno a všechny jeho synovské widgety (v tomto případě žádné)\n"
-" MyWindow.show_all();\n"
-" this.application.add_window(MyWindow);\n"
+" myWindow.show_all();\n"
+" this.application.add_window(myWindow);\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"// Spustí aplikaci\n"
"let app = new Application ();\n"
diff --git a/platform-overview/cs/cs.po b/platform-overview/cs/cs.po
index 97ac83c..2b50c6c 100644
--- a/platform-overview/cs/cs.po
+++ b/platform-overview/cs/cs.po
@@ -1,13 +1,13 @@
# Czech translation of GNOME User Guide.
#
# Lucas Lommer <llommer svn gnome org>, 2008, 2009.
-# Marek Černocký <marek manet cz>, 2015, 2016, 2017.
+# Marek Černocký <marek manet cz>, 2015, 2016, 2017, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: user-guide\n"
-"POT-Creation-Date: 2017-11-23 20:23+0000\n"
-"PO-Revision-Date: 2017-11-24 08:20+0100\n"
+"POT-Creation-Date: 2017-12-04 19:33+0000\n"
+"PO-Revision-Date: 2018-03-02 12:25+0100\n"
"Last-Translator: Marek Černocký <marek manet cz>\n"
"Language-Team: čeština <gnome-cs-list gnome org>\n"
"Language: cs\n"
@@ -5026,74 +5026,68 @@ msgstr ""
#. (itstool) path: example/p
#: C/tour-events.page:35
-msgid ""
-"Declare <code>HelloWorld</code> as a new <code>Lang</code> class. Gjs "
-"requires classes to have the Name property defined."
-msgstr ""
-"Deklarujte <code>HelloWorld</code> jako novou třídu jazyka <code>Lang</"
-"code>. Gjs vyžaduje, aby třídy měly definovánu vlastnost Name."
+msgid "Declare <code>HelloWorld</code> as a new class."
+msgstr "Zadeklarujte <code>HelloWorld</code> jako novou třídu."
#. (itstool) path: example/code
-#: C/tour-events.page:38
+#: C/tour-events.page:37
#, no-wrap
msgid ""
"\n"
-"const HelloWorld = new Lang.Class({\n"
-" Name: 'HelloWorld',\n"
+"class HelloWorld {\n"
msgstr ""
"\n"
-"const HelloWorld = new Lang.Class({\n"
-" Name: 'HelloWorld',\n"
+"class HelloWorld {\n"
#. (itstool) path: example/p
-#: C/tour-events.page:43
+#: C/tour-events.page:41
msgid ""
-"<code>_init</code> is called when a new instance is created. Create a "
+"<code>constructor</code> is called when a new instance is created. Create a "
"<code>GtkApplication</code>, then connect <code>activate</code> to the "
"existing Gtk event <code>_onActivate</code> and <code>startup</code> to "
"<code>_onStartup</code>:"
msgstr ""
-"<code>_init</code> je voláno ve chvíli, kdy je vytvořena nová instance. "
-"Vytvořte <code>GtkApplication</code>, pak napojte <code>activate</code> na "
-"existující událost Gtk <code>_onActivate</code> a <code>startup</code> na "
-"<code>_onStartup</code>."
+"<code>constructor</code> je voláno ve chvíli, kdy je vytvořena nová "
+"instance. Vytvořte <code>GtkApplication</code>, pak napojte <code>activate</"
+"code> na existující událost Gtk <code>_onActivate</code> a <code>startup</"
+"code> na <code>_onStartup</code>."
#. (itstool) path: example/code
-#: C/tour-events.page:48
+#: C/tour-events.page:46
#, no-wrap
msgid ""
"\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
msgstr ""
"\n"
-" _init: function() {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
#. (itstool) path: example/p
-#: C/tour-events.page:56
+#: C/tour-events.page:54
msgid "Show the window upon application activation:"
msgstr "Zobrazte okno ihned po aktivaci aplikace:"
#. (itstool) path: example/code
-#: C/tour-events.page:57
+#: C/tour-events.page:55
#, no-wrap
msgid ""
"\n"
-" _onActivate: function(){\n"
+" _onActivate() {\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
msgstr ""
"\n"
-" _onActivate: function(){\n"
+" _onActivate() {\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
#. (itstool) path: info/desc
#: C/tour-get_object.page:23
@@ -5134,22 +5128,22 @@ msgstr ""
#, no-wrap
msgid ""
"\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" let builder = new Gtk.Builder();\n"
" builder.add_from_file('helloworld.glade');\n"
" this._window = builder.get_object('window1');\n"
" this.application.add_window(this._window);\n"
" }\n"
-"});\n"
+"};\n"
msgstr ""
"\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" let builder = new Gtk.Builder();\n"
" builder.add_from_file('helloworld.glade');\n"
" this._window = builder.get_object('window1');\n"
" this.application.add_window(this._window);\n"
" }\n"
-"});\n"
+"};\n"
#. (itstool) path: info/desc
#: C/tour-gjs.page:23
@@ -5214,22 +5208,24 @@ msgstr ""
#. (itstool) path: example/p
#: C/tour-gjs.page:46
msgid ""
-"Import <code>lang</code> for the <code>bind</code> function and <code>gi."
-"Gtk</code> for <code>Gtk</code> functions."
+"Import <code>gi.Gtk</code> for <code>Gtk</code> functions. As both version "
+"3.0 and 4.0 may be installed, make sure that the desired version is imported "
+"first."
msgstr ""
-"Naimportujte <code>lang</code> pro funkci <code>bind</code> a <code>gi.Gtk</"
-"code> pro funkce <code>Gtk</code>."
+"Naimportujte funkce <code>gi.Gtk</code> pro <code>Gtk</code>. Můžete mít "
+"naráz nainstalovanou verzi 3.0 a 4.0, takže se ujistěte, že požadovaná verze "
+"se importuje jako první."
#. (itstool) path: example/code
-#: C/tour-gjs.page:49
+#: C/tour-gjs.page:50
#, no-wrap
msgid ""
"\n"
-"const Lang = imports.lang;\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
msgstr ""
"\n"
-"const Lang = imports.lang;\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
#. (itstool) path: info/desc
@@ -5359,29 +5355,27 @@ msgid ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
-"const Lang = imports.lang;\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
"\n"
-"const HelloWorld = new Lang.Class({\n"
-" Name: 'HelloWorld',\n"
-"\n"
-" _init: function() {\n"
+"class HelloWorld {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
-" _onActivate: function(){\n"
+" _onActivate() {\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" let builder = new Gtk.Builder();\n"
-" builder.add_from_file('helloworld.glade');\n"
+" builder.add_from_file('tour.glade');\n"
" this._window = builder.get_object('window1');\n"
" this.application.add_window(this._window);\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"let app = new HelloWorld();\n"
"app.application.run(ARGV);\n"
@@ -5389,32 +5383,53 @@ msgstr ""
"\n"
"#!/usr/bin/gjs\n"
"\n"
-"const Lang = imports.lang;\n"
+"imports.gi.versions.Gtk = '3.0';\n"
"const Gtk = imports.gi.Gtk;\n"
"\n"
-"const HelloWorld = new Lang.Class({\n"
-" Name: 'HelloWorld',\n"
-"\n"
-" _init: function() {\n"
+"class HelloWorld {\n"
+" constructor() {\n"
" this.application = new Gtk.Application();\n"
-" this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
-" this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
-" },\n"
+" this.application.connect('activate', this._onActivate.bind(this));\n"
+" this.application.connect('startup', this._onStartup.bind(this));\n"
+" }\n"
"\n"
-" _onActivate: function(){\n"
+" _onActivate() {\n"
" this._window.show_all();\n"
-" },\n"
+" }\n"
"\n"
-" _onStartup: function() {\n"
+" _onStartup() {\n"
" let builder = new Gtk.Builder();\n"
-" builder.add_from_file('helloworld.glade');\n"
+" builder.add_from_file('tour.glade');\n"
" this._window = builder.get_object('window1');\n"
" this.application.add_window(this._window);\n"
" }\n"
-"});\n"
+"};\n"
"\n"
"let app = new HelloWorld();\n"
"app.application.run(ARGV);\n"
+#~ msgid ""
+#~ "Declare <code>HelloWorld</code> as a new <code>Lang</code> class. Gjs "
+#~ "requires classes to have the Name property defined."
+#~ msgstr ""
+#~ "Deklarujte <code>HelloWorld</code> jako novou třídu jazyka <code>Lang</"
+#~ "code>. Gjs vyžaduje, aby třídy měly definovánu vlastnost Name."
+
+#~ msgid ""
+#~ "\n"
+#~ "const HelloWorld = new Lang.Class({\n"
+#~ " Name: 'HelloWorld',\n"
+#~ msgstr ""
+#~ "\n"
+#~ "const HelloWorld = new Lang.Class({\n"
+#~ " Name: 'HelloWorld',\n"
+
+#~ msgid ""
+#~ "Import <code>lang</code> for the <code>bind</code> function and <code>gi."
+#~ "Gtk</code> for <code>Gtk</code> functions."
+#~ msgstr ""
+#~ "Naimportujte <code>lang</code> pro funkci <code>bind</code> a <code>gi."
+#~ "Gtk</code> pro funkce <code>Gtk</code>."
+
#~ msgid "Enchant"
#~ msgstr "Enchant"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]