1# Korean translation for gnome-devel-docs.
2# Copyright (C) 2016 gnome-devel-docs's COPYRIGHT HOLDER
3# This file is distributed under the same license as the gnome-devel-docs package.
4# Seong-ho Cho <shcho@gnome.org>, 2017-2019.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: gnome-devel-docs master\n"
9"POT-Creation-Date: 2019-02-03 09:39+0000\n"
10"PO-Revision-Date: 2019-02-27 23:07+0900\n"
11"Last-Translator: Seong-ho Cho <shcho@gnome.org>\n"
12"Language-Team: Korean <gnome-kr@googlegroups.com>\n"
13"Language: ko\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=1; plural=0;\n"
18"X-Generator: Poedit 2.1.1\n"
19
20#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2
21msgctxt "_"
22msgid "translator-credits"
23msgstr "조성호 <shcho@gnome.org>, 2017-2019."
24
25#. (itstool) path: credit/name
26#: C/02_welcome_to_the_grid.js.page:15 C/03_getting_the_signal.js.page:16 C/aboutdialog.js.page:12
27#: C/button.js.page:13 C/checkbutton.js.page:13 C/comboboxtext.js.page:15 C/combobox.js.page:17 C/dialog.js.page:13
28#: C/entry.js.page:13 C/grid.js.page:18 C/hellognome.js.page:12 C/image.js.page:12 C/label.js.page:13
29#: C/linkbutton.js.page:13 C/messagedialog.js.page:16 C/progressbar.js.page:12 C/radiobutton.js.page:13
30#: C/scale.js.page:13 C/set-up-gedit.js.page:12 C/spinbutton.js.page:16 C/spinner.js.page:13 C/statusbar.js.page:13
31#: C/switch.js.page:13 C/textview.js.page:17 C/togglebutton.js.page:13 C/treeview_simple_liststore.js.page:16
32#: C/window.js.page:13
33msgid "Taryn Fox"
34msgstr "Taryn Fox"
35
36#. (itstool) path: credit/years
37#: C/02_welcome_to_the_grid.js.page:17 C/03_getting_the_signal.js.page:18 C/aboutdialog.c.page:17
38#: C/aboutdialog.js.page:14 C/aboutdialog.py.page:16 C/aboutdialog.vala.page:17 C/beginner.js.page:13
39#: C/button.c.page:17 C/button.js.page:15 C/button.py.page:17 C/button.vala.page:16 C/buttonbox.py.page:17
40#: C/checkbutton.c.page:15 C/checkbutton.js.page:15 C/checkbutton.py.page:16 C/checkbutton.vala.page:15
41#: C/colorbutton.py.page:16 C/colorbutton.vala.page:17 C/comboboxtext.js.page:17 C/combobox.c.page:15
42#: C/combobox.js.page:19 C/combobox.py.page:17 C/combobox.vala.page:15 C/combobox_multicolumn.py.page:16
43#: C/dialog.c.page:17 C/dialog.js.page:15 C/dialog.py.page:17 C/dialog.vala.page:15 C/entry.c.page:15
44#: C/entry.js.page:15 C/entry.py.page:17 C/entry.vala.page:15 C/filechooserdialog.py.page:19
45#: C/filechooserdialog.vala.page:18 C/fontchooserwidget.py.page:17 C/gmenu.c.page:15 C/gmenu.js.page:15
46#: C/gmenu.py.page:17 C/gmenu.py.page:23 C/gmenu.vala.page:16 C/grid.c.page:15 C/grid.js.page:15 C/grid.py.page:17
47#: C/grid.py.page:23 C/grid.vala.page:17 C/GtkApplicationWindow.c.page:15 C/GtkApplicationWindow.js.page:15
48#: C/GtkApplicationWindow.py.page:17 C/GtkApplicationWindow.py.page:22 C/GtkApplicationWindow.vala.page:15
49#: C/guitar-tuner.js.page:14 C/hellognome.js.page:14 C/hello-world.c.page:17 C/hello-world.js.page:17
50#: C/hello-world.py.page:17 C/hello-world.vala.page:17 C/image.c.page:15 C/image.js.page:14 C/image.py.page:17
51#: C/image.vala.page:15 C/label.c.page:16 C/label.js.page:15 C/label.py.page:19 C/label.py.page:24
52#: C/label.vala.page:15 C/linkbutton.c.page:15 C/linkbutton.js.page:15 C/linkbutton.py.page:16
53#: C/linkbutton.vala.page:15 C/menubar.c.page:17 C/menubar.py.page:17 C/menubar.py.page:22 C/menubar.vala.page:17
54#: C/menubutton.js.page:15 C/menubutton.py.page:16 C/menubutton.py.page:22 C/menubutton.vala.page:15
55#: C/messagedialog.c.page:16 C/messagedialog.js.page:18 C/messagedialog.py.page:16 C/messagedialog.vala.page:15
56#: C/model-view-controller.py.page:23 C/paned.c.page:15 C/paned.py.page:16 C/progressbar.c.page:16
57#: C/progressbar.js.page:14 C/progressbar.py.page:16 C/progressbar.vala.page:15 C/properties.py.page:23
58#: C/radiobutton.c.page:17 C/radiobutton.js.page:15 C/radiobutton.py.page:17 C/radiobutton.vala.page:18
59#: C/response-type.page:11 C/scale.c.page:17 C/scale.js.page:15 C/scale.py.page:17 C/scale.vala.page:17
60#: C/scrolledwindow.c.page:17 C/scrolledwindow.py.page:16 C/scrolledwindow.vala.page:16 C/separator.py.page:17
61#: C/set-up-gedit.js.page:14 C/signals-callbacks.py.page:23 C/spinbutton.c.page:18 C/spinbutton.js.page:18
62#: C/spinbutton.py.page:17 C/spinbutton.vala.page:17 C/spinner.c.page:16 C/spinner.js.page:15 C/spinner.py.page:16
63#: C/spinner.vala.page:15 C/statusbar.c.page:19 C/statusbar.js.page:15 C/statusbar.py.page:17
64#: C/statusbar.vala.page:18 C/strings.py.page:23 C/switch.c.page:15 C/switch.js.page:15 C/switch.py.page:16
65#: C/switch.vala.page:19 C/textview.c.page:15 C/textview.js.page:19 C/textview.py.page:24 C/textview.vala.page:15
66#: C/togglebutton.c.page:19 C/togglebutton.js.page:15 C/togglebutton.py.page:16 C/togglebutton.vala.page:18
67#: C/toolbar.c.page:17 C/toolbar.js.page:15 C/toolbar.py.page:17 C/toolbar.vala.page:16 C/toolbar_builder.py.page:18
68#: C/toolbar_builder.py.page:24 C/toolbar_builder.vala.page:17 C/tooltip.py.page:17
69#: C/treeview_advanced_liststore.py.page:16 C/treeview_cellrenderertoggle.py.page:16
70#: C/treeview_simple_liststore.js.page:18 C/treeview_simple_liststore.py.page:17
71#: C/treeview_simple_liststore.vala.page:17 C/treeview_treestore.py.page:17 C/tutorial.py.page:17
72#: C/weatherApp.js.page:14 C/weatherAppMain.js.page:13 C/weatherAutotools.js.page:13 C/weatherGeonames.js.page:13
73#: C/window.c.page:15 C/window.js.page:15 C/window.py.page:17 C/window.py.page:22 C/window.vala.page:15
74msgid "2012"
75msgstr "2012"
76
77#. (itstool) path: info/desc
78#: C/02_welcome_to_the_grid.js.page:20
79msgid "Learn how to lay out UI components, like Images and Labels."
80msgstr "그림과 레이블 같은 사용자 인터페이스 구성요소를 어떻게 배치하는지 알아보겠습니다."
81
82#. (itstool) path: page/title
83#: C/02_welcome_to_the_grid.js.page:23
84msgid "2. Welcome to the Grid"
85msgstr "2. Grid를 쓰러 오셨어요?"
86
87#. (itstool) path: synopsis/p
88#: C/02_welcome_to_the_grid.js.page:25
89msgid ""
90"This tutorial will show you how to create basic widgets, or parts of the GNOME user interface, like Images and "
91"Labels. You'll then learn how to arrange them all in a Grid, which lets you put widgets exactly where you want "
92"them."
93msgstr ""
94"이 따라하기 지침서에서는 기본 위젯 또는 그림 및 레이블 같은 그놈 사용자 인터페이스 일부를 만드는 방법을 보여드리겠"
95"습니다. 그 다음, 해당 위젯을 놓고 싶은 곳에 정확히 놓게 하는 그리드로 정돈하는 방법을 알아보겠습니다."
96
97#. (itstool) path: note/p
98#: C/02_welcome_to_the_grid.js.page:26
99msgid ""
100"Have you taken <link xref=\"hellognome.js\">the first tutorial in this series</link> already? You'll want to do so "
101"before continuing."
102msgstr ""
103"<link xref=\"hellognome.js\">이 시리즈의 따라하기 첫번째</link>를 해보셨쥬? 계속 진행하기전에 해보는게 좋아요."
104
105#. (itstool) path: section/title
106#: C/02_welcome_to_the_grid.js.page:32
107msgid "Going native"
108msgstr "네이티브로 갑시다"
109
110#. (itstool) path: section/p
111#: C/02_welcome_to_the_grid.js.page:34
112msgid ""
113"In the last tutorial, we created what was basically a GNOME window frame for a web app. All the GNOME-specific "
114"code we needed to learn revolved around putting the WebView -- the widget containing our application -- into an "
115"ApplicationWindow, and telling it to display. The application itself was written in HTML and JavaScript, just like "
116"most pages on the web."
117msgstr ""
118"이전 따라하기에서, 웹 앱용 그놈 기본 창 프레임을 만들었습니다. 우리가 배울 모든 그놈 코드는 ApplicationWindow의 "
119"WebView 주변에 두고 표시하게 했습니다. 프로그램 자체는 웹의 대부분 페이지처럼 HTML과 JavaScript로 작성했습니다."
120
121#. (itstool) path: section/p
122#: C/02_welcome_to_the_grid.js.page:35
123msgid ""
124"This time, we're going to use only native GNOME widgets. A widget is just a thing, like a checkbox or picture, and "
125"GNOME has a wide variety of them to choose from. We call them \"native\" widgets to distinguish them from things "
126"like the button and header in the web app we wrote. Because instead of using web code, these are going to be 100 "
127"percent GNOME, using GTK+."
128msgstr ""
129"이제 자체 그놈 위젯을 사용하겠습니다. 위젯은 그냥 확인 상자 또는 그림 같은거고, 그놈에는 선택해 볼 수 있는 다양한 "
130"위젯이 있습니다. 우리가 작성했던 웹 앱의 단추 및 헤더 같은걸 따로 구분할 목적으로 \"자체\" 위젯이라고 하겠습니다. "
131"웹 코드를 사용하는 대신, GTK+로 완전한 그놈 프로그램을 이루기 때문입니다."
132
133#. (itstool) path: note/p
134#: C/02_welcome_to_the_grid.js.page:36
135msgid ""
136"GTK+ stands for \"GIMP Toolkit\". It's like a toolbox of widgets that you can reach into, while building your "
137"applications. It was originally written for <link href=\"http://www.gimp.org/\">the GIMP</link>, which is a free "
138"software image editor."
139msgstr ""
140"GTK+는 \"GIMP Toolkit\"입니다. 프로그램을 구성하는 동안 여러분이 접근할 수 있는 위젯의 도구함 같은 존재입니다. 원래"
141"는 자유 소프트웨어 그림 편집기 <link href=\"http://www.gimp.org/\">김프</link>를 작성하려고 만들었었죠."
142
143#. (itstool) path: section/title
144#: C/02_welcome_to_the_grid.js.page:40
145msgid "Setting up our application"
146msgstr "프로그램 구성"
147
148#. (itstool) path: section/p
149#: C/02_welcome_to_the_grid.js.page:42
150msgid ""
151"Before we dig out any widgets from the GTK+ toolbox, we first need to write the basic boilerplate code that our "
152"application requires."
153msgstr "GTK+ 도구함의 위젯을 찾아보기 전에, 우선 프로그램에서 필요한 기본 준비 코드를 작성해야합니다."
154
155#. (itstool) path: section/code
156#: C/02_welcome_to_the_grid.js.page:43
157#, no-wrap
158msgid ""
159"\n"
160"#!/usr/bin/gjs\n"
161"\n"
162"imports.gi.versions.Gtk = '3.0';\n"
163"const Gtk = imports.gi.Gtk;\n"
164msgstr ""
165"\n"
166"#!/usr/bin/gjs\n"
167"\n"
168"imports.gi.versions.Gtk = '3.0';\n"
169"const Gtk = imports.gi.Gtk;\n"
170
171#. (itstool) path: section/p
172#: C/02_welcome_to_the_grid.js.page:49
173msgid ""
174"This part always goes at the start of your code. Depending on what you'll be doing with it, you may want to "
175"declare more imports here. What we're writing today is pretty basic, so these are all we need; Gtk for the "
176"widgets, using the stable '3.0' API."
177msgstr ""
178"이 부분은 늘 나타나는 코드의 시작 부분입니다. 이 코드로 어떤 프로그램을 작성하느냐에 따라 여기에 더 가져올 항목을 "
179"선언할 수도 있습니다. 지금 작성하는 부분은 좀 기본적이기에, 하여간 우리가 필요한 건 다 갖추었습니다. 위젯에 필요한 "
180"GTK입니다. '3.0' 안정 API를 활용하세요."
181
182#. (itstool) path: section/p
183#: C/02_welcome_to_the_grid.js.page:50
184msgid "Speaking of which:"
185msgstr "말 나온 김에:"
186
187#. (itstool) path: section/code
188#: C/02_welcome_to_the_grid.js.page:51
189#, no-wrap
190msgid ""
191"\n"
192"class WelcomeToTheGrid {\n"
193"    // Create the application itself\n"
194"    constructor() {\n"
195"        this.application = new Gtk.Application();\n"
196"\n"
197"        // Connect 'activate' and 'startup' signals to the callback functions\n"
198"        this.application.connect('activate', this._onActivate.bind(this));\n"
199"        this.application.connect('startup', this._onStartup.bind(this));\n"
200"    }\n"
201"\n"
202"    // Callback function for 'activate' signal presents windows when active\n"
203"    _onActivate() {\n"
204"        this._window.present();\n"
205"    }\n"
206"\n"
207"    // Callback function for 'startup' signal builds the UI\n"
208"    _onStartup() {\n"
209"        this._buildUI ();\n"
210"    }\n"
211msgstr ""
212"\n"
213"class WelcomeToTheGrid {\n"
214"    // Create the application itself\n"
215"    constructor() {\n"
216"        this.application = new Gtk.Application();\n"
217"\n"
218"        // Connect 'activate' and 'startup' signals to the callback functions\n"
219"        this.application.connect('activate', this._onActivate.bind(this));\n"
220"        this.application.connect('startup', this._onStartup.bind(this));\n"
221"    }\n"
222"\n"
223"    // Callback function for 'activate' signal presents windows when active\n"
224"    _onActivate() {\n"
225"        this._window.present();\n"
226"    }\n"
227"\n"
228"    // Callback function for 'startup' signal builds the UI\n"
229"    _onStartup() {\n"
230"        this._buildUI ();\n"
231"    }\n"
232
233#. (itstool) path: section/p
234#: C/02_welcome_to_the_grid.js.page:72
235msgid ""
236"This is the start of the application itself, and the _init function which creates it. It tells _buildUI to create "
237"an ApplicationWindow, which we're going to call _window, and it tells our window to present itself whenever needed."
238msgstr ""
239"프로그램 자체를 시작하는 부분이고 _init 함수에서 프로그램을 구성합니다. _buildUI에서 _window를 호출할 "
240"ApplicationWindow 객체를 만들게 하고, 필요할 때 창을 나타내게 합니다."
241
242#. (itstool) path: section/p
243#: C/02_welcome_to_the_grid.js.page:73
244msgid "This part, again, is pretty much copy-and-paste, but you always want to give your application a unique name."
245msgstr "다시 말해, 이 부분을 막 갖다 붙여넣긴 했지만, 이 프로그램에 언제든 고유한 이름을 줄 수 있습니다."
246
247#. (itstool) path: section/code
248#: C/02_welcome_to_the_grid.js.page:75
249#, no-wrap
250msgid ""
251"\n"
252"    // Build the application's UI\n"
253"    _buildUI() {\n"
254"\n"
255"        // Create the application window\n"
256"        this._window = new Gtk.ApplicationWindow({\n"
257"            application: this.application,\n"
258"            window_position: Gtk.WindowPosition.CENTER,\n"
259"            border_width: 10,\n"
260"            title: \"Welcome to the Grid\"});\n"
261msgstr ""
262"\n"
263"    // Build the application's UI\n"
264"    _buildUI() {\n"
265"\n"
266"        // Create the application window\n"
267"        this._window = new Gtk.ApplicationWindow({\n"
268"            application: this.application,\n"
269"            window_position: Gtk.WindowPosition.CENTER,\n"
270"            border_width: 10,\n"
271"            title: \"Welcome to the Grid\"});\n"
272
273#. (itstool) path: section/p
274#: C/02_welcome_to_the_grid.js.page:86
275msgid ""
276"Finally, we start off the _buildUI function by creating a new ApplicationWindow. We specify that it goes with this "
277"application, that it should appear in the center of the screen, and that there should be at least 10 pixels "
278"between the outside edge and any widgets inside of it. We also give it a title, which will appear at the top of "
279"the window."
280msgstr ""
281"마지막으로 _buildUI 함수로 새 ApplicationWindow 객체를 만들겠습니다. 이 프로그램에서 창을 화면 가운데에서 나타나게 "
282"하고 바깥 가장자리는 최소한 10 픽셀의 간격을 두고 어떤 위젯이든 이 안에 두도록 하겠습니다. 또한 창 상단에 뜨는 제목"
283"도 넣겠습니다."
284
285#. (itstool) path: section/title
286#: C/02_welcome_to_the_grid.js.page:90
287msgid "Reaching into the GTK+ toolbox"
288msgstr "GTK+ 도구함 찾아가기"
289
290#. (itstool) path: section/p
291#: C/02_welcome_to_the_grid.js.page:91
292msgid "What widgets should we use? Well, let's say we want to write an application that looks like this:"
293msgstr "어떤 위젯을 사용할까요? 일단 다음과 같은 프로그램을 작성한다고 가정하겠습니다:"
294
295#. (itstool) path: section/media
296#. This is a reference to an external file such as an image or video. When
297#. the file changes, the md5 hash will change to let you know you need to
298#. update your localized copy. The msgstr is not used at all. Set it to
299#. whatever you like once you have updated your copy of the file.
300#: C/02_welcome_to_the_grid.js.page:93
301msgctxt "_"
302msgid "external ref='media/02_jsgrid_01.png' md5='3fdc22d361cf801f71557fdc76ae5b49'"
303msgstr ""
304
305#. (itstool) path: section/p
306#: C/02_welcome_to_the_grid.js.page:95
307msgid ""
308"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:"
309msgstr "최소한, 필요한걸 그림과 텍스트 레이블이라고 하죠. 그림 놓기로 시작해보겠습니다:"
310
311#. (itstool) path: section/code
312#: C/02_welcome_to_the_grid.js.page:96
313#, no-wrap
314msgid ""
315"\n"
316"        // Create an image\n"
317"        this._image = new Gtk.Image ({ file: \"gnome-image.png\" });\n"
318msgstr ""
319"\n"
320"        // Create an image\n"
321"        this._image = new Gtk.Image ({ file: \"gnome-image.png\" });\n"
322
323#. (itstool) path: section/p
324#: C/02_welcome_to_the_grid.js.page:101
325msgid ""
326"You can download the image file used in this example <link href=\"https://live.gnome.org/TarynFox?"
327"action=AttachFile&amp;do=get&amp;target=gnome-image.png\">here</link>. Be sure to put it in the same directory as "
328"the code you're writing."
329msgstr ""
330"이 예제에서 사용하는 그림 파일은 <link href=\"https://live.gnome.org/TarynFox?action=AttachFile&amp;do=get&amp;"
331"target=gnome-image.png\">여기</link>에서 받을 수 있습니다. 작성 중인 코드대로 동일한 디렉터리에 그림을 두었는지 확"
332"인해보십시오."
333
334#. (itstool) path: section/code
335#: C/02_welcome_to_the_grid.js.page:103
336#, no-wrap
337msgid ""
338"\n"
339"        // Create a label\n"
340"        this._label = new Gtk.Label ({ label: \"Welcome to GNOME, too!\" });\n"
341msgstr ""
342"\n"
343"        // Create a label\n"
344"        this._label = new Gtk.Label ({ label: \"Welcome to GNOME, too!\" });\n"
345
346#. (itstool) path: section/p
347#: C/02_welcome_to_the_grid.js.page:107
348msgid ""
349"That code adds in the label beneath. You can see how we create widgets, here; each one is a part of Gtk, and we "
350"can give it properties that customize how it behaves. In this case, we set the Image's file property to be the "
351"filename of the picture we want, and the Label's label property to be the sentence that we want beneath the "
352"picture."
353msgstr ""
354"이 코드에서 그림 하단에 레이블을 추가합니다. 위젯을 만드는 방법을 볼 수가 있지요. GTK의 일부분이고, 바꿀 모양으로 "
355"속성 값을 줄 수 있습니다. 여기서는 그림의 file 속성을 우리가 원하는 그림의 파일 이름으로 넣었고 레이블의 label 속성"
356"은 그림 아래에 표시할 문장을 넣었습니다."
357
358#. (itstool) path: note/p
359#: C/02_welcome_to_the_grid.js.page:108
360msgid ""
361"Yes, it sounds redundant for a Label to have a label property, but it's not. Other widgets that contain text have "
362"a label property, so it's <em>consistent</em> for the Label widget to have one too."
363msgstr ""
364"예 레이블의 label 속성은 뭔가 반복된 것 같죠. 하지만 그렇진 않습니다. 텍스트를 가진 다른 위젯에도 label 속성이 있어"
365"서, 문장을 가진 레이블 위젯에 대해 <em>일관된</em> 양상을 취하고 있죠."
366
367#. (itstool) path: section/p
368#: C/02_welcome_to_the_grid.js.page:109
369msgid ""
370"We can't just add these widgets to our window in order, though, the same way HTML elements appear in the order you "
371"write them. That's because an ApplicationWindow can only contain one widget."
372msgstr ""
373"창에 위젯을 추가할 때 이렇게 만 할 수 있는게 아니라, 위젯을 작성할 때 HTML 구성 요소로 동일한 방식으로 작성하여 나"
374"타낼 수 있습니다. ApplicationWindow에서 위젯 하나만 넣을 수 있는 이유가 됩니다."
375
376#. (itstool) path: section/p
377#: C/02_welcome_to_the_grid.js.page:110
378msgid ""
379"How do we get around that? By making that one widget a container widget, which can hold more than one widget and "
380"organize them inside it. Behold: The Grid."
381msgstr ""
382"어떻게 할까요? 이 위젯을 컨테이너 위젯으로 만들면, 위젯에 다른 위젯을 하나 이상 더 넣을 수 있습니다. 이걸 그리드라 "
383"하죠."
384
385#. (itstool) path: section/code
386#: C/02_welcome_to_the_grid.js.page:111
387#, no-wrap
388msgid ""
389"\n"
390"        // Create the Grid\n"
391"        this._grid = new Gtk.Grid ();\n"
392msgstr ""
393"\n"
394"        // Create the Grid\n"
395"        this._grid = new Gtk.Grid ();\n"
396
397#. (itstool) path: section/p
398#: C/02_welcome_to_the_grid.js.page:116
399msgid ""
400"We're not giving it any properties yet. Those will come later, as we learn how to use the Grid's powers. First, "
401"let's attach the Image and Label we made to our Grid."
402msgstr ""
403"아직은 속성 값을 넣지 않았습니다. 일단 그리드의 막강한 기능을 사용하는 법을 배우고 나서 속성 값을 넣겠구요. 우선, "
404"앞에서 구성한 그림과 레이블을 그리드에 넣어보겠습니다."
405
406#. (itstool) path: section/code
407#: C/02_welcome_to_the_grid.js.page:117
408#, no-wrap
409msgid ""
410"\n"
411"        // Attach the image and label to the grid\n"
412"        this._grid.attach (this._image, 0, 0, 1, 1);\n"
413"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
414msgstr ""
415"\n"
416"        // Attach the image and label to the grid\n"
417"        this._grid.attach (this._image, 0, 0, 1, 1);\n"
418"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
419
420#. (itstool) path: section/p
421#: C/02_welcome_to_the_grid.js.page:123
422msgid "This code looks awfully complicated, but it's not. Here's what those numbers mean:"
423msgstr "이 코드는 억수로 복잡해보이지만, 그렇지가 않아요읭? 여기 나타난 숫자는:"
424
425#. (itstool) path: item/p
426#: C/02_welcome_to_the_grid.js.page:125
427msgid ""
428"The <em>first</em> number is what left-to-right position to put things in, starting from 0. Any widget that uses a "
429"0 here goes all the way to the left."
430msgstr ""
431"<em>첫번째</em> 숫자는 왼쪽에서 오른쪽으로 어떤 위치에 둘거냐를 말하는데, 0부터 시작합니다. 여기에 0 값이 들어가면 "
432"왼쪽에 넣겠다는 의미죠."
433
434#. (itstool) path: item/p
435#: C/02_welcome_to_the_grid.js.page:126
436msgid ""
437"The <em>second</em> number is what top-to-bottom position to put a given widget in, starting from 0. The Label "
438"goes beneath the Image, so we give the Image a 0 and the Label a 1 here."
439msgstr ""
440"<em>두번째</em> 숫자는 위에서 아래로 어떤 위치에 둘거냐를 말하는데, 역시 0부터 시작합니다. 레이블이 그림 아래로 가"
441"니까, 그림에는 이 자리에 0 값을 주고, 레이블은 1 값을 줍니다."
442
443#. (itstool) path: item/p
444#: C/02_welcome_to_the_grid.js.page:127
445msgid ""
446"The <em>third</em> and <em>fourth</em> numbers are how many columns and rows a widget should take up. We'll see "
447"how these work in a minute."
448msgstr ""
449"<em>세번째</em>와 <em>네번째</em> 숫자는 행열(열-행 순) 위젯 갯수를 몇개로 둘지 나타냅니다. 조금 이따가 어떻게 동작"
450"하는지 보겠습니다."
451
452#. (itstool) path: section/code
453#: C/02_welcome_to_the_grid.js.page:130
454#, no-wrap
455msgid ""
456"\n"
457"        // Add the grid to the window\n"
458"        this._window.add (this._grid);\n"
459"\n"
460"        // Show the window and all child widgets\n"
461"        this._window.show_all();\n"
462"    }\n"
463"\n"
464"};\n"
465"\n"
466"// Run the application\n"
467"let app = new WelcomeToTheGrid ();\n"
468"app.application.run (ARGV);\n"
469msgstr ""
470"\n"
471"        // Add the grid to the window\n"
472"        this._window.add (this._grid);\n"
473"\n"
474"        // Show the window and all child widgets\n"
475"        this._window.show_all();\n"
476"    }\n"
477"\n"
478"};\n"
479"\n"
480"// Run the application\n"
481"let app = new WelcomeToTheGrid ();\n"
482"app.application.run (ARGV);\n"
483
484#. (itstool) path: section/p
485#: C/02_welcome_to_the_grid.js.page:144
486msgid ""
487"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 "
488"show itself, as the last part of the _buildUI function. As always, to finish up we create a new instance of the "
489"application's class and tell it to run."
490msgstr ""
491"이제 모든 위젯을 넣은 그리드를 만들어서 창에 추가했고, _buildUI 함수의 마지막 부분에서 창에서 그동안 추가한 위젯을 "
492"표시하도록 했습니다. 언제든지 마무리할 때는 프로그램 클래스의 새 인스턴스를 만들고 실행을 지시합니다."
493
494#. (itstool) path: section/p
495#: C/02_welcome_to_the_grid.js.page:145
496msgid ""
497"Save your application as welcome_to_the_grid.js. Then, to run your application just open a terminal, go to the "
498"directory where your application is at, and type"
499msgstr ""
500"프로그램을 welcome_to_the_grid.js로 저장하시고요. 프로그램을 실행하려면 그냥 터미널을 여시고, 프로그램이 있는 디렉"
501"터리로 가셔서 다음 명령을 쳐 넣으세요"
502
503#. (itstool) path: section/screen
504#: C/02_welcome_to_the_grid.js.page:146
505#, no-wrap
506msgid " <output style=\"prompt\">$ </output>gjs welcome_to_the_grid.js "
507msgstr " <output style=\"prompt\">$ </output>gjs welcome_to_the_grid.js "
508
509#. (itstool) path: section/media
510#. This is a reference to an external file such as an image or video. When
511#. the file changes, the md5 hash will change to let you know you need to
512#. update your localized copy. The msgstr is not used at all. Set it to
513#. whatever you like once you have updated your copy of the file.
514#: C/02_welcome_to_the_grid.js.page:148
515msgctxt "_"
516msgid "external ref='media/02_jsgrid_02.png' md5='07db86b0043ba5c3c24a90d7322bd81e'"
517msgstr ""
518
519#. (itstool) path: section/p
520#: C/02_welcome_to_the_grid.js.page:150
521msgid ""
522"There we go! But wait. That doesn't look right. Why is the Label crammed up next to the Image like that? That "
523"doesn't look as nice, and it makes it harder to read. What can we do about this?"
524msgstr ""
525"아 돌아가네요! 어 근데 잠깐만요? 제대로 나타나질 않네요. 왜 레이블이 그림 옆으로 쑤셔들어갔을까요? 별로 좋아보이지 "
526"않고, 알아보기가 어렵네요. 이걸 어떻게 할 수 있을까요?"
527
528#. (itstool) path: section/title
529#: C/02_welcome_to_the_grid.js.page:154
530msgid "Tweaking the Grid"
531msgstr "그리드 조절"
532
533#. (itstool) path: section/p
534#: C/02_welcome_to_the_grid.js.page:156
535msgid ""
536"One thing we can do, is we can give the Label a margin_top property when we create it. This works sort of like "
537"setting a margin for an HTML element using inline CSS styling."
538msgstr ""
539"여기서 우리는 우리가 레이블을 만들 때 margin_top 속성 값을 줄 수 있습니다. 인라인 CSS 스타일로 HTML 구성 요소에 여"
540"백 값을 주는 일과 비슷하죠."
541
542#. (itstool) path: section/code
543#: C/02_welcome_to_the_grid.js.page:157
544#, no-wrap
545msgid ""
546"\n"
547"        // Create a label\n"
548"        this._label = new Gtk.Label ({\n"
549"            label: \"Welcome to GNOME, too!\",\n"
550"            margin_top: 20 });\n"
551msgstr ""
552"\n"
553"        // Create a label\n"
554"        this._label = new Gtk.Label ({\n"
555"            label: \"Welcome to GNOME, too!\",\n"
556"            margin_top: 20 });\n"
557
558#. (itstool) path: section/p
559#: C/02_welcome_to_the_grid.js.page:164
560msgid ""
561"Of course, if we do that then if we replace the Label with something else -- or add in another widget -- then we "
562"have to repeat the margin_top on it too. Otherwise we end up with something like this:"
563msgstr ""
564"물론, 이렇게 하고 나면 레이블을 다른 모양새로, 또는 다른 위젯으로 바꿀 때 margin_top 속성 값 설정을 반복해야합니"
565"다. 아니면 다음과 같이 끝냅니다:"
566
567#. (itstool) path: section/media
568#. This is a reference to an external file such as an image or video. When
569#. the file changes, the md5 hash will change to let you know you need to
570#. update your localized copy. The msgstr is not used at all. Set it to
571#. whatever you like once you have updated your copy of the file.
572#: C/02_welcome_to_the_grid.js.page:165
573msgctxt "_"
574msgid "external ref='media/02_jsgrid_03.png' md5='817351e73c687d47253c56ed06b6629f'"
575msgstr ""
576
577#. (itstool) path: section/p
578#: C/02_welcome_to_the_grid.js.page:167
579msgid ""
580"We could give the Image a margin_bottom property, but that won't work when the new Label is in a separate column. "
581"So how about we try this instead:"
582msgstr ""
583"그림에 margin_bottom 속성 값을 줄 수 있지만, 새 레이블을 개별 칸에 넣을 경우 동작하지 않습니다. 그래서 대신, 다음"
584"과 같이 해보겠습니다:"
585
586#. (itstool) path: section/code
587#: C/02_welcome_to_the_grid.js.page:168
588#, no-wrap
589msgid ""
590"\n"
591"        // Create the Grid\n"
592"        this._grid = new Gtk.Grid ({\n"
593"            row_spacing: 20 });\n"
594msgstr ""
595"\n"
596"        // Create the Grid\n"
597"        this._grid = new Gtk.Grid ({\n"
598"            row_spacing: 20 });\n"
599
600#. (itstool) path: section/p
601#: C/02_welcome_to_the_grid.js.page:174
602msgid "That makes it so that there are always 20 pixels of space in between each horizontal row."
603msgstr "수평행에 배치했을 때 사이 여백을 항상 20 픽셀로 두도록합니다."
604
605#. (itstool) path: note/p
606#: C/02_welcome_to_the_grid.js.page:175
607msgid ""
608"Yes, you can also set the column_spacing property on a Grid, or the margin_left and margin_right properties on any "
609"widget. Try them out, if you like!"
610msgstr ""
611"예, 그리드에서 column_spacing 속성 값을 설정하든지 각 위젯의 margin_left, margin_right 값을 설정할 수도 있습니다. "
612"원하면 해보세요!"
613
614#. (itstool) path: section/title
615#: C/02_welcome_to_the_grid.js.page:179
616msgid "Adding more widgets"
617msgstr "위젯 또 추가하기"
618
619#. (itstool) path: section/p
620#: C/02_welcome_to_the_grid.js.page:181
621msgid ""
622"If we did want to add a second Label, how would we do it so that it actually looked like it belonged there? One "
623"way is to center the Image on top, so that it's above both Labels instead of just the one on the left. That's "
624"where those other numbers in the Grid's attach method come in:"
625msgstr ""
626"두번째 레이블을 또 추가하고 싶다면 말이죠. 우리가 그리드에 어떻게 넣어서 그렇게 보이게 했을까요? 방법은 상단 그림"
627"을 가운데로 두어서 레이블의 왼편으로 가는 대신 두 레이블의 위로 가게 했습니다. 다음 내용은 그리드에 레이블을 또 넣"
628"는 방법을 나타냅니다:"
629
630#. (itstool) path: section/code
631#: C/02_welcome_to_the_grid.js.page:182
632#, no-wrap
633msgid ""
634"\n"
635"        // Create a second label\n"
636"        this._labelTwo = new Gtk.Label ({\n"
637"            label: \"The cake is a pie.\" });\n"
638"\n"
639"        // Attach the image and labels to the grid\n"
640"        this._grid.attach (this._image, 0, 0, 2, 1);\n"
641"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
642"        this._grid.attach (this._labelTwo, 1, 1, 1, 1);\n"
643msgstr ""
644"\n"
645"        // Create a second label\n"
646"        this._labelTwo = new Gtk.Label ({\n"
647"            label: \"The cake is a pie.\" });\n"
648"\n"
649"        // Attach the image and labels to the grid\n"
650"        this._grid.attach (this._image, 0, 0, 2, 1);\n"
651"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
652"        this._grid.attach (this._labelTwo, 1, 1, 1, 1);\n"
653
654#. (itstool) path: section/p
655#: C/02_welcome_to_the_grid.js.page:193
656msgid ""
657"After we create the second Label, we attach it to the Grid to the right of the first Label. Remember, the first "
658"two numbers count columns and rows from left to right and top to bottom, starting with 0. So if the first Label is "
659"in column 0 and row 1, we can put the second in column 1 and row 1 to put it to the right of the first Label."
660msgstr ""
661"두번째 레이블을 만들고 나면 처음 레이블의 오른쪽으로 가도록 그리드에 붙여넣습니다. 처음 숫자 두개는 열-행 숫자를 각"
662"각 왼쪽에서 오른쪽순으로 그리고 위에서 아래 순으로 0번부터 센다는 점을 기억하시죠. 그러니까 첫번째 레이블이 0번째 "
663"칸, 1번째 줄(첫번째 칸, 두번째 줄)에서 시작하면, 두번째 레이블은 처음 레이블의 오른쪽에 가도록 1번째 칸, 1번째 줄"
664"(두번째 칸, 두번째 줄)에 둘 수 있습니다."
665
666#. (itstool) path: section/p
667#: C/02_welcome_to_the_grid.js.page:194
668msgid ""
669"Note the number 2 in the attach statement for the Image. That's what does the trick here. That number is how many "
670"columns the Image spans, remember? So when we put it together, we get something like this:"
671msgstr ""
672"여기서 붙여넣기 구분의 숫자 2는 그림에 해당합니다. 여기서 사용하는 꼼수에서 할 일입니다. 해당 숫자 값은 그림이 칸"
673"을 얼마나 차지하겠느냐는 의미입니다. 그래서 이걸 같이 두면, 다음과 같이 나타납니다:"
674
675#. (itstool) path: section/media
676#. This is a reference to an external file such as an image or video. When
677#. the file changes, the md5 hash will change to let you know you need to
678#. update your localized copy. The msgstr is not used at all. Set it to
679#. whatever you like once you have updated your copy of the file.
680#: C/02_welcome_to_the_grid.js.page:195
681msgctxt "_"
682msgid "external ref='media/02_jsgrid_04.png' md5='eeaead27cee2851877fc3cfe66177f07'"
683msgstr ""
684
685#. (itstool) path: section/p
686#: C/02_welcome_to_the_grid.js.page:197
687msgid "There are two things you should take note of, here."
688msgstr "알아둘 게 두가지가 있는데요."
689
690#. (itstool) path: item/p
691#: C/02_welcome_to_the_grid.js.page:199
692msgid ""
693"Setting the Image to span two columns doesn't stretch the picture itself horizontally. Instead, it stretches the "
694"invisible box taken up by the Image widget to fill both columns, then places the Image in the center of that box."
695msgstr ""
696"그림에 두칸을 차지하도록 설정한다고 해서 그림 자체가 수평으로 쭉 늘어나진 않아요. 대신 그림 위젯 뒤의 보이지 않는 "
697"상자가 늘어나서 두 칸을 채우고, 그림은 상자 한가운데로 갑니다."
698
699#. (itstool) path: item/p
700#: C/02_welcome_to_the_grid.js.page:200
701msgid ""
702"Even though we've set the Grid's row_spacing and the ApplicationWindow's border_width properties, we haven't yet "
703"set anything that puts a border in between the two Labels. They were separate earlier when the Image was in only "
704"one column, but now that it spans both GNOME doesn't see a reason to keep them apart."
705msgstr ""
706"그리드 row_spacing 속성 값과 ApplicationWindow의 border_width 속성 값을 설정하긴 했지만, 레이블 둘 사이의 테두리에 "
707"대한 그 어떤 값도 설정하지 않았습니다. 그림이 한 칸만 차지했을 때는 따로 나뉘어져있었지만, 그놈 그림이 두 칸을 차지"
708"한 이후로는 두 레이블이 따로 떨어져 보일 이유를 찾아볼 수가 없죠."
709
710#. (itstool) path: section/p
711#: C/02_welcome_to_the_grid.js.page:203
712msgid ""
713"There are at least three ways we can get around that last one. First, we can set a margin_left or margin_right on "
714"one of the Labels:"
715msgstr ""
716"마지막 문제를 해결할 수 있는데는 최소한 세가지 방법이 있습니다. 우선 레이블 중 하나에 margin_left 또는 "
717"margin_right 값을 설정할 수 있습니다:"
718
719#. (itstool) path: section/media
720#. This is a reference to an external file such as an image or video. When
721#. the file changes, the md5 hash will change to let you know you need to
722#. update your localized copy. The msgstr is not used at all. Set it to
723#. whatever you like once you have updated your copy of the file.
724#: C/02_welcome_to_the_grid.js.page:204
725msgctxt "_"
726msgid "external ref='media/02_jsgrid_05.png' md5='a3ad12f432d5977fc1f66302ad5b7498'"
727msgstr ""
728
729#. (itstool) path: section/p
730#: C/02_welcome_to_the_grid.js.page:206
731msgid "Second, we can set the Grid's column_homogeneous property to true."
732msgstr "두번째로, 그리드의 column_homogeneous 속성 값을 true로 설정할 수 있고요."
733
734#. (itstool) path: section/code
735#: C/02_welcome_to_the_grid.js.page:207
736#, no-wrap
737msgid ""
738"\n"
739"        // Create the Grid\n"
740"        this._grid = new Gtk.Grid ({\n"
741"            column_homogeneous: true,\n"
742"            row_spacing: 20 });\n"
743msgstr ""
744"\n"
745"        // Create the Grid\n"
746"        this._grid = new Gtk.Grid ({\n"
747"            column_homogeneous: true,\n"
748"            row_spacing: 20 });\n"
749
750#. (itstool) path: section/p
751#: C/02_welcome_to_the_grid.js.page:214
752msgid "That makes it look something like this:"
753msgstr "이렇게 하면 다음과 같이 나타납니다:"
754
755#. (itstool) path: section/media
756#. This is a reference to an external file such as an image or video. When
757#. the file changes, the md5 hash will change to let you know you need to
758#. update your localized copy. The msgstr is not used at all. Set it to
759#. whatever you like once you have updated your copy of the file.
760#: C/02_welcome_to_the_grid.js.page:215
761msgctxt "_"
762msgid "external ref='media/02_jsgrid_06.png' md5='450e48dbf6b8f5ce1c208e4812e1714b'"
763msgstr ""
764
765#. (itstool) path: section/p
766#: C/02_welcome_to_the_grid.js.page:217
767msgid "And third, we can set the Grid's column_spacing property, the same way we set its row_spacing."
768msgstr ""
769"그리고 세번째로는, 그리드의 column_spacing 속성 값을 설정하는데요. row_spacing 속성 값 설정 방식과 동일합니다."
770
771#. (itstool) path: section/code
772#: C/02_welcome_to_the_grid.js.page:218
773#, no-wrap
774msgid ""
775"\n"
776"        // Create the Grid\n"
777"        this._grid = new Gtk.Grid ({\n"
778"            column_spacing: 20,\n"
779"            row_spacing: 20 });\n"
780msgstr ""
781"\n"
782"        // Create the Grid\n"
783"        this._grid = new Gtk.Grid ({\n"
784"            column_spacing: 20,\n"
785"            row_spacing: 20 });\n"
786
787#. (itstool) path: section/p
788#: C/02_welcome_to_the_grid.js.page:224
789msgid "That makes it look like this:"
790msgstr "이렇게 하면 다음과 같이 나타나죠:"
791
792#. (itstool) path: section/media
793#. This is a reference to an external file such as an image or video. When
794#. the file changes, the md5 hash will change to let you know you need to
795#. update your localized copy. The msgstr is not used at all. Set it to
796#. whatever you like once you have updated your copy of the file.
797#: C/02_welcome_to_the_grid.js.page:225
798msgctxt "_"
799msgid "external ref='media/02_jsgrid_07.png' md5='0b304d70728903fbb2601d55bf00fdb9'"
800msgstr ""
801
802#. (itstool) path: section/title
803#: C/02_welcome_to_the_grid.js.page:229
804msgid "Using stock images"
805msgstr "스톡 그림 사용"
806
807#. (itstool) path: section/p
808#: C/02_welcome_to_the_grid.js.page:231
809msgid ""
810"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 "
811"want a universally-recognized icon. Here's how we create a stock image, compared to how we create a normal one:"
812msgstr ""
813"그놈에는 그림을 만들고 싶지 않거나 전세계적으로 통용하는 아이콘을 사용하고 싶을 때 쓸 수 있는 여러가지 스톡 그림이 "
814"이미 있습니다. 여기서 그냥 그림을 만드는 방법과 비교하여, 스톡 그림을 만드는 방법을 알아보도록 하겠습니다:"
815
816#. (itstool) path: section/code
817#: C/02_welcome_to_the_grid.js.page:232
818#, no-wrap
819msgid ""
820"\n"
821"        // Create an image\n"
822"        this._image = new Gtk.Image ({ file: \"gnome-image.png\" });\n"
823"\n"
824"        // Create a second image using a stock icon\n"
825"        this._icon = new Gtk.Image ({ stock: 'gtk-about' });\n"
826msgstr ""
827"\n"
828"        // Create an image\n"
829"        this._image = new Gtk.Image ({ file: \"gnome-image.png\" });\n"
830"\n"
831"        // Create a second image using a stock icon\n"
832"        this._icon = new Gtk.Image ({ stock: 'gtk-about' });\n"
833
834#. (itstool) path: section/p
835#: C/02_welcome_to_the_grid.js.page:239
836msgid ""
837"After that, we attach it to the Grid to the left of the first Label. (We aren't using the second one for this "
838"example.)"
839msgstr "그 다음 그리드에 붙인 처음 레이블의 왼편에 붙여넣어보겠습니다(이 예제에는 두번째 레이블이 없어요~)."
840
841#. (itstool) path: section/code
842#: C/02_welcome_to_the_grid.js.page:240
843#, no-wrap
844msgid ""
845"\n"
846"        // Attach the images and label to the grid\n"
847"        this._grid.attach (this._image, 0, 0, 2, 1);\n"
848"        this._grid.attach (this._icon,  0, 1, 1, 1);\n"
849"        this._grid.attach (this._label, 1, 1, 1, 1);\n"
850msgstr ""
851"\n"
852"        // Attach the images and label to the grid\n"
853"        this._grid.attach (this._image, 0, 0, 2, 1);\n"
854"        this._grid.attach (this._icon,  0, 1, 1, 1);\n"
855"        this._grid.attach (this._label, 1, 1, 1, 1);\n"
856
857#. (itstool) path: section/p
858#: C/02_welcome_to_the_grid.js.page:246
859msgid "That gives us this, when we run it:"
860msgstr "실행하면 다음 화면이 나타납니다:"
861
862#. (itstool) path: section/media
863#. This is a reference to an external file such as an image or video. When
864#. the file changes, the md5 hash will change to let you know you need to
865#. update your localized copy. The msgstr is not used at all. Set it to
866#. whatever you like once you have updated your copy of the file.
867#: C/02_welcome_to_the_grid.js.page:247
868msgctxt "_"
869msgid "external ref='media/02_jsgrid_08.png' md5='78890beb47bd11360154b8ca4d50d1ff'"
870msgstr ""
871
872#. (itstool) path: section/p
873#: C/02_welcome_to_the_grid.js.page:249
874msgid ""
875"That's what the stock \"About\" icon looks like. You can see a list of all the stock items starting with gtk-about "
876"in <link href=\"https://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html#GTK-STOCK-ABOUT:CAPS\">GNOME's "
877"developer documentation</link>. It was written for C programmers, but you don't need to know C to use it; just "
878"look at the part in quotation marks, like \"gtk-about\", and copy that part to use the icon next to it."
879msgstr ""
880"이게 \"정보\" 스톡 아이콘 같은 그림입니다. gtk-about부터 시작하는 모든 스톡 항목은 <link href=\"https://developer."
881"gnome.org/gtk3/3.4/gtk3-Stock-Items.html#GTK-STOCK-ABOUT:CAPS\">그놈 개발자 문서</link>에서 볼 수 있습니다. C 프로"
882"그래머에 해당하는 내용으로 작성했지만, 스톡 항목을 사용하는데 C 언어를 알 필요는 없습니다. 그냥 \"gtk-about\" 처럼 "
883"큰 따옴표에 둘러싸인 부분만 보시고, 아이콘 옆에 있는 부분을 복사해서 쓰십시오."
884
885#. (itstool) path: note/p
886#: C/02_welcome_to_the_grid.js.page:250
887msgid ""
888"We put single quotes around 'gtk-about' here because, unlike text strings that have double quotes around them, "
889"that part will never need to be translated into another language. In fact, if it <em>were</em> translated it'd "
890"break the icon, because its name is still \"gtk-about\" no matter which language you speak."
891msgstr ""
892"큰 따옴표를 붙여넣은 텍스트 문자열과는 달리 'gtk-about'에 작은 따옴표를 붙여넣었는데, 이 부분은 다른 언어로 굳이 번"
893"역할 필요가 전혀 없습니다. 사실, 어떤 언어를 사용하든 스톡 그림 이름이 \"gtk-about\"이기 때문에, 이 부분을 번역<em>"
894"하면</em> 아이콘이 깨집니다."
895
896#. (itstool) path: section/title
897#: C/02_welcome_to_the_grid.js.page:255 C/03_getting_the_signal.js.page:336 C/hellognome.js.page:191
898msgid "What's next?"
899msgstr "다음은요?"
900
901#. (itstool) path: section/p
902#: C/02_welcome_to_the_grid.js.page:256
903msgid "Before we go on to the next tutorial, let's try something a little different:"
904msgstr "다음 따라하기 내용으로 넘어가기 전에, 좀 다른걸 해보겠습니다:"
905
906#. (itstool) path: section/code
907#: C/02_welcome_to_the_grid.js.page:257
908#, no-wrap
909msgid ""
910"\n"
911"        // Create a button\n"
912"        this._button = new Gtk.Button ({\n"
913"            label: \"Welcome to GNOME, too!\"});\n"
914"\n"
915"        // Attach the images and button to the grid\n"
916"        this._grid.attach (this._image,  0, 0, 2, 1);\n"
917"        this._grid.attach (this._icon,   0, 1, 1, 1);\n"
918"        this._grid.attach (this._button, 1, 1, 1, 1);\n"
919msgstr ""
920"\n"
921"        // Create a button\n"
922"        this._button = new Gtk.Button ({\n"
923"            label: \"Welcome to GNOME, too!\"});\n"
924"\n"
925"        // Attach the images and button to the grid\n"
926"        this._grid.attach (this._image,  0, 0, 2, 1);\n"
927"        this._grid.attach (this._icon,   0, 1, 1, 1);\n"
928"        this._grid.attach (this._button, 1, 1, 1, 1);\n"
929
930#. (itstool) path: section/p
931#: C/02_welcome_to_the_grid.js.page:268
932msgid ""
933"That's right, we turned the Label into a Button just by changing the name! If you run the application and click on "
934"it, though, you'll find that it doesn't do anything. How do we make our Button do something? That's what we'll "
935"find out, in <link xref=\"03_getting_the_signal.js\">our next tutorial</link>."
936msgstr ""
937"예, 됐구요~ 레이블을 이름만 바꿔서 단추로 만들었습니다! 프로그램을 실행하고 나서 눌러보면 아무동작도 하지 않습니"
938"다. 단추를 눌렀을 때 어떤 동작을 하게 하려면 어떻게 할까요? <link xref=\"03_getting_the_signal.js\">다음 따라하기</"
939"link>에서 찾아볼 수 있습니다."
940
941#. (itstool) path: section/p
942#: C/02_welcome_to_the_grid.js.page:269
943msgid ""
944"If you like, feel free to spend some time experimenting with Grids, Labels, and Images, including stock images."
945msgstr "원한다면 그리드, 레이블, 그림, 스톡 그림으로 자유롭게 무언가를 해보세요."
946
947#. (itstool) path: note/p
948#: C/02_welcome_to_the_grid.js.page:270
949msgid ""
950"One trick you can use to make more complex layouts is to nest Grids inside of each other. This lets you group "
951"together related widgets, and rearrange them easily. Take a look at the <link xref=\"radiobutton.js\">RadioButton</"
952"link> code sample if you'd like to see how this is done."
953msgstr ""
954"더 복잡하게 배치하는 방법은 그리드 안에 그리드를 넣는 방법입니다. 위젯에 상대적인 위치에 모아둘 수 있고 쉽게 재정돈"
955"할 수 있습니다. 어떻게 하는지 보고 싶으면 <link xref=\"radiobutton.js\">RadioButton</link> 예제 코드를 살펴보시지"
956"요."
957
958#. (itstool) path: section/title
959#: C/02_welcome_to_the_grid.js.page:274 C/checkbutton.js.page:130 C/comboboxtext.js.page:171 C/combobox.js.page:228
960#: C/hellognome.js.page:198 C/messagedialog.js.page:184 C/radiobutton.js.page:269 C/scale.js.page:203
961#: C/spinbutton.js.page:194 C/statusbar.js.page:216 C/switch.js.page:259 C/textview.js.page:243
962#: C/togglebutton.js.page:148 C/treeview_simple_liststore.js.page:267
963msgid "Complete code sample"
964msgstr "완전한 코드 예제"
965
966#. (itstool) path: section/code
967#: C/02_welcome_to_the_grid.js.page:275
968#, no-wrap
969msgid ""
970"#!/usr/bin/gjs\n"
971"\n"
972"imports.gi.versions.Gtk = '3.0';\n"
973"const Gtk = imports.gi.Gtk;\n"
974"\n"
975"class WelcomeToTheGrid {\n"
976"\n"
977"    // Create the application itself\n"
978"    constructor() {\n"
979"        this.application = new Gtk.Application();\n"
980"\n"
981"    // Connect 'activate' and 'startup' signals to the callback functions\n"
982"    this.application.connect('activate', this._onActivate.bind(this));\n"
983"    this.application.connect('startup', this._onStartup.bind(this));\n"
984"    }\n"
985"\n"
986"    // Callback function for 'activate' signal presents windows when active\n"
987"    _onActivate() {\n"
988"        this._window.present();\n"
989"    }\n"
990"\n"
991"    // Callback function for 'startup' signal builds the UI\n"
992"    _onStartup() {\n"
993"        this._buildUI ();\n"
994"    }\n"
995"\n"
996"    // Build the application's UI\n"
997"    _buildUI() {\n"
998"\n"
999"        // Create the application window\n"
1000"        this._window = new Gtk.ApplicationWindow({\n"
1001"            application: this.application,\n"
1002"            window_position: Gtk.WindowPosition.CENTER,\n"
1003"            border_width: 10,\n"
1004"            title: \"Welcome to the Grid\"});\n"
1005"\n"
1006"        // Create the Grid\n"
1007"        this._grid = new Gtk.Grid ({\n"
1008"            // column_homogeneous: true,\n"
1009"            // column_spacing: 20,\n"
1010"            row_spacing: 20 });\n"
1011"\n"
1012"        // Create an image\n"
1013"        this._image = new Gtk.Image ({ file: \"gnome-image.png\" });\n"
1014"\n"
1015"        // Create a second image using a stock icon\n"
1016"        this._icon = new Gtk.Image ({ stock: 'gtk-about' });\n"
1017"\n"
1018"        // Create a label\n"
1019"        this._label = new Gtk.Label ({\n"
1020"            label: \"Welcome to GNOME, too!\",\n"
1021"            /* margin_top: 20 */ });\n"
1022"\n"
1023"        /* Create a second label\n"
1024"        this._labelTwo = new Gtk.Label ({\n"
1025"            label: \"The cake is a pie.\" }); */\n"
1026"\n"
1027"        /* Create a button\n"
1028"        this._button = new Gtk.Button ({\n"
1029"            label: \"Welcome to GNOME, too!\"}); */\n"
1030"\n"
1031"        // Attach the images and button to the grid\n"
1032"        this._grid.attach (this._image,  0, 0, 2, 1);\n"
1033"        this._grid.attach (this._icon,   0, 1, 1, 1);\n"
1034"        this._grid.attach (this._label,  1, 1, 1, 1);\n"
1035"\n"
1036"        // this._grid.attach (this._label, 0, 1, 1, 1);\n"
1037"        // this._grid.attach (this._labelTwo, 1, 1, 1, 1);\n"
1038"\n"
1039"        // this._grid.attach (this._button, 1, 1, 1, 1);\n"
1040"\n"
1041"        // Add the grid to the window\n"
1042"        this._window.add (this._grid);\n"
1043"\n"
1044"        // Show the window and all child widgets\n"
1045"        this._window.show_all();\n"
1046"    }\n"
1047"\n"
1048"};\n"
1049"\n"
1050"// Run the application\n"
1051"let app = new WelcomeToTheGrid ();\n"
1052"app.application.run (ARGV);\n"
1053msgstr ""
1054"#!/usr/bin/gjs\n"
1055"\n"
1056"imports.gi.versions.Gtk = '3.0';\n"
1057"const Gtk = imports.gi.Gtk;\n"
1058"\n"
1059"class WelcomeToTheGrid {\n"
1060"\n"
1061"    // Create the application itself\n"
1062"    constructor() {\n"
1063"        this.application = new Gtk.Application();\n"
1064"\n"
1065"    // Connect 'activate' and 'startup' signals to the callback functions\n"
1066"    this.application.connect('activate', this._onActivate.bind(this));\n"
1067"    this.application.connect('startup', this._onStartup.bind(this));\n"
1068"    }\n"
1069"\n"
1070"    // Callback function for 'activate' signal presents windows when active\n"
1071"    _onActivate() {\n"
1072"        this._window.present();\n"
1073"    }\n"
1074"\n"
1075"    // Callback function for 'startup' signal builds the UI\n"
1076"    _onStartup() {\n"
1077"        this._buildUI ();\n"
1078"    }\n"
1079"\n"
1080"    // Build the application's UI\n"
1081"    _buildUI() {\n"
1082"\n"
1083"        // Create the application window\n"
1084"        this._window = new Gtk.ApplicationWindow({\n"
1085"            application: this.application,\n"
1086"            window_position: Gtk.WindowPosition.CENTER,\n"
1087"            border_width: 10,\n"
1088"            title: \"Welcome to the Grid\"});\n"
1089"\n"
1090"        // Create the Grid\n"
1091"        this._grid = new Gtk.Grid ({\n"
1092"            // column_homogeneous: true,\n"
1093"            // column_spacing: 20,\n"
1094"            row_spacing: 20 });\n"
1095"\n"
1096"        // Create an image\n"
1097"        this._image = new Gtk.Image ({ file: \"gnome-image.png\" });\n"
1098"\n"
1099"        // Create a second image using a stock icon\n"
1100"        this._icon = new Gtk.Image ({ stock: 'gtk-about' });\n"
1101"\n"
1102"        // Create a label\n"
1103"        this._label = new Gtk.Label ({\n"
1104"            label: \"Welcome to GNOME, too!\",\n"
1105"            /* margin_top: 20 */ });\n"
1106"\n"
1107"        /* Create a second label\n"
1108"        this._labelTwo = new Gtk.Label ({\n"
1109"            label: \"The cake is a pie.\" }); */\n"
1110"\n"
1111"        /* Create a button\n"
1112"        this._button = new Gtk.Button ({\n"
1113"            label: \"Welcome to GNOME, too!\"}); */\n"
1114"\n"
1115"        // Attach the images and button to the grid\n"
1116"        this._grid.attach (this._image,  0, 0, 2, 1);\n"
1117"        this._grid.attach (this._icon,   0, 1, 1, 1);\n"
1118"        this._grid.attach (this._label,  1, 1, 1, 1);\n"
1119"\n"
1120"        // this._grid.attach (this._label, 0, 1, 1, 1);\n"
1121"        // this._grid.attach (this._labelTwo, 1, 1, 1, 1);\n"
1122"\n"
1123"        // this._grid.attach (this._button, 1, 1, 1, 1);\n"
1124"\n"
1125"        // Add the grid to the window\n"
1126"        this._window.add (this._grid);\n"
1127"\n"
1128"        // Show the window and all child widgets\n"
1129"        this._window.show_all();\n"
1130"    }\n"
1131"\n"
1132"};\n"
1133"\n"
1134"// Run the application\n"
1135"let app = new WelcomeToTheGrid ();\n"
1136"app.application.run (ARGV);\n"
1137
1138#. (itstool) path: info/desc
1139#: C/03_getting_the_signal.js.page:21
1140msgid "Create Buttons and other widgets that do things when you click on them."
1141msgstr "단추와 단추를 누르면 동작하는 다른 위젯을 만듭니다."
1142
1143#. (itstool) path: page/title
1144#: C/03_getting_the_signal.js.page:24
1145msgid "3. Getting the Signal"
1146msgstr "3. 시그널 취하기"
1147
1148#. (itstool) path: synopsis/p
1149#: C/03_getting_the_signal.js.page:26
1150msgid ""
1151"In the last tutorial, we learned how to create widgets like Labels, Images, and Buttons. Here, we'll learn how to "
1152"make Buttons and other input widgets actually do things, by writing functions which handle the signals they send "
1153"when they are clicked on or interacted with."
1154msgstr ""
1155"이전 따라하기 과정에서 레이블, 그림, 단추 위젯을 만드는 방법을 알아보았습니다. 여기서는 단추를 누르거나 어떤 반응"
1156"을 받았을 때 보내는 시그널을 처리할 함수를 작성하여 단추와 기타 입력 위젯을 만드는 방법을 알아보겠습니다."
1157
1158#. (itstool) path: section/title
1159#: C/03_getting_the_signal.js.page:32
1160msgid "A basic application"
1161msgstr "기본 프로그램"
1162
1163#. (itstool) path: section/p
1164#: C/03_getting_the_signal.js.page:33
1165msgid ""
1166"In GNOME, widgets that you can interact with, like Buttons and Switches, send out signals when they are clicked on "
1167"or activated. A Button, for instance, sends out the \"clicked\" signal when somebody clicks on it. When this "
1168"happens, GNOME looks for the part in your code that says what to do."
1169msgstr ""
1170"그놈에서 단추, 스위치 같이 다룰 수 있는 위젯은 누르거나 마우스 커서를 올려두는 식으로 활성화하면 시그널을 내보냅니"
1171"다. 예를 들어, 단추라면 누군가가 단추를 누르면 \"clicked\" 시그널을 내보냅니다. 시그널이 나오면, 그놈에서는 여러분"
1172"이 작성한 코드에서 시그널에 반응하는 부분을 찾습니다."
1173
1174#. (itstool) path: section/p
1175#: C/03_getting_the_signal.js.page:34
1176msgid ""
1177"How do we write that code? By connecting that Button's \"clicked\" signal to a callback function, which is a "
1178"function you write just to handle that signal. So whenever it gives off that signal, the function connected to "
1179"that signal is run."
1180msgstr ""
1181"코드를 어떻게 작성할까요? 단추의 \"clicked\" 시그널을 콜백 함수에 연결하면, 해당 함수에서 시그널을 처리합니다. 따라"
1182"서 시그널을 줄 때마다 시그널에 연결한 함수가 동작하죠."
1183
1184#. (itstool) path: section/p
1185#: C/03_getting_the_signal.js.page:35
1186msgid "Here is an extremely basic example:"
1187msgstr "매우 기본적인 예제입니다:"
1188
1189#. (itstool) path: section/media
1190#. This is a reference to an external file such as an image or video. When
1191#. the file changes, the md5 hash will change to let you know you need to
1192#. update your localized copy. The msgstr is not used at all. Set it to
1193#. whatever you like once you have updated your copy of the file.
1194#: C/03_getting_the_signal.js.page:37 C/03_getting_the_signal.js.page:349
1195msgctxt "_"
1196msgid "external ref='media/03_jssignal_01.png' md5='8d6ecab185f4af4534cc255d62b58b8e'"
1197msgstr ""
1198
1199#. (itstool) path: section/p
1200#: C/03_getting_the_signal.js.page:39
1201msgid ""
1202"This ApplicationWindow has a Button and a Label inside it, arranged in a Grid. Whenever the Button is clicked, a "
1203"variable that holds the number of cookies is increased by 1, and the Label that shows how many cookies there are "
1204"is updated."
1205msgstr ""
1206"ApplicationWindow에는 단추와 레이블이 있는데 이걸 그리드로 정렬했습니다. 단추를 클릭할 때마다 과자 갯수 값을 가진 "
1207"변수 값이 하나씩 늘어나고, 과자 갯수를 보여주는 레이블이 바뀝니다."
1208
1209#. (itstool) path: note/p
1210#: C/03_getting_the_signal.js.page:40
1211msgid ""
1212"The cookies in this example are not the same as the cookies that you get from websites, which store your login "
1213"information and may keep track of which sites you've visited. They're just imaginary treats. You may bake some "
1214"real ones if you like."
1215msgstr ""
1216"이 예제의 과자는 웹사이트에서 로그인 정보를 저장하고 방문 사이트 상태를 보관하는 그런 과자가 아닙니다. 그냥 상상속"
1217"의 무언가일 뿐이죠. 원하면 실제로 구워드세요."
1218
1219#. (itstool) path: section/p
1220#: C/03_getting_the_signal.js.page:41
1221msgid ""
1222"Here is the basic, boilerplate code that goes at the start of the application, before we start creating the window "
1223"and widgets. Besides the application having a unique name, the biggest change from the usual boilerplate is that "
1224"we create a global variable right near the beginning, to hold the number of cookies."
1225msgstr ""
1226"하여간, 윈도우와 위젯 만들기를 시작하기 전 프로그램을 시작하는 기본 기반 코드를 작성하겠습니다. 프로그램에 고유 이"
1227"름을 붙이고, 기반 코드에서 확 바뀌는 부분은 과자 갯수 값을 보관하는 코드 시작 부분의 전역 변수 추가입니다."
1228
1229#. (itstool) path: section/code
1230#: C/03_getting_the_signal.js.page:42
1231#, no-wrap
1232msgid ""
1233"\n"
1234"#!/usr/bin/gjs\n"
1235"\n"
1236"imports.gi.versions.Gtk = '3.0';\n"
1237"const Gtk = imports.gi.Gtk;\n"
1238"\n"
1239"// We start out with 0 cookies\n"
1240"var cookies = 0;\n"
1241"\n"
1242"class GettingTheSignal {\n"
1243"    // Create the application itself\n"
1244"    constructor() {\n"
1245"        this.application = new Gtk.Application();\n"
1246"\n"
1247"        // Connect 'activate' and 'startup' signals to the callback functions\n"
1248"        this.application.connect('activate', this._onActivate.bind(this));\n"
1249"        this.application.connect('startup', this._onStartup.bind(this));\n"
1250"    }\n"
1251"\n"
1252"    // Callback function for 'activate' signal presents window when active\n"
1253"    _onActivate() {\n"
1254"        this._window.present();\n"
1255"    }\n"
1256"\n"
1257"    // Callback function for 'startup' signal builds the UI\n"
1258"    _onStartup() {\n"
1259"        this._buildUI ();\n"
1260"    }\n"
1261msgstr ""
1262"\n"
1263"#!/usr/bin/gjs\n"
1264"\n"
1265"imports.gi.versions.Gtk = '3.0';\n"
1266"const Gtk = imports.gi.Gtk;\n"
1267"\n"
1268"// We start out with 0 cookies\n"
1269"var cookies = 0;\n"
1270"\n"
1271"class GettingTheSignal {\n"
1272"    // Create the application itself\n"
1273"    constructor() {\n"
1274"        this.application = new Gtk.Application();\n"
1275"\n"
1276"        // Connect 'activate' and 'startup' signals to the callback functions\n"
1277"        this.application.connect('activate', this._onActivate.bind(this));\n"
1278"        this.application.connect('startup', this._onStartup.bind(this));\n"
1279"    }\n"
1280"\n"
1281"    // Callback function for 'activate' signal presents window when active\n"
1282"    _onActivate() {\n"
1283"        this._window.present();\n"
1284"    }\n"
1285"\n"
1286"    // Callback function for 'startup' signal builds the UI\n"
1287"    _onStartup() {\n"
1288"        this._buildUI ();\n"
1289"    }\n"
1290
1291#. (itstool) path: section/p
1292#: C/03_getting_the_signal.js.page:71
1293msgid ""
1294"Take a look at the part that uses our application's connect method and bind, to connect its activate and startup "
1295"signals to the functions that present the window and build the UI. We're going to do the same thing with our "
1296"Button when we get to it, except that we're going to connect its \"clicked\" signal instead."
1297msgstr ""
1298"프로그램의 connect 메서드와 bind 부분을 보시죠. 창을 나타내고 사용자 인터페이스를 구성하는 함수에 activate 시그널"
1299"과 startup 시그널을 연결하죠. 단추에도 \"clicked\" 시그널에 연결한다는 점만 빼고는 같은 방식을 취합니다."
1300
1301#. (itstool) path: section/title
1302#: C/03_getting_the_signal.js.page:75
1303msgid "Click the button"
1304msgstr "단추 누르기"
1305
1306#. (itstool) path: section/p
1307#: C/03_getting_the_signal.js.page:77
1308msgid ""
1309"As usual, we'll put all the code to create our Button and other widgets inside the _buildUI function, which is "
1310"called when the application starts up."
1311msgstr ""
1312"보통 때와 같이, 프로그램을 시작할 때 호출하는 _buildUI 함수에, 단추와 다른 위젯을 만드는 모든 코드를 넣겠습니다."
1313
1314#. (itstool) path: section/code
1315#: C/03_getting_the_signal.js.page:78
1316#, no-wrap
1317msgid ""
1318"\n"
1319"    // Build the application's UI\n"
1320"    _buildUI() {\n"
1321msgstr ""
1322"\n"
1323"    // Build the application's UI\n"
1324"    _buildUI() {\n"
1325
1326#. (itstool) path: section/p
1327#: C/03_getting_the_signal.js.page:83
1328msgid "First, we create the window itself:"
1329msgstr "우선, 창을 만들고요:"
1330
1331#. (itstool) path: section/code
1332#: C/03_getting_the_signal.js.page:84
1333#, no-wrap
1334msgid ""
1335"\n"
1336"        // Create the application window\n"
1337"        this._window = new Gtk.ApplicationWindow({\n"
1338"            application: this.application,\n"
1339"            window_position: Gtk.WindowPosition.CENTER,\n"
1340"            default_height: 200,\n"
1341"            default_width: 400,\n"
1342"            title: \"Click the button to get a cookie!\"});\n"
1343msgstr ""
1344"\n"
1345"        // Create the application window\n"
1346"        this._window = new Gtk.ApplicationWindow({\n"
1347"            application: this.application,\n"
1348"            window_position: Gtk.WindowPosition.CENTER,\n"
1349"            default_height: 200,\n"
1350"            default_width: 400,\n"
1351"            title: \"Click the button to get a cookie!\"});\n"
1352
1353#. (itstool) path: section/p
1354#: C/03_getting_the_signal.js.page:93
1355msgid ""
1356"Note that we've set its default_height and default_width properties. These let us control how tall and wide the "
1357"ApplicationWindow will be, in pixels."
1358msgstr ""
1359"여기서 default_height, default_width 속성을 설정한 걸 보시죠. ApplicationWindow의 너비 높이를 픽셀 단위로 설정합니"
1360"다."
1361
1362#. (itstool) path: section/p
1363#: C/03_getting_the_signal.js.page:94
1364msgid ""
1365"Next, we'll create the Label that shows us the number of cookies. We can use the cookies variable as part of the "
1366"Label's label property."
1367msgstr ""
1368"다음, 과자 갯수를 보여줄 레이블을 만들겠습니다. 레이블의 label 속성 일부로 cookies 변수를 사용할 수 있습니다."
1369
1370#. (itstool) path: section/code
1371#: C/03_getting_the_signal.js.page:95
1372#, no-wrap
1373msgid ""
1374"\n"
1375"        // Create the label\n"
1376"        this._cookieLabel = new Gtk.Label ({\n"
1377"            label: \"Number of cookies: \" + cookies });\n"
1378msgstr ""
1379"\n"
1380"        // Create the label\n"
1381"        this._cookieLabel = new Gtk.Label ({\n"
1382"            label: \"Number of cookies: \" + cookies });\n"
1383
1384#. (itstool) path: section/p
1385#: C/03_getting_the_signal.js.page:101
1386msgid ""
1387"Now we'll create the Button. We set its label property to show the text that we want on the Button, and we connect "
1388"its \"clicked\" signal to a function called _getACookie, which we'll write after we're done building our "
1389"application's UI."
1390msgstr ""
1391"다음, 단추를 만들겠습니다. 단추에 표시할 텍스트를 보여줄 때 label 속성 값을 설정할 수 있고, 프로그램 사용자 인터페"
1392"이스를 구성하고 나서 작성할 _getACookie 함수에 \"clicked\" 시그널을 연결하겠습니다."
1393
1394#. (itstool) path: section/code
1395#: C/03_getting_the_signal.js.page:102
1396#, no-wrap
1397msgid ""
1398"\n"
1399"        // Create the cookie button\n"
1400"        this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
1401"\n"
1402"        // Connect the cookie button to the function that handles clicking it\n"
1403"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
1404msgstr ""
1405"\n"
1406"        // Create the cookie button\n"
1407"        this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
1408"\n"
1409"        // Connect the cookie button to the function that handles clicking it\n"
1410"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
1411
1412#. (itstool) path: section/p
1413#: C/03_getting_the_signal.js.page:109
1414msgid ""
1415"Finally, we create a Grid, attach the Label and Button to it, add it to the window and tell the window to show "
1416"itself and its contents. That's all we need inside the _buildUI function, so we close it with a bracket, as well "
1417"as a comma that tells GNOME to go on to the next function. Note that even though we wrote the code for the Label "
1418"first, we can still attach it to the Grid in a way that will put it on the bottom."
1419msgstr ""
1420"마지막으로, 그리드를 만들어 레이블과 단추를 붙여넣은 후, 그리드에 붙여넣은 위젯을 창 위에 표시하도록 창에 추가하겠"
1421"습니다. 이게 _buildUI 함수에서 작성할 모든 내용이니, 중괄호로 닫으세요. 쉼표를 입력해서 다음 함수로 넘어간다는걸 그"
1422"놈에 알려주시고요. 레이블 코드를 먼저 작성하겠지만, 해당 코드 아래에서 그리드에 붙여넣을 수 있습니다."
1423
1424#. (itstool) path: section/code
1425#: C/03_getting_the_signal.js.page:110
1426#, no-wrap
1427msgid ""
1428"\n"
1429"        // Create a grid to arrange everything inside\n"
1430"        this._grid = new Gtk.Grid ({\n"
1431"            halign: Gtk.Align.CENTER,\n"
1432"            valign: Gtk.Align.CENTER,\n"
1433"            row_spacing: 20 });\n"
1434"\n"
1435"        // Put everything inside the grid\n"
1436"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
1437"        this._grid.attach (this._cookieLabel, 0, 1, 1, 1);\n"
1438"\n"
1439"        // Add the grid to the window\n"
1440"        this._window.add (this._grid);\n"
1441"\n"
1442"        // Show the window and all child widgets\n"
1443"        this._window.show_all();\n"
1444"\n"
1445"    }\n"
1446msgstr ""
1447"\n"
1448"        // Create a grid to arrange everything inside\n"
1449"        this._grid = new Gtk.Grid ({\n"
1450"            halign: Gtk.Align.CENTER,\n"
1451"            valign: Gtk.Align.CENTER,\n"
1452"            row_spacing: 20 });\n"
1453"\n"
1454"        // Put everything inside the grid\n"
1455"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
1456"        this._grid.attach (this._cookieLabel, 0, 1, 1, 1);\n"
1457"\n"
1458"        // Add the grid to the window\n"
1459"        this._window.add (this._grid);\n"
1460"\n"
1461"        // Show the window and all child widgets\n"
1462"        this._window.show_all();\n"
1463"\n"
1464"    }\n"
1465
1466#. (itstool) path: section/p
1467#: C/03_getting_the_signal.js.page:129
1468msgid ""
1469"Now, we write the _getACookie function. Whenever our Button sends out its \"clicked\" signal, the code in this "
1470"function will run. In this case, all it does is increase the number of cookies by 1, and update the Label to show "
1471"the new number of cookies. We do this using the Label's set_label method."
1472msgstr ""
1473"이제 _getACookie 함수를 작성하겠습니다. 단추에서 \"clicked\" 시그널을 보낼 따마다 이 함수의 코드를 실행합니다. 이 "
1474"때 과자 갯수가 하나씩 늘어나며, 레이블에 새 과자 갯수 값이 들어가서 바뀝니다. 이 동작은 레이블의 set_label 메서드"
1475"로 처리하겠습니다."
1476
1477#. (itstool) path: note/p
1478#: C/03_getting_the_signal.js.page:130
1479msgid ""
1480"Many widgets have the same properties and methods. Both Labels and Buttons, for instance, have a label property "
1481"that says what text is inside them, and get_label and set_label methods that let you check what that text is and "
1482"change it, respectively. So if you learn how one widget works, you'll also know how others like it work."
1483msgstr ""
1484"여러 위젯에 동일한 속성과 메서드가 있습니다. 레이블 및 단추에도 어떤 텍스트를 넣는지 나타내는 lable 속성이 있고, 어"
1485"떤 텍스트가 있는지 확인하는 get_label과 텍스트를 바꾸는 set_label 메서드가 있습니다. 따라서 위젯 동작 방식을 알면 "
1486"다른 위젯 동작 방식도 알게 되는거죠??."
1487
1488#. (itstool) path: section/code
1489#: C/03_getting_the_signal.js.page:131
1490#, no-wrap
1491msgid ""
1492"\n"
1493"    _getACookie: function() {\n"
1494"\n"
1495"        // Increase the number of cookies by 1 and update the label\n"
1496"        cookies++;\n"
1497"        this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
1498"\n"
1499"    }\n"
1500"\n"
1501"};\n"
1502msgstr ""
1503"\n"
1504"    _getACookie: function() {\n"
1505"\n"
1506"        // Increase the number of cookies by 1 and update the label\n"
1507"        cookies++;\n"
1508"        this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
1509"\n"
1510"    }\n"
1511"\n"
1512"};\n"
1513
1514#. (itstool) path: section/p
1515#: C/03_getting_the_signal.js.page:143
1516msgid "Finally, we run the application, using the same kind of code as in our last tutorial."
1517msgstr "마지막으로, 이전 따라하기 예제에서 코드를 실행했던 방식으로 프로그램을 실행하겠습니다."
1518
1519#. (itstool) path: section/code
1520#: C/03_getting_the_signal.js.page:144
1521#, no-wrap
1522msgid ""
1523"\n"
1524"// Run the application\n"
1525"let app = new GettingTheSignal ();\n"
1526"app.application.run (ARGV);\n"
1527msgstr ""
1528"\n"
1529"// Run the application\n"
1530"let app = new GettingTheSignal ();\n"
1531"app.application.run (ARGV);\n"
1532
1533#. (itstool) path: section/title
1534#: C/03_getting_the_signal.js.page:152
1535msgid "Flip the switch"
1536msgstr "스위치 젖히기"
1537
1538#. (itstool) path: section/p
1539#: C/03_getting_the_signal.js.page:153
1540msgid ""
1541"Buttons aren't the only input widgets in our GTK+ toolbox. We can also use switches, like the one in this example. "
1542"Switches don't have a label property, so we have to create a separate Label that says what it does to go next to "
1543"it."
1544msgstr ""
1545"GTK+ 도구함에는 단추만 있는게 아닙니다. 이 예제에서와 같이 스위치도 있구요~. 스위치는 레이블 속성이 없어서 스위치"
1546"가 어떤 역할을 하는지 레이블을 옆에 따로 만들어야합니다."
1547
1548#. (itstool) path: section/media
1549#. This is a reference to an external file such as an image or video. When
1550#. the file changes, the md5 hash will change to let you know you need to
1551#. update your localized copy. The msgstr is not used at all. Set it to
1552#. whatever you like once you have updated your copy of the file.
1553#: C/03_getting_the_signal.js.page:155 C/03_getting_the_signal.js.page:355
1554msgctxt "_"
1555msgid "external ref='media/03_jssignal_02.png' md5='ba941390fbafc4a0f653c8f70bca92c0'"
1556msgstr ""
1557
1558#. (itstool) path: section/p
1559#: C/03_getting_the_signal.js.page:157
1560msgid ""
1561"A Switch has two positions, Off and On. When a Switch is turned on, its text and background color change, so you "
1562"can tell which position it's in."
1563msgstr ""
1564"스위치 단추의 위치는, 끔 아니면 켬 두가지가 있죠. 스위치를 켠 상태로 두면 텍스트와 배경 색이 바뀌어서 어떤 상태인"
1565"지 확인할 수 있습니다."
1566
1567#. (itstool) path: section/p
1568#: C/03_getting_the_signal.js.page:159
1569msgid ""
1570"You may have seen Switches like these in GNOME's accessibility menu, which let you turn features like large text "
1571"and the on-screen keyboard on and off. In this case, the Switch controls our imaginary cookie dispenser. If the "
1572"Switch is turned on, you can get cookies by clicking the \"Get a cookie\" Button. If it's turned off, clicking the "
1573"Button won't do anything."
1574msgstr ""
1575"큰 글씨를 표시하고 화면 키보드를 켜고 끄는 기능을 갖춘 그놈 접근성 메뉴 같은데서 이런 스위치를 볼 수 있죠. 여기서 "
1576"스위치로 가상의 과자 뽑기 기계 동작 여부를 다루겠습니다. 스위치를 켜두면 \"Get a cookie\" 단추를 눌렀을 때 과자를 "
1577"받을 수 있습니다. 스위치를 끄면 단추를 눌렀을 때 반응하지 않고요."
1578
1579#. (itstool) path: note/p
1580#: C/03_getting_the_signal.js.page:160
1581msgid ""
1582"You can get to the accessibility menu by clicking on the outline of a human, near your name in the upper-right "
1583"corner of the screen."
1584msgstr "화면의 우측 상단에 사용자 이름이 있는 사람 모양 아이콘을 누르면 접근성 메뉴로 들어갈 수 있습니다."
1585
1586#. (itstool) path: section/p
1587#: C/03_getting_the_signal.js.page:161
1588msgid "Here's how we create the Switch:"
1589msgstr "이제 스위치를 어떻게 만드는지 알아보죠:"
1590
1591#. (itstool) path: section/code
1592#: C/03_getting_the_signal.js.page:162
1593#, no-wrap
1594msgid ""
1595"\n"
1596"        // Create the switch that controls whether or not you can win\n"
1597"        this._cookieSwitch = new Gtk.Switch ();\n"
1598msgstr ""
1599"\n"
1600"        // Create the switch that controls whether or not you can win\n"
1601"        this._cookieSwitch = new Gtk.Switch ();\n"
1602
1603#. (itstool) path: section/p
1604#: C/03_getting_the_signal.js.page:167
1605msgid ""
1606"We don't actually need to connect the Switch to anything. All we need to do is write an if statement in our "
1607"_getACookie function, to check to see if the Switch is turned on. If we wanted to make something happen as soon as "
1608"you flip the Switch, though, we would connect its notify::active signal, like so:"
1609msgstr ""
1610"스위치에서 뭘 할지는 실제로 연결할 필요가 없습니다. 우리가 할 일은 _getACookie 함수에서 if 구문을 작성해서 스위치"
1611"가 켜졌는지 여부만 확인하면 됩니다. 스위치를 젖혔을 때 바로 무언가를 하려면 notify::active 시그널을 다음처럼 연결하"
1612"면 됩니다:"
1613
1614#. (itstool) path: section/code
1615#: C/03_getting_the_signal.js.page:168
1616#, no-wrap
1617msgid ""
1618"\n"
1619"        // Connect the switch to the function that handles it\n"
1620"        this._cookieSwitch.connect ('notify::active', this._cookieDispenser.bind(this));\n"
1621msgstr ""
1622"\n"
1623"        // Connect the switch to the function that handles it\n"
1624"        this._cookieSwitch.connect ('notify::active', this._cookieDispenser.bind(this));\n"
1625
1626#. (itstool) path: section/p
1627#: C/03_getting_the_signal.js.page:173
1628msgid ""
1629"A Switch is set to the off position by default. If we wanted the Switch to start out turned on, we would set the "
1630"value of its active property to true when we create it."
1631msgstr ""
1632"스위치는 기본적으로 끔 위치로 설정해둡니다. 켠 상태로 시작하게 하려면, 스위치를 만들 때 active 속성을 true로 설정하"
1633"면 됩니다."
1634
1635#. (itstool) path: section/code
1636#: C/03_getting_the_signal.js.page:174
1637#, no-wrap
1638msgid ""
1639"\n"
1640"        this._cookieSwitch = new Gtk.Switch ({ active: true });\n"
1641msgstr ""
1642"\n"
1643"        this._cookieSwitch = new Gtk.Switch ({ active: true });\n"
1644
1645#. (itstool) path: section/p
1646#: C/03_getting_the_signal.js.page:178
1647msgid ""
1648"Let's just create it normally, though, and then create the Label that goes with it. We want the Switch and the "
1649"Label to be kept right next to each other, so we'll create a Grid just for them, then put that Grid in our larger "
1650"Grid that holds all the widgets inside it. Here's what the code looks like to create all that:"
1651msgstr ""
1652"그럼 평범하게 만들어보고 옆에 레이블을 붙여두죠. 스위치와 레이블은 오른편에 두는걸로 하겠습니다. 그렇게 해서, 이 위"
1653"젯에 맞는 그리드를 만들고 이 그리드를 큰 그리드에 넣겠습니다. 다 만들고 나면 코드가 다음과 같이 되겠죠:"
1654
1655#. (itstool) path: section/code
1656#: C/03_getting_the_signal.js.page:179
1657#, no-wrap
1658msgid ""
1659"\n"
1660"        // Create the switch that controls whether or not you can win\n"
1661"        this._cookieSwitch = new Gtk.Switch ();\n"
1662"\n"
1663"        // Create the label to go with the switch\n"
1664"        this._switchLabel = new Gtk.Label ({\n"
1665"            label: \"Cookie dispenser\" });\n"
1666"\n"
1667"        // Create a grid for the switch and its label\n"
1668"        this._switchGrid = new Gtk.Grid ({\n"
1669"            halign: Gtk.Align.CENTER,\n"
1670"            valign: Gtk.Align.CENTER });\n"
1671"\n"
1672"        // Put the switch and its label inside that grid\n"
1673"        this._switchGrid.attach (this._switchLabel, 0, 0, 1, 1);\n"
1674"        this._switchGrid.attach (this._cookieSwitch, 1, 0, 1, 1);\n"
1675msgstr ""
1676"\n"
1677"        // Create the switch that controls whether or not you can win\n"
1678"        this._cookieSwitch = new Gtk.Switch ();\n"
1679"\n"
1680"        // Create the label to go with the switch\n"
1681"        this._switchLabel = new Gtk.Label ({\n"
1682"            label: \"Cookie dispenser\" });\n"
1683"\n"
1684"        // Create a grid for the switch and its label\n"
1685"        this._switchGrid = new Gtk.Grid ({\n"
1686"            halign: Gtk.Align.CENTER,\n"
1687"            valign: Gtk.Align.CENTER });\n"
1688"\n"
1689"        // Put the switch and its label inside that grid\n"
1690"        this._switchGrid.attach (this._switchLabel, 0, 0, 1, 1);\n"
1691"        this._switchGrid.attach (this._cookieSwitch, 1, 0, 1, 1);\n"
1692
1693#. (itstool) path: section/p
1694#: C/03_getting_the_signal.js.page:197
1695msgid "And now we arrange everything in the larger Grid like so."
1696msgstr "마찬가지로 이제 더 큰 그리드에 몽땅 정리하겠습니다."
1697
1698#. (itstool) path: section/code
1699#: C/03_getting_the_signal.js.page:198
1700#, no-wrap
1701msgid ""
1702"\n"
1703"        // Put everything inside the grid\n"
1704"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
1705"        this._grid.attach (this._switchGrid, 0, 1, 1, 1);\n"
1706"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
1707msgstr ""
1708"\n"
1709"        // Put everything inside the grid\n"
1710"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
1711"        this._grid.attach (this._switchGrid, 0, 1, 1, 1);\n"
1712"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
1713
1714#. (itstool) path: section/p
1715#: C/03_getting_the_signal.js.page:205
1716msgid ""
1717"Now we change the _getACookie function so that it checks to see if the cookie dispenser is turned on. We do that "
1718"by using the Switch's get_active method. It returns true if the Switch is turned on, and false if the Switch is "
1719"turned off."
1720msgstr ""
1721"이제 _getACookie 함수 코드를 바꿔서 과자 뽑기가 켜졌는지 확인하겠습니다. 스위치의 get_active 메서드를 사용하겠습니"
1722"다. 스위치가 켜져있으면 true, 꺼져있으면 false를 반환합니다."
1723
1724#. (itstool) path: note/p
1725#: C/03_getting_the_signal.js.page:206
1726msgid ""
1727"When a method is used in an if statement like this, the code inside the if statement is executed if the method "
1728"returns true."
1729msgstr ""
1730"if 구문에서 다음과 같이 메서드를 사용하면, 메서드에서 true를 반환했을 때 if 구문 안에 있는 코드를 실행합니다."
1731
1732#. (itstool) path: section/code
1733#: C/03_getting_the_signal.js.page:207
1734#, no-wrap
1735msgid ""
1736"\n"
1737"    _getACookie() {\n"
1738"\n"
1739"        // Is the cookie dispenser turned on?\n"
1740"        if (this._cookieSwitch.get_active()) {\n"
1741"\n"
1742"            // Increase the number of cookies by 1 and update the label\n"
1743"            cookies++;\n"
1744"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
1745"\n"
1746"        }\n"
1747"\n"
1748"    }\n"
1749msgstr ""
1750"\n"
1751"    _getACookie() {\n"
1752"\n"
1753"        // Is the cookie dispenser turned on?\n"
1754"        if (this._cookieSwitch.get_active()) {\n"
1755"\n"
1756"            // Increase the number of cookies by 1 and update the label\n"
1757"            cookies++;\n"
1758"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
1759"\n"
1760"        }\n"
1761"\n"
1762"    }\n"
1763
1764#. (itstool) path: section/title
1765#: C/03_getting_the_signal.js.page:225
1766msgid "Tuning the radio"
1767msgstr "라디오 튜닝"
1768
1769#. (itstool) path: section/p
1770#: C/03_getting_the_signal.js.page:227
1771msgid ""
1772"Another type of input widget we can use is called the RadioButton. You create them in groups, and then only one "
1773"RadioButton in a group can be selected at a time. They're called RadioButtons because they work like the channel "
1774"preset button in old-style car radios. The radio could only be tuned to one station at a time, so whenever you "
1775"pressed one button in, another would pop back out."
1776msgstr ""
1777"우리가 쓸 수 있는 다른 입력 위젯으로 RadioButton이 있습니다. 한 모임 단위로 만들 수 있고, 모임 안에 있는 "
1778"RadioButton은 한번에 하나만 선택할 수 있습니다. 구식 카 라디오의 프리셋 단추 처럼 동작하기 때문에 RadioButton으로 "
1779"부릅니다. 라디오는 한번에 방송국 하나만 선택할 수 있기에, 어떤 단추를 누르면 다른 단추는 도로 튀어나옵니다."
1780
1781#. (itstool) path: section/media
1782#. This is a reference to an external file such as an image or video. When
1783#. the file changes, the md5 hash will change to let you know you need to
1784#. update your localized copy. The msgstr is not used at all. Set it to
1785#. whatever you like once you have updated your copy of the file.
1786#: C/03_getting_the_signal.js.page:229 C/03_getting_the_signal.js.page:361
1787msgctxt "_"
1788msgid "external ref='media/03_jssignal_03.png' md5='49ecf251b0bf57543c8d79a77b6f306d'"
1789msgstr ""
1790
1791#. (itstool) path: section/p
1792#: C/03_getting_the_signal.js.page:231
1793msgid ""
1794"First off, let's change our ApplicationWindow's name and increase its border_width property, so that our widgets "
1795"aren't packed in too tightly. The border_width is the number of pixels between any widget and the edge of the "
1796"window."
1797msgstr ""
1798"우선 ApplicationWindow의 이름을 바꾸고 border_width 속성 값을 늘려서, 위젯이 답답하게 붙어있지 않게 하겠습니다. "
1799"border_width는 위젯과 창 가장자리 사이의 픽셀 단위 간격입니다."
1800
1801#. (itstool) path: section/code
1802#: C/03_getting_the_signal.js.page:232
1803#, no-wrap
1804msgid ""
1805"\n"
1806"        // Create the application window\n"
1807"        this._window = new Gtk.ApplicationWindow({\n"
1808"            application: this.application,\n"
1809"            window_position: Gtk.WindowPosition.CENTER,\n"
1810"            default_height: 200,\n"
1811"            default_width: 400,\n"
1812"            border_width: 20,\n"
1813"            title: \"Choose the one that says 'cookie'!\"});\n"
1814msgstr ""
1815"\n"
1816"        // Create the application window\n"
1817"        this._window = new Gtk.ApplicationWindow({\n"
1818"            application: this.application,\n"
1819"            window_position: Gtk.WindowPosition.CENTER,\n"
1820"            default_height: 200,\n"
1821"            default_width: 400,\n"
1822"            border_width: 20,\n"
1823"            title: \"Choose the one that says 'cookie'!\"});\n"
1824
1825#. (itstool) path: section/p
1826#: C/03_getting_the_signal.js.page:243
1827msgid ""
1828"After that, we create the RadioButtons. Remember how they're created in groups? The way we do that, is we set each "
1829"new RadioButton's group property to the name of another RadioButton."
1830msgstr ""
1831"그 다음 RadioButton을 만들겠습니다. 근데 그룹안에 어떻게 만들었죠? 우리가 할 일은 각 RadioButton의 그룹 속성에 다"
1832"른 RadioButton 이름을 넣는 일입니다."
1833
1834#. (itstool) path: section/code
1835#: C/03_getting_the_signal.js.page:244
1836#, no-wrap
1837msgid ""
1838"\n"
1839"        // Create the radio buttons\n"
1840"        this._cookieRadio = new Gtk.RadioButton ({ label: \"Cookie\" });\n"
1841"        this._notCookieOne = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
1842"            group: this._cookieRadio });\n"
1843"        this._notCookieTwo = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
1844"            group: this._cookieRadio });\n"
1845msgstr ""
1846"\n"
1847"        // Create the radio buttons\n"
1848"        this._cookieRadio = new Gtk.RadioButton ({ label: \"Cookie\" });\n"
1849"        this._notCookieOne = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
1850"            group: this._cookieRadio });\n"
1851"        this._notCookieTwo = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
1852"            group: this._cookieRadio });\n"
1853
1854#. (itstool) path: section/p
1855#: C/03_getting_the_signal.js.page:253
1856msgid ""
1857"Next, we create a Grid for the RadioButtons. Remember, we don't have to arrange things in Grids in the same order "
1858"that we create them in."
1859msgstr "다음 RadioButton의 그리드를 만들겠습니다. 만든 순서대로 그리드에 똑같이 정렬할 필요는 없습니다."
1860
1861#. (itstool) path: section/code
1862#: C/03_getting_the_signal.js.page:254
1863#, no-wrap
1864msgid ""
1865"\n"
1866"        // Arrange the radio buttons in their own grid\n"
1867"        this._radioGrid = new Gtk.Grid ();\n"
1868"        this._radioGrid.attach (this._notCookieOne, 0, 0, 1, 1);\n"
1869"        this._radioGrid.attach (this._cookieRadio, 0, 1, 1, 1);\n"
1870"        this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);\n"
1871msgstr ""
1872"\n"
1873"        // Arrange the radio buttons in their own grid\n"
1874"        this._radioGrid = new Gtk.Grid ();\n"
1875"        this._radioGrid.attach (this._notCookieOne, 0, 0, 1, 1);\n"
1876"        this._radioGrid.attach (this._cookieRadio, 0, 1, 1, 1);\n"
1877"        this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);\n"
1878
1879#. (itstool) path: section/p
1880#: C/03_getting_the_signal.js.page:262
1881msgid ""
1882"Normally, the RadioButton that's selected by default is the one that's the name of the group. We want the first "
1883"\"Not cookie\" button to be selected by default, though, so we use its set_active method."
1884msgstr ""
1885"보통 기본으로 선택한 RadioButton은 그룹 이름으로 설정한 RadioButton입니다. 우선은 기본적으로 \"Not cookie\" 단추를 "
1886"선택한 상태로 두려고 합니다. 그러니까 set_active 메서드를 쓰겠습니다."
1887
1888#. (itstool) path: note/p
1889#: C/03_getting_the_signal.js.page:263
1890msgid "We could also set its active property to true when we create it."
1891msgstr "RadioButton을 만들 때 active 속성을 설정할 수도 있습니다."
1892
1893#. (itstool) path: section/code
1894#: C/03_getting_the_signal.js.page:264
1895#, no-wrap
1896msgid ""
1897"\n"
1898"        // Set the button that will be at the top to be active by default\n"
1899"        this._notCookieOne.set_active (true);\n"
1900msgstr ""
1901"\n"
1902"        // Set the button that will be at the top to be active by default\n"
1903"        this._notCookieOne.set_active (true);\n"
1904
1905#. (itstool) path: section/p
1906#: C/03_getting_the_signal.js.page:269
1907msgid "Now we arrange everything in our main Grid like usual ..."
1908msgstr "이제 흔히 하던대로 메인 그리드에 모든 위젯을 정리하겠습니다 ..."
1909
1910#. (itstool) path: section/code
1911#: C/03_getting_the_signal.js.page:270
1912#, no-wrap
1913msgid ""
1914"\n"
1915"        // Put everything inside the grid\n"
1916"        this._grid.attach (this._radioGrid, 0, 0, 1, 1);\n"
1917"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
1918"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
1919msgstr ""
1920"\n"
1921"        // Put everything inside the grid\n"
1922"        this._grid.attach (this._radioGrid, 0, 0, 1, 1);\n"
1923"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
1924"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
1925
1926#. (itstool) path: section/p
1927#: C/03_getting_the_signal.js.page:277
1928msgid "And then we change our _getACookie function to test to see if the cookie button is the one that's selected."
1929msgstr "그리고 과자 단추를 선택했는지 확인하도록 _getACookie 함수 코드를 바꾸겠습니다."
1930
1931#. (itstool) path: section/code
1932#: C/03_getting_the_signal.js.page:278
1933#, no-wrap
1934msgid ""
1935"\n"
1936"    _getACookie() {\n"
1937"\n"
1938"        // Did you select \"cookie\" instead of \"not cookie\"?\n"
1939"        if (this._cookieRadio.get_active()) {\n"
1940"\n"
1941"            // Increase the number of cookies by 1 and update the label\n"
1942"            cookies++;\n"
1943"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
1944"\n"
1945"        }\n"
1946"\n"
1947"    }\n"
1948msgstr ""
1949"\n"
1950"    _getACookie() {\n"
1951"\n"
1952"        // Did you select \"cookie\" instead of \"not cookie\"?\n"
1953"        if (this._cookieRadio.get_active()) {\n"
1954"\n"
1955"            // Increase the number of cookies by 1 and update the label\n"
1956"            cookies++;\n"
1957"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
1958"\n"
1959"        }\n"
1960"\n"
1961"    }\n"
1962
1963#. (itstool) path: section/title
1964#: C/03_getting_the_signal.js.page:296
1965msgid "Can you spell \"cookie\"?"
1966msgstr "\"cookie\" 쓸 수 있죠?"
1967
1968#. (itstool) path: section/p
1969#: C/03_getting_the_signal.js.page:298
1970msgid "The last input widget we're going to cover is the Entry widget, which is used for single-line text entry."
1971msgstr "우리가 다룰 마지막 위젯은 단일 행 텍스트 항목을 다루는 Entry 위젯입니다."
1972
1973#. (itstool) path: note/p
1974#: C/03_getting_the_signal.js.page:299
1975msgid ""
1976"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 "
1977"to look at the much more customizable <link xref=\"textview.js\">TextView</link> widget."
1978msgstr ""
1979"텍스트 편집기를 만들 때 처럼 한 문당 이상을 입력할 수 있는게 필요하다면, 개별적으로 이리저리 자유롭게 바꿀 수 있는 "
1980"<link xref=\"textview.js\">TextView</link> 위젯을 찾으시려는 지도 모르겠습니다."
1981
1982#. (itstool) path: section/media
1983#. This is a reference to an external file such as an image or video. When
1984#. the file changes, the md5 hash will change to let you know you need to
1985#. update your localized copy. The msgstr is not used at all. Set it to
1986#. whatever you like once you have updated your copy of the file.
1987#: C/03_getting_the_signal.js.page:300 C/03_getting_the_signal.js.page:367
1988msgctxt "_"
1989msgid "external ref='media/03_jssignal_04.png' md5='dfc5221ca15ca9fba7d3c76a73804e2d'"
1990msgstr ""
1991
1992#. (itstool) path: section/p
1993#: C/03_getting_the_signal.js.page:302
1994msgid "After we change the window's name, we create the Entry widget."
1995msgstr "창 이름을 바꾸고 나서 Entry 위젯을 만들겠습니다."
1996
1997#. (itstool) path: section/code
1998#: C/03_getting_the_signal.js.page:303
1999#, no-wrap
2000msgid ""
2001"\n"
2002"        // Create the text entry field\n"
2003"        this._spellCookie = new Gtk.Entry ();\n"
2004msgstr ""
2005"\n"
2006"        // Create the text entry field\n"
2007"        this._spellCookie = new Gtk.Entry ();\n"
2008
2009#. (itstool) path: section/p
2010#: C/03_getting_the_signal.js.page:308
2011msgid "Next, we arrange everything in the Grid ..."
2012msgstr "그 다음, 그리드에 모두 정리하고요 ..."
2013
2014#. (itstool) path: section/code
2015#: C/03_getting_the_signal.js.page:309
2016#, no-wrap
2017msgid ""
2018"\n"
2019"        // Put everything inside the grid\n"
2020"        this._grid.attach (this._spellCookie, 0, 0, 1, 1);\n"
2021"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
2022"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2023msgstr ""
2024"\n"
2025"        // Put everything inside the grid\n"
2026"        this._grid.attach (this._spellCookie, 0, 0, 1, 1);\n"
2027"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
2028"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2029
2030#. (itstool) path: section/p
2031#: C/03_getting_the_signal.js.page:316
2032msgid ""
2033"And now we modify _getACookie's if statement again, using the Entry's get_text method to retrieve the text that "
2034"you entered into it and see if you spelled \"cookie\" right. We don't care whether you capitalize \"cookie\" or "
2035"not, so we use JavaScript's built-in toLowerCase method to change the Entry's text to all lower case inside the if "
2036"statement."
2037msgstr ""
2038"Entry의 get_text 메서드로 텍스트를 가져와서 \"cookie\" 문자열이 맞는지 확인하도록 _getACookie의 if 구문을 수정하겠"
2039"습니다. \"cookie\"의 어디가 대문자인지는 상관하지 않을거기에 if 구문 안에서 Entry의 모든 텍스트 문자를 소문자로 바"
2040"꾸는 JavaScript 내장 함수 toLowerCase를 사용하겠습니다."
2041
2042#. (itstool) path: note/p
2043#: C/03_getting_the_signal.js.page:317
2044msgid ""
2045"An Entry widget doesn't have a label property, which is a set text string that the user can't change. (You can't "
2046"normally change the label on a Button, for instance.) Instead, it has a text property, which changes to match what "
2047"the user types in."
2048msgstr ""
2049"Entry 위젯은 사용자가 못바꾸는 텍스트 문자열을 설정하는 label 속성이 없습니다(심지어 단추에도 보통은 레이블의 문자"
2050"열을 바꿀 수 없습니다). 대신 사용자가 입력한 내용이 일치하는지 여부를 바꾸는 text 속성이 있습니다."
2051
2052#. (itstool) path: section/code
2053#: C/03_getting_the_signal.js.page:318
2054#, no-wrap
2055msgid ""
2056"\n"
2057"    _getACookie() {\n"
2058"\n"
2059"        // Did you spell \"cookie\" correctly?\n"
2060"        if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
2061"\n"
2062"            // Increase the number of cookies by 1 and update the label\n"
2063"            cookies++;\n"
2064"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2065"\n"
2066"        }\n"
2067"\n"
2068"    }\n"
2069msgstr ""
2070"\n"
2071"    _getACookie() {\n"
2072"\n"
2073"        // Did you spell \"cookie\" correctly?\n"
2074"        if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
2075"\n"
2076"            // Increase the number of cookies by 1 and update the label\n"
2077"            cookies++;\n"
2078"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2079"\n"
2080"        }\n"
2081"\n"
2082"    }\n"
2083
2084#. (itstool) path: section/p
2085#: C/03_getting_the_signal.js.page:337
2086msgid "Keep reading, if you'd like to see the complete code for each version of our cookie maker application."
2087msgstr "과자 만들기 프로그램의 여러가지  각 버전에 해당하는 완전한 코드를 보려면 계속 읽어나가십시오."
2088
2089#. (itstool) path: note/p
2090#: C/03_getting_the_signal.js.page:338
2091msgid ""
2092"The main JavaScript tutorials page has <link xref=\"beginner.js#buttons\">more detailed code samples</link> for "
2093"each input widget, including several not covered here."
2094msgstr ""
2095"메인 JavaScript 지침서 페이지에는 여기서 다루지 못한 여러가지 입력 위젯을 다룬 <link xref=\"beginner.js#buttons\">"
2096"상세 예제 코드</link>가 있습니다."
2097
2098#. (itstool) path: section/title
2099#: C/03_getting_the_signal.js.page:343
2100msgid "Complete code samples"
2101msgstr "완전한 예제 코드"
2102
2103#. (itstool) path: section/title
2104#: C/03_getting_the_signal.js.page:348
2105msgid "Code sample with Button"
2106msgstr "단추 코드 예제"
2107
2108#. (itstool) path: section/code
2109#: C/03_getting_the_signal.js.page:350
2110#, no-wrap
2111msgid ""
2112"#!/usr/bin/gjs\n"
2113"\n"
2114"imports.gi.versions.Gtk = '3.0';\n"
2115"const Gtk = imports.gi.Gtk;\n"
2116"\n"
2117"// We start out with 0 cookies\n"
2118"var cookies = 0;\n"
2119"\n"
2120"class GettingTheSignal {\n"
2121"\n"
2122"    // Create the application itself\n"
2123"    constructor() {\n"
2124"        this.application = new Gtk.Application();\n"
2125"\n"
2126"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2127"        this.application.connect('activate', this._onActivate.bind(this));\n"
2128"        this.application.connect('startup', this._onStartup.bind(this));\n"
2129"    }\n"
2130"\n"
2131"    // Callback function for 'activate' signal presents window when active\n"
2132"    _onActivate() {\n"
2133"        this._window.present();\n"
2134"    }\n"
2135"\n"
2136"    // Callback function for 'startup' signal builds the UI\n"
2137"    _onStartup() {\n"
2138"        this._buildUI();\n"
2139"    }\n"
2140"\n"
2141"    // Build the application's UI\n"
2142"    _buildUI() {\n"
2143"\n"
2144"        // Create the application window\n"
2145"        this._window = new Gtk.ApplicationWindow({\n"
2146"            application: this.application,\n"
2147"            window_position: Gtk.WindowPosition.CENTER,\n"
2148"            default_height: 200,\n"
2149"            default_width: 400,\n"
2150"            title: \"Click the button to get a cookie!\"});\n"
2151"\n"
2152"        // Create the label\n"
2153"        this._cookieLabel = new Gtk.Label ({\n"
2154"            label: \"Number of cookies: \" + cookies });\n"
2155"\n"
2156"        // Create the cookie button\n"
2157"        this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
2158"\n"
2159"        // Connect the cookie button to the function that handles clicking it\n"
2160"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2161"\n"
2162"        // Create a grid to arrange everything inside\n"
2163"        this._grid = new Gtk.Grid ({\n"
2164"            halign: Gtk.Align.CENTER,\n"
2165"            valign: Gtk.Align.CENTER,\n"
2166"            row_spacing: 20 });\n"
2167"\n"
2168"        // Put everything inside the grid\n"
2169"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
2170"        this._grid.attach (this._cookieLabel, 0, 1, 1, 1);\n"
2171"\n"
2172"        // Add the grid to the window\n"
2173"        this._window.add (this._grid);\n"
2174"\n"
2175"        // Show the window and all child widgets\n"
2176"        this._window.show_all();\n"
2177"\n"
2178"    }\n"
2179"\n"
2180"    _getACookie() {\n"
2181"\n"
2182"        // Increase the number of cookies by 1 and update the label\n"
2183"        cookies++;\n"
2184"        this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2185"\n"
2186"    }\n"
2187"\n"
2188"};\n"
2189"\n"
2190"// Run the application\n"
2191"let app = new GettingTheSignal ();\n"
2192"app.application.run (ARGV);\n"
2193msgstr ""
2194"#!/usr/bin/gjs\n"
2195"\n"
2196"imports.gi.versions.Gtk = '3.0';\n"
2197"const Gtk = imports.gi.Gtk;\n"
2198"\n"
2199"// We start out with 0 cookies\n"
2200"var cookies = 0;\n"
2201"\n"
2202"class GettingTheSignal {\n"
2203"\n"
2204"    // Create the application itself\n"
2205"    constructor() {\n"
2206"        this.application = new Gtk.Application();\n"
2207"\n"
2208"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2209"        this.application.connect('activate', this._onActivate.bind(this));\n"
2210"        this.application.connect('startup', this._onStartup.bind(this));\n"
2211"    }\n"
2212"\n"
2213"    // Callback function for 'activate' signal presents window when active\n"
2214"    _onActivate() {\n"
2215"        this._window.present();\n"
2216"    }\n"
2217"\n"
2218"    // Callback function for 'startup' signal builds the UI\n"
2219"    _onStartup() {\n"
2220"        this._buildUI();\n"
2221"    }\n"
2222"\n"
2223"    // Build the application's UI\n"
2224"    _buildUI() {\n"
2225"\n"
2226"        // Create the application window\n"
2227"        this._window = new Gtk.ApplicationWindow({\n"
2228"            application: this.application,\n"
2229"            window_position: Gtk.WindowPosition.CENTER,\n"
2230"            default_height: 200,\n"
2231"            default_width: 400,\n"
2232"            title: \"Click the button to get a cookie!\"});\n"
2233"\n"
2234"        // Create the label\n"
2235"        this._cookieLabel = new Gtk.Label ({\n"
2236"            label: \"Number of cookies: \" + cookies });\n"
2237"\n"
2238"        // Create the cookie button\n"
2239"        this._cookieButton = new Gtk.Button ({ label: \"Get a cookie\" });\n"
2240"\n"
2241"        // Connect the cookie button to the function that handles clicking it\n"
2242"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2243"\n"
2244"        // Create a grid to arrange everything inside\n"
2245"        this._grid = new Gtk.Grid ({\n"
2246"            halign: Gtk.Align.CENTER,\n"
2247"            valign: Gtk.Align.CENTER,\n"
2248"            row_spacing: 20 });\n"
2249"\n"
2250"        // Put everything inside the grid\n"
2251"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
2252"        this._grid.attach (this._cookieLabel, 0, 1, 1, 1);\n"
2253"\n"
2254"        // Add the grid to the window\n"
2255"        this._window.add (this._grid);\n"
2256"\n"
2257"        // Show the window and all child widgets\n"
2258"        this._window.show_all();\n"
2259"\n"
2260"    }\n"
2261"\n"
2262"    _getACookie() {\n"
2263"\n"
2264"        // Increase the number of cookies by 1 and update the label\n"
2265"        cookies++;\n"
2266"        this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2267"\n"
2268"    }\n"
2269"\n"
2270"};\n"
2271"\n"
2272"// Run the application\n"
2273"let app = new GettingTheSignal ();\n"
2274"app.application.run (ARGV);\n"
2275
2276#. (itstool) path: section/title
2277#: C/03_getting_the_signal.js.page:354
2278msgid "Code sample with Switch"
2279msgstr "스위치 코드 예제"
2280
2281#. (itstool) path: section/code
2282#: C/03_getting_the_signal.js.page:356
2283#, no-wrap
2284msgid ""
2285"#!/usr/bin/gjs\n"
2286"\n"
2287"imports.gi.versions.Gtk = '3.0';\n"
2288"const Gtk = imports.gi.Gtk;\n"
2289"\n"
2290"// We start out with 0 cookies\n"
2291"var cookies = 0;\n"
2292"\n"
2293"class GettingTheSignal {\n"
2294"\n"
2295"    // Create the application itself\n"
2296"    constructor() {\n"
2297"        this.application = new Gtk.Application();\n"
2298"\n"
2299"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2300"        this.application.connect('activate', this._onActivate.bind(this));\n"
2301"        this.application.connect('startup', this._onStartup.bind(this));\n"
2302"    }\n"
2303"\n"
2304"    // Callback function for 'activate' signal presents window when active\n"
2305"    _onActivate() {\n"
2306"        this._window.present();\n"
2307"    }\n"
2308"\n"
2309"    // Callback function for 'startup' signal builds the UI\n"
2310"    _onStartup() {\n"
2311"        this._buildUI();\n"
2312"    }\n"
2313"\n"
2314"    // Build the application's UI\n"
2315"    _buildUI() {\n"
2316"\n"
2317"        // Create the application window\n"
2318"        this._window = new Gtk.ApplicationWindow({\n"
2319"            application: this.application,\n"
2320"            window_position: Gtk.WindowPosition.CENTER,\n"
2321"            default_height: 200,\n"
2322"            default_width: 400,\n"
2323"            title: \"Click the button to get a cookie!\"});\n"
2324"\n"
2325"        // Create the label\n"
2326"        this._cookieLabel = new Gtk.Label ({\n"
2327"            label: \"Number of cookies: \" + cookies });\n"
2328"\n"
2329"        // Create the cookie button\n"
2330"        this._cookieButton = new Gtk.Button ({\n"
2331"            label: \"Get a cookie\" });\n"
2332"\n"
2333"        // Connect the cookie button to the function that handles clicking it\n"
2334"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2335"\n"
2336"        // Create the switch that controls whether or not you can win\n"
2337"        this._cookieSwitch = new Gtk.Switch ();\n"
2338"\n"
2339"        // Create the label to go with the switch\n"
2340"        this._switchLabel = new Gtk.Label ({\n"
2341"            label: \"Cookie dispenser\" });\n"
2342"\n"
2343"        // Create a grid for the switch and its label\n"
2344"        this._switchGrid = new Gtk.Grid ({\n"
2345"            halign: Gtk.Align.CENTER,\n"
2346"            valign: Gtk.Align.CENTER });\n"
2347"\n"
2348"        // Put the switch and its label inside that grid\n"
2349"        this._switchGrid.attach (this._switchLabel, 0, 0, 1, 1);\n"
2350"        this._switchGrid.attach (this._cookieSwitch, 1, 0, 1, 1);\n"
2351"\n"
2352"        // Create a grid to arrange everything else inside\n"
2353"        this._grid = new Gtk.Grid ({\n"
2354"            halign: Gtk.Align.CENTER,\n"
2355"            valign: Gtk.Align.CENTER,\n"
2356"            row_spacing: 20 });\n"
2357"\n"
2358"        // Put everything inside the grid\n"
2359"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
2360"        this._grid.attach (this._switchGrid, 0, 1, 1, 1);\n"
2361"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2362"\n"
2363"        // Add the grid to the window\n"
2364"        this._window.add (this._grid);\n"
2365"\n"
2366"        // Show the window and all child widgets\n"
2367"        this._window.show_all();\n"
2368"\n"
2369"    }\n"
2370"\n"
2371"    _getACookie() {\n"
2372"\n"
2373"        // Is the cookie dispenser turned on?\n"
2374"        if (this._cookieSwitch.get_active()) {\n"
2375"\n"
2376"            // Increase the number of cookies by 1 and update the label\n"
2377"            cookies++;\n"
2378"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2379"\n"
2380"        }\n"
2381"\n"
2382"    }\n"
2383"\n"
2384"};\n"
2385"\n"
2386"// Run the application\n"
2387"let app = new GettingTheSignal ();\n"
2388"app.application.run (ARGV);\n"
2389msgstr ""
2390"#!/usr/bin/gjs\n"
2391"\n"
2392"imports.gi.versions.Gtk = '3.0';\n"
2393"const Gtk = imports.gi.Gtk;\n"
2394"\n"
2395"// We start out with 0 cookies\n"
2396"var cookies = 0;\n"
2397"\n"
2398"class GettingTheSignal {\n"
2399"\n"
2400"    // Create the application itself\n"
2401"    constructor() {\n"
2402"        this.application = new Gtk.Application();\n"
2403"\n"
2404"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2405"        this.application.connect('activate', this._onActivate.bind(this));\n"
2406"        this.application.connect('startup', this._onStartup.bind(this));\n"
2407"    }\n"
2408"\n"
2409"    // Callback function for 'activate' signal presents window when active\n"
2410"    _onActivate() {\n"
2411"        this._window.present();\n"
2412"    }\n"
2413"\n"
2414"    // Callback function for 'startup' signal builds the UI\n"
2415"    _onStartup() {\n"
2416"        this._buildUI();\n"
2417"    }\n"
2418"\n"
2419"    // Build the application's UI\n"
2420"    _buildUI() {\n"
2421"\n"
2422"        // Create the application window\n"
2423"        this._window = new Gtk.ApplicationWindow({\n"
2424"            application: this.application,\n"
2425"            window_position: Gtk.WindowPosition.CENTER,\n"
2426"            default_height: 200,\n"
2427"            default_width: 400,\n"
2428"            title: \"Click the button to get a cookie!\"});\n"
2429"\n"
2430"        // Create the label\n"
2431"        this._cookieLabel = new Gtk.Label ({\n"
2432"            label: \"Number of cookies: \" + cookies });\n"
2433"\n"
2434"        // Create the cookie button\n"
2435"        this._cookieButton = new Gtk.Button ({\n"
2436"            label: \"Get a cookie\" });\n"
2437"\n"
2438"        // Connect the cookie button to the function that handles clicking it\n"
2439"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2440"\n"
2441"        // Create the switch that controls whether or not you can win\n"
2442"        this._cookieSwitch = new Gtk.Switch ();\n"
2443"\n"
2444"        // Create the label to go with the switch\n"
2445"        this._switchLabel = new Gtk.Label ({\n"
2446"            label: \"Cookie dispenser\" });\n"
2447"\n"
2448"        // Create a grid for the switch and its label\n"
2449"        this._switchGrid = new Gtk.Grid ({\n"
2450"            halign: Gtk.Align.CENTER,\n"
2451"            valign: Gtk.Align.CENTER });\n"
2452"\n"
2453"        // Put the switch and its label inside that grid\n"
2454"        this._switchGrid.attach (this._switchLabel, 0, 0, 1, 1);\n"
2455"        this._switchGrid.attach (this._cookieSwitch, 1, 0, 1, 1);\n"
2456"\n"
2457"        // Create a grid to arrange everything else inside\n"
2458"        this._grid = new Gtk.Grid ({\n"
2459"            halign: Gtk.Align.CENTER,\n"
2460"            valign: Gtk.Align.CENTER,\n"
2461"            row_spacing: 20 });\n"
2462"\n"
2463"        // Put everything inside the grid\n"
2464"        this._grid.attach (this._cookieButton, 0, 0, 1, 1);\n"
2465"        this._grid.attach (this._switchGrid, 0, 1, 1, 1);\n"
2466"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2467"\n"
2468"        // Add the grid to the window\n"
2469"        this._window.add (this._grid);\n"
2470"\n"
2471"        // Show the window and all child widgets\n"
2472"        this._window.show_all();\n"
2473"\n"
2474"    }\n"
2475"\n"
2476"    _getACookie() {\n"
2477"\n"
2478"        // Is the cookie dispenser turned on?\n"
2479"        if (this._cookieSwitch.get_active()) {\n"
2480"\n"
2481"            // Increase the number of cookies by 1 and update the label\n"
2482"            cookies++;\n"
2483"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2484"\n"
2485"        }\n"
2486"\n"
2487"    }\n"
2488"\n"
2489"};\n"
2490"\n"
2491"// Run the application\n"
2492"let app = new GettingTheSignal ();\n"
2493"app.application.run (ARGV);\n"
2494
2495#. (itstool) path: section/title
2496#: C/03_getting_the_signal.js.page:360
2497msgid "Code sample with RadioButton"
2498msgstr "RadioButton 코드 예제"
2499
2500#. (itstool) path: section/code
2501#: C/03_getting_the_signal.js.page:362
2502#, no-wrap
2503msgid ""
2504"#!/usr/bin/gjs\n"
2505"\n"
2506"imports.gi.versions.Gtk = '3.0';\n"
2507"const Gtk = imports.gi.Gtk;\n"
2508"\n"
2509"// We start out with 0 cookies\n"
2510"var cookies = 0;\n"
2511"\n"
2512"class GettingTheSignal {\n"
2513"\n"
2514"    // Create the application itself\n"
2515"    constructor() {\n"
2516"        this.application = new Gtk.Application();\n"
2517"\n"
2518"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2519"        this.application.connect('activate', this._onActivate.bind(this));\n"
2520"        this.application.connect('startup', this._onStartup.bind(this));\n"
2521"    }\n"
2522"\n"
2523"    // Callback function for 'activate' signal presents window when active\n"
2524"    _onActivate() {\n"
2525"        this._window.present();\n"
2526"    }\n"
2527"\n"
2528"    // Callback function for 'startup' signal builds the UI\n"
2529"    _onStartup() {\n"
2530"        this._buildUI();\n"
2531"    }\n"
2532"\n"
2533"    // Build the application's UI\n"
2534"    _buildUI() {\n"
2535"\n"
2536"        // Create the application window\n"
2537"        this._window = new Gtk.ApplicationWindow({\n"
2538"            application: this.application,\n"
2539"            window_position: Gtk.WindowPosition.CENTER,\n"
2540"            default_height: 200,\n"
2541"            default_width: 400,\n"
2542"            border_width: 20,\n"
2543"            title: \"Choose the one that says 'cookie'!\"});\n"
2544"\n"
2545"        // Create the radio buttons\n"
2546"        this._cookieRadio = new Gtk.RadioButton ({ label: \"Cookie\" });\n"
2547"        this._notCookieOne = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
2548"            group: this._cookieRadio });\n"
2549"        this._notCookieTwo = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
2550"            group: this._cookieRadio });\n"
2551"\n"
2552"        // Arrange the radio buttons in their own grid\n"
2553"        this._radioGrid = new Gtk.Grid ();\n"
2554"        this._radioGrid.attach (this._notCookieOne, 0, 0, 1, 1);\n"
2555"        this._radioGrid.attach (this._cookieRadio, 0, 1, 1, 1);\n"
2556"        this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);\n"
2557"\n"
2558"        // Set the button that will be at the top to be active by default\n"
2559"        this._notCookieOne.set_active (true);\n"
2560"\n"
2561"        // Create the cookie button\n"
2562"        this._cookieButton = new Gtk.Button ({\n"
2563"            label: \"Get a cookie\" });\n"
2564"\n"
2565"        // Connect the cookie button to the function that handles clicking it\n"
2566"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2567"\n"
2568"        // Create the label\n"
2569"        this._cookieLabel = new Gtk.Label ({\n"
2570"            label: \"Number of cookies: \" + cookies });\n"
2571"\n"
2572"        // Create a grid to arrange everything inside\n"
2573"        this._grid = new Gtk.Grid ({\n"
2574"            halign: Gtk.Align.CENTER,\n"
2575"            valign: Gtk.Align.CENTER,\n"
2576"            row_spacing: 20 });\n"
2577"\n"
2578"        // Put everything inside the grid\n"
2579"        this._grid.attach (this._radioGrid, 0, 0, 1, 1);\n"
2580"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
2581"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2582"\n"
2583"        // Add the grid to the window\n"
2584"        this._window.add (this._grid);\n"
2585"\n"
2586"        // Show the window and all child widgets\n"
2587"        this._window.show_all();\n"
2588"\n"
2589"    }\n"
2590"\n"
2591"    _getACookie() {\n"
2592"\n"
2593"        // Did you select \"cookie\" instead of \"not cookie\"?\n"
2594"        if (this._cookieRadio.get_active()) {\n"
2595"\n"
2596"            // Increase the number of cookies by 1 and update the label\n"
2597"            cookies++;\n"
2598"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2599"\n"
2600"        }\n"
2601"\n"
2602"    }\n"
2603"\n"
2604"};\n"
2605"\n"
2606"// Run the application\n"
2607"let app = new GettingTheSignal ();\n"
2608"app.application.run (ARGV);\n"
2609msgstr ""
2610"#!/usr/bin/gjs\n"
2611"\n"
2612"imports.gi.versions.Gtk = '3.0';\n"
2613"const Gtk = imports.gi.Gtk;\n"
2614"\n"
2615"// We start out with 0 cookies\n"
2616"var cookies = 0;\n"
2617"\n"
2618"class GettingTheSignal {\n"
2619"\n"
2620"    // Create the application itself\n"
2621"    constructor() {\n"
2622"        this.application = new Gtk.Application();\n"
2623"\n"
2624"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2625"        this.application.connect('activate', this._onActivate.bind(this));\n"
2626"        this.application.connect('startup', this._onStartup.bind(this));\n"
2627"    }\n"
2628"\n"
2629"    // Callback function for 'activate' signal presents window when active\n"
2630"    _onActivate() {\n"
2631"        this._window.present();\n"
2632"    }\n"
2633"\n"
2634"    // Callback function for 'startup' signal builds the UI\n"
2635"    _onStartup() {\n"
2636"        this._buildUI();\n"
2637"    }\n"
2638"\n"
2639"    // Build the application's UI\n"
2640"    _buildUI() {\n"
2641"\n"
2642"        // Create the application window\n"
2643"        this._window = new Gtk.ApplicationWindow({\n"
2644"            application: this.application,\n"
2645"            window_position: Gtk.WindowPosition.CENTER,\n"
2646"            default_height: 200,\n"
2647"            default_width: 400,\n"
2648"            border_width: 20,\n"
2649"            title: \"Choose the one that says 'cookie'!\"});\n"
2650"\n"
2651"        // Create the radio buttons\n"
2652"        this._cookieRadio = new Gtk.RadioButton ({ label: \"Cookie\" });\n"
2653"        this._notCookieOne = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
2654"            group: this._cookieRadio });\n"
2655"        this._notCookieTwo = new Gtk.RadioButton ({ label: \"Not cookie\",\n"
2656"            group: this._cookieRadio });\n"
2657"\n"
2658"        // Arrange the radio buttons in their own grid\n"
2659"        this._radioGrid = new Gtk.Grid ();\n"
2660"        this._radioGrid.attach (this._notCookieOne, 0, 0, 1, 1);\n"
2661"        this._radioGrid.attach (this._cookieRadio, 0, 1, 1, 1);\n"
2662"        this._radioGrid.attach (this._notCookieTwo, 0, 2, 1, 1);\n"
2663"\n"
2664"        // Set the button that will be at the top to be active by default\n"
2665"        this._notCookieOne.set_active (true);\n"
2666"\n"
2667"        // Create the cookie button\n"
2668"        this._cookieButton = new Gtk.Button ({\n"
2669"            label: \"Get a cookie\" });\n"
2670"\n"
2671"        // Connect the cookie button to the function that handles clicking it\n"
2672"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2673"\n"
2674"        // Create the label\n"
2675"        this._cookieLabel = new Gtk.Label ({\n"
2676"            label: \"Number of cookies: \" + cookies });\n"
2677"\n"
2678"        // Create a grid to arrange everything inside\n"
2679"        this._grid = new Gtk.Grid ({\n"
2680"            halign: Gtk.Align.CENTER,\n"
2681"            valign: Gtk.Align.CENTER,\n"
2682"            row_spacing: 20 });\n"
2683"\n"
2684"        // Put everything inside the grid\n"
2685"        this._grid.attach (this._radioGrid, 0, 0, 1, 1);\n"
2686"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
2687"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2688"\n"
2689"        // Add the grid to the window\n"
2690"        this._window.add (this._grid);\n"
2691"\n"
2692"        // Show the window and all child widgets\n"
2693"        this._window.show_all();\n"
2694"\n"
2695"    }\n"
2696"\n"
2697"    _getACookie() {\n"
2698"\n"
2699"        // Did you select \"cookie\" instead of \"not cookie\"?\n"
2700"        if (this._cookieRadio.get_active()) {\n"
2701"\n"
2702"            // Increase the number of cookies by 1 and update the label\n"
2703"            cookies++;\n"
2704"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2705"\n"
2706"        }\n"
2707"\n"
2708"    }\n"
2709"\n"
2710"};\n"
2711"\n"
2712"// Run the application\n"
2713"let app = new GettingTheSignal ();\n"
2714"app.application.run (ARGV);\n"
2715
2716#. (itstool) path: section/title
2717#: C/03_getting_the_signal.js.page:366
2718msgid "Code sample with Entry"
2719msgstr "Entry 코드 예제"
2720
2721#. (itstool) path: section/code
2722#: C/03_getting_the_signal.js.page:368
2723#, no-wrap
2724msgid ""
2725"#!/usr/bin/gjs\n"
2726"\n"
2727"imports.gi.versions.Gtk = '3.0';\n"
2728"const Gtk = imports.gi.Gtk;\n"
2729"\n"
2730"// We start out with 0 cookies\n"
2731"var cookies = 0;\n"
2732"\n"
2733"class GettingTheSignal {\n"
2734"\n"
2735"    // Create the application itself\n"
2736"    constructor() {\n"
2737"        this.application = new Gtk.Application();\n"
2738"\n"
2739"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2740"        this.application.connect('activate', this._onActivate.bind(this));\n"
2741"        this.application.connect('startup', this._onStartup.bind(this));\n"
2742"    }\n"
2743"\n"
2744"    // Callback function for 'activate' signal presents window when active\n"
2745"    _onActivate() {\n"
2746"        this._window.present();\n"
2747"    }\n"
2748"\n"
2749"    // Callback function for 'startup' signal builds the UI\n"
2750"    _onStartup() {\n"
2751"        this._buildUI();\n"
2752"    }\n"
2753"\n"
2754"    // Build the application's UI\n"
2755"    _buildUI() {\n"
2756"\n"
2757"        // Create the application window\n"
2758"        this._window = new Gtk.ApplicationWindow({\n"
2759"            application: this.application,\n"
2760"            window_position: Gtk.WindowPosition.CENTER,\n"
2761"            default_height: 200,\n"
2762"            default_width: 400,\n"
2763"            border_width: 20,\n"
2764"            title: \"Spell 'cookie' to get a cookie!\"});\n"
2765"\n"
2766"        // Create the text entry field\n"
2767"        this._spellCookie = new Gtk.Entry ();\n"
2768"\n"
2769"        // Create the cookie button\n"
2770"        this._cookieButton = new Gtk.Button ({\n"
2771"            label: \"Get a cookie\" });\n"
2772"\n"
2773"        // Connect the cookie button to the function that handles clicking it\n"
2774"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2775"\n"
2776"        // Create the label\n"
2777"        this._cookieLabel = new Gtk.Label ({\n"
2778"            label: \"Number of cookies: \" + cookies });\n"
2779"\n"
2780"        // Create a grid to arrange everything inside\n"
2781"        this._grid = new Gtk.Grid ({\n"
2782"            halign: Gtk.Align.CENTER,\n"
2783"            valign: Gtk.Align.CENTER,\n"
2784"            row_spacing: 20 });\n"
2785"\n"
2786"        // Put everything inside the grid\n"
2787"        this._grid.attach (this._spellCookie, 0, 0, 1, 1);\n"
2788"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
2789"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2790"\n"
2791"        // Add the grid to the window\n"
2792"        this._window.add (this._grid);\n"
2793"\n"
2794"        // Show the window and all child widgets\n"
2795"        this._window.show_all();\n"
2796"\n"
2797"    }\n"
2798"\n"
2799"    _getACookie() {\n"
2800"\n"
2801"        // Did you spell \"cookie\" correctly?\n"
2802"        if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
2803"\n"
2804"            // Increase the number of cookies by 1 and update the label\n"
2805"            cookies++;\n"
2806"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2807"\n"
2808"        }\n"
2809"\n"
2810"    }\n"
2811"\n"
2812"};\n"
2813"\n"
2814"// Run the application\n"
2815"let app = new GettingTheSignal ();\n"
2816"app.application.run (ARGV);\n"
2817msgstr ""
2818"#!/usr/bin/gjs\n"
2819"\n"
2820"imports.gi.versions.Gtk = '3.0';\n"
2821"const Gtk = imports.gi.Gtk;\n"
2822"\n"
2823"// We start out with 0 cookies\n"
2824"var cookies = 0;\n"
2825"\n"
2826"class GettingTheSignal {\n"
2827"\n"
2828"    // Create the application itself\n"
2829"    constructor() {\n"
2830"        this.application = new Gtk.Application();\n"
2831"\n"
2832"        // Connect 'activate' and 'startup' signals to the callback functions\n"
2833"        this.application.connect('activate', this._onActivate.bind(this));\n"
2834"        this.application.connect('startup', this._onStartup.bind(this));\n"
2835"    }\n"
2836"\n"
2837"    // Callback function for 'activate' signal presents window when active\n"
2838"    _onActivate() {\n"
2839"        this._window.present();\n"
2840"    }\n"
2841"\n"
2842"    // Callback function for 'startup' signal builds the UI\n"
2843"    _onStartup() {\n"
2844"        this._buildUI();\n"
2845"    }\n"
2846"\n"
2847"    // Build the application's UI\n"
2848"    _buildUI() {\n"
2849"\n"
2850"        // Create the application window\n"
2851"        this._window = new Gtk.ApplicationWindow({\n"
2852"            application: this.application,\n"
2853"            window_position: Gtk.WindowPosition.CENTER,\n"
2854"            default_height: 200,\n"
2855"            default_width: 400,\n"
2856"            border_width: 20,\n"
2857"            title: \"Spell 'cookie' to get a cookie!\"});\n"
2858"\n"
2859"        // Create the text entry field\n"
2860"        this._spellCookie = new Gtk.Entry ();\n"
2861"\n"
2862"        // Create the cookie button\n"
2863"        this._cookieButton = new Gtk.Button ({\n"
2864"            label: \"Get a cookie\" });\n"
2865"\n"
2866"        // Connect the cookie button to the function that handles clicking it\n"
2867"        this._cookieButton.connect ('clicked', this._getACookie.bind(this));\n"
2868"\n"
2869"        // Create the label\n"
2870"        this._cookieLabel = new Gtk.Label ({\n"
2871"            label: \"Number of cookies: \" + cookies });\n"
2872"\n"
2873"        // Create a grid to arrange everything inside\n"
2874"        this._grid = new Gtk.Grid ({\n"
2875"            halign: Gtk.Align.CENTER,\n"
2876"            valign: Gtk.Align.CENTER,\n"
2877"            row_spacing: 20 });\n"
2878"\n"
2879"        // Put everything inside the grid\n"
2880"        this._grid.attach (this._spellCookie, 0, 0, 1, 1);\n"
2881"        this._grid.attach (this._cookieButton, 0, 1, 1, 1);\n"
2882"        this._grid.attach (this._cookieLabel, 0, 2, 1, 1);\n"
2883"\n"
2884"        // Add the grid to the window\n"
2885"        this._window.add (this._grid);\n"
2886"\n"
2887"        // Show the window and all child widgets\n"
2888"        this._window.show_all();\n"
2889"\n"
2890"    }\n"
2891"\n"
2892"    _getACookie() {\n"
2893"\n"
2894"        // Did you spell \"cookie\" correctly?\n"
2895"        if ((this._spellCookie.get_text()).toLowerCase() == \"cookie\") {\n"
2896"\n"
2897"            // Increase the number of cookies by 1 and update the label\n"
2898"            cookies++;\n"
2899"            this._cookieLabel.set_label (\"Number of cookies: \" + cookies);\n"
2900"\n"
2901"        }\n"
2902"\n"
2903"    }\n"
2904"\n"
2905"};\n"
2906"\n"
2907"// Run the application\n"
2908"let app = new GettingTheSignal ();\n"
2909"app.application.run (ARGV);\n"
2910
2911#. (itstool) path: info/title
2912#: C/aboutdialog.c.page:8
2913msgctxt "text"
2914msgid "AboutDialog (C)"
2915msgstr "AboutDialog(C)"
2916
2917#. (itstool) path: credit/name
2918#: C/aboutdialog.c.page:15 C/button.c.page:15 C/combobox.c.page:13 C/dialog.c.page:15 C/entry.c.page:13
2919#: C/grid.c.page:13 C/image.c.page:13 C/label.c.page:14 C/linkbutton.c.page:13 C/menubar.c.page:15
2920#: C/messagedialog.c.page:14 C/progressbar.c.page:14 C/radiobutton.c.page:15 C/scale.c.page:15
2921#: C/scrolledwindow.c.page:15 C/spinbutton.c.page:16 C/spinner.c.page:14 C/statusbar.c.page:17 C/switch.c.page:13
2922#: C/textview.c.page:13 C/togglebutton.c.page:17 C/toolbar.c.page:15
2923msgid "Monica Kochofar"
2924msgstr "Monica Kochofar"
2925
2926#. (itstool) path: info/desc
2927#: C/aboutdialog.c.page:20 C/aboutdialog.js.page:17 C/aboutdialog.vala.page:26
2928msgid "Display information about an application"
2929msgstr "프로그램 정보를 나타냅니다"
2930
2931#. (itstool) path: page/title
2932#: C/aboutdialog.c.page:23 C/aboutdialog.js.page:20 C/aboutdialog.py.page:22 C/aboutdialog.vala.page:29
2933msgid "AboutDialog"
2934msgstr "AboutDialog"
2935
2936#. (itstool) path: page/media
2937#. This is a reference to an external file such as an image or video. When
2938#. the file changes, the md5 hash will change to let you know you need to
2939#. update your localized copy. The msgstr is not used at all. Set it to
2940#. whatever you like once you have updated your copy of the file.
2941#: C/aboutdialog.c.page:25 C/aboutdialog.js.page:21 C/aboutdialog.py.page:23 C/aboutdialog.vala.page:30
2942msgctxt "_"
2943msgid "external ref='media/aboutdialog_GMenu.png' md5='a36117a559fa98e25e2f6b3db593639f'"
2944msgstr ""
2945
2946#. (itstool) path: page/p
2947#: C/aboutdialog.c.page:26 C/aboutdialog.vala.page:31
2948msgid "An AboutDialog example using Gtk.ApplicationWindow and Menu"
2949msgstr "AboutDialog 예제에서는 GtkApplicationWindow와 Menu를 다룹니다"
2950
2951#. (itstool) path: note/p
2952#: C/aboutdialog.c.page:27 C/aboutdialog.vala.page:32 C/gmenu.c.page:24
2953msgid "<em style=\"bold\">You need to be running Gtk3.4 or later for this to work</em>"
2954msgstr "<em style=\"bold\">이 코드를 동작하려면 Gtk 3.4 이상이 필요합니다</em>"
2955
2956#. (itstool) path: page/code
2957#: C/aboutdialog.c.page:29
2958#, no-wrap
2959#| msgid ""
2960#| "\n"
2961#| "#include &lt;gtk/gtk.h&gt;\n"
2962#| "\n"
2963#| "/* Callback function in which reacts to the \"response\" signal from the user in\n"
2964#| " * the message dialog window.\n"
2965#| " * This function is used to destroy the dialog window.\n"
2966#| " */\n"
2967#| "static void\n"
2968#| "on_close (GtkDialog *dialog,\n"
2969#| "          gint       response_id,\n"
2970#| "          gpointer   user_data)\n"
2971#| "{\n"
2972#| "  /* This will cause the dialog to be destroyed */\n"
2973#| "  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
2974#| "}\n"
2975#| "\n"
2976#| "/* Callback function for the response signal \"activate\" related to the SimpleAction\n"
2977#| " * \"about_action\".\n"
2978#| " * This function is used to cause the about dialog window to popup.\n"
2979#| " */\n"
2980#| "static void\n"
2981#| "about_cb (GSimpleAction *simple,\n"
2982#| "          GVariant      *parameter,\n"
2983#| "          gpointer       user_data)\n"
2984#| "{\n"
2985#| "  GtkWidget *about_dialog;\n"
2986#| "\n"
2987#| "  about_dialog = gtk_about_dialog_new ();\n"
2988#| "\n"
2989#| "  /* Lists of authors/ documentators to be used later, they must be initialized\n"
2990#| "   * in a null terminated array of strings.\n"
2991#| "   */\n"
2992#| "  const gchar *authors[] = {\"GNOME Documentation Team\", NULL};\n"
2993#| "  const gchar *documenters[] = {\"GNOME Documentation Team\", NULL};\n"
2994#| "\n"
2995#| "  /* We fill in the information for the about dialog */\n"
2996#| "  gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about_dialog), \"AboutDialog Example\");\n"
2997#| "  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about_dialog), \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\");\n"
2998#| "  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about_dialog), authors);\n"
2999#| "  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (about_dialog), documenters);\n"
3000#| "  gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (about_dialog), \"GNOME Developer Website\");\n"
3001#| "  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about_dialog), \"http://developer.gnome.org\");\n"
3002#| "\n"
3003#| "  /* We do not wish to show the title, which in this case would be\n"
3004#| "   * \"AboutDialog Example\". We have to reset the title of the messagedialog\n"
3005#| "   * window after setting the program name.\n"
3006#| "   */\n"
3007#| "  gtk_window_set_title (GTK_WINDOW (about_dialog), \"\");\n"
3008#| "\n"
3009#| "  /* To close the aboutdialog when \"close\" is clicked we connect the response\n"
3010#| "   * signal to on_close\n"
3011#| "   */\n"
3012#| "  g_signal_connect (GTK_DIALOG (about_dialog), \"response\",\n"
3013#| "                    G_CALLBACK (on_close), NULL);\n"
3014#| "\n"
3015#| "  /* Show the about dialog */\n"
3016#| "  gtk_widget_show (about_dialog);\n"
3017#| "}\n"
3018#| "\n"
3019#| "static void\n"
3020#| "activate (GtkApplication *app,\n"
3021#| "          gpointer        user_data)\n"
3022#| "{\n"
3023#| "  GtkWidget *window;\n"
3024#| "\n"
3025#| "  GSimpleAction *about_action;\n"
3026#| "\n"
3027#| "  /* Create a window with a title and a default size */\n"
3028#| "  window = gtk_application_window_new (app);\n"
3029#| "  gtk_window_set_title (GTK_WINDOW (window), \"AboutDialog Example\");\n"
3030#| "  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);\n"
3031#| "\n"
3032#| "  /* Create a new simple action, giving it a NULL parameter type. It will\n"
3033#| "   * always be NULL for actions invoked from a menu. (e.g clicking on an \"ok\"\n"
3034#| "   * or \"cancel\" button)\n"
3035#| "   */\n"
3036#| "  about_action = g_simple_action_new (\"about\", NULL);\n"
3037#| "\n"
3038#| "  /* Connect the \"activate\" signal to the appropriate callback function.\n"
3039#| "   * It will indicate that the action was just activated.\n"
3040#| "   */\n"
3041#| "  g_signal_connect (about_action, \"activate\", G_CALLBACK (about_cb),\n"
3042#| "                    GTK_WINDOW (window));\n"
3043#| "\n"
3044#| "  /* Adds the about_action to the overall action map. An Action map is an\n"
3045#| "   * interface that contains a number of named GAction instances\n"
3046#| "   * (such as about_action)\n"
3047#| "   */\n"
3048#| "  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (about_action));\n"
3049#| "\n"
3050#| "  gtk_widget_show_all (window);\n"
3051#| "}\n"
3052#| "\n"
3053#| "/* Callback function for the response signal \"activate\" from the \"quit\" action\n"
3054#| " * found in the function directly below.\n"
3055#| " */\n"
3056#| "static void\n"
3057#| "quit_cb (GSimpleAction *simple,\n"
3058#| "         GVariant      *parameter,\n"
3059#| "         gpointer       user_data)\n"
3060#| "{\n"
3061#| "  GApplication *application = user_data;\n"
3062#| "\n"
3063#| "  g_application_quit (application);\n"
3064#| "}\n"
3065#| "\n"
3066#| "/* Startup function for the menu we are creating in this sample */\n"
3067#| "static void\n"
3068#| "startup (GApplication *app,\n"
3069#| "         gpointer      user_data)\n"
3070#| "{\n"
3071#| "  GMenu *menu;\n"
3072#| "  GSimpleAction *quit_action;\n"
3073#| "\n"
3074#| "  /* Initialize the GMenu, and add a menu item with label \"About\" and action\n"
3075#| "   * \"win.about\". Also add another menu item with label \"Quit\" and action\n"
3076#| "   * \"app.quit\"\n"
3077#| "   */\n"
3078#| "  menu = g_menu_new ();\n"
3079#| "  g_menu_append (menu, \"About\", \"win.about\");\n"
3080#| "  g_menu_append (menu, \"Quit\", \"app.quit\");\n"
3081#| "\n"
3082#| "  /* Create a new simple action for the application. (In this case it is the\n"
3083#| "   * \"quit\" action.\n"
3084#| "   */\n"
3085#| "  quit_action = g_simple_action_new (\"quit\", NULL);\n"
3086#| "\n"
3087#| "  /* Ensure that the menu we have just created is set for the overall application */\n"
3088#| "  gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (menu));\n"
3089#| "\n"
3090#| "  g_signal_connect (quit_action,\n"
3091#| "                    \"activate\",\n"
3092#| "                    G_CALLBACK (quit_cb),\n"
3093#| "                    app);\n"
3094#| "\n"
3095#| "  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
3096#| "}\n"
3097#| "\n"
3098#| "/* Startup function for the application */\n"
3099#| "int\n"
3100#| "main (int argc, char **argv)\n"
3101#| "{\n"
3102#| "  GtkApplication *app;\n"
3103#| "  int status;\n"
3104#| "\n"
3105#| "  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
3106#| "  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
3107#| "  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
3108#| "  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
3109#| "  g_object_unref (app);\n"
3110#| "\n"
3111#| "  return status;\n"
3112#| "}\n"
3113msgid ""
3114"\n"
3115"#include &lt;gtk/gtk.h&gt;\n"
3116"\n"
3117"/* Callback function in which reacts to the \"response\" signal from the user in\n"
3118" * the message dialog window.\n"
3119" * This function is used to destroy the dialog window.\n"
3120" */\n"
3121"static void\n"
3122"on_close (GtkDialog *dialog,\n"
3123"          gint       response_id,\n"
3124"          gpointer   user_data)\n"
3125"{\n"
3126"  /* This will cause the dialog to be destroyed */\n"
3127"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
3128"}\n"
3129"\n"
3130"/* Callback function for the response signal \"activate\" related to the SimpleAction\n"
3131" * \"about_action\".\n"
3132" * This function is used to cause the about dialog window to popup.\n"
3133" */\n"
3134"static void\n"
3135"about_cb (GSimpleAction *simple,\n"
3136"          GVariant      *parameter,\n"
3137"          gpointer       user_data)\n"
3138"{\n"
3139"  GtkWidget *about_dialog;\n"
3140"\n"
3141"  about_dialog = gtk_about_dialog_new ();\n"
3142"\n"
3143"  /* Lists of authors/ documenters to be used later, they must be initialized\n"
3144"   * in a null terminated array of strings.\n"
3145"   */\n"
3146"  const gchar *authors[] = {\"GNOME Documentation Team\", NULL};\n"
3147"  const gchar *documenters[] = {\"GNOME Documentation Team\", NULL};\n"
3148"\n"
3149"  /* We fill in the information for the about dialog */\n"
3150"  gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about_dialog), \"AboutDialog Example\");\n"
3151"  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about_dialog), \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\");\n"
3152"  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about_dialog), authors);\n"
3153"  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (about_dialog), documenters);\n"
3154"  gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (about_dialog), \"GNOME Developer Website\");\n"
3155"  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about_dialog), \"http://developer.gnome.org\");\n"
3156"\n"
3157"  /* We do not wish to show the title, which in this case would be\n"
3158"   * \"AboutDialog Example\". We have to reset the title of the messagedialog\n"
3159"   * window after setting the program name.\n"
3160"   */\n"
3161"  gtk_window_set_title (GTK_WINDOW (about_dialog), \"\");\n"
3162"\n"
3163"  /* To close the aboutdialog when \"close\" is clicked we connect the response\n"
3164"   * signal to on_close\n"
3165"   */\n"
3166"  g_signal_connect (GTK_DIALOG (about_dialog), \"response\",\n"
3167"                    G_CALLBACK (on_close), NULL);\n"
3168"\n"
3169"  /* Show the about dialog */\n"
3170"  gtk_widget_show (about_dialog);\n"
3171"}\n"
3172"\n"
3173"static void\n"
3174"activate (GtkApplication *app,\n"
3175"          gpointer        user_data)\n"
3176"{\n"
3177"  GtkWidget *window;\n"
3178"\n"
3179"  GSimpleAction *about_action;\n"
3180"\n"
3181"  /* Create a window with a title and a default size */\n"
3182"  window = gtk_application_window_new (app);\n"
3183"  gtk_window_set_title (GTK_WINDOW (window), \"AboutDialog Example\");\n"
3184"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);\n"
3185"\n"
3186"  /* Create a new simple action, giving it a NULL parameter type. It will\n"
3187"   * always be NULL for actions invoked from a menu. (e.g clicking on an \"ok\"\n"
3188"   * or \"cancel\" button)\n"
3189"   */\n"
3190"  about_action = g_simple_action_new (\"about\", NULL);\n"
3191"\n"
3192"  /* Connect the \"activate\" signal to the appropriate callback function.\n"
3193"   * It will indicate that the action was just activated.\n"
3194"   */\n"
3195"  g_signal_connect (about_action, \"activate\", G_CALLBACK (about_cb),\n"
3196"                    GTK_WINDOW (window));\n"
3197"\n"
3198"  /* Adds the about_action to the overall action map. An Action map is an\n"
3199"   * interface that contains a number of named GAction instances\n"
3200"   * (such as about_action)\n"
3201"   */\n"
3202"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (about_action));\n"
3203"\n"
3204"  gtk_widget_show_all (window);\n"
3205"}\n"
3206"\n"
3207"/* Callback function for the response signal \"activate\" from the \"quit\" action\n"
3208" * found in the function directly below.\n"
3209" */\n"
3210"static void\n"
3211"quit_cb (GSimpleAction *simple,\n"
3212"         GVariant      *parameter,\n"
3213"         gpointer       user_data)\n"
3214"{\n"
3215"  GApplication *application = user_data;\n"
3216"\n"
3217"  g_application_quit (application);\n"
3218"}\n"
3219"\n"
3220"/* Startup function for the menu we are creating in this sample */\n"
3221"static void\n"
3222"startup (GApplication *app,\n"
3223"         gpointer      user_data)\n"
3224"{\n"
3225"  GMenu *menu;\n"
3226"  GSimpleAction *quit_action;\n"
3227"\n"
3228"  /* Initialize the GMenu, and add a menu item with label \"About\" and action\n"
3229"   * \"win.about\". Also add another menu item with label \"Quit\" and action\n"
3230"   * \"app.quit\"\n"
3231"   */\n"
3232"  menu = g_menu_new ();\n"
3233"  g_menu_append (menu, \"About\", \"win.about\");\n"
3234"  g_menu_append (menu, \"Quit\", \"app.quit\");\n"
3235"\n"
3236"  /* Create a new simple action for the application. (In this case it is the\n"
3237"   * \"quit\" action.\n"
3238"   */\n"
3239"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
3240"\n"
3241"  /* Ensure that the menu we have just created is set for the overall application */\n"
3242"  gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (menu));\n"
3243"\n"
3244"  g_signal_connect (quit_action,\n"
3245"                    \"activate\",\n"
3246"                    G_CALLBACK (quit_cb),\n"
3247"                    app);\n"
3248"\n"
3249"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
3250"}\n"
3251"\n"
3252"/* Startup function for the application */\n"
3253"int\n"
3254"main (int argc, char **argv)\n"
3255"{\n"
3256"  GtkApplication *app;\n"
3257"  int status;\n"
3258"\n"
3259"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
3260"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
3261"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
3262"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
3263"  g_object_unref (app);\n"
3264"\n"
3265"  return status;\n"
3266"}\n"
3267msgstr ""
3268"\n"
3269"#include &lt;gtk/gtk.h&gt;\n"
3270"\n"
3271"/* Callback function in which reacts to the \"response\" signal from the user in\n"
3272" * the message dialog window.\n"
3273" * This function is used to destroy the dialog window.\n"
3274" */\n"
3275"static void\n"
3276"on_close (GtkDialog *dialog,\n"
3277"          gint       response_id,\n"
3278"          gpointer   user_data)\n"
3279"{\n"
3280"  /* This will cause the dialog to be destroyed */\n"
3281"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
3282"}\n"
3283"\n"
3284"/* Callback function for the response signal \"activate\" related to the SimpleAction\n"
3285" * \"about_action\".\n"
3286" * This function is used to cause the about dialog window to popup.\n"
3287" */\n"
3288"static void\n"
3289"about_cb (GSimpleAction *simple,\n"
3290"          GVariant      *parameter,\n"
3291"          gpointer       user_data)\n"
3292"{\n"
3293"  GtkWidget *about_dialog;\n"
3294"\n"
3295"  about_dialog = gtk_about_dialog_new ();\n"
3296"\n"
3297"  /* Lists of authors/ documenters to be used later, they must be initialized\n"
3298"   * in a null terminated array of strings.\n"
3299"   */\n"
3300"  const gchar *authors[] = {\"GNOME Documentation Team\", NULL};\n"
3301"  const gchar *documenters[] = {\"GNOME Documentation Team\", NULL};\n"
3302"\n"
3303"  /* We fill in the information for the about dialog */\n"
3304"  gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about_dialog), \"AboutDialog Example\");\n"
3305"  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about_dialog), \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\");\n"
3306"  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about_dialog), authors);\n"
3307"  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (about_dialog), documenters);\n"
3308"  gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (about_dialog), \"GNOME Developer Website\");\n"
3309"  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about_dialog), \"http://developer.gnome.org\");\n"
3310"\n"
3311"  /* We do not wish to show the title, which in this case would be\n"
3312"   * \"AboutDialog Example\". We have to reset the title of the messagedialog\n"
3313"   * window after setting the program name.\n"
3314"   */\n"
3315"  gtk_window_set_title (GTK_WINDOW (about_dialog), \"\");\n"
3316"\n"
3317"  /* To close the aboutdialog when \"close\" is clicked we connect the response\n"
3318"   * signal to on_close\n"
3319"   */\n"
3320"  g_signal_connect (GTK_DIALOG (about_dialog), \"response\",\n"
3321"                    G_CALLBACK (on_close), NULL);\n"
3322"\n"
3323"  /* Show the about dialog */\n"
3324"  gtk_widget_show (about_dialog);\n"
3325"}\n"
3326"\n"
3327"static void\n"
3328"activate (GtkApplication *app,\n"
3329"          gpointer        user_data)\n"
3330"{\n"
3331"  GtkWidget *window;\n"
3332"\n"
3333"  GSimpleAction *about_action;\n"
3334"\n"
3335"  /* Create a window with a title and a default size */\n"
3336"  window = gtk_application_window_new (app);\n"
3337"  gtk_window_set_title (GTK_WINDOW (window), \"AboutDialog Example\");\n"
3338"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);\n"
3339"\n"
3340"  /* Create a new simple action, giving it a NULL parameter type. It will\n"
3341"   * always be NULL for actions invoked from a menu. (e.g clicking on an \"ok\"\n"
3342"   * or \"cancel\" button)\n"
3343"   */\n"
3344"  about_action = g_simple_action_new (\"about\", NULL);\n"
3345"\n"
3346"  /* Connect the \"activate\" signal to the appropriate callback function.\n"
3347"   * It will indicate that the action was just activated.\n"
3348"   */\n"
3349"  g_signal_connect (about_action, \"activate\", G_CALLBACK (about_cb),\n"
3350"                    GTK_WINDOW (window));\n"
3351"\n"
3352"  /* Adds the about_action to the overall action map. An Action map is an\n"
3353"   * interface that contains a number of named GAction instances\n"
3354"   * (such as about_action)\n"
3355"   */\n"
3356"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (about_action));\n"
3357"\n"
3358"  gtk_widget_show_all (window);\n"
3359"}\n"
3360"\n"
3361"/* Callback function for the response signal \"activate\" from the \"quit\" action\n"
3362" * found in the function directly below.\n"
3363" */\n"
3364"static void\n"
3365"quit_cb (GSimpleAction *simple,\n"
3366"         GVariant      *parameter,\n"
3367"         gpointer       user_data)\n"
3368"{\n"
3369"  GApplication *application = user_data;\n"
3370"\n"
3371"  g_application_quit (application);\n"
3372"}\n"
3373"\n"
3374"/* Startup function for the menu we are creating in this sample */\n"
3375"static void\n"
3376"startup (GApplication *app,\n"
3377"         gpointer      user_data)\n"
3378"{\n"
3379"  GMenu *menu;\n"
3380"  GSimpleAction *quit_action;\n"
3381"\n"
3382"  /* Initialize the GMenu, and add a menu item with label \"About\" and action\n"
3383"   * \"win.about\". Also add another menu item with label \"Quit\" and action\n"
3384"   * \"app.quit\"\n"
3385"   */\n"
3386"  menu = g_menu_new ();\n"
3387"  g_menu_append (menu, \"About\", \"win.about\");\n"
3388"  g_menu_append (menu, \"Quit\", \"app.quit\");\n"
3389"\n"
3390"  /* Create a new simple action for the application. (In this case it is the\n"
3391"   * \"quit\" action.\n"
3392"   */\n"
3393"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
3394"\n"
3395"  /* Ensure that the menu we have just created is set for the overall application */\n"
3396"  gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (menu));\n"
3397"\n"
3398"  g_signal_connect (quit_action,\n"
3399"                    \"activate\",\n"
3400"                    G_CALLBACK (quit_cb),\n"
3401"                    app);\n"
3402"\n"
3403"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
3404"}\n"
3405"\n"
3406"/* Startup function for the application */\n"
3407"int\n"
3408"main (int argc, char **argv)\n"
3409"{\n"
3410"  GtkApplication *app;\n"
3411"  int status;\n"
3412"\n"
3413"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
3414"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
3415"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
3416"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
3417"  g_object_unref (app);\n"
3418"\n"
3419"  return status;\n"
3420"}\n"
3421
3422#. (itstool) path: page/p
3423#. (itstool) path: section/p
3424#: C/aboutdialog.c.page:31 C/aboutdialog.js.page:25 C/aboutdialog.py.page:42 C/aboutdialog.vala.page:35
3425#: C/button.c.page:30 C/button.js.page:27 C/button.py.page:53 C/buttonbox.js.page:36 C/buttonbox.py.page:47
3426#: C/checkbutton.c.page:26 C/checkbutton.py.page:43 C/checkbutton.vala.page:26 C/colorbutton.js.page:34
3427#: C/colorbutton.py.page:41 C/colorbutton.vala.page:28 C/comboboxtext.js.page:177 C/combobox.c.page:31
3428#: C/combobox.js.page:234 C/combobox.py.page:43 C/combobox.vala.page:26 C/combobox_multicolumn.py.page:42
3429#: C/combobox_multicolumn.vala.page:36 C/dialog.c.page:30 C/dialog.js.page:26 C/dialog.py.page:47
3430#: C/dialog.vala.page:28 C/entry.c.page:28 C/entry.js.page:26 C/entry.py.page:62 C/entry.vala.page:26
3431#: C/filechooserdialog.py.page:71 C/filechooserdialog.vala.page:36 C/fontchooserwidget.js.page:35
3432#: C/fontchooserwidget.py.page:45 C/fontchooserwidget.vala.page:35 C/gmenu.c.page:28 C/gmenu.js.page:26
3433#: C/gmenu.py.page:78 C/gmenu.vala.page:35 C/grid.c.page:28 C/grid.js.page:30 C/grid.py.page:55 C/grid.vala.page:28
3434#: C/GtkApplicationWindow.c.page:26 C/GtkApplicationWindow.js.page:27 C/GtkApplicationWindow.py.page:51
3435#: C/GtkApplicationWindow.vala.page:27 C/image.c.page:29 C/image.js.page:28 C/image.py.page:128 C/image.vala.page:28
3436#: C/label.c.page:33 C/label.js.page:26 C/label.py.page:103 C/label.vala.page:27 C/linkbutton.c.page:28
3437#: C/linkbutton.js.page:26 C/linkbutton.py.page:45 C/linkbutton.vala.page:26 C/menubar.c.page:33
3438#: C/menubar.py.page:184 C/menubar.vala.page:188 C/menubutton.c.page:36 C/menubutton.js.page:29
3439#: C/menubutton.py.page:54 C/menubutton.vala.page:29 C/messagedialog.c.page:32 C/messagedialog.js.page:190
3440#: C/messagedialog.py.page:55 C/messagedialog.vala.page:27 C/paned.c.page:34 C/paned.js.page:34 C/paned.py.page:40
3441#: C/paned.vala.page:34 C/progressbar.c.page:29 C/progressbar.js.page:35 C/progressbar.py.page:55
3442#: C/progressbar.vala.page:26 C/radiobutton.c.page:30 C/radiobutton.py.page:47 C/radiobutton.vala.page:29
3443#: C/scale.c.page:30 C/scale.py.page:55 C/scale.vala.page:28 C/scrolledwindow.c.page:30 C/scrolledwindow.js.page:34
3444#: C/scrolledwindow.py.page:43 C/scrolledwindow.vala.page:27 C/separator.c.page:36 C/separator.py.page:37
3445#: C/separator.vala.page:38 C/spinbutton.c.page:31 C/spinbutton.py.page:47 C/spinbutton.vala.page:28
3446#: C/spinner.c.page:29 C/spinner.js.page:26 C/spinner.py.page:40 C/spinner.vala.page:26 C/statusbar.c.page:32
3447#: C/statusbar.py.page:51 C/statusbar.vala.page:29 C/switch.c.page:29 C/switch.py.page:43 C/switch.vala.page:32
3448#: C/textview.c.page:32 C/textview.py.page:94 C/textview.vala.page:31 C/togglebutton.c.page:32
3449#: C/togglebutton.py.page:42 C/togglebutton.vala.page:29 C/toolbar.c.page:31 C/toolbar.js.page:27
3450#: C/toolbar.py.page:53 C/toolbar.vala.page:30 C/toolbar_builder.py.page:192 C/toolbar_builder.vala.page:147
3451#: C/tooltip.c.page:36 C/tooltip.js.page:35 C/tooltip.py.page:57 C/tooltip.vala.page:36
3452#: C/treeview_advanced_liststore.py.page:42 C/treeview_cellrenderertoggle.py.page:42
3453#: C/treeview_simple_liststore.js.page:273 C/treeview_simple_liststore.py.page:43
3454#: C/treeview_simple_liststore.vala.page:28 C/treeview_treestore.py.page:42 C/widget_drawing.py.page:36
3455#: C/window.c.page:30 C/window.py.page:62 C/window.vala.page:34
3456msgid "In this sample we used the following:"
3457msgstr "이 예제는 다음 참고자료가 필요합니다:"
3458
3459#. (itstool) path: item/p
3460#: C/aboutdialog.c.page:35 C/button.c.page:34 C/combobox.c.page:35 C/dialog.c.page:34 C/entry.c.page:32
3461#: C/grid.c.page:32 C/GtkApplicationWindow.c.page:30 C/image.c.page:33 C/label.c.page:37 C/linkbutton.c.page:32
3462#: C/messagedialog.c.page:36 C/progressbar.c.page:33 C/radiobutton.c.page:34 C/scale.c.page:34 C/spinbutton.c.page:35
3463#: C/spinner.c.page:33 C/statusbar.c.page:36 C/switch.c.page:33 C/textview.c.page:36 C/togglebutton.c.page:36
3464#: C/window.c.page:34
3465msgid "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkApplication.html\">GtkApplication</link>"
3466msgstr "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkApplication.html\">GtkApplication</link>"
3467
3468#. (itstool) path: item/p
3469#: C/aboutdialog.c.page:36 C/button.c.page:35 C/combobox.c.page:36 C/dialog.c.page:35 C/entry.c.page:33
3470#: C/grid.c.page:33 C/linkbutton.c.page:33 C/messagedialog.c.page:38 C/progressbar.c.page:34 C/radiobutton.c.page:35
3471#: C/scale.c.page:35 C/spinbutton.c.page:36 C/spinner.c.page:34 C/statusbar.c.page:37 C/switch.c.page:34
3472#: C/textview.c.page:37 C/togglebutton.c.page:37 C/window.c.page:35
3473msgid "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkWindow.html\">GtkWindow</link>"
3474msgstr "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkWindow.html\">GtkWindow</link>"
3475
3476#. (itstool) path: item/p
3477#: C/aboutdialog.c.page:37
3478msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkAboutDialog.html\">GtkAboutDialog</link>"
3479msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkAboutDialog.html\">GtkAboutDialog</link>"
3480
3481#. (itstool) path: item/p
3482#: C/aboutdialog.c.page:38 C/aboutdialog.py.page:48 C/messagedialog.c.page:42 C/messagedialog.py.page:64
3483msgid "<link href=\"http://developer.gnome.org/gio/stable/GMenu.html\">GMenu</link>"
3484msgstr "<link href=\"http://developer.gnome.org/gio/stable/GMenu.html\">GMenu</link>"
3485
3486#. (itstool) path: item/p
3487#: C/aboutdialog.c.page:39 C/messagedialog.c.page:41
3488msgid "<link href=\"http://developer.gnome.org/gio/stable/GActionMap.html\">GActionMap</link>"
3489msgstr "<link href=\"http://developer.gnome.org/gio/stable/GActionMap.html\">GActionMap</link>"
3490
3491#. (itstool) path: info/title
3492#: C/aboutdialog.js.page:7
3493msgctxt "text"
3494msgid "AboutDialog (JavaScript)"
3495msgstr "AboutDialog(JavaScript)"
3496
3497#. (itstool) path: page/p
3498#: C/aboutdialog.js.page:22
3499msgid ""
3500"A modal dialog window which shows information about an application and its creators. This one is triggered by "
3501"clicking \"About\" in the application's menu, which is normally a good place to put it."
3502msgstr ""
3503"프로그램과 만든 사람 정보를 나타내는 모달 대화상자 창입니다. \"정보\" 항목을 두기 딱 좋은 프로그램 메뉴에서 \"정보"
3504"\"를 누르면 정보 모달 대화상자 창이 뜹니다."
3505
3506#. (itstool) path: page/code
3507#: C/aboutdialog.js.page:24
3508#, no-wrap
3509msgid ""
3510"#!/usr/bin/gjs\n"
3511"\n"
3512"imports.gi.versions.Gtk = '3.0';\n"
3513"\n"
3514"const Gio = imports.gi.Gio;\n"
3515"const GLib = imports.gi.GLib;\n"
3516"const Gtk = imports.gi.Gtk;\n"
3517"\n"
3518"class AboutDialogExample {\n"
3519"\n"
3520"    // Create the application itself\n"
3521"    constructor() {\n"
3522"        this.application = new Gtk.Application({\n"
3523"            application_id: 'org.example.jsaboutdialog',\n"
3524"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
3525"        });\n"
3526"\n"
3527"        // Connect 'activate' and 'startup' signals to the callback functions\n"
3528"        this.application.connect('activate', this._onActivate.bind(this));\n"
3529"        this.application.connect('startup', this._onStartup.bind(this));\n"
3530"    }\n"
3531"\n"
3532"    // Callback function for 'activate' signal presents windows when active\n"
3533"    _onActivate() {\n"
3534"        this._window.present();\n"
3535"    }\n"
3536"\n"
3537"    // Callback function for 'startup' signal creates the menu and builds the UI\n"
3538"    _onStartup() {\n"
3539"        this._initMenus();\n"
3540"        this._buildUI();\n"
3541"    }\n"
3542"\n"
3543"    // Build the application's UI\n"
3544"    _buildUI() {\n"
3545"        // Create the application window\n"
3546"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
3547"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
3548"                                                   title: \"AboutDialog Example\",\n"
3549"                                                   default_height: 250,\n"
3550"                                                   default_width: 350 });\n"
3551"\n"
3552"        // Show the window and all child widgets\n"
3553"        this._window.show_all();\n"
3554"    }\n"
3555"\n"
3556"    // Create the application menu\n"
3557"    _initMenus() {\n"
3558"        let menu = new Gio.Menu();\n"
3559"        menu.append(\"About\", 'app.about');\n"
3560"        menu.append(\"Quit\",'app.quit');\n"
3561"        this.application.set_app_menu(menu);\n"
3562"\n"
3563"        // Create the \"About\" menu option and have it call the _showAbout() function\n"
3564"        let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
3565"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
3566"        this.application.add_action(aboutAction);\n"
3567"\n"
3568"        // Create the \"Quit\" menu option and have it close the window\n"
3569"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
3570"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
3571"        this.application.add_action(quitAction);\n"
3572"    }\n"
3573"\n"
3574"    _showAbout() {\n"
3575"\n"
3576"        // String arrays of the names of the people involved in the project\n"
3577"        var authors = [\"GNOME Documentation Team\"];\n"
3578"        var documenters = [\"GNOME Documentation Team\"];\n"
3579"\n"
3580"        // Create the About dialog\n"
3581"        let aboutDialog = new Gtk.AboutDialog({ title: \"AboutDialog Example\",\n"
3582"                                                program_name: \"GtkApplication Example\",\n"
3583"                                                copyright: \"Copyright \\xa9 2012 GNOME Documentation Team\",\n"
3584"                                                authors: authors,\n"
3585"                                                documenters: documenters,\n"
3586"                                                website: \"http://developer.gnome.org\",\n"
3587"                                                website_label: \"GNOME Developer Website\" });\n"
3588"\n"
3589"        // Attach the About dialog to the window\n"
3590"        aboutDialog.modal = true;\n"
3591"        aboutDialog.transient_for = this._window;\n"
3592"\n"
3593"        // Show the About dialog\n"
3594"        aboutDialog.show();\n"
3595"\n"
3596"        // Connect the Close button to the destroy signal for the dialog\n"
3597"        aboutDialog.connect('response', function() {\n"
3598"            aboutDialog.destroy();\n"
3599"        });\n"
3600"    }\n"
3601"};\n"
3602"\n"
3603"// Run the application\n"
3604"let app = new AboutDialogExample();\n"
3605"app.application.run(ARGV);\n"
3606msgstr ""
3607"#!/usr/bin/gjs\n"
3608"\n"
3609"imports.gi.versions.Gtk = '3.0';\n"
3610"\n"
3611"const Gio = imports.gi.Gio;\n"
3612"const GLib = imports.gi.GLib;\n"
3613"const Gtk = imports.gi.Gtk;\n"
3614"\n"
3615"class AboutDialogExample {\n"
3616"\n"
3617"    // Create the application itself\n"
3618"    constructor() {\n"
3619"        this.application = new Gtk.Application({\n"
3620"            application_id: 'org.example.jsaboutdialog',\n"
3621"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
3622"        });\n"
3623"\n"
3624"        // Connect 'activate' and 'startup' signals to the callback functions\n"
3625"        this.application.connect('activate', this._onActivate.bind(this));\n"
3626"        this.application.connect('startup', this._onStartup.bind(this));\n"
3627"    }\n"
3628"\n"
3629"    // Callback function for 'activate' signal presents windows when active\n"
3630"    _onActivate() {\n"
3631"        this._window.present();\n"
3632"    }\n"
3633"\n"
3634"    // Callback function for 'startup' signal creates the menu and builds the UI\n"
3635"    _onStartup() {\n"
3636"        this._initMenus();\n"
3637"        this._buildUI();\n"
3638"    }\n"
3639"\n"
3640"    // Build the application's UI\n"
3641"    _buildUI() {\n"
3642"        // Create the application window\n"
3643"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
3644"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
3645"                                                   title: \"AboutDialog Example\",\n"
3646"                                                   default_height: 250,\n"
3647"                                                   default_width: 350 });\n"
3648"\n"
3649"        // Show the window and all child widgets\n"
3650"        this._window.show_all();\n"
3651"    }\n"
3652"\n"
3653"    // Create the application menu\n"
3654"    _initMenus() {\n"
3655"        let menu = new Gio.Menu();\n"
3656"        menu.append(\"About\", 'app.about');\n"
3657"        menu.append(\"Quit\",'app.quit');\n"
3658"        this.application.set_app_menu(menu);\n"
3659"\n"
3660"        // Create the \"About\" menu option and have it call the _showAbout() function\n"
3661"        let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
3662"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
3663"        this.application.add_action(aboutAction);\n"
3664"\n"
3665"        // Create the \"Quit\" menu option and have it close the window\n"
3666"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
3667"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
3668"        this.application.add_action(quitAction);\n"
3669"    }\n"
3670"\n"
3671"    _showAbout() {\n"
3672"\n"
3673"        // String arrays of the names of the people involved in the project\n"
3674"        var authors = [\"GNOME Documentation Team\"];\n"
3675"        var documenters = [\"GNOME Documentation Team\"];\n"
3676"\n"
3677"        // Create the About dialog\n"
3678"        let aboutDialog = new Gtk.AboutDialog({ title: \"AboutDialog Example\",\n"
3679"                                                program_name: \"GtkApplication Example\",\n"
3680"                                                copyright: \"Copyright \\xa9 2012 GNOME Documentation Team\",\n"
3681"                                                authors: authors,\n"
3682"                                                documenters: documenters,\n"
3683"                                                website: \"http://developer.gnome.org\",\n"
3684"                                                website_label: \"GNOME Developer Website\" });\n"
3685"\n"
3686"        // Attach the About dialog to the window\n"
3687"        aboutDialog.modal = true;\n"
3688"        aboutDialog.transient_for = this._window;\n"
3689"\n"
3690"        // Show the About dialog\n"
3691"        aboutDialog.show();\n"
3692"\n"
3693"        // Connect the Close button to the destroy signal for the dialog\n"
3694"        aboutDialog.connect('response', function() {\n"
3695"            aboutDialog.destroy();\n"
3696"        });\n"
3697"    }\n"
3698"};\n"
3699"\n"
3700"// Run the application\n"
3701"let app = new AboutDialogExample();\n"
3702"app.application.run(ARGV);\n"
3703
3704#. (itstool) path: item/p
3705#: C/aboutdialog.js.page:29 C/gmenu.c.page:32 C/gmenu.js.page:30 C/gmenu.py.page:80 C/messagedialog.js.page:194
3706#: C/switch.js.page:266
3707msgid "<link href=\"http://developer.gnome.org/gio/unstable/GMenu.html\">GMenu</link>"
3708msgstr "<link href=\"http://developer.gnome.org/gio/unstable/GMenu.html\">GMenu</link>"
3709
3710#. (itstool) path: item/p
3711#: C/aboutdialog.js.page:30 C/filechooserdialog.py.page:80 C/gmenu.c.page:33 C/gmenu.js.page:31 C/gmenu.py.page:81
3712#: C/menubar.c.page:39 C/messagedialog.js.page:195 C/messagedialog.py.page:62 C/switch.js.page:267
3713msgid "<link href=\"http://developer.gnome.org/gio/stable/GSimpleAction.html\">GSimpleAction</link>"
3714msgstr "<link href=\"http://developer.gnome.org/gio/stable/GSimpleAction.html\">GSimpleAction</link>"
3715
3716#. (itstool) path: item/p
3717#: C/aboutdialog.js.page:31
3718msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.AboutDialog.html\">Gtk.AboutDialog</link>"
3719msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.AboutDialog.html\">Gtk.AboutDialog</link>"
3720
3721#. (itstool) path: item/p
3722#: C/aboutdialog.js.page:32 C/button.js.page:31 C/checkbutton.js.page:137 C/comboboxtext.js.page:181
3723#: 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
3724#: C/image.js.page:32 C/label.js.page:30 C/linkbutton.js.page:30 C/messagedialog.js.page:196 C/progressbar.js.page:40
3725#: C/radiobutton.js.page:276 C/scale.js.page:211 C/spinbutton.js.page:202 C/spinner.js.page:31
3726#: C/statusbar.js.page:223 C/switch.js.page:268 C/textview.js.page:250 C/togglebutton.js.page:155
3727#: C/treeview_simple_liststore.js.page:277 C/window.js.page:39
3728msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>"
3729msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>"
3730
3731#. (itstool) path: item/p
3732#: C/aboutdialog.js.page:33 C/button.js.page:32 C/checkbutton.js.page:138 C/comboboxtext.js.page:182
3733#: 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
3734#: C/image.js.page:33 C/label.js.page:31 C/linkbutton.js.page:31 C/messagedialog.js.page:197 C/progressbar.js.page:41
3735#: C/radiobutton.js.page:277 C/scale.js.page:212 C/spinbutton.js.page:203 C/spinner.js.page:32
3736#: C/statusbar.js.page:224 C/switch.js.page:269 C/textview.js.page:251 C/togglebutton.js.page:156
3737#: C/treeview_simple_liststore.js.page:278
3738msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkApplicationWindow.html\">Gtk.ApplicationWindow</link>"
3739msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkApplicationWindow.html\">Gtk.ApplicationWindow</link>"
3740
3741#. (itstool) path: info/title
3742#: C/aboutdialog.py.page:8
3743msgctxt "text"
3744msgid "AboutDialog (Python)"
3745msgstr "AboutDialog(Python)"
3746
3747#. (itstool) path: credit/name
3748#: C/aboutdialog.py.page:14 C/beginner.js.page:16 C/beginner.py.page:19 C/beginner.vala.page:19 C/button.py.page:15
3749#: C/buttonbox.py.page:15 C/checkbutton.py.page:14 C/colorbutton.py.page:14 C/combobox.py.page:15
3750#: C/combobox_multicolumn.py.page:14 C/dialog.py.page:15 C/entry.py.page:15 C/filechooserdialog.py.page:17
3751#: C/fontchooserwidget.py.page:15 C/gmenu.py.page:21 C/grid.py.page:21 C/GtkApplicationWindow.py.page:20
3752#: C/guitar-tuner.c.page:23 C/guitar-tuner.cpp.page:21 C/guitar-tuner.py.page:23 C/guitar-tuner.py.page:28
3753#: C/guitar-tuner.vala.page:26 C/image.py.page:15 C/image-viewer.c.page:23 C/image-viewer.cpp.page:21
3754#: C/image-viewer.js.page:23 C/image-viewer.py.page:23 C/image-viewer.vala.page:31 C/js.page:16 C/label.py.page:17
3755#: C/linkbutton.py.page:14 C/magic-mirror.vala.page:23 C/menubar.py.page:20 C/menubutton.py.page:20
3756#: C/message-board.c.page:20 C/messagedialog.py.page:14 C/model-view-controller.py.page:21 C/paned.py.page:14
3757#: C/photo-wall.c.page:22 C/progressbar.py.page:14 C/properties.py.page:21 C/py.page:15 C/radiobutton.py.page:15
3758#: C/record-collection.js.page:23 C/scale.py.page:15 C/scrolledwindow.py.page:14 C/separator.py.page:15
3759#: C/signals-callbacks.py.page:21 C/spinbutton.py.page:15 C/spinner.py.page:14 C/statusbar.py.page:15
3760#: C/strings.py.page:21 C/switch.py.page:14 C/textview.py.page:22 C/togglebutton.py.page:14 C/toolbar.py.page:15
3761#: C/toolbar_builder.py.page:22 C/tooltip.py.page:15 C/treeview_advanced_liststore.py.page:14
3762#: C/treeview_cellrenderertoggle.py.page:14 C/treeview_simple_liststore.py.page:15 C/treeview_treestore.py.page:15
3763#: C/tutorial.py.page:20 C/vala.page:15 C/weatherApp.js.page:17 C/widget_drawing.py.page:13 C/window.py.page:20
3764msgid "Marta Maria Casetti"
3765msgstr "Marta Maria Casetti"
3766
3767#. (itstool) path: info/desc
3768#: C/aboutdialog.py.page:19
3769msgid "A window that displays information about an application"
3770msgstr "프로그램 정보를 표시하는 창입니다"
3771
3772#. (itstool) path: page/p
3773#: C/aboutdialog.py.page:24
3774msgid ""
3775"An AboutDialog example using Gtk.ApplicationWindow and Menu (the \"about\" is displayed if \"About\" in the menu "
3776"is selected)."
3777msgstr "AboutDialog 예제에서는 Gtk.ApplicationWindow와 Menu를 다룹니다."
3778
3779#. (itstool) path: section/title
3780#: C/aboutdialog.py.page:29 C/button.py.page:31 C/buttonbox.js.page:30 C/buttonbox.py.page:31
3781#: C/checkbutton.py.page:29 C/colorbutton.js.page:28 C/colorbutton.py.page:29 C/combobox.py.page:30
3782#: C/combobox_multicolumn.py.page:29 C/combobox_multicolumn.vala.page:29 C/dialog.py.page:30 C/entry.py.page:35
3783#: C/filechooserdialog.py.page:53 C/fontchooserwidget.js.page:29 C/fontchooserwidget.py.page:31
3784#: C/fontchooserwidget.vala.page:29 C/gmenu.py.page:36 C/grid.py.page:37 C/GtkApplicationWindow.py.page:35
3785#: C/image.py.page:41 C/label.py.page:37 C/linkbutton.py.page:30 C/menubutton.c.page:30 C/menubutton.py.page:37
3786#: C/messagedialog.py.page:29 C/paned.c.page:28 C/paned.js.page:28 C/paned.py.page:29 C/paned.vala.page:28
3787#: C/progressbar.py.page:39 C/radiobutton.py.page:30 C/scale.py.page:30 C/scrolledwindow.js.page:28
3788#: C/scrolledwindow.py.page:29 C/separator.c.page:30 C/separator.py.page:31 C/separator.vala.page:32
3789#: C/spinbutton.py.page:30 C/spinner.py.page:29 C/statusbar.py.page:30 C/switch.py.page:31 C/textview.py.page:44
3790#: C/togglebutton.py.page:29 C/toolbar.py.page:31 C/toolbar_builder.py.page:164 C/tooltip.c.page:30
3791#: C/tooltip.js.page:29 C/tooltip.py.page:31 C/tooltip.vala.page:30 C/treeview_advanced_liststore.py.page:29
3792#: C/treeview_cellrenderertoggle.py.page:29 C/treeview_simple_liststore.py.page:30 C/treeview_treestore.py.page:30
3793#: C/widget_drawing.py.page:28 C/window.py.page:45
3794msgid "Code used to generate this example"
3795msgstr "예제 결과를 만드는 코드"
3796
3797#. (itstool) path: section/code
3798#: C/aboutdialog.py.page:31
3799#, no-wrap
3800msgid ""
3801"from gi.repository import Gtk\n"
3802"from gi.repository import Gio\n"
3803"import sys\n"
3804"\n"
3805"\n"
3806"class MyWindow(Gtk.ApplicationWindow):\n"
3807"\n"
3808"     # constructor for a window (the parent window)\n"
3809"    def __init__(self, app):\n"
3810"        Gtk.Window.__init__(self, title=\"AboutDialog Example\", application=app)\n"
3811"        self.set_default_size(200, 200)\n"
3812"\n"
3813"        # create the about_action (a Gio.SimpleAction)\n"
3814"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
3815"        # connect the signal from the action to the function about_cb()\n"
3816"        about_action.connect(\"activate\", self.about_cb)\n"
3817"        # add the action to the application\n"
3818"        app.add_action(about_action)\n"
3819"\n"
3820"    # callback function for the about_action's \"activate\" signal\n"
3821"    def about_cb(self, action, parameter):\n"
3822"        # a  Gtk.AboutDialog\n"
3823"        aboutdialog = Gtk.AboutDialog()\n"
3824"\n"
3825"        # lists of authors and documenters (will be used later)\n"
3826"        authors = [\"GNOME Documentation Team\"]\n"
3827"        documenters = [\"GNOME Documentation Team\"]\n"
3828"\n"
3829"        # we fill in the aboutdialog\n"
3830"        aboutdialog.set_program_name(\"AboutDialog Example\")\n"
3831"        aboutdialog.set_copyright(\n"
3832"            \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\")\n"
3833"        aboutdialog.set_authors(authors)\n"
3834"        aboutdialog.set_documenters(documenters)\n"
3835"        aboutdialog.set_website(\"http://developer.gnome.org\")\n"
3836"        aboutdialog.set_website_label(\"GNOME Developer Website\")\n"
3837"\n"
3838"        # we do not want to show the title, which by default would be \"About AboutDialog Example\"\n"
3839"        # we have to reset the title of the messagedialog window after setting\n"
3840"        # the program name\n"
3841"        aboutdialog.set_title(\"\")\n"
3842"\n"
3843"        # to close the aboutdialog when \"close\" is clicked we connect the\n"
3844"        # \"response\" signal to on_close\n"
3845"        aboutdialog.connect(\"response\", self.on_close)\n"
3846"        # show the aboutdialog\n"
3847"        aboutdialog.show()\n"
3848"\n"
3849"    # destroy the aboutdialog\n"
3850"    def on_close(self, action, parameter):\n"
3851"        action.destroy()\n"
3852"\n"
3853"\n"
3854"class MyApplication(Gtk.Application):\n"
3855"\n"
3856"    def __init__(self):\n"
3857"        Gtk.Application.__init__(self)\n"
3858"\n"
3859"    def do_activate(self):\n"
3860"        win = MyWindow(self)\n"
3861"        win.show_all()\n"
3862"\n"
3863"    def quit_cb(self, action, parameter):\n"
3864"        self.quit()\n"
3865"\n"
3866"    def do_startup(self):\n"
3867"        Gtk.Application.do_startup(self)\n"
3868"\n"
3869"        # create a menu (a Gio.Menu)\n"
3870"        menu = Gio.Menu()\n"
3871"        # append a menu item with label \"About\" and action \"app.about\"\n"
3872"        menu.append(\"About\", \"app.about\")\n"
3873"        # append a menu item with label \"Quit\" and action \"app.quit\"\n"
3874"        menu.append(\"Quit\", \"app.quit\")\n"
3875"        # set menu as the menu for the application\n"
3876"        self.set_app_menu(menu)\n"
3877"\n"
3878"        # a new simpleaction - for the application\n"
3879"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
3880"        quit_action.connect(\"activate\", self.quit_cb)\n"
3881"        self.add_action(quit_action)\n"
3882"\n"
3883"app = MyApplication()\n"
3884"exit_status = app.run(sys.argv)\n"
3885"sys.exit(exit_status)\n"
3886msgstr ""
3887"from gi.repository import Gtk\n"
3888"from gi.repository import Gio\n"
3889"import sys\n"
3890"\n"
3891"\n"
3892"class MyWindow(Gtk.ApplicationWindow):\n"
3893"\n"
3894"     # constructor for a window (the parent window)\n"
3895"    def __init__(self, app):\n"
3896"        Gtk.Window.__init__(self, title=\"AboutDialog Example\", application=app)\n"
3897"        self.set_default_size(200, 200)\n"
3898"\n"
3899"        # create the about_action (a Gio.SimpleAction)\n"
3900"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
3901"        # connect the signal from the action to the function about_cb()\n"
3902"        about_action.connect(\"activate\", self.about_cb)\n"
3903"        # add the action to the application\n"
3904"        app.add_action(about_action)\n"
3905"\n"
3906"    # callback function for the about_action's \"activate\" signal\n"
3907"    def about_cb(self, action, parameter):\n"
3908"        # a  Gtk.AboutDialog\n"
3909"        aboutdialog = Gtk.AboutDialog()\n"
3910"\n"
3911"        # lists of authors and documenters (will be used later)\n"
3912"        authors = [\"GNOME Documentation Team\"]\n"
3913"        documenters = [\"GNOME Documentation Team\"]\n"
3914"\n"
3915"        # we fill in the aboutdialog\n"
3916"        aboutdialog.set_program_name(\"AboutDialog Example\")\n"
3917"        aboutdialog.set_copyright(\n"
3918"            \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\")\n"
3919"        aboutdialog.set_authors(authors)\n"
3920"        aboutdialog.set_documenters(documenters)\n"
3921"        aboutdialog.set_website(\"http://developer.gnome.org\")\n"
3922"        aboutdialog.set_website_label(\"GNOME Developer Website\")\n"
3923"\n"
3924"        # we do not want to show the title, which by default would be \"About AboutDialog Example\"\n"
3925"        # we have to reset the title of the messagedialog window after setting\n"
3926"        # the program name\n"
3927"        aboutdialog.set_title(\"\")\n"
3928"\n"
3929"        # to close the aboutdialog when \"close\" is clicked we connect the\n"
3930"        # \"response\" signal to on_close\n"
3931"        aboutdialog.connect(\"response\", self.on_close)\n"
3932"        # show the aboutdialog\n"
3933"        aboutdialog.show()\n"
3934"\n"
3935"    # destroy the aboutdialog\n"
3936"    def on_close(self, action, parameter):\n"
3937"        action.destroy()\n"
3938"\n"
3939"\n"
3940"class MyApplication(Gtk.Application):\n"
3941"\n"
3942"    def __init__(self):\n"
3943"        Gtk.Application.__init__(self)\n"
3944"\n"
3945"    def do_activate(self):\n"
3946"        win = MyWindow(self)\n"
3947"        win.show_all()\n"
3948"\n"
3949"    def quit_cb(self, action, parameter):\n"
3950"        self.quit()\n"
3951"\n"
3952"    def do_startup(self):\n"
3953"        Gtk.Application.do_startup(self)\n"
3954"\n"
3955"        # create a menu (a Gio.Menu)\n"
3956"        menu = Gio.Menu()\n"
3957"        # append a menu item with label \"About\" and action \"app.about\"\n"
3958"        menu.append(\"About\", \"app.about\")\n"
3959"        # append a menu item with label \"Quit\" and action \"app.quit\"\n"
3960"        menu.append(\"Quit\", \"app.quit\")\n"
3961"        # set menu as the menu for the application\n"
3962"        self.set_app_menu(menu)\n"
3963"\n"
3964"        # a new simpleaction - for the application\n"
3965"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
3966"        quit_action.connect(\"activate\", self.quit_cb)\n"
3967"        self.add_action(quit_action)\n"
3968"\n"
3969"app = MyApplication()\n"
3970"exit_status = app.run(sys.argv)\n"
3971"sys.exit(exit_status)\n"
3972
3973#. (itstool) path: section/title
3974#: C/aboutdialog.py.page:36
3975msgid "Useful methods for an AboutDialog widget"
3976msgstr "AboutDialog 위젯에 쓸만한 메서드"
3977
3978#. (itstool) path: section/p
3979#: C/aboutdialog.py.page:37
3980msgid ""
3981"In line 15 the signal <code>\"activate\"</code> is connected to the callback function <code>about_cb()</code> "
3982"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
3983"\"signals-callbacks.py\"/> for a more detailed explanation."
3984msgstr ""
3985"15번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로 "
3986"<code>\"activate\"</code> 시그널을 <code>about_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
3987"\"signals-callbacks.py\"/>를 참조하십시오."
3988
3989#. (itstool) path: section/title
3990#: C/aboutdialog.py.page:41 C/button.py.page:52 C/buttonbox.js.page:35 C/buttonbox.py.page:46
3991#: C/checkbutton.py.page:42 C/colorbutton.js.page:33 C/colorbutton.py.page:40 C/combobox.py.page:42
3992#: C/combobox_multicolumn.py.page:41 C/combobox_multicolumn.vala.page:35 C/dialog.py.page:46 C/entry.py.page:61
3993#: C/filechooserdialog.py.page:70 C/fontchooserwidget.js.page:34 C/fontchooserwidget.py.page:44
3994#: C/fontchooserwidget.vala.page:34 C/gmenu.py.page:77 C/grid.py.page:54 C/GtkApplicationWindow.py.page:50
3995#: C/image.py.page:126 C/label.py.page:102 C/linkbutton.py.page:44 C/menubar.py.page:183 C/menubutton.c.page:35
3996#: C/menubutton.py.page:53 C/messagedialog.py.page:54 C/paned.c.page:33 C/paned.js.page:33 C/paned.py.page:39
3997#: C/paned.vala.page:33 C/progressbar.py.page:54 C/radiobutton.py.page:46 C/scale.py.page:54
3998#: C/scrolledwindow.js.page:33 C/scrolledwindow.py.page:42 C/spinbutton.py.page:46 C/spinner.py.page:39
3999#: C/statusbar.py.page:50 C/switch.py.page:42 C/textview.py.page:93 C/togglebutton.py.page:41 C/toolbar.py.page:52
4000#: C/toolbar_builder.py.page:191 C/tooltip.c.page:35 C/tooltip.js.page:34 C/tooltip.py.page:56 C/tooltip.vala.page:35
4001#: C/treeview_advanced_liststore.py.page:41 C/treeview_cellrenderertoggle.py.page:41
4002#: C/treeview_simple_liststore.py.page:42 C/treeview_treestore.py.page:41 C/widget_drawing.py.page:35
4003#: C/window.py.page:60
4004msgid "API References"
4005msgstr "API 참고서"
4006
4007#. (itstool) path: item/p
4008#: C/aboutdialog.py.page:46
4009msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkAboutDialog.html\">GtkAboutDialog</link>"
4010msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkAboutDialog.html\">GtkAboutDialog</link>"
4011
4012#. (itstool) path: item/p
4013#: C/aboutdialog.py.page:47 C/checkbutton.py.page:46 C/grid.py.page:58 C/GtkApplicationWindow.py.page:56
4014#: C/separator.c.page:38
4015msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkApplicationWindow.html\">GtkApplicationWindow</link>"
4016msgstr ""
4017"<link href=\"http://developer.gnome.org/gtk3/unstable/GtkApplicationWindow.html\">GtkApplicationWindow</link>"
4018
4019#. (itstool) path: item/p
4020#: C/aboutdialog.py.page:49 C/checkbutton.py.page:45 C/grid.py.page:57 C/GtkApplicationWindow.py.page:55
4021#: C/messagedialog.py.page:65 C/window.py.page:64
4022msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkApplication.html\">GtkApplication</link>"
4023msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkApplication.html\">GtkApplication</link>"
4024
4025#. (itstool) path: info/title
4026#: C/aboutdialog.vala.page:8
4027msgctxt "text"
4028msgid "AboutDialog (Vala)"
4029msgstr "AboutDialog(Vala)"
4030
4031#. (itstool) path: credit/name
4032#: C/aboutdialog.vala.page:15 C/gmenu.vala.page:14
4033msgid "Ryan Lortie"
4034msgstr "Ryan Lortie"
4035
4036#. (itstool) path: credit/name
4037#: C/aboutdialog.vala.page:21 C/beginner.py.page:15 C/beginner.vala.page:15 C/button.vala.page:14 C/c.page:14
4038#: C/checkbutton.c.page:13 C/checkbutton.vala.page:13 C/colorbutton.vala.page:15 C/combobox.c.page:18
4039#: C/combobox.vala.page:13 C/combobox_multicolumn.vala.page:14 C/cpp.page:11 C/dialog.vala.page:13
4040#: C/entry.vala.page:13 C/filechooserdialog.vala.page:16 C/gmenu.c.page:13 C/gmenu.js.page:13 C/gmenu.py.page:15
4041#: C/gmenu.vala.page:20 C/grid.py.page:15 C/grid.vala.page:15 C/GtkApplicationWindow.c.page:13
4042#: C/GtkApplicationWindow.js.page:13 C/GtkApplicationWindow.py.page:15 C/GtkApplicationWindow.vala.page:13
4043#: C/guitar-tuner.vala.page:22 C/hello-world.c.page:20 C/hello-world.js.page:20 C/hello-world.py.page:20
4044#: C/hello-world.vala.page:20 C/image.vala.page:13 C/image-viewer.vala.page:27 C/index.page:23 C/js.page:12
4045#: C/label.vala.page:13 C/linkbutton.vala.page:13 C/menubar.py.page:15 C/menubar.vala.page:15 C/menubutton.c.page:13
4046#: C/menubutton.py.page:14 C/menubutton.vala.page:13 C/messagedialog.vala.page:13 C/paned.c.page:13
4047#: C/paned.vala.page:13 C/progressbar.vala.page:13 C/py.page:11 C/radiobutton.vala.page:16 C/response-type.page:9
4048#: C/scale.vala.page:15 C/scrolledwindow.vala.page:14 C/separator.c.page:14 C/separator.vala.page:16
4049#: C/spinbutton.vala.page:15 C/spinner.vala.page:13 C/statusbar.vala.page:16 C/switch.vala.page:17
4050#: C/textview.vala.page:13 C/togglebutton.vala.page:16 C/toolbar.js.page:13 C/toolbar.vala.page:14
4051#: C/toolbar_builder.py.page:16 C/toolbar_builder.vala.page:15 C/tooltip.c.page:14 C/tooltip.vala.page:14
4052#: C/treeview_simple_liststore.vala.page:15 C/tutorial.py.page:15 C/vala.page:11 C/window.c.page:13
4053#: C/window.py.page:15 C/window.vala.page:13
4054msgid "Tiffany Antopolski"
4055msgstr "Tiffany Antopolski"
4056
4057#. (itstool) path: page/code
4058#: C/aboutdialog.vala.page:34
4059#, no-wrap
4060msgid ""
4061"/* A window in the application */\n"
4062"public class Window : Gtk.ApplicationWindow {\n"
4063"\n"
4064"\t/* The constructor */\n"
4065"\tpublic Window (Application app) {\n"
4066"\t\tObject (application: app, title: \"AboutDialog Example\");\n"
4067"\n"
4068"\t\tvar about_action = new SimpleAction (\"about\", null);\n"
4069"\n"
4070"\t\tabout_action.activate.connect (this.about_cb);\n"
4071"\t\tthis.add_action (about_action);\n"
4072"\t\tthis.show_all ();\n"
4073"\t}\n"
4074"\n"
4075"\t/* This is the callback function connected to the 'activate' signal\n"
4076"\t * of the SimpleAction about_action.\n"
4077"\t */\n"
4078"\tvoid about_cb (SimpleAction simple, Variant? parameter) {\n"
4079"\t\tstring[] authors = { \"GNOME Documentation Team\", null };\n"
4080"\t\tstring[] documenters = { \"GNOME Documentation Team\", null };\n"
4081"\n"
4082"\t\tGtk.show_about_dialog (this,\n"
4083"                               \"program-name\", (\"GtkApplication Example\"),\n"
4084"                               \"copyright\", (\"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\"),\n"
4085"                               \"authors\", authors,\n"
4086"                               \"documenters\", documenters,\n"
4087"                               \"website\", \"http://developer.gnome.org\",\n"
4088"                               \"website-label\", (\"GNOME Developer Website\"),\n"
4089"                               null);\n"
4090"\t}\n"
4091"}\n"
4092"\n"
4093"/* This is the Application */\n"
4094"public class Application : Gtk.Application {\n"
4095"\n"
4096"\t/* Here we override the activate signal of GLib.Application */\n"
4097"\tprotected override void activate () {\n"
4098"\t\tnew Window (this);\n"
4099"\t}\n"
4100"\n"
4101"\t/* Here we override the startup signal of GLib.Application */\n"
4102"\tprotected override void startup () {\n"
4103"\n"
4104"\t\tbase.startup ();\n"
4105"\n"
4106"\t\tvar menu = new Menu ();\n"
4107"\t\tmenu.append (\"About\", \"win.about\");\n"
4108"\t\tmenu.append (\"Quit\", \"app.quit\");\n"
4109"\t\tthis.app_menu = menu;\n"
4110"\n"
4111"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
4112"\t\t//quit_action.activate.connect (this.quit);\n"
4113"\t\tthis.add_action (quit_action);\n"
4114"\t}\n"
4115"\n"
4116"\t/* The constructor */\n"
4117"\tpublic Application () {\n"
4118"\t\tObject (application_id: \"org.example.application\");\n"
4119"\t}\n"
4120"}\n"
4121"\n"
4122"/* main function creates Application and runs it */\n"
4123"int main (string[] args) {\n"
4124"\treturn new Application ().run (args);\n"
4125"}\n"
4126msgstr ""
4127"/* A window in the application */\n"
4128"public class Window : Gtk.ApplicationWindow {\n"
4129"\n"
4130"\t/* The constructor */\n"
4131"\tpublic Window (Application app) {\n"
4132"\t\tObject (application: app, title: \"AboutDialog Example\");\n"
4133"\n"
4134"\t\tvar about_action = new SimpleAction (\"about\", null);\n"
4135"\n"
4136"\t\tabout_action.activate.connect (this.about_cb);\n"
4137"\t\tthis.add_action (about_action);\n"
4138"\t\tthis.show_all ();\n"
4139"\t}\n"
4140"\n"
4141"\t/* This is the callback function connected to the 'activate' signal\n"
4142"\t * of the SimpleAction about_action.\n"
4143"\t */\n"
4144"\tvoid about_cb (SimpleAction simple, Variant? parameter) {\n"
4145"\t\tstring[] authors = { \"GNOME Documentation Team\", null };\n"
4146"\t\tstring[] documenters = { \"GNOME Documentation Team\", null };\n"
4147"\n"
4148"\t\tGtk.show_about_dialog (this,\n"
4149"                               \"program-name\", (\"GtkApplication Example\"),\n"
4150"                               \"copyright\", (\"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\"),\n"
4151"                               \"authors\", authors,\n"
4152"                               \"documenters\", documenters,\n"
4153"                               \"website\", \"http://developer.gnome.org\",\n"
4154"                               \"website-label\", (\"GNOME Developer Website\"),\n"
4155"                               null);\n"
4156"\t}\n"
4157"}\n"
4158"\n"
4159"/* This is the Application */\n"
4160"public class Application : Gtk.Application {\n"
4161"\n"
4162"\t/* Here we override the activate signal of GLib.Application */\n"
4163"\tprotected override void activate () {\n"
4164"\t\tnew Window (this);\n"
4165"\t}\n"
4166"\n"
4167"\t/* Here we override the startup signal of GLib.Application */\n"
4168"\tprotected override void startup () {\n"
4169"\n"
4170"\t\tbase.startup ();\n"
4171"\n"
4172"\t\tvar menu = new Menu ();\n"
4173"\t\tmenu.append (\"About\", \"win.about\");\n"
4174"\t\tmenu.append (\"Quit\", \"app.quit\");\n"
4175"\t\tthis.app_menu = menu;\n"
4176"\n"
4177"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
4178"\t\t//quit_action.activate.connect (this.quit);\n"
4179"\t\tthis.add_action (quit_action);\n"
4180"\t}\n"
4181"\n"
4182"\t/* The constructor */\n"
4183"\tpublic Application () {\n"
4184"\t\tObject (application_id: \"org.example.application\");\n"
4185"\t}\n"
4186"}\n"
4187"\n"
4188"/* main function creates Application and runs it */\n"
4189"int main (string[] args) {\n"
4190"\treturn new Application ().run (args);\n"
4191"}\n"
4192
4193#. (itstool) path: item/p
4194#: C/aboutdialog.vala.page:39 C/gmenu.vala.page:39 C/window.vala.page:38
4195msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Application.html\">Gtk.Application</link>"
4196msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Application.html\">Gtk.Application</link>"
4197
4198#. (itstool) path: item/p
4199#: C/aboutdialog.vala.page:40 C/gmenu.vala.page:40 C/GtkApplicationWindow.vala.page:32 C/label.vala.page:32
4200msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ApplicationWindow.html\">Gtk.ApplicationWindow</link>"
4201msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ApplicationWindow.html\">Gtk.ApplicationWindow</link>"
4202
4203#. (itstool) path: item/p
4204#: C/aboutdialog.vala.page:41
4205msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.set_default_size.html\">set_default_size</link>"
4206msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.set_default_size.html\">set_default_size</link>"
4207
4208#. (itstool) path: info/desc
4209#: C/audio-player.vala.page:10
4210msgid "Coming soon..."
4211msgstr "곧 계속됩니다..."
4212
4213#. (itstool) path: credit/name
4214#: C/audio-player.vala.page:14 C/guitar-tuner.c.page:15 C/guitar-tuner.cpp.page:13 C/guitar-tuner.py.page:15
4215#: C/guitar-tuner.vala.page:14 C/image-viewer.c.page:15 C/image-viewer.cpp.page:13 C/image-viewer.vala.page:15
4216#: C/record-collection.js.page:15
4217msgid "GNOME Documentation Project"
4218msgstr "그놈 문서 프로젝트"
4219
4220#. (itstool) path: page/title
4221#: C/audio-player.vala.page:19
4222msgid "Audio player"
4223msgstr "오디오 재생기"
4224
4225#. (itstool) path: credit/name
4226#: C/beginner.js.page:11 C/grid.js.page:13 C/guitar-tuner.js.page:12 C/hello-world.c.page:15 C/hello-world.js.page:15
4227#: C/hello-world.py.page:15 C/hello-world.vala.page:15 C/weatherApp.js.page:12 C/weatherAppMain.js.page:11
4228#: C/weatherAutotools.js.page:11 C/weatherGeonames.js.page:11
4229msgid "Susanna Huhtanen"
4230msgstr "Susanna Huhtanen"
4231
4232#. (itstool) path: credit/years
4233#: C/beginner.js.page:18 C/beginner.py.page:21 C/beginner.vala.page:21 C/buttonbox.js.page:16
4234#: C/colorbutton.js.page:15 C/combobox_multicolumn.vala.page:16 C/fontchooserwidget.js.page:15
4235#: C/fontchooserwidget.vala.page:15 C/guitar-tuner.c.page:25 C/guitar-tuner.cpp.page:23 C/guitar-tuner.py.page:25
4236#: C/guitar-tuner.py.page:30 C/guitar-tuner.vala.page:28 C/image-viewer.c.page:25 C/image-viewer.cpp.page:23
4237#: C/image-viewer.js.page:25 C/image-viewer.py.page:25 C/image-viewer.vala.page:33 C/js.page:18
4238#: C/magic-mirror.vala.page:25 C/menubutton.c.page:15 C/message-board.c.page:22 C/paned.js.page:15
4239#: C/paned.vala.page:15 C/photo-wall.c.page:24 C/py.page:17 C/record-collection.js.page:25
4240#: C/scrolledwindow.js.page:15 C/separator.c.page:16 C/separator.vala.page:18 C/tooltip.c.page:16
4241#: C/tooltip.js.page:16 C/tooltip.vala.page:16 C/tutorial.py.page:27 C/vala.page:17 C/weatherApp.js.page:19
4242#: C/widget_drawing.py.page:15
4243msgid "2013"
4244msgstr "2013"
4245
4246#. (itstool) path: info/desc
4247#: C/beginner.js.page:21
4248msgid ""
4249"A beginner's guide to writing GNOME applications in JavaScript, including code samples and practice exercises."
4250msgstr "코드 예제와 실제 연습 예제가 들어있는 JavaScript 그놈 프로그램 작성용 초보자 안내서입니다."
4251
4252#. (itstool) path: page/title
4253#: C/beginner.js.page:24 C/beginner.vala.page:25
4254msgid "Tutorial for beginners and code samples"
4255msgstr "초보자 지침서 및 예제 코드"
4256
4257#. (itstool) path: synopsis/p
4258#: C/beginner.js.page:26
4259msgid ""
4260"JavaScript is one of the most popular programming languages on the web. It's not just for the web, though. If you "
4261"have even a basic understanding of JavaScript, you can write full-fledged applications for GNOME. <link href="
4262"\"https://wiki.gnome.org/Apps/Documents\">GNOME Documents</link> is written in JavaScript, and so is <link href="
4263"\"https://live.gnome.org/GnomeShell/Tour\">GNOME Shell</link>, the most basic part of GNOME."
4264msgstr ""
4265"JavaScript는 웹에서 가장 인기있는 프로그래밍 언어 중 하나입니다. 단지 웹에서 뿐만이 아닙니다. JavaScript 기본을 잘 "
4266"이해하면 완전한 격을 갖춘 그놈 프로그램을 작성할 수 있습니다. <link href=\"https://wiki.gnome.org/Apps/Documents\">"
4267"그놈 문서</link>는 JavaScript로 작성했으며, 그놈의 가장 근본적인 부분 <link href=\"https://live.gnome.org/"
4268"GnomeShell/Tour\">그놈 셸</link> 도 마찬가지입니다."
4269
4270#. (itstool) path: note/p
4271#: C/beginner.js.page:27
4272msgid ""
4273"GNOME Shell is what you see when you click on \"Activities\" in the top-left corner of your screen. It also "
4274"controls the clock and the rest of the top panel. Besides showing how you to write GNOME applications, these "
4275"tutorials will also show you how to use JavaScript to write GNOME Shell extensions, which give it new features or "
4276"change the way it does things."
4277msgstr ""
4278"그놈 셸은 화면의 좌측 상단에 있는 \"현재 활동\"을 눌렀을 때 볼 수 있습니다. 시계와 상단 패널 나머지를 다룹니다. 그"
4279"놈 프로그램 작성 방법을 알려드리기 전에 다음 따라하기 내용을 통해, 그놈 셸에 새 기능을 붙이거나 동작 방식을 바꾸는 "
4280"그놈 셸 확장 기능을 작성할 때 JavaScript를 사용하는 방법을 보여드리겠습니다."
4281
4282#. (itstool) path: section/title
4283#: C/beginner.js.page:31
4284msgid "Getting Started"
4285msgstr "시작하기"
4286
4287#. (itstool) path: section/p
4288#: C/beginner.js.page:32
4289msgid ""
4290"These tutorials are designed for people who already know how to write in JavaScript, and who have GNOME installed "
4291"on their computers already, but who are new to developing GNOME applications. If you don't already know "
4292"JavaScript, or if you need help getting GNOME set up, take a look at these resources first:"
4293msgstr ""
4294"이 따라하기 참고서는 JavaScript 코드 작성법을 이미 알고 있는 사람, 이미 컴퓨터에 그놈을 설치한 사람, 하지만 그놈 프"
4295"로그램 개발에 처음인 사람이 쉽게 읽을 수 있게 기획했습니다. 이미 JavaScript 코드 작성법을 아는 사람이 아니거나 그"
4296"놈 설정에 도움이 필요하다면 다음 참고 자료를 우선 살펴보십시오:"
4297
4298#. (itstool) path: item/p
4299#: C/beginner.js.page:34
4300msgid ""
4301"<link href=\"http://eloquentjavascript.net/contents.html\">Eloquent JavaScript</link> is a free, Creative Commons-"
4302"licensed book, which explains the basics of JavaScript programming. Since you won't be writing JavaScript for the "
4303"web, you only need to read up to chapter 10 or so."
4304msgstr ""
4305"<link href=\"http://eloquentjavascript.net/contents.html\">Eloquent JavaScript</link>는 크리에이티브 커먼즈 라이선"
4306"스를 부여한 무료 책이며, JavaScript 프로그래밍 기본을 설명합니다. 웹용 JavaScript 프로그램을 작성하지 않을 것이기"
4307"에 10장까지만 읽으시면 됩니다."
4308
4309#. (itstool) path: item/p
4310#: C/beginner.js.page:35
4311msgid ""
4312"<link href=\"http://www.gnome.org/getting-gnome/\">Download GNOME</link> as part of a distribution, like Fedora, "
4313"openSUSE, or Ubuntu. Each distribution has its own instructions for how to get GNOME."
4314msgstr ""
4315"페도라, 오픈수세, 우분투 배포판의 일부로 <link href=\"http://www.gnome.org/getting-gnome/\">그놈을 다운로드</link> "
4316"하십시오. 각 배포판에는 그놈을 설치하는 자체 방식이 있습니다."
4317
4318#. (itstool) path: item/p
4319#: C/beginner.js.page:36
4320msgid ""
4321"<link xref=\"set-up-gedit.js\">Set up gedit</link> for writing applications. GNOME's text editor, gedit, is "
4322"sometimes just called \"text editor\"."
4323msgstr ""
4324"프로그램을 작성할 <link xref=\"set-up-gedit.js\">지에디트를 설정</link> 하십시오. 그놈 텍스트 편집기 지에디트는 그"
4325"냥 \"텍스트 편집기\"라고도 합니다."
4326
4327#. (itstool) path: section/title
4328#: C/beginner.js.page:42 C/beginner.vala.page:42 C/c.page:113
4329msgid "Tutorials"
4330msgstr "지침서"
4331
4332#. (itstool) path: section/title
4333#: C/beginner.js.page:46 C/beginner.vala.page:46 C/py.page:32
4334msgid "Code samples"
4335msgstr "예제 코드"
4336
4337#. (itstool) path: section/p
4338#: C/beginner.js.page:47
4339msgid ""
4340"These samples show how to use widgets in your GNOME applications. Each one demonstrates a complete application "
4341"which showcases the featured widget. At the end of each sample, you will find links to more detailed reference "
4342"material."
4343msgstr ""
4344"이 예제에서는 그놈 프로그램에서 위젯을 사용하는 방법을 보여줍니다. 각 예제 코드에서는 기능을 갖춘 위젯을 모아서 보"
4345"여주는 완전한 프로그램으로 실험적으로 동작합니다. 각 예제 끝에는 더욱 자세한 참고 자료 링크를 보실 수 있습니다."
4346
4347#. (itstool) path: section/p
4348#: C/beginner.js.page:48 C/beginner.vala.page:47 C/c.page:91
4349msgid "To run the code samples:"
4350msgstr "예제 코드를 실행하려면:"
4351
4352#. (itstool) path: item/p
4353#: C/beginner.js.page:50
4354msgid "Copy and paste the code into <var>filename</var>.js"
4355msgstr "<var>filename</var>.js에 코드를 복사하여 붙여넣으십시오"
4356
4357#. (itstool) path: item/p
4358#: C/beginner.js.page:51
4359msgid "In the terminal, type:"
4360msgstr "터미널에서 다음 명령을 입력하십시오:"
4361
4362#. (itstool) path: item/screen
4363#: C/beginner.js.page:52
4364#, no-wrap
4365msgid "gjs <var>filename</var>.js"
4366msgstr "gjs <var>filename</var>.js"
4367
4368#. (itstool) path: section/title
4369#: C/beginner.js.page:55 C/beginner.py.page:32 C/beginner.vala.page:58 C/c.page:118
4370msgid "Windows"
4371msgstr "창"
4372
4373#. (itstool) path: section/title
4374#: C/beginner.js.page:57 C/beginner.py.page:34 C/beginner.vala.page:61 C/c.page:121
4375msgid "Display widgets"
4376msgstr "위젯 표시"
4377
4378#. (itstool) path: section/title
4379#: C/beginner.js.page:59 C/beginner.py.page:36 C/beginner.vala.page:63 C/c.page:123
4380msgid "Buttons and toggles"
4381msgstr "단추 및 토글"
4382
4383#. (itstool) path: section/title
4384#: C/beginner.js.page:61 C/beginner.py.page:38 C/beginner.vala.page:65 C/c.page:125
4385msgid "Numeric and text data entry"
4386msgstr "숫자, 텍스트 데이터 항목"
4387
4388#. (itstool) path: section/title
4389#: C/beginner.js.page:63 C/beginner.py.page:40 C/beginner.vala.page:67 C/c.page:127
4390msgid "Multiline text editor"
4391msgstr "다중라인 텍스트 편집기"
4392
4393#. (itstool) path: section/title
4394#: C/beginner.js.page:65 C/beginner.py.page:42 C/beginner.vala.page:69 C/c.page:129
4395msgid "Menu, combo box and toolbar widgets"
4396msgstr "메뉴, 콤보상자, 도구모음 위젯"
4397
4398#. (itstool) path: section/title
4399#: C/beginner.js.page:67 C/beginner.py.page:44 C/beginner.vala.page:71 C/c.page:131
4400msgid "TreeView widget"
4401msgstr "TreeView 위젯"
4402
4403#. (itstool) path: section/title
4404#. (itstool) path: steps/title
4405#: C/beginner.js.page:69 C/beginner.py.page:46 C/beginner.vala.page:73 C/c.page:133 C/tutorial.py.page:127
4406msgid "Selectors"
4407msgstr "선택 상자"
4408
4409#. (itstool) path: section/title
4410#: C/beginner.js.page:70 C/beginner.py.page:47 C/beginner.vala.page:74 C/c.page:134
4411msgid "File selectors"
4412msgstr "파일 선택 상자"
4413
4414#. (itstool) path: section/title
4415#: C/beginner.js.page:72 C/beginner.py.page:49 C/beginner.vala.page:76 C/c.page:136
4416msgid "Font selectors"
4417msgstr "글꼴 선택 상자"
4418
4419#. (itstool) path: section/title
4420#: C/beginner.js.page:74 C/beginner.py.page:51 C/beginner.vala.page:78 C/c.page:138
4421msgid "Color Selectors"
4422msgstr "색상 선택 상자"
4423
4424#. (itstool) path: section/title
4425#: C/beginner.js.page:77 C/beginner.py.page:54 C/beginner.vala.page:81 C/c.page:141
4426msgid "Layout containers"
4427msgstr "배치 컨테이너"
4428
4429#. (itstool) path: section/title
4430#: C/beginner.js.page:79 C/beginner.py.page:56 C/beginner.vala.page:83 C/c.page:143
4431msgid "Ornaments"
4432msgstr "장식"
4433
4434#. (itstool) path: section/title
4435#: C/beginner.js.page:81 C/beginner.py.page:58 C/beginner.vala.page:85 C/c.page:145
4436msgid "Scrolling"
4437msgstr "스크롤"
4438
4439#. (itstool) path: section/title
4440#: C/beginner.js.page:83 C/beginner.py.page:60 C/beginner.vala.page:87 C/c.page:147
4441msgid "Miscellaneous"
4442msgstr "기타"
4443
4444#. (itstool) path: section/title
4445#: C/beginner.js.page:88 C/beginner.vala.page:92 C/menubar.vala.page:198
4446msgid "Exercises"
4447msgstr "연습 예제"
4448
4449#. (itstool) path: info/title
4450#: C/beginner.py.page:9
4451msgctxt "text"
4452msgid "GTK+ widgets sample code (Python)"
4453msgstr "GTK+ 위젯 예제 코드(Python)"
4454
4455#. (itstool) path: info/desc
4456#: C/beginner.py.page:13
4457msgid "A guide to GUI programming using GTK+, including code samples and practice exercises."
4458msgstr "예제 코드와 실제 연습 예제가 들어있는 GTK+ GUI 프로그래밍 안내서입니다."
4459
4460#. (itstool) path: page/title
4461#: C/beginner.py.page:25
4462msgid "GTK+ widgets sample code"
4463msgstr "GTK+ 위젯 예제 코드"
4464
4465#. (itstool) path: synopsis/p
4466#: C/beginner.py.page:27
4467msgid ""
4468"If you are a beginner and you would like a tutorial to guide you step by step in an exploration of what you can do "
4469"with GTK+ 3, you should go to the <link xref=\"tutorial.py\"/> page. If you are looking for a specific widget, you "
4470"can find it in the sections below."
4471msgstr ""
4472"GTK+ 3으로 뭘 할 수 있는지 단계별로 살펴볼 수 있는 지침서를 찾는 초보자라면 <link xref=\"tutorial.py\"/> 페이지로 "
4473"이동하십시오. 개별 위젯을 찾는다면 아래 섹션에서 찾아볼 수 있습니다."
4474
4475#. (itstool) path: section/title
4476#: C/beginner.py.page:64
4477msgid "Theory pages"
4478msgstr "이론 페이지"
4479
4480#. (itstool) path: info/title
4481#: C/beginner.vala.page:9
4482msgctxt "text"
4483msgid "Tutorial for beginners (Vala)"
4484msgstr "초보자용 지침서(Vala)"
4485
4486#. (itstool) path: info/desc
4487#: C/beginner.vala.page:13
4488msgid "A beginner's guide to GUI programming using GTK+, including code samples and practice exercises."
4489msgstr "예제 코드와 실제 연습 예제가 들어있는 GTK+ GUI 프로그래밍 초보자 안내서입니다."
4490
4491#. (itstool) path: synopsis/p
4492#: C/beginner.vala.page:27
4493msgid ""
4494"Although these tutorials are designed for beginners, we can't cover all the basics. Before attempting to follow "
4495"these tutorials, you are expected to be familiar with the following concepts:"
4496msgstr ""
4497"이 안내서는 초보자에 맞게 구성했지만 모든 기본적인 내용을 다루지는 못했습니다. 이 안내서를 따라가기 전에 다음 개념"
4498"에 익숙한 상황임을 가정하겠습니다:"
4499
4500#. (itstool) path: item/p
4501#: C/beginner.vala.page:29
4502msgid "Object oriented programming"
4503msgstr "객체 지향 프로그래밍"
4504
4505#. (itstool) path: item/p
4506#: C/beginner.vala.page:30
4507msgid "The Vala programming language:"
4508msgstr "Vala 프로그래밍 언어:"
4509
4510#. (itstool) path: item/p
4511#: C/beginner.vala.page:32
4512msgid "<link href=\"https://live.gnome.org/Vala/Tutorial\">The Vala Tutorial</link>"
4513msgstr "<link href=\"https://live.gnome.org/Vala/Tutorial\">Vala 따라하기 지침서</link>"
4514
4515#. (itstool) path: item/p
4516#: C/beginner.vala.page:33
4517msgid "<link href=\"https://live.gnome.org/Vala/Documentation#Sample_Code\">Sample Vala code</link>"
4518msgstr "<link href=\"https://live.gnome.org/Vala/Documentation#Sample_Code\">Vala 예제 코드</link>"
4519
4520#. (itstool) path: synopsis/p
4521#: C/beginner.vala.page:38
4522msgid "By following these tutorials you will learn the basics of GUI programming using GTK+."
4523msgstr "이 안내서를 따라가면 GTK+ GUI 프로그래밍의 기본 내용을 배웁니다."
4524
4525#. (itstool) path: item/p
4526#: C/beginner.vala.page:51
4527msgid "Copy and paste the code into <var>filename</var>.vala"
4528msgstr "<var>filename</var>.vala에 코드를 복사하여 붙여넣으십시오"
4529
4530#. (itstool) path: item/p
4531#: C/beginner.vala.page:52 C/c.page:98
4532msgid "In the terminal type:"
4533msgstr "터미널에 다음 명령을 입력하십시오:"
4534
4535#. (itstool) path: item/screen
4536#: C/beginner.vala.page:53
4537#, no-wrap
4538msgid "valac --pkg gtk+-3.0 <var>filename</var>.vala"
4539msgstr "valac --pkg gtk+-3.0 <var>filename</var>.vala"
4540
4541#. (itstool) path: item/screen
4542#: C/beginner.vala.page:54 C/c.page:100
4543#, no-wrap
4544msgid "./<var>filename</var>"
4545msgstr "./<var>filename</var>"
4546
4547#. (itstool) path: info/title
4548#: C/button.c.page:8
4549msgctxt "text"
4550msgid "Button (C)"
4551msgstr "Button(C)"
4552
4553#. (itstool) path: info/desc
4554#: C/button.c.page:20 C/button.py.page:20 C/button.vala.page:19
4555msgid "A button widget which emits a signal when clicked"
4556msgstr "눌렀을 때 시그널을 내보내는 단추 위젯입니다"
4557
4558#. (itstool) path: page/title
4559#: C/button.c.page:23 C/button.js.page:21 C/button.py.page:23
4560msgid "Button"
4561msgstr "Button"
4562
4563#. (itstool) path: page/media
4564#. This is a reference to an external file such as an image or video. When
4565#. the file changes, the md5 hash will change to let you know you need to
4566#. update your localized copy. The msgstr is not used at all. Set it to
4567#. whatever you like once you have updated your copy of the file.
4568#: C/button.c.page:25 C/button.js.page:22 C/button.py.page:25 C/button.vala.page:24
4569msgctxt "_"
4570msgid "external ref='media/button.png' md5='8d69efbb3a0d3e043af6139b6492171c'"
4571msgstr ""
4572
4573#. (itstool) path: page/p
4574#: C/button.c.page:26
4575msgid "A button widget connected to a callback function that reverses its label when clicked."
4576msgstr "눌렀을 때 레이블을 반전하는 콜백 함수에 연결한 단추 위젯입니다."
4577
4578#. (itstool) path: page/code
4579#: C/button.c.page:28
4580#, no-wrap
4581msgid ""
4582"\n"
4583"#include &lt;gtk/gtk.h&gt;\n"
4584"\n"
4585"\n"
4586"\n"
4587"/*This is the callback function. It is a handler function which \n"
4588"reacts to the signal. In this case, it will cause the button label's \n"
4589"string to reverse.*/\n"
4590"static void\n"
4591"button_clicked (GtkButton *button,\n"
4592"                gpointer   user_data)\n"
4593"{\n"
4594"  const char *old_label;\n"
4595"  char *new_label;\n"
4596"\n"
4597"  old_label = gtk_button_get_label (button);\n"
4598"  new_label = g_utf8_strreverse (old_label, -1);\n"
4599"\n"
4600"  gtk_button_set_label (button, new_label);\n"
4601"  g_free (new_label);\n"
4602"}\n"
4603"\n"
4604"\n"
4605"\n"
4606"static void\n"
4607"activate (GtkApplication *app,\n"
4608"          gpointer        user_data)\n"
4609"{\n"
4610"  GtkWidget *window;\n"
4611"  GtkWidget *button;\n"
4612"\n"
4613"  /*Create a window with a title and a default size*/\n"
4614"  window = gtk_application_window_new (app);\n"
4615"  gtk_window_set_title (GTK_WINDOW (window), \"GNOME Button\");\n"
4616"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 50);\n"
4617"\n"
4618"  /*Create a button with a label, and add it to the window*/\n"
4619"  button = gtk_button_new_with_label (\"Click Me\");\n"
4620"  gtk_container_add (GTK_CONTAINER (window), button);\n"
4621"\n"
4622"  /*Connecting the clicked signal to the callback function*/\n"
4623"  g_signal_connect (GTK_BUTTON (button),\n"
4624"                    \"clicked\", \n"
4625"                    G_CALLBACK (button_clicked), \n"
4626"                    G_OBJECT (window));\n"
4627"\n"
4628"  gtk_widget_show_all (window);\n"
4629"}\n"
4630"\n"
4631"\n"
4632"\n"
4633"int\n"
4634"main (int argc, char **argv)\n"
4635"{\n"
4636"  GtkApplication *app;\n"
4637"  int status;\n"
4638"\n"
4639"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
4640"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
4641"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
4642"  g_object_unref (app);\n"
4643"\n"
4644"  return status;\n"
4645"}\n"
4646msgstr ""
4647"\n"
4648"#include &lt;gtk/gtk.h&gt;\n"
4649"\n"
4650"\n"
4651"\n"
4652"/*This is the callback function. It is a handler function which \n"
4653"reacts to the signal. In this case, it will cause the button label's \n"
4654"string to reverse.*/\n"
4655"static void\n"
4656"button_clicked (GtkButton *button,\n"
4657"                gpointer   user_data)\n"
4658"{\n"
4659"  const char *old_label;\n"
4660"  char *new_label;\n"
4661"\n"
4662"  old_label = gtk_button_get_label (button);\n"
4663"  new_label = g_utf8_strreverse (old_label, -1);\n"
4664"\n"
4665"  gtk_button_set_label (button, new_label);\n"
4666"  g_free (new_label);\n"
4667"}\n"
4668"\n"
4669"\n"
4670"\n"
4671"static void\n"
4672"activate (GtkApplication *app,\n"
4673"          gpointer        user_data)\n"
4674"{\n"
4675"  GtkWidget *window;\n"
4676"  GtkWidget *button;\n"
4677"\n"
4678"  /*Create a window with a title and a default size*/\n"
4679"  window = gtk_application_window_new (app);\n"
4680"  gtk_window_set_title (GTK_WINDOW (window), \"GNOME Button\");\n"
4681"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 50);\n"
4682"\n"
4683"  /*Create a button with a label, and add it to the window*/\n"
4684"  button = gtk_button_new_with_label (\"Click Me\");\n"
4685"  gtk_container_add (GTK_CONTAINER (window), button);\n"
4686"\n"
4687"  /*Connecting the clicked signal to the callback function*/\n"
4688"  g_signal_connect (GTK_BUTTON (button),\n"
4689"                    \"clicked\", \n"
4690"                    G_CALLBACK (button_clicked), \n"
4691"                    G_OBJECT (window));\n"
4692"\n"
4693"  gtk_widget_show_all (window);\n"
4694"}\n"
4695"\n"
4696"\n"
4697"\n"
4698"int\n"
4699"main (int argc, char **argv)\n"
4700"{\n"
4701"  GtkApplication *app;\n"
4702"  int status;\n"
4703"\n"
4704"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
4705"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
4706"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
4707"  g_object_unref (app);\n"
4708"\n"
4709"  return status;\n"
4710"}\n"
4711
4712#. (itstool) path: item/p
4713#: C/button.c.page:36 C/buttonbox.py.page:51 C/grid.c.page:35
4714msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkButton.html\">GtkButton</link>"
4715msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkButton.html\">GtkButton</link>"
4716
4717#. (itstool) path: item/p
4718#: C/button.c.page:37
4719msgid ""
4720"<link href=\"http://developer.gnome.org/glib/stable/glib-Unicode-Manipulation.html#g-utf8-strreverse\">Unicode "
4721"Manipulation</link>"
4722msgstr ""
4723"<link href=\"http://developer.gnome.org/glib/stable/glib-Unicode-Manipulation.html#g-utf8-strreverse\">Unicode "
4724"Manipulation</link>"
4725
4726#. (itstool) path: info/title
4727#: C/button.js.page:8
4728msgctxt "text"
4729msgid "Button (JavaScript)"
4730msgstr "Button(JavaScript)"
4731
4732#. (itstool) path: info/desc
4733#: C/button.js.page:18
4734msgid "A button which can be connected to other widgets"
4735msgstr "다른 위젯에 연결할 수 있는 단추입니다"
4736
4737#. (itstool) path: page/p
4738#: C/button.js.page:23
4739msgid "A button widget that changes its label when you click it."
4740msgstr "단추를 누르면 레이블을 바꾸는 단추 위젯입니다."
4741
4742#. (itstool) path: page/code
4743#: C/button.js.page:25
4744#, no-wrap
4745msgid ""
4746"#!/usr/bin/gjs\n"
4747"\n"
4748"imports.gi.versions.Gtk = '3.0';\n"
4749"\n"
4750"const Gio = imports.gi.Gio;\n"
4751"const GLib = imports.gi.GLib;\n"
4752"const Gtk = imports.gi.Gtk;\n"
4753"\n"
4754"class ButtonExample {\n"
4755"\n"
4756"    /* Create the application itself\n"
4757"       This boilerplate code is needed to build any GTK+ application. */\n"
4758"    constructor() {\n"
4759"        this.application = new Gtk.Application ({\n"
4760"            application_id: 'org.example.jsbutton',\n"
4761"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
4762"        });\n"
4763"\n"
4764"        // Connect 'activate' and 'startup' signals to the callback functions\n"
4765"        this.application.connect('activate', this._onActivate.bind(this));\n"
4766"        this.application.connect('startup', this._onStartup.bind(this));\n"
4767"    }\n"
4768"\n"
4769"    // Callback function for 'activate' signal presents windows when active\n"
4770"    _onActivate() {\n"
4771"        this._window.present ();\n"
4772"    }\n"
4773"\n"
4774"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
4775"    _onStartup() {\n"
4776"        this._buildUI();\n"
4777"    }\n"
4778"\n"
4779"    // Build the application's UI\n"
4780"    _buildUI() {\n"
4781"\n"
4782"        // Create the application window\n"
4783"            this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
4784"                                                              window_position: Gtk.WindowPosition.CENTER,\n"
4785"                                                              title: \"GNOME Button\",\n"
4786"                                                              default_height: 50,\n"
4787"                                                              default_width: 250 });\n"
4788"\n"
4789"        // Create the button\n"
4790"        this.Button = new Gtk.Button ({label: \"Click Me\"});\n"
4791"        this._window.add (this.Button);\n"
4792"\n"
4793"        // Bind it to a function that says what to do when the button is clicked\n"
4794"        this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
4795"\n"
4796"                // Show the window and all child widgets\n"
4797"                this._window.show_all();\n"
4798"    }\n"
4799"\n"
4800"    // Here's the function that says what happens when the button is clicked\n"
4801"    _clickHandler() {\n"
4802"        this.Button.set_label (\"Clicked!\");\n"
4803"    }\n"
4804"};\n"
4805"\n"
4806"// Run the application\n"
4807"let app = new ButtonExample ();\n"
4808"app.application.run (ARGV);\n"
4809msgstr ""
4810"#!/usr/bin/gjs\n"
4811"\n"
4812"imports.gi.versions.Gtk = '3.0';\n"
4813"\n"
4814"const Gio = imports.gi.Gio;\n"
4815"const GLib = imports.gi.GLib;\n"
4816"const Gtk = imports.gi.Gtk;\n"
4817"\n"
4818"class ButtonExample {\n"
4819"\n"
4820"    /* Create the application itself\n"
4821"       This boilerplate code is needed to build any GTK+ application. */\n"
4822"    constructor() {\n"
4823"        this.application = new Gtk.Application ({\n"
4824"            application_id: 'org.example.jsbutton',\n"
4825"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
4826"        });\n"
4827"\n"
4828"        // Connect 'activate' and 'startup' signals to the callback functions\n"
4829"        this.application.connect('activate', this._onActivate.bind(this));\n"
4830"        this.application.connect('startup', this._onStartup.bind(this));\n"
4831"    }\n"
4832"\n"
4833"    // Callback function for 'activate' signal presents windows when active\n"
4834"    _onActivate() {\n"
4835"        this._window.present ();\n"
4836"    }\n"
4837"\n"
4838"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
4839"    _onStartup() {\n"
4840"        this._buildUI();\n"
4841"    }\n"
4842"\n"
4843"    // Build the application's UI\n"
4844"    _buildUI() {\n"
4845"\n"
4846"        // Create the application window\n"
4847"            this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
4848"                                                              window_position: Gtk.WindowPosition.CENTER,\n"
4849"                                                              title: \"GNOME Button\",\n"
4850"                                                              default_height: 50,\n"
4851"                                                              default_width: 250 });\n"
4852"\n"
4853"        // Create the button\n"
4854"        this.Button = new Gtk.Button ({label: \"Click Me\"});\n"
4855"        this._window.add (this.Button);\n"
4856"\n"
4857"        // Bind it to a function that says what to do when the button is clicked\n"
4858"        this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
4859"\n"
4860"                // Show the window and all child widgets\n"
4861"                this._window.show_all();\n"
4862"    }\n"
4863"\n"
4864"    // Here's the function that says what happens when the button is clicked\n"
4865"    _clickHandler() {\n"
4866"        this.Button.set_label (\"Clicked!\");\n"
4867"    }\n"
4868"};\n"
4869"\n"
4870"// Run the application\n"
4871"let app = new ButtonExample ();\n"
4872"app.application.run (ARGV);\n"
4873
4874#. (itstool) path: item/p
4875#: C/button.js.page:33 C/grid.js.page:36
4876msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Button.html\">Gtk.Button</link>"
4877msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Button.html\">Gtk.Button</link>"
4878
4879#. (itstool) path: info/title
4880#: C/button.py.page:8
4881msgctxt "text"
4882msgid "Button (Python)"
4883msgstr "Button (Python)"
4884
4885#. (itstool) path: page/p
4886#: C/button.py.page:26 C/button.vala.page:25
4887msgid "A button widget connected to a simple callback function."
4888msgstr "간단한 콜백 함수에 연결한 단추 위젯입니다."
4889
4890#. (itstool) path: section/code
4891#: C/button.py.page:32
4892#, no-wrap
4893msgid ""
4894"from gi.repository import Gtk\n"
4895"import sys\n"
4896"\n"
4897"\n"
4898"class MyWindow(Gtk.ApplicationWindow):\n"
4899"    # a window\n"
4900"\n"
4901"    def __init__(self, app):\n"
4902"        Gtk.Window.__init__(self, title=\"GNOME Button\", application=app)\n"
4903"        self.set_default_size(250, 50)\n"
4904"\n"
4905"        # a button\n"
4906"        button = Gtk.Button()\n"
4907"        # with a label\n"
4908"        button.set_label(\"Click me\")\n"
4909"        # connect the signal \"clicked\" emitted by the button\n"
4910"        # to the callback function do_clicked\n"
4911"        button.connect(\"clicked\", self.do_clicked)\n"
4912"        # add the button to the window\n"
4913"        self.add(button)\n"
4914"\n"
4915"    # callback function connected to the signal \"clicked\" of the button\n"
4916"    def do_clicked(self, button):\n"
4917"        print(\"You clicked me!\")\n"
4918"\n"
4919"\n"
4920"class MyApplication(Gtk.Application):\n"
4921"\n"
4922"    def __init__(self):\n"
4923"        Gtk.Application.__init__(self)\n"
4924"\n"
4925"    def do_activate(self):\n"
4926"        win = MyWindow(self)\n"
4927"        win.show_all()\n"
4928"\n"
4929"    def do_startup(self):\n"
4930"        Gtk.Application.do_startup(self)\n"
4931"\n"
4932"app = MyApplication()\n"
4933"exit_status = app.run(sys.argv)\n"
4934"sys.exit(exit_status)\n"
4935msgstr ""
4936"from gi.repository import Gtk\n"
4937"import sys\n"
4938"\n"
4939"\n"
4940"class MyWindow(Gtk.ApplicationWindow):\n"
4941"    # a window\n"
4942"\n"
4943"    def __init__(self, app):\n"
4944"        Gtk.Window.__init__(self, title=\"GNOME Button\", application=app)\n"
4945"        self.set_default_size(250, 50)\n"
4946"\n"
4947"        # a button\n"
4948"        button = Gtk.Button()\n"
4949"        # with a label\n"
4950"        button.set_label(\"Click me\")\n"
4951"        # connect the signal \"clicked\" emitted by the button\n"
4952"        # to the callback function do_clicked\n"
4953"        button.connect(\"clicked\", self.do_clicked)\n"
4954"        # add the button to the window\n"
4955"        self.add(button)\n"
4956"\n"
4957"    # callback function connected to the signal \"clicked\" of the button\n"
4958"    def do_clicked(self, button):\n"
4959"        print(\"You clicked me!\")\n"
4960"\n"
4961"\n"
4962"class MyApplication(Gtk.Application):\n"
4963"\n"
4964"    def __init__(self):\n"
4965"        Gtk.Application.__init__(self)\n"
4966"\n"
4967"    def do_activate(self):\n"
4968"        win = MyWindow(self)\n"
4969"        win.show_all()\n"
4970"\n"
4971"    def do_startup(self):\n"
4972"        Gtk.Application.do_startup(self)\n"
4973"\n"
4974"app = MyApplication()\n"
4975"exit_status = app.run(sys.argv)\n"
4976"sys.exit(exit_status)\n"
4977
4978#. (itstool) path: section/title
4979#: C/button.py.page:36
4980msgid "Useful methods for a Button widget"
4981msgstr "Button 위젯에 쓸만한 메서드"
4982
4983#. (itstool) path: section/p
4984#: C/button.py.page:37
4985msgid ""
4986"In line 16 the <code>\"clicked\"</code> signal from the button is connected to the callback function "
4987"<code>do_clicked()</code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</"
4988"code>. See <link xref=\"signals-callbacks.py\"/> for a more detailed explanation."
4989msgstr ""
4990"16번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로 "
4991"<code>\"clicked\"</code> 시그널을 <code>do_clicked()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
4992"\"signals-callbacks.py\"/>를 참조하십시오."
4993
4994#. (itstool) path: item/p
4995#: C/button.py.page:39
4996msgid ""
4997"<code>set_relief(Gtk.ReliefStyle.NONE)</code> sets to none the relief style of the edges of the Gtk.Button - as "
4998"opposed to <code>Gtk.ReliefStyle.NORMAL</code>."
4999msgstr ""
5000"<code>set_relief(Gtk.ReliefStyle.NONE)</code> 함수는 Gtk.Button의 가장자리의 두드러진 모양새를 없음으로 설정합니"
5001"다. <code>Gtk.ReliefStyle.NORMAL</code>과는 반대죠."
5002
5003#. (itstool) path: item/p
5004#: C/button.py.page:40
5005msgid ""
5006"If the label of the button is a <link href=\"http://developer.gnome.org/gtk3/unstable/gtk3-Stock-Items.html"
5007"\">stock icon</link>, <code>set_use_stock(True)</code> sets the label as the name of the corresponding stock icon."
5008msgstr ""
5009"단추 레이블에 <link href=\"http://developer.gnome.org/gtk3/unstable/gtk3-Stock-Items.html\">스톡 아이콘</link>이라"
5010"면, <code>set_use_stock(True)</code> 함수로 스톡 아이콘 이름을 레이블로 설정합니다."
5011
5012#. (itstool) path: item/p
5013#: C/button.py.page:41
5014msgid "To set an image (e.g. a stock image) for the button <code>button</code>:"
5015msgstr "<code>button</code> 단추 레이블에 그림(예: 스톡 그림)을 설정하려면:"
5016
5017#. (itstool) path: item/code
5018#: C/button.py.page:42
5019#, no-wrap
5020msgid ""
5021"\n"
5022"image = Gtk.Image()\n"
5023"image.set_from_stock(Gtk.STOCK_ABOUT, Gtk.IconSize.BUTTON)\n"
5024"button.set_image(image)"
5025msgstr ""
5026"\n"
5027"image = Gtk.Image()\n"
5028"image.set_from_stock(Gtk.STOCK_ABOUT, Gtk.IconSize.BUTTON)\n"
5029"button.set_image(image)"
5030
5031#. (itstool) path: item/p
5032#: C/button.py.page:46
5033msgid "You should not set a label for the button after this, otherwise it will show the label and not the image."
5034msgstr "이 코드 다음에 단추에 레이블 문자열을 설정하면, 그림 대신 텍스트 레이블이 나타납니다."
5035
5036#. (itstool) path: item/p
5037#: C/button.py.page:47
5038msgid ""
5039"If we use <code>set_focus_on_click(False)</code> the button will not grab focus when it is clicked by the mouse. "
5040"This could be useful in places like toolbars, so that the keyboard focus is not removed from the main area of the "
5041"application."
5042msgstr ""
5043"<code>set_focus_on_click(False)</code> 함수를 사용하면 단추를 마우스로 눌렀을 때 포커스를 주지 않습니다. 도구 모음 "
5044"같은 곳에 쓸만해서 키보드 포커스를 프로그램의 주 영역에서 없애지 않을 때 씁니다."
5045
5046#. (itstool) path: item/p
5047#: C/button.py.page:55
5048msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkButton.html\">GtkButton</link>"
5049msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkButton.html\">GtkButton</link>"
5050
5051#. (itstool) path: item/p
5052#: C/button.py.page:56 C/dialog.py.page:52 C/label.py.page:106 C/linkbutton.py.page:47 C/messagedialog.py.page:61
5053#: C/radiobutton.py.page:49 C/separator.py.page:39 C/window.py.page:65
5054msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkWindow.html\">GtkWindow</link>"
5055msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkWindow.html\">GtkWindow</link>"
5056
5057#. (itstool) path: info/title
5058#: C/button.vala.page:8
5059msgctxt "text"
5060msgid "Button (Vala)"
5061msgstr "Button (Vala)"
5062
5063#. (itstool) path: page/title
5064#: C/button.vala.page:22
5065msgid "Button widget"
5066msgstr "단추 위젯"
5067
5068#. (itstool) path: page/code
5069#: C/button.vala.page:27
5070#, no-wrap
5071msgid ""
5072"\n"
5073"/* A window in the application */\n"
5074"public class MyWindow : Gtk.ApplicationWindow {\n"
5075"\n"
5076"\t/* The constructor of the window */\n"
5077"\tinternal MyWindow (MyApplication app) {\n"
5078"\t\tObject (application: app, title: \"GNOME Button\");\n"
5079"\n"
5080"\t\tvar button = new Gtk.Button.with_label (\"Click Me\");\n"
5081"\t\tbutton.clicked.connect (this.reverse_label);\n"
5082"\t\tbutton.show ();\n"
5083"\n"
5084"\t\tthis.window_position = Gtk.WindowPosition.CENTER;\n"
5085"\t\tthis.set_default_size (250,50);\n"
5086"\t\tthis.add (button);\n"
5087"\t}\n"
5088"\n"
5089"\t/* The callback function connected to the\n"
5090"\t * 'clicked' signal of the button.\n"
5091"\t */\n"
5092"\tvoid reverse_label (Gtk.Button button) {\n"
5093"\t\tbutton.label = button.label.reverse ();\n"
5094"\t}\n"
5095"}\n"
5096"\n"
5097"/* This is the application. */\n"
5098"public class MyApplication : Gtk.Application {\n"
5099"\n"
5100"\t/* This is the constructor */\n"
5101"\tinternal MyApplication () {\n"
5102"\t\tObject (application_id: \"org.example.MyApplication\");\n"
5103"\t}\n"
5104"\n"
5105"\t/* Override the activate signal of GLib.Application */\n"
5106"\tprotected override void activate () {\n"
5107"\t\tnew MyWindow (this).show ();\n"
5108"\t}\n"
5109"}\n"
5110"\n"
5111"/* main creates and runs the application */\n"
5112"public int main (string[] args) {\n"
5113"\treturn new MyApplication ().run (args);\n"
5114"}\n"
5115msgstr ""
5116"\n"
5117"/* A window in the application */\n"
5118"public class MyWindow : Gtk.ApplicationWindow {\n"
5119"\n"
5120"\t/* The constructor of the window */\n"
5121"\tinternal MyWindow (MyApplication app) {\n"
5122"\t\tObject (application: app, title: \"GNOME Button\");\n"
5123"\n"
5124"\t\tvar button = new Gtk.Button.with_label (\"Click Me\");\n"
5125"\t\tbutton.clicked.connect (this.reverse_label);\n"
5126"\t\tbutton.show ();\n"
5127"\n"
5128"\t\tthis.window_position = Gtk.WindowPosition.CENTER;\n"
5129"\t\tthis.set_default_size (250,50);\n"
5130"\t\tthis.add (button);\n"
5131"\t}\n"
5132"\n"
5133"\t/* The callback function connected to the\n"
5134"\t * 'clicked' signal of the button.\n"
5135"\t */\n"
5136"\tvoid reverse_label (Gtk.Button button) {\n"
5137"\t\tbutton.label = button.label.reverse ();\n"
5138"\t}\n"
5139"}\n"
5140"\n"
5141"/* This is the application. */\n"
5142"public class MyApplication : Gtk.Application {\n"
5143"\n"
5144"\t/* This is the constructor */\n"
5145"\tinternal MyApplication () {\n"
5146"\t\tObject (application_id: \"org.example.MyApplication\");\n"
5147"\t}\n"
5148"\n"
5149"\t/* Override the activate signal of GLib.Application */\n"
5150"\tprotected override void activate () {\n"
5151"\t\tnew MyWindow (this).show ();\n"
5152"\t}\n"
5153"}\n"
5154"\n"
5155"/* main creates and runs the application */\n"
5156"public int main (string[] args) {\n"
5157"\treturn new MyApplication ().run (args);\n"
5158"}\n"
5159
5160#. (itstool) path: page/p
5161#: C/button.vala.page:29
5162msgid ""
5163"In this sample we used the following: <link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Button.html\">Gtk.Button</"
5164"link>"
5165msgstr ""
5166"이 예제에서 <link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Button.html\">Gtk.Button</link>을 사용하겠습니다"
5167
5168#. (itstool) path: info/title
5169#: C/buttonbox.js.page:8
5170msgctxt "text"
5171msgid "ButtonBox (JavaScript)"
5172msgstr "ButtonBox (JavaScript)"
5173
5174#. (itstool) path: credit/name
5175#: C/buttonbox.js.page:14 C/colorbutton.js.page:13 C/fontchooserwidget.js.page:13 C/paned.js.page:13
5176#: C/scrolledwindow.js.page:13 C/tooltip.js.page:14
5177msgid "Meg Ford"
5178msgstr "Meg Ford"
5179
5180#. (itstool) path: info/desc
5181#: C/buttonbox.js.page:19 C/buttonbox.py.page:20
5182msgid "A container for arranging buttons"
5183msgstr "단추를 정렬하는 컨테이너"
5184
5185#. (itstool) path: page/title
5186#. (itstool) path: steps/title
5187#: C/buttonbox.js.page:22 C/buttonbox.py.page:23 C/tutorial.py.page:92
5188msgid "ButtonBox"
5189msgstr "ButtonBox"
5190
5191#. (itstool) path: page/media
5192#. This is a reference to an external file such as an image or video. When
5193#. the file changes, the md5 hash will change to let you know you need to
5194#. update your localized copy. The msgstr is not used at all. Set it to
5195#. whatever you like once you have updated your copy of the file.
5196#: C/buttonbox.js.page:24 C/buttonbox.py.page:25
5197msgctxt "_"
5198msgid "external ref='media/buttonbox_calculator.png' md5='ce0de08b7ac66f517290e33e6d33d508'"
5199msgstr ""
5200
5201#. (itstool) path: page/p
5202#: C/buttonbox.js.page:25 C/buttonbox.py.page:26
5203msgid "A calculator - the buttons are enclosed in horizontal ButtonBoxes."
5204msgstr "계산기 - 단추는 수평 ButtonBox에 둘러싸여있습니다."
5205
5206#. (itstool) path: section/code
5207#: C/buttonbox.js.page:31
5208#, no-wrap
5209#| msgid ""
5210#| "#!/usr/bin/gjs\n"
5211#| "\n"
5212#| "imports.gi.versions.Gtk = '3.0';\n"
5213#| "\n"
5214#| "const GObject = imports.gi.GObject;\n"
5215#| "const Gtk = imports.gi.Gtk;\n"
5216#| "\n"
5217#| "class ButtonBoxExample {\n"
5218#| "\n"
5219#| "    // Create the application itthis\n"
5220#| "    constructor() {\n"
5221#| "        this.application = new Gtk.Application({\n"
5222#| "            application_id: 'org.example.jsbuttonbox'\n"
5223#| "        });\n"
5224#| "\n"
5225#| "        // Connect 'activate' and 'startup' signals to the callback functions\n"
5226#| "        this.application.connect('activate', this._onActivate.bind(this));\n"
5227#| "        this.application.connect('startup', this._onStartup.bind(this));\n"
5228#| "    }\n"
5229#| "\n"
5230#| "    // Callback function for 'activate' signal presents windows when active\n"
5231#| "    _onActivate() {\n"
5232#| "        this.window.present();\n"
5233#| "    }\n"
5234#| "\n"
5235#| "    // Callback function for 'startup' signal builds the UI\n"
5236#| "    _onStartup() {\n"
5237#| "        this._buildUI();\n"
5238#| "    }\n"
5239#| "\n"
5240#| "    // Build the application's UI\n"
5241#| "    _buildUI() {\n"
5242#| "        // Create the application window\n"
5243#| "        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
5244#| "                                                    window_position: Gtk.WindowPosition.CENTER,\n"
5245#| "                                                    title: \"Calculator\",\n"
5246#| "                                                    default_width: 350,\n"
5247#| "                                                    default_height: 200,\n"
5248#| "                                                    border_width: 10 });\n"
5249#| "        this.entry = new Gtk.Entry();\n"
5250#| "        this.entry.set_text('0');\n"
5251#| "        // text aligned on the right\n"
5252#| "        this.entry.set_alignment(1);\n"
5253#| "        // the text in the entry cannot be modified by writing in it\n"
5254#| "        this.entry.set_can_focus(false);\n"
5255#| "\n"
5256#| "        // a grid\n"
5257#| "        this.grid = new Gtk.Grid();\n"
5258#| "        this.grid.set_row_spacing(5);\n"
5259#| "        \n"
5260#| "        // to attach the entry\n"
5261#| "        this.grid.attach(this.entry, 0, 0, 1, 1);\n"
5262#| "        \n"
5263#| "        // the labels for the buttons\n"
5264#| "        this.buttons = [ 7, 8, 9, '/', 4, 5, 6, '*', 1, 2, 3, '-', 'C', 0, '=', '+' ];\n"
5265#| "        \n"
5266#| "        // each row is a ButtonBox, attached to the grid            \n"
5267#| "        for (let i = 0; i &lt; 4; i++) {\n"
5268#| "            this.hbox = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL);\n"
5269#| "            this.hbox.set_spacing(5);\n"
5270#| "            this.grid.attach(this.hbox, 0, i + 1, 1, 1);\n"
5271#| "            // each ButtonBox has 4 buttons, connected to the callback function\n"
5272#| "            for (let j= 0; j &lt; 4; j++) {\n"
5273#| "                this.button = new Gtk.Button();\n"
5274#| "                this.buttonLabel = (this.buttons[i * 4 + j].toString());\n"
5275#| "                this.button.set_label(this.buttonLabel);\n"
5276#| "                this.button.set_can_focus(false);\n"
5277#| "                this.button.connect(\"clicked\", this._buttonClicked.bind(this));\n"
5278#| "                this.hbox.add(this.button);\n"
5279#| "            }\n"
5280#| "        }\n"
5281#| "            \n"
5282#| "        // some variables for the calculations\n"
5283#| "        this.firstNumber = 0;\n"
5284#| "        this.secondNumber = 0;\n"
5285#| "        this.counter = 0;\n"
5286#| "        this.operation = \"\";\n"
5287#| "\n"
5288#| "        // add the grid to the window\n"
5289#| "        this.window.add(this.grid);\n"
5290#| "        this.window.show_all();\n"
5291#| "    }\n"
5292#| "\n"
5293#| "    // callback function for all the buttons\n"
5294#| "    _buttonClicked(button) {\n"
5295#| "        this.button = button;\n"
5296#| "        // for the operations\n"
5297#| "        if (this.button.get_label() == '+') {\n"
5298#| "            this.counter += 1 \n"
5299#| "            if (this.counter &gt; 1)\n"
5300#| "                this._doOperation();\n"
5301#| "            this.entry.set_text('0');\n"
5302#| "            this.operation = \"plus\";\n"
5303#| "        }\n"
5304#| "\n"
5305#| "        else if (this.button.get_label() == '-') {\n"
5306#| "            this.counter += 1;\n"
5307#| "            if (this.counter &gt; 1)\n"
5308#| "                this._doOperation();\n"
5309#| "            this.entry.set_text('0');\n"
5310#| "            this.operation = \"minus\";\n"
5311#| "        }\n"
5312#| "\n"
5313#| "        else if (this.button.get_label() == '*') {\n"
5314#| "            this.counter += 1; \n"
5315#| "            if (this.counter &gt; 1)\n"
5316#| "                this._doOperation();\n"
5317#| "            this.entry.set_text('0');\n"
5318#| "            this.operation = \"multiplication\";\n"
5319#| "        }\n"
5320#| "\n"
5321#| "        else if (this.button.get_label() == '/') {\n"
5322#| "            this.counter += 1 \n"
5323#| "            if (this.counter &gt; 1)\n"
5324#| "                this._doOperation();\n"
5325#| "            this.entry.set_text('0');\n"
5326#| "            this.operation = \"division\";\n"
5327#| "        }\n"
5328#| "\n"
5329#| "        // for =\n"
5330#| "        else if (this.button.get_label() == '=') {\n"
5331#| "            this._doOperation();\n"
5332#| "            this.entry.set_text(this.firstNumber.toString());\n"
5333#| "            this.counter = 1;\n"
5334#| "        }\n"
5335#| "\n"
5336#| "        // for Cancel\n"
5337#| "        else if (this.button.get_label() == 'C') {\n"
5338#| "            this.firstNumber = 0;\n"
5339#| "            this.secondNumber = 0;\n"
5340#| "            this.counter = 0;\n"
5341#| "            this.entry.set_text('0');\n"
5342#| "            this.operation = \"\";\n"
5343#| "        }\n"
5344#| "\n"
5345#| "        // for a digit button\n"
5346#| "        else {\n"
5347#| "            this.newDigit = parseInt(this.button.get_label());\n"
5348#| "            if (this.entry.get_text() == \"error\")\n"
5349#| "                this.number = 0;\n"
5350#| "            else\n"
5351#| "                this.number = parseInt(this.entry.get_text());\n"
5352#| "            this.number = this.number * 10 + this.newDigit;            \n"
5353#| "            if (this.counter == 0)\n"
5354#| "                this.firstNumber = this.number;\n"
5355#| "            else\n"
5356#| "                this.secondNumber = this.number;\n"
5357#| "            this.entry.set_text(this.number.toString());\n"
5358#| "        }\n"
5359#| "     }\n"
5360#| "\n"
5361#| "     _doOperation() {\n"
5362#| "        if (this.operation == \"plus\") {\n"
5363#| "           this.firstNumber += this.secondNumber;\n"
5364#| "        } else if (this.operation == \"minus\") {\n"
5365#| "            this.firstNumber -= this.secondNumber;\n"
5366#| "        } else if (this.operation == \"multiplication\") {\n"
5367#| "            this.firstNumber *= this.secondNumber;\n"
5368#| "        } else if (this.operation == \"division\") {\n"
5369#| "            if (this.secondNumber != 0) {\n"
5370#| "                this.firstNumber /= this.secondNumber;\n"
5371#| "            } else {\n"
5372#| "                this.firstNumber = 0; \n"
5373#| "                this.secondNumber = 0;\n"
5374#| "                this.counter = 0; \n"
5375#| "                this.entry.set_text(\"error\");\n"
5376#| "                this.operation = \"\";\n"
5377#| "\n"
5378#| "                return\n"
5379#| "            }\n"
5380#| "        } else {\n"
5381#| "            this.firstNumber = 0;\n"
5382#| "            this.secondNumber = 0;\n"
5383#| "            this.counter = 0;\n"
5384#| "            this.entry.set_text(\"error\");\n"
5385#| "        }\n"
5386#| "    }\n"
5387#| "};\n"
5388#| "\n"
5389#| "// Run the application\n"
5390#| "let app = new ButtonBoxExample();\n"
5391#| "app.application.run (ARGV);\n"
5392msgid ""
5393"#!/usr/bin/gjs\n"
5394"\n"
5395"imports.gi.versions.Gtk = '3.0';\n"
5396"\n"
5397"const GObject = imports.gi.GObject;\n"
5398"const Gtk = imports.gi.Gtk;\n"
5399"\n"
5400"class ButtonBoxExample {\n"
5401"\n"
5402"    // Create the application itself\n"
5403"    constructor() {\n"
5404"        this.application = new Gtk.Application({\n"
5405"            application_id: 'org.example.jsbuttonbox'\n"
5406"        });\n"
5407"\n"
5408"        // Connect 'activate' and 'startup' signals to the callback functions\n"
5409"        this.application.connect('activate', this._onActivate.bind(this));\n"
5410"        this.application.connect('startup', this._onStartup.bind(this));\n"
5411"    }\n"
5412"\n"
5413"    // Callback function for 'activate' signal presents windows when active\n"
5414"    _onActivate() {\n"
5415"        this.window.present();\n"
5416"    }\n"
5417"\n"
5418"    // Callback function for 'startup' signal builds the UI\n"
5419"    _onStartup() {\n"
5420"        this._buildUI();\n"
5421"    }\n"
5422"\n"
5423"    // Build the application's UI\n"
5424"    _buildUI() {\n"
5425"        // Create the application window\n"
5426"        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
5427"                                                    window_position: Gtk.WindowPosition.CENTER,\n"
5428"                                                    title: \"Calculator\",\n"
5429"                                                    default_width: 350,\n"
5430"                                                    default_height: 200,\n"
5431"                                                    border_width: 10 });\n"
5432"        this.entry = new Gtk.Entry();\n"
5433"        this.entry.set_text('0');\n"
5434"        // text aligned on the right\n"
5435"        this.entry.set_alignment(1);\n"
5436"        // the text in the entry cannot be modified by writing in it\n"
5437"        this.entry.set_can_focus(false);\n"
5438"\n"
5439"        // a grid\n"
5440"        this.grid = new Gtk.Grid();\n"
5441"        this.grid.set_row_spacing(5);\n"
5442"        \n"
5443"        // to attach the entry\n"
5444"        this.grid.attach(this.entry, 0, 0, 1, 1);\n"
5445"        \n"
5446"        // the labels for the buttons\n"
5447"        this.buttons = [ 7, 8, 9, '/', 4, 5, 6, '*', 1, 2, 3, '-', 'C', 0, '=', '+' ];\n"
5448"        \n"
5449"        // each row is a ButtonBox, attached to the grid            \n"
5450"        for (let i = 0; i &lt; 4; i++) {\n"
5451"            this.hbox = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL);\n"
5452"            this.hbox.set_spacing(5);\n"
5453"            this.grid.attach(this.hbox, 0, i + 1, 1, 1);\n"
5454"            // each ButtonBox has 4 buttons, connected to the callback function\n"
5455"            for (let j= 0; j &lt; 4; j++) {\n"
5456"                this.button = new Gtk.Button();\n"
5457"                this.buttonLabel = (this.buttons[i * 4 + j].toString());\n"
5458"                this.button.set_label(this.buttonLabel);\n"
5459"                this.button.set_can_focus(false);\n"
5460"                this.button.connect(\"clicked\", this._buttonClicked.bind(this));\n"
5461"                this.hbox.add(this.button);\n"
5462"            }\n"
5463"        }\n"
5464"            \n"
5465"        // some variables for the calculations\n"
5466"        this.firstNumber = 0;\n"
5467"        this.secondNumber = 0;\n"
5468"        this.counter = 0;\n"
5469"        this.operation = \"\";\n"
5470"\n"
5471"        // add the grid to the window\n"
5472"        this.window.add(this.grid);\n"
5473"        this.window.show_all();\n"
5474"    }\n"
5475"\n"
5476"    // callback function for all the buttons\n"
5477"    _buttonClicked(button) {\n"
5478"        this.button = button;\n"
5479"        // for the operations\n"
5480"        if (this.button.get_label() == '+') {\n"
5481"            this.counter += 1 \n"
5482"            if (this.counter &gt; 1)\n"
5483"                this._doOperation();\n"
5484"            this.entry.set_text('0');\n"
5485"            this.operation = \"plus\";\n"
5486"        }\n"
5487"\n"
5488"        else if (this.button.get_label() == '-') {\n"
5489"            this.counter += 1;\n"
5490"            if (this.counter &gt; 1)\n"
5491"                this._doOperation();\n"
5492"            this.entry.set_text('0');\n"
5493"            this.operation = \"minus\";\n"
5494"        }\n"
5495"\n"
5496"        else if (this.button.get_label() == '*') {\n"
5497"            this.counter += 1; \n"
5498"            if (this.counter &gt; 1)\n"
5499"                this._doOperation();\n"
5500"            this.entry.set_text('0');\n"
5501"            this.operation = \"multiplication\";\n"
5502"        }\n"
5503"\n"
5504"        else if (this.button.get_label() == '/') {\n"
5505"            this.counter += 1 \n"
5506"            if (this.counter &gt; 1)\n"
5507"                this._doOperation();\n"
5508"            this.entry.set_text('0');\n"
5509"            this.operation = \"division\";\n"
5510"        }\n"
5511"\n"
5512"        // for =\n"
5513"        else if (this.button.get_label() == '=') {\n"
5514"            this._doOperation();\n"
5515"            this.entry.set_text(this.firstNumber.toString());\n"
5516"            this.counter = 1;\n"
5517"        }\n"
5518"\n"
5519"        // for Cancel\n"
5520"        else if (this.button.get_label() == 'C') {\n"
5521"            this.firstNumber = 0;\n"
5522"            this.secondNumber = 0;\n"
5523"            this.counter = 0;\n"
5524"            this.entry.set_text('0');\n"
5525"            this.operation = \"\";\n"
5526"        }\n"
5527"\n"
5528"        // for a digit button\n"
5529"        else {\n"
5530"            this.newDigit = parseInt(this.button.get_label());\n"
5531"            if (this.entry.get_text() == \"error\")\n"
5532"                this.number = 0;\n"
5533"            else\n"
5534"                this.number = parseInt(this.entry.get_text());\n"
5535"            this.number = this.number * 10 + this.newDigit;            \n"
5536"            if (this.counter == 0)\n"
5537"                this.firstNumber = this.number;\n"
5538"            else\n"
5539"                this.secondNumber = this.number;\n"
5540"            this.entry.set_text(this.number.toString());\n"
5541"        }\n"
5542"     }\n"
5543"\n"
5544"     _doOperation() {\n"
5545"        if (this.operation == \"plus\") {\n"
5546"           this.firstNumber += this.secondNumber;\n"
5547"        } else if (this.operation == \"minus\") {\n"
5548"            this.firstNumber -= this.secondNumber;\n"
5549"        } else if (this.operation == \"multiplication\") {\n"
5550"            this.firstNumber *= this.secondNumber;\n"
5551"        } else if (this.operation == \"division\") {\n"
5552"            if (this.secondNumber != 0) {\n"
5553"                this.firstNumber /= this.secondNumber;\n"
5554"            } else {\n"
5555"                this.firstNumber = 0; \n"
5556"                this.secondNumber = 0;\n"
5557"                this.counter = 0; \n"
5558"                this.entry.set_text(\"error\");\n"
5559"                this.operation = \"\";\n"
5560"\n"
5561"                return\n"
5562"            }\n"
5563"        } else {\n"
5564"            this.firstNumber = 0;\n"
5565"            this.secondNumber = 0;\n"
5566"            this.counter = 0;\n"
5567"            this.entry.set_text(\"error\");\n"
5568"        }\n"
5569"    }\n"
5570"};\n"
5571"\n"
5572"// Run the application\n"
5573"let app = new ButtonBoxExample();\n"
5574"app.application.run (ARGV);\n"
5575msgstr ""
5576"#!/usr/bin/gjs\n"
5577"\n"
5578"imports.gi.versions.Gtk = '3.0';\n"
5579"\n"
5580"const GObject = imports.gi.GObject;\n"
5581"const Gtk = imports.gi.Gtk;\n"
5582"\n"
5583"class ButtonBoxExample {\n"
5584"\n"
5585"    // Create the application itself\n"
5586"    constructor() {\n"
5587"        this.application = new Gtk.Application({\n"
5588"            application_id: 'org.example.jsbuttonbox'\n"
5589"        });\n"
5590"\n"
5591"        // Connect 'activate' and 'startup' signals to the callback functions\n"
5592"        this.application.connect('activate', this._onActivate.bind(this));\n"
5593"        this.application.connect('startup', this._onStartup.bind(this));\n"
5594"    }\n"
5595"\n"
5596"    // Callback function for 'activate' signal presents windows when active\n"
5597"    _onActivate() {\n"
5598"        this.window.present();\n"
5599"    }\n"
5600"\n"
5601"    // Callback function for 'startup' signal builds the UI\n"
5602"    _onStartup() {\n"
5603"        this._buildUI();\n"
5604"    }\n"
5605"\n"
5606"    // Build the application's UI\n"
5607"    _buildUI() {\n"
5608"        // Create the application window\n"
5609"        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
5610"                                                    window_position: Gtk.WindowPosition.CENTER,\n"
5611"                                                    title: \"Calculator\",\n"
5612"                                                    default_width: 350,\n"
5613"                                                    default_height: 200,\n"
5614"                                                    border_width: 10 });\n"
5615"        this.entry = new Gtk.Entry();\n"
5616"        this.entry.set_text('0');\n"
5617"        // text aligned on the right\n"
5618"        this.entry.set_alignment(1);\n"
5619"        // the text in the entry cannot be modified by writing in it\n"
5620"        this.entry.set_can_focus(false);\n"
5621"\n"
5622"        // a grid\n"
5623"        this.grid = new Gtk.Grid();\n"
5624"        this.grid.set_row_spacing(5);\n"
5625"        \n"
5626"        // to attach the entry\n"
5627"        this.grid.attach(this.entry, 0, 0, 1, 1);\n"
5628"        \n"
5629"        // the labels for the buttons\n"
5630"        this.buttons = [ 7, 8, 9, '/', 4, 5, 6, '*', 1, 2, 3, '-', 'C', 0, '=', '+' ];\n"
5631"        \n"
5632"        // each row is a ButtonBox, attached to the grid            \n"
5633"        for (let i = 0; i &lt; 4; i++) {\n"
5634"            this.hbox = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL);\n"
5635"            this.hbox.set_spacing(5);\n"
5636"            this.grid.attach(this.hbox, 0, i + 1, 1, 1);\n"
5637"            // each ButtonBox has 4 buttons, connected to the callback function\n"
5638"            for (let j= 0; j &lt; 4; j++) {\n"
5639"                this.button = new Gtk.Button();\n"
5640"                this.buttonLabel = (this.buttons[i * 4 + j].toString());\n"
5641"                this.button.set_label(this.buttonLabel);\n"
5642"                this.button.set_can_focus(false);\n"
5643"                this.button.connect(\"clicked\", this._buttonClicked.bind(this));\n"
5644"                this.hbox.add(this.button);\n"
5645"            }\n"
5646"        }\n"
5647"            \n"
5648"        // some variables for the calculations\n"
5649"        this.firstNumber = 0;\n"
5650"        this.secondNumber = 0;\n"
5651"        this.counter = 0;\n"
5652"        this.operation = \"\";\n"
5653"\n"
5654"        // add the grid to the window\n"
5655"        this.window.add(this.grid);\n"
5656"        this.window.show_all();\n"
5657"    }\n"
5658"\n"
5659"    // callback function for all the buttons\n"
5660"    _buttonClicked(button) {\n"
5661"        this.button = button;\n"
5662"        // for the operations\n"
5663"        if (this.button.get_label() == '+') {\n"
5664"            this.counter += 1 \n"
5665"            if (this.counter &gt; 1)\n"
5666"                this._doOperation();\n"
5667"            this.entry.set_text('0');\n"
5668"            this.operation = \"plus\";\n"
5669"        }\n"
5670"\n"
5671"        else if (this.button.get_label() == '-') {\n"
5672"            this.counter += 1;\n"
5673"            if (this.counter &gt; 1)\n"
5674"                this._doOperation();\n"
5675"            this.entry.set_text('0');\n"
5676"            this.operation = \"minus\";\n"
5677"        }\n"
5678"\n"
5679"        else if (this.button.get_label() == '*') {\n"
5680"            this.counter += 1; \n"
5681"            if (this.counter &gt; 1)\n"
5682"                this._doOperation();\n"
5683"            this.entry.set_text('0');\n"
5684"            this.operation = \"multiplication\";\n"
5685"        }\n"
5686"\n"
5687"        else if (this.button.get_label() == '/') {\n"
5688"            this.counter += 1 \n"
5689"            if (this.counter &gt; 1)\n"
5690"                this._doOperation();\n"
5691"            this.entry.set_text('0');\n"
5692"            this.operation = \"division\";\n"
5693"        }\n"
5694"\n"
5695"        // for =\n"
5696"        else if (this.button.get_label() == '=') {\n"
5697"            this._doOperation();\n"
5698"            this.entry.set_text(this.firstNumber.toString());\n"
5699"            this.counter = 1;\n"
5700"        }\n"
5701"\n"
5702"        // for Cancel\n"
5703"        else if (this.button.get_label() == 'C') {\n"
5704"            this.firstNumber = 0;\n"
5705"            this.secondNumber = 0;\n"
5706"            this.counter = 0;\n"
5707"            this.entry.set_text('0');\n"
5708"            this.operation = \"\";\n"
5709"        }\n"
5710"\n"
5711"        // for a digit button\n"
5712"        else {\n"
5713"            this.newDigit = parseInt(this.button.get_label());\n"
5714"            if (this.entry.get_text() == \"error\")\n"
5715"                this.number = 0;\n"
5716"            else\n"
5717"                this.number = parseInt(this.entry.get_text());\n"
5718"            this.number = this.number * 10 + this.newDigit;            \n"
5719"            if (this.counter == 0)\n"
5720"                this.firstNumber = this.number;\n"
5721"            else\n"
5722"                this.secondNumber = this.number;\n"
5723"            this.entry.set_text(this.number.toString());\n"
5724"        }\n"
5725"     }\n"
5726"\n"
5727"     _doOperation() {\n"
5728"        if (this.operation == \"plus\") {\n"
5729"           this.firstNumber += this.secondNumber;\n"
5730"        } else if (this.operation == \"minus\") {\n"
5731"            this.firstNumber -= this.secondNumber;\n"
5732"        } else if (this.operation == \"multiplication\") {\n"
5733"            this.firstNumber *= this.secondNumber;\n"
5734"        } else if (this.operation == \"division\") {\n"
5735"            if (this.secondNumber != 0) {\n"
5736"                this.firstNumber /= this.secondNumber;\n"
5737"            } else {\n"
5738"                this.firstNumber = 0; \n"
5739"                this.secondNumber = 0;\n"
5740"                this.counter = 0; \n"
5741"                this.entry.set_text(\"error\");\n"
5742"                this.operation = \"\";\n"
5743"\n"
5744"                return\n"
5745"            }\n"
5746"        } else {\n"
5747"            this.firstNumber = 0;\n"
5748"            this.secondNumber = 0;\n"
5749"            this.counter = 0;\n"
5750"            this.entry.set_text(\"error\");\n"
5751"        }\n"
5752"    }\n"
5753"};\n"
5754"\n"
5755"// Run the application\n"
5756"let app = new ButtonBoxExample();\n"
5757"app.application.run (ARGV);\n"
5758
5759#. (itstool) path: item/p
5760#: C/buttonbox.js.page:38
5761msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ButtonBox.html\">GtkButtonBox</link>"
5762msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ButtonBox.html\">GtkButtonBox</link>"
5763
5764#. (itstool) path: item/p
5765#: C/buttonbox.js.page:39
5766msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Box.html\">GtkBox</link>"
5767msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Box.html\">GtkBox</link>"
5768
5769#. (itstool) path: item/p
5770#: C/buttonbox.js.page:40
5771msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Button.html\">GtkButton</link>"
5772msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Button.html\">GtkButton</link>"
5773
5774#. (itstool) path: item/p
5775#: C/buttonbox.js.page:41
5776msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Entry.html\">GtkEntry</link>"
5777msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Entry.html\">GtkEntry</link>"
5778
5779#. (itstool) path: item/p
5780#: C/buttonbox.js.page:42
5781msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Grid.html\">GtkGrid</link>"
5782msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Grid.html\">GtkGrid</link>"
5783
5784#. (itstool) path: info/title
5785#: C/buttonbox.py.page:8
5786msgctxt "text"
5787msgid "ButtonBox (Python)"
5788msgstr "ButtonBox (Python)"
5789
5790#. (itstool) path: section/code
5791#: C/buttonbox.py.page:32
5792#, no-wrap
5793msgid ""
5794"from gi.repository import Gtk\n"
5795"import sys\n"
5796"\n"
5797"\n"
5798"class MyWindow(Gtk.ApplicationWindow):\n"
5799"\n"
5800"    def __init__(self, app):\n"
5801"        Gtk.Window.__init__(self, title=\"Calculator\", application=app)\n"
5802"        self.set_default_size(350, 200)\n"
5803"        self.set_border_width(10)\n"
5804"\n"
5805"        # an entry\n"
5806"        self.entry = Gtk.Entry()\n"
5807"        # with an initial text\n"
5808"        self.entry.set_text('0')\n"
5809"        # text aligned on the right\n"
5810"        self.entry.set_alignment(1)\n"
5811"        # the text in the entry cannot be modified writing in it\n"
5812"        self.entry.set_can_focus(False)\n"
5813"\n"
5814"        # a grid\n"
5815"        grid = Gtk.Grid()\n"
5816"        grid.set_row_spacing(5)\n"
5817"\n"
5818"        # to attach the entry\n"
5819"        grid.attach(self.entry, 0, 0, 1, 1)\n"
5820"\n"
5821"        # the labels for the buttons\n"
5822"        buttons = [7, 8, 9, '/',\n"
5823"                   4, 5, 6, '*',\n"
5824"                   1, 2, 3, '-',\n"
5825"                   'C', 0, '=', '+']\n"
5826"\n"
5827"        # each row is a ButtonBox, attached to the grid\n"
5828"        for i in range(4):\n"
5829"            hbox = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL)\n"
5830"            hbox.set_spacing(5)\n"
5831"            grid.attach(hbox, 0, i + 1, 1, 1)\n"
5832"            # each ButtonBox has 4 buttons, connected to the callback function\n"
5833"            for j in range(4):\n"
5834"                button = Gtk.Button(label=buttons[i * 4 + j])\n"
5835"                button.set_can_focus(False)\n"
5836"                button.connect(\"clicked\", self.button_clicked)\n"
5837"                hbox.add(button)\n"
5838"\n"
5839"        # some variables for the calculations\n"
5840"        self.first_number = 0\n"
5841"        self.second_number = 0\n"
5842"        self.counter = 0\n"
5843"        self.operation = \"\"\n"
5844"\n"
5845"        # add the grid to the window\n"
5846"        self.add(grid)\n"
5847"\n"
5848"    # callback function for all the buttons\n"
5849"    def button_clicked(self, button):\n"
5850"        # for the operations\n"
5851"        if button.get_label() == '+':\n"
5852"            self.counter += 1\n"
5853"            if self.counter &gt; 1:\n"
5854"                self.do_operation()\n"
5855"            self.entry.set_text('0')\n"
5856"            self.operation = \"plus\"\n"
5857"        elif button.get_label() == '-':\n"
5858"            self.counter += 1\n"
5859"            if self.counter &gt; 1:\n"
5860"                self.do_operation()\n"
5861"            self.entry.set_text('0')\n"
5862"            self.operation = \"minus\"\n"
5863"        elif button.get_label() == '*':\n"
5864"            self.counter += 1\n"
5865"            if self.counter &gt; 1:\n"
5866"                self.do_operation()\n"
5867"            self.entry.set_text('0')\n"
5868"            self.operation = \"multiplication\"\n"
5869"        elif button.get_label() == '/':\n"
5870"            self.counter += 1\n"
5871"            if self.counter &gt; 1:\n"
5872"                self.do_operation()\n"
5873"            self.entry.set_text('0')\n"
5874"            self.operation = \"division\"\n"
5875"        # for =\n"
5876"        elif button.get_label() == '=':\n"
5877"            self.do_operation()\n"
5878"            self.entry.set_text(str(self.first_number))\n"
5879"            self.counter = 1\n"
5880"        # for Cancel\n"
5881"        elif button.get_label() == 'C':\n"
5882"            self.first_number = 0\n"
5883"            self.second_number = 0\n"
5884"            self.counter = 0\n"
5885"            self.entry.set_text('')\n"
5886"            self.operation = \"\"\n"
5887"        # for a digit button\n"
5888"        else:\n"
5889"            new_digit = int(button.get_label())\n"
5890"            if self.entry.get_text() == 'error':\n"
5891"                number = 0\n"
5892"            else:\n"
5893"                number = int(self.entry.get_text())\n"
5894"            number = number * 10 + new_digit\n"
5895"            if self.counter == 0:\n"
5896"                self.first_number = number\n"
5897"            else:\n"
5898"                self.second_number = number\n"
5899"            self.entry.set_text(str(number))\n"
5900"\n"
5901"    def do_operation(self):\n"
5902"        if self.operation == \"plus\":\n"
5903"            self.first_number += self.second_number\n"
5904"        elif self.operation == \"minus\":\n"
5905"            self.first_number -= self.second_number\n"
5906"        elif self.operation == \"multiplication\":\n"
5907"            self.first_number *= self.second_number\n"
5908"        elif self.operation == \"division\":\n"
5909"            try:\n"
5910"                self.first_number /= self.second_number\n"
5911"            except ZeroDivisionError:\n"
5912"                self.first_number = 0\n"
5913"                self.second_number = 0\n"
5914"                self.counter = 0\n"
5915"                self.entry.set_text('error')\n"
5916"                self.operation = \"\"\n"
5917"                return\n"
5918"        else:\n"
5919"            self.first_number = 0\n"
5920"            self.second_number = 0\n"
5921"            self.counter = 0\n"
5922"            self.entry.set_text('error')\n"
5923"\n"
5924"\n"
5925"class MyApplication(Gtk.Application):\n"
5926"\n"
5927"    def __init__(self):\n"
5928"        Gtk.Application.__init__(self)\n"
5929"\n"
5930"    def do_activate(self):\n"
5931"        win = MyWindow(self)\n"
5932"        win.show_all()\n"
5933"\n"
5934"    def do_startup(self):\n"
5935"        Gtk.Application.do_startup(self)\n"
5936"\n"
5937"app = MyApplication()\n"
5938"exit_status = app.run(sys.argv)\n"
5939"sys.exit(exit_status)\n"
5940msgstr ""
5941"from gi.repository import Gtk\n"
5942"import sys\n"
5943"\n"
5944"\n"
5945"class MyWindow(Gtk.ApplicationWindow):\n"
5946"\n"
5947"    def __init__(self, app):\n"
5948"        Gtk.Window.__init__(self, title=\"Calculator\", application=app)\n"
5949"        self.set_default_size(350, 200)\n"
5950"        self.set_border_width(10)\n"
5951"\n"
5952"        # an entry\n"
5953"        self.entry = Gtk.Entry()\n"
5954"        # with an initial text\n"
5955"        self.entry.set_text('0')\n"
5956"        # text aligned on the right\n"
5957"        self.entry.set_alignment(1)\n"
5958"        # the text in the entry cannot be modified writing in it\n"
5959"        self.entry.set_can_focus(False)\n"
5960"\n"
5961"        # a grid\n"
5962"        grid = Gtk.Grid()\n"
5963"        grid.set_row_spacing(5)\n"
5964"\n"
5965"        # to attach the entry\n"
5966"        grid.attach(self.entry, 0, 0, 1, 1)\n"
5967"\n"
5968"        # the labels for the buttons\n"
5969"        buttons = [7, 8, 9, '/',\n"
5970"                   4, 5, 6, '*',\n"
5971"                   1, 2, 3, '-',\n"
5972"                   'C', 0, '=', '+']\n"
5973"\n"
5974"        # each row is a ButtonBox, attached to the grid\n"
5975"        for i in range(4):\n"
5976"            hbox = Gtk.ButtonBox.new(Gtk.Orientation.HORIZONTAL)\n"
5977"            hbox.set_spacing(5)\n"
5978"            grid.attach(hbox, 0, i + 1, 1, 1)\n"
5979"            # each ButtonBox has 4 buttons, connected to the callback function\n"
5980"            for j in range(4):\n"
5981"                button = Gtk.Button(label=buttons[i * 4 + j])\n"
5982"                button.set_can_focus(False)\n"
5983"                button.connect(\"clicked\", self.button_clicked)\n"
5984"                hbox.add(button)\n"
5985"\n"
5986"        # some variables for the calculations\n"
5987"        self.first_number = 0\n"
5988"        self.second_number = 0\n"
5989"        self.counter = 0\n"
5990"        self.operation = \"\"\n"
5991"\n"
5992"        # add the grid to the window\n"
5993"        self.add(grid)\n"
5994"\n"
5995"    # callback function for all the buttons\n"
5996"    def button_clicked(self, button):\n"
5997"        # for the operations\n"
5998"        if button.get_label() == '+':\n"
5999"            self.counter += 1\n"
6000"            if self.counter &gt; 1:\n"
6001"                self.do_operation()\n"
6002"            self.entry.set_text('0')\n"
6003"            self.operation = \"plus\"\n"
6004"        elif button.get_label() == '-':\n"
6005"            self.counter += 1\n"
6006"            if self.counter &gt; 1:\n"
6007"                self.do_operation()\n"
6008"            self.entry.set_text('0')\n"
6009"            self.operation = \"minus\"\n"
6010"        elif button.get_label() == '*':\n"
6011"            self.counter += 1\n"
6012"            if self.counter &gt; 1:\n"
6013"                self.do_operation()\n"
6014"            self.entry.set_text('0')\n"
6015"            self.operation = \"multiplication\"\n"
6016"        elif button.get_label() == '/':\n"
6017"            self.counter += 1\n"
6018"            if self.counter &gt; 1:\n"
6019"                self.do_operation()\n"
6020"            self.entry.set_text('0')\n"
6021"            self.operation = \"division\"\n"
6022"        # for =\n"
6023"        elif button.get_label() == '=':\n"
6024"            self.do_operation()\n"
6025"            self.entry.set_text(str(self.first_number))\n"
6026"            self.counter = 1\n"
6027"        # for Cancel\n"
6028"        elif button.get_label() == 'C':\n"
6029"            self.first_number = 0\n"
6030"            self.second_number = 0\n"
6031"            self.counter = 0\n"
6032"            self.entry.set_text('')\n"
6033"            self.operation = \"\"\n"
6034"        # for a digit button\n"
6035"        else:\n"
6036"            new_digit = int(button.get_label())\n"
6037"            if self.entry.get_text() == 'error':\n"
6038"                number = 0\n"
6039"            else:\n"
6040"                number = int(self.entry.get_text())\n"
6041"            number = number * 10 + new_digit\n"
6042"            if self.counter == 0:\n"
6043"                self.first_number = number\n"
6044"            else:\n"
6045"                self.second_number = number\n"
6046"            self.entry.set_text(str(number))\n"
6047"\n"
6048"    def do_operation(self):\n"
6049"        if self.operation == \"plus\":\n"
6050"            self.first_number += self.second_number\n"
6051"        elif self.operation == \"minus\":\n"
6052"            self.first_number -= self.second_number\n"
6053"        elif self.operation == \"multiplication\":\n"
6054"            self.first_number *= self.second_number\n"
6055"        elif self.operation == \"division\":\n"
6056"            try:\n"
6057"                self.first_number /= self.second_number\n"
6058"            except ZeroDivisionError:\n"
6059"                self.first_number = 0\n"
6060"                self.second_number = 0\n"
6061"                self.counter = 0\n"
6062"                self.entry.set_text('error')\n"
6063"                self.operation = \"\"\n"
6064"                return\n"
6065"        else:\n"
6066"            self.first_number = 0\n"
6067"            self.second_number = 0\n"
6068"            self.counter = 0\n"
6069"            self.entry.set_text('error')\n"
6070"\n"
6071"\n"
6072"class MyApplication(Gtk.Application):\n"
6073"\n"
6074"    def __init__(self):\n"
6075"        Gtk.Application.__init__(self)\n"
6076"\n"
6077"    def do_activate(self):\n"
6078"        win = MyWindow(self)\n"
6079"        win.show_all()\n"
6080"\n"
6081"    def do_startup(self):\n"
6082"        Gtk.Application.do_startup(self)\n"
6083"\n"
6084"app = MyApplication()\n"
6085"exit_status = app.run(sys.argv)\n"
6086"sys.exit(exit_status)\n"
6087
6088#. (itstool) path: section/title
6089#: C/buttonbox.py.page:36
6090msgid "Useful methods for a ButtonBox widget"
6091msgstr "ButtonBox 위젯에 쓸만한 메서드"
6092
6093#. (itstool) path: item/p
6094#: C/buttonbox.py.page:38
6095msgid ""
6096"The layout of the ButtonBox are set with <code>set_layout(layout)</code>, where <code>layout</code> can be "
6097"<code>Gtk.ButtonBoxStyle.SPREAD</code> (buttons are evenly spread across the box), <code>Gtk.ButtonBoxStyle.EDGE</"
6098"code> (buttons are placed at the edges of the box), <code>Gtk.ButtonBoxStyle.START</code> (buttons are grouped "
6099"towards the start of the box), <code>Gtk.ButtonBoxStyle.END</code> (buttons are grouped towards the end of the "
6100"box), <code>Gtk.ButtonBoxStyle.CENTER</code> (buttons are centered in the box)."
6101msgstr ""
6102"ButtonBox 배치는 <code>set_layout(layout)</code> 함수로 설정하며, <code>layout</code>에 들어갈 값은 <code>Gtk."
6103"ButtonBoxStyle.SPREAD</code>(단추가 상자 크기만큼 늘어남), <code>Gtk.ButtonBoxStyle.EDGE</code>(단추가 상자 가장자"
6104"리에 붙음), <code>Gtk.ButtonBoxStyle.START</code>(단추가 상자 시작 부분에 모임), <code>Gtk.ButtonBoxStyle.END</"
6105"code>(단추가 상자 끝부분에 모임), <code>Gtk.ButtonBoxStyle.CENTER</code>(단추가 상자 한가운데로 모임)가 될 수 있습"
6106"니다."
6107
6108#. (itstool) path: item/p
6109#: C/buttonbox.py.page:39
6110msgid ""
6111"<code>set_child_secondary(button, is_secondary)</code> sets whether <code>button</code> should appear in a "
6112"secondary group of children. A typical use of a secondary child is the help button in a dialog. This group appears "
6113"after the other children if the style is <code>START</code>, <code>SPREAD</code> or <code>EDGE</code>, and before "
6114"the other children if the style is <code>END</code>. If the style is <code>START</code> or <code>END</code>, then "
6115"the secondary children are aligned at the other end of the button box from the main children. For the other "
6116"styles, they appear immediately next to the main children."
6117msgstr ""
6118"<code>set_child_secondary(button, is_secondary)</code> 함수로 <code>button</code> 이 하위 두번째 모임으로 나타날지 "
6119"여부를 설정합니다. 2차 하위요소는 대화상자의 도움말 단추가 될 수 있습니다. 이 모임은 모양새가 <code>START</code>, "
6120"<code>SPREAD</code>, <code>EDGE</code> 중 하나고, 그 이전 하위 요소의 모양새가 <code>END</code>일 때, 다른 하위 요"
6121"소의 전에 나타납니다. 모양새가 <code>START</code>, <code>END</code> 중 하나면, 주 하위 요소의 단추 상자 다른 끝부분"
6122"에 두번째 하위 요소를 정렬합니다. 다른 모양새로 설정하면, 주 하위 요소 바로 다음에 나타냅니다."
6123
6124#. (itstool) path: item/p
6125#: C/buttonbox.py.page:40
6126msgid ""
6127"<code>set_child_non_homogeneous(button, is_non_homogeneous)</code> sets whether the child is exempted from "
6128"homogeneous sizing. Default value is <code>False</code>."
6129msgstr ""
6130"<code>set_child_non_homogeneous(button, is_non_homogeneous)</code> 함수로 하위 요소에 대한 동일 크기 조절 방식 비적"
6131"용 여부를 설정합니다. 기본 값은 <code>false</code>입니다."
6132
6133#. (itstool) path: item/p
6134#: C/buttonbox.py.page:41
6135msgid "<code>set_spacing(spacing)</code> sets the spacing, in pixels, between the buttons of the box."
6136msgstr "<code>set_spacing(spacing)</code> 함수는 상자안의 단추 사이 간격을 픽셀 단위로 설정합니다."
6137
6138#. (itstool) path: item/p
6139#: C/buttonbox.py.page:49
6140msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkButtonBox.html\">GtkButtonBox</link>"
6141msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkButtonBox.html\">GtkButtonBox</link>"
6142
6143#. (itstool) path: item/p
6144#: C/buttonbox.py.page:50
6145msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkBox.html\">GtkBox</link>"
6146msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkBox.html\">GtkBox</link>"
6147
6148#. (itstool) path: item/p
6149#: C/buttonbox.py.page:52 C/entry.c.page:34
6150msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkEntry.html\">GtkEntry</link>"
6151msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkEntry.html\">GtkEntry</link>"
6152
6153#. (itstool) path: item/p
6154#: C/buttonbox.py.page:53 C/grid.c.page:36 C/radiobutton.c.page:37 C/spinbutton.c.page:40 C/statusbar.c.page:40
6155#: C/switch.c.page:37 C/togglebutton.c.page:40
6156msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkGrid.html\">GtkGrid</link>"
6157msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkGrid.html\">GtkGrid</link>"
6158
6159#. (itstool) path: info/title
6160#: C/c.page:9
6161msgctxt "link"
6162msgid "C"
6163msgstr "C"
6164
6165#. (itstool) path: credit/name
6166#: C/c.page:18
6167msgid "Bastian Ilso"
6168msgstr "Bastian Ilso"
6169
6170#. (itstool) path: info/desc
6171#: C/c.page:24
6172msgid "Tutorials and code samples in C."
6173msgstr "C언어 기반 지침 및 예제 코드입니다."
6174
6175#. (itstool) path: page/title
6176#: C/c.page:27
6177msgid "Platform Demos in C"
6178msgstr "C언어 기반 플랫폼 데모"
6179
6180#. (itstool) path: section/title
6181#: C/c.page:31
6182msgid "Prerequisites"
6183msgstr "준비요건"
6184
6185#. (itstool) path: section/p
6186#: C/c.page:33
6187msgid ""
6188"To compile these platform demos you will need a C compiler, for example <link href=\"https://gcc.gnu.org/\">gcc</"
6189"link>. You will also need GTK+ 3 including headers and pkg-config files. Linux distributions usually abstract GTK+ "
6190"3 headers and pkg-config files into separate packages called <em>gtk3-devel</em>, <em>gtk3-dev</em> or similar."
6191msgstr ""
6192"플랫폼 데모를 컴파일하려면 <link href=\"https://gcc.gnu.org/\">gcc</link> 같은 C 컴파일러가 필요합니다. 또한 헤더"
6193"와 pkg-config 파일이 있는 GTK+ 3가 필요합니다. 보통, 리눅스 배포판에서는 추상 GTK+ 3 헤더와 pkg-config 파일을 "
6194"<em>gtk3-devel</em>, <em>gtk3-dev</em> 같은 식으로 별개 패키지로 배포합니다."
6195
6196#. (itstool) path: section/title
6197#: C/c.page:44
6198msgid "Guidelines for new developers"
6199msgstr "새 개발자 지침서"
6200
6201#. (itstool) path: section/p
6202#: C/c.page:46
6203msgid ""
6204"Beyond the prerequisites mentioned above, several tools has been developed to assist you further in developing "
6205"your GNOME application. GNOME also recommends a specific coding style and conventions which this section will "
6206"elaborate further upon."
6207msgstr ""
6208"이전에 언급했던 준비사항 이전에, 그놈 프로그램 개발을 도와주려 개발한 몇가지 도구가 있습니다. 그놈에서는 지정 코드 "
6209"작성 방식과 앞으로 이 장에서 계속 따라갈 관례를 추천합니다."
6210
6211#. (itstool) path: section/title
6212#: C/c.page:52
6213msgid "Recommended tools"
6214msgstr "추천 도구"
6215
6216#. (itstool) path: item/p
6217#: C/c.page:56
6218msgid "<link href=\"https://wiki.gnome.org/Apps/Devhelp\">DevHelp</link>: An API documentation browser for GNOME."
6219msgstr "<link href=\"https://wiki.gnome.org/Apps/Devhelp\">DevHelp</link>: 그놈 API 문서 탐색기."
6220
6221#. (itstool) path: item/p
6222#: C/c.page:60
6223msgid ""
6224"A GNOME IDE (Integrated Development Environment). An IDE can assist you in writing and debugging C code, for "
6225"example <link href=\"https://wiki.gnome.org/Apps/Builder\">Builder</link> or <link href=\"https://wiki.gnome.org/"
6226"Apps/Anjuta\">Anjuta</link>."
6227msgstr ""
6228"그놈 IDE(통합 개발 환경). <link href=\"https://wiki.gnome.org/Apps/Builder\">빌더</link>나 <link href=\"https://"
6229"wiki.gnome.org/Apps/Anjuta\">안주타</link> 같은 IDE에서 C 코드를 작성하고 디버깅하는 과정을 도와줄 수 있습니다."
6230
6231#. (itstool) path: item/p
6232#: C/c.page:66
6233msgid "<link href=\"http://glade.gnome.org/\">Glade</link>: A user interface designer for GTK+ Applications."
6234msgstr "<link href=\"http://glade.gnome.org/\">글레이드</link>: GTK+ 프로그램용 사용자 인터페이스 디자이너."
6235
6236#. (itstool) path: item/p
6237#: C/c.page:70
6238msgid ""
6239"An IRC Client, for example <link href=\"https://wiki.gnome.org/Apps/Polari\">Polari</link> or <link href=\"https://"
6240"wiki.gnome.org/Apps/Empathy\">Empathy</link>. If you run into problems while following the beginner tutorials, "
6241"join #gnome on <em>irc.gnome.org</em>."
6242msgstr ""
6243"<link href=\"https://wiki.gnome.org/Apps/Polari\">폴라리</link>나 <link href=\"https://wiki.gnome.org/Apps/Empathy"
6244"\">엠퍼시</link> 같은 IRC 클라이언트. 초보자 지침서를 따라가다 문제에 봉착하면 <em>irc.gnome.org</em>의 #gnome으로 "
6245"오세요."
6246
6247#. (itstool) path: section/title
6248#: C/c.page:80
6249msgid "Coding Style"
6250msgstr "코드 작성 방식"
6251
6252#. (itstool) path: section/p
6253#: C/c.page:82
6254msgid ""
6255"Most applications in the GNOME project is written in the <link href=\"http://en.wikipedia.org/wiki/"
6256"Indent_style#GNU_style\">GNU style</link> of indentation. The tutorials and code examples presented are following "
6257"this convention and you are recommended to do so too."
6258msgstr ""
6259"그놈 프로젝트의 대부분 프로그램은 <link href=\"http://en.wikipedia.org/wiki/Indent_style#GNU_style\">GNU 방식</"
6260"link> 들여쓰기로 작성했습니다. 지침서와 예제 코드는 이 관례를 따랐으며,  여러분도 이 방식을 따르는게 좋습니다."
6261
6262#. (itstool) path: section/title
6263#: C/c.page:89
6264msgid "Executing Code"
6265msgstr "코드 실행"
6266
6267#. (itstool) path: item/p
6268#: C/c.page:95
6269msgid "Copy and paste the code into <var>filename</var>.c"
6270msgstr "<var>filename</var>.c 파일에 코드를 복사하여 붙여넣으십시오"
6271
6272#. (itstool) path: item/screen
6273#: C/c.page:99
6274#, no-wrap
6275msgid "gcc <var>filename</var>.c `pkg-config --cflags --libs gtk+-3.0` -o <var>filename</var>"
6276msgstr "gcc <var>filename</var>.c `pkg-config --cflags --libs gtk+-3.0` -o <var>filename</var>"
6277
6278#. (itstool) path: note/p
6279#: C/c.page:105
6280msgid ""
6281"For more information about compiling GTK+ programs see <link href=\"http://developer.gnome.org/gtk3/3.4/gtk-"
6282"compiling.html\">Compiling GTK+ Applications on UNIX</link>."
6283msgstr ""
6284"GTK+ 프로그램 컴파일에 대해 더 알아보시려면 <link href=\"http://developer.gnome.org/gtk3/3.4/gtk-compiling.html\">"
6285"유닉스 GTK+ 프로그램 컴파일</link>을 살펴보십시오."
6286
6287#. (itstool) path: section/title
6288#: C/c.page:117
6289msgid "Widget Code Examples"
6290msgstr "위젯 예제 코드"
6291
6292#. (itstool) path: info/title
6293#: C/checkbutton.c.page:8
6294msgctxt "text"
6295msgid "CheckButton (C)"
6296msgstr "CheckButton(C)"
6297
6298#. (itstool) path: info/desc
6299#: C/checkbutton.c.page:18
6300msgid "Create widgets with a discrete ToggleButton"
6301msgstr "개별 ToggleButton으로 위젯을 만듭니다"
6302
6303#. (itstool) path: page/title
6304#: C/checkbutton.c.page:21 C/checkbutton.js.page:21 C/checkbutton.py.page:22 C/checkbutton.vala.page:21
6305msgid "CheckButton"
6306msgstr "CheckButton"
6307
6308#. (itstool) path: page/media
6309#. This is a reference to an external file such as an image or video. When
6310#. the file changes, the md5 hash will change to let you know you need to
6311#. update your localized copy. The msgstr is not used at all. Set it to
6312#. whatever you like once you have updated your copy of the file.
6313#: C/checkbutton.c.page:22 C/checkbutton.js.page:22 C/checkbutton.py.page:23 C/checkbutton.vala.page:22
6314msgctxt "_"
6315msgid "external ref='media/checkbutton.png' md5='7921a6812c87dd2b3781f4fad241e858'"
6316msgstr ""
6317
6318#. (itstool) path: page/p
6319#: C/checkbutton.c.page:23 C/checkbutton.py.page:24 C/checkbutton.vala.page:23
6320msgid "This CheckButton toggles the title."
6321msgstr "CheckButton으로 제목 표시 여부를 전환합니다."
6322
6323#. (itstool) path: page/code
6324#: C/checkbutton.c.page:25
6325#, no-wrap
6326msgid ""
6327"#include &lt;gtk/gtk.h&gt;\n"
6328"\n"
6329"/* signal handler for \"toggled\" signal of the CheckButton */\n"
6330"static void\n"
6331"toggled_cb (GtkToggleButton *toggle_button,\n"
6332"            gpointer         user_data)\n"
6333"{\n"
6334"  GtkWindow *window = user_data;\n"
6335"\n"
6336"  if (gtk_toggle_button_get_active (toggle_button))\n"
6337"      gtk_window_set_title (window, \"CheckButton Example\");\n"
6338"  else\n"
6339"      gtk_window_set_title (window, \"\");\n"
6340"}\n"
6341"\n"
6342"static void\n"
6343"activate (GtkApplication *app,\n"
6344"          gpointer        user_data)\n"
6345"{\n"
6346"  GtkWidget *window;\n"
6347"  GtkWidget *checkbutton;\n"
6348"\n"
6349"  window = gtk_application_window_new (app);\n"
6350"  gtk_window_set_title (GTK_WINDOW (window), \"CheckButton Example\");\n"
6351"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 100);\n"
6352"\n"
6353"  checkbutton = gtk_check_button_new_with_label (\"Show Title\");\n"
6354"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), TRUE);\n"
6355"  g_signal_connect (GTK_TOGGLE_BUTTON (checkbutton), \"toggled\", G_CALLBACK (toggled_cb), window);\n"
6356"  gtk_container_add (GTK_CONTAINER (window), checkbutton);\n"
6357"  gtk_widget_show_all (window);\n"
6358"}\n"
6359"\n"
6360"int\n"
6361"main (int argc, char **argv)\n"
6362"{\n"
6363"  GtkApplication *app;\n"
6364"  int status;\n"
6365"\n"
6366"  app = gtk_application_new (\"org.example.checkbutton\", G_APPLICATION_FLAGS_NONE);\n"
6367"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
6368"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
6369"  g_object_unref (app);\n"
6370"\n"
6371"  return status;\n"
6372"}\n"
6373msgstr ""
6374"#include &lt;gtk/gtk.h&gt;\n"
6375"\n"
6376"/* signal handler for \"toggled\" signal of the CheckButton */\n"
6377"static void\n"
6378"toggled_cb (GtkToggleButton *toggle_button,\n"
6379"            gpointer         user_data)\n"
6380"{\n"
6381"  GtkWindow *window = user_data;\n"
6382"\n"
6383"  if (gtk_toggle_button_get_active (toggle_button))\n"
6384"      gtk_window_set_title (window, \"CheckButton Example\");\n"
6385"  else\n"
6386"      gtk_window_set_title (window, \"\");\n"
6387"}\n"
6388"\n"
6389"static void\n"
6390"activate (GtkApplication *app,\n"
6391"          gpointer        user_data)\n"
6392"{\n"
6393"  GtkWidget *window;\n"
6394"  GtkWidget *checkbutton;\n"
6395"\n"
6396"  window = gtk_application_window_new (app);\n"
6397"  gtk_window_set_title (GTK_WINDOW (window), \"CheckButton Example\");\n"
6398"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 100);\n"
6399"\n"
6400"  checkbutton = gtk_check_button_new_with_label (\"Show Title\");\n"
6401"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), TRUE);\n"
6402"  g_signal_connect (GTK_TOGGLE_BUTTON (checkbutton), \"toggled\", G_CALLBACK (toggled_cb), window);\n"
6403"  gtk_container_add (GTK_CONTAINER (window), checkbutton);\n"
6404"  gtk_widget_show_all (window);\n"
6405"}\n"
6406"\n"
6407"int\n"
6408"main (int argc, char **argv)\n"
6409"{\n"
6410"  GtkApplication *app;\n"
6411"  int status;\n"
6412"\n"
6413"  app = gtk_application_new (\"org.example.checkbutton\", G_APPLICATION_FLAGS_NONE);\n"
6414"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
6415"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
6416"  g_object_unref (app);\n"
6417"\n"
6418"  return status;\n"
6419"}\n"
6420
6421#. (itstool) path: item/p
6422#: C/checkbutton.c.page:30
6423msgid "<link href=\"http://developer.gnome.org/gtk3/3.2/GtkCheckButton.html\">GtkCheckButton</link>"
6424msgstr "<link href=\"http://developer.gnome.org/gtk3/3.2/GtkCheckButton.html\">GtkCheckButton</link>"
6425
6426#. (itstool) path: info/title
6427#: C/checkbutton.js.page:8
6428msgctxt "text"
6429msgid "CheckButton (JavaScript)"
6430msgstr "CheckButton(JavaScript)"
6431
6432#. (itstool) path: info/desc
6433#: C/checkbutton.js.page:18
6434msgid "A box which can be checked or unchecked"
6435msgstr "표시를 하거나 지울 수 있는 상자입니다"
6436
6437#. (itstool) path: page/p
6438#: C/checkbutton.js.page:23
6439msgid ""
6440"This application has a CheckButton. Whether the box is checked dictates whether the window's title bar shows "
6441"anything."
6442msgstr ""
6443"이 프로그램에는 CheckButton이 있습니다. 이 확인 상자의 표시 여부에 따라 창 제목 표시줄에 무언가를 나타냅니다."
6444
6445#. (itstool) path: page/p
6446#: C/checkbutton.js.page:24
6447msgid ""
6448"A CheckButton sends the \"toggled\" signal when it's checked or unchecked. While it's checked, the \"active\" "
6449"property is true. While it's not, \"active\" tests as false."
6450msgstr ""
6451"CheckButton에 표시하거나 지울 때, \"toggled\" 시그널을 보냅니다. 표시해두면 \"active\" 속성 값이 true가 되고, 그렇"
6452"지 않으면 false가 됩니다."
6453
6454#. (itstool) path: section/title
6455#: C/checkbutton.js.page:28 C/comboboxtext.js.page:30 C/combobox.js.page:33 C/guitar-tuner.js.page:55
6456#: C/hello-world.js.page:53 C/hello-world.py.page:46 C/messagedialog.js.page:31 C/radiobutton.js.page:28
6457#: C/scale.js.page:28 C/spinbutton.js.page:31 C/statusbar.js.page:28 C/switch.js.page:35 C/textview.js.page:38
6458#: C/togglebutton.js.page:28 C/treeview_simple_liststore.js.page:37 C/weatherAppMain.js.page:41
6459msgid "Libraries to import"
6460msgstr "가져올 라이브러리"
6461
6462#. (itstool) path: section/code
6463#: C/checkbutton.js.page:29
6464#, no-wrap
6465msgid ""
6466"\n"
6467"#!/usr/bin/gjs\n"
6468"\n"
6469"imports.gi.versions.Gtk = '3.0';\n"
6470"\n"
6471"const Gio = imports.gi.Gio;\n"
6472"const Gtk = imports.gi.Gtk;\n"
6473msgstr ""
6474"\n"
6475"#!/usr/bin/gjs\n"
6476"\n"
6477"imports.gi.versions.Gtk = '3.0';\n"
6478"\n"
6479"const Gio = imports.gi.Gio;\n"
6480"const Gtk = imports.gi.Gtk;\n"
6481
6482#. (itstool) path: section/p
6483#: C/checkbutton.js.page:37 C/comboboxtext.js.page:37 C/combobox.js.page:42 C/messagedialog.js.page:39
6484#: 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
6485#: C/textview.js.page:45 C/togglebutton.js.page:36 C/treeview_simple_liststore.js.page:46
6486msgid ""
6487"These are the libraries we need to import for this application to run. Remember that the line which tells GNOME "
6488"that we're using Gjs always needs to go at the start."
6489msgstr ""
6490"이 프로그램을 실행할 때 가져올 라이브러리입니다. 시작 부분에 항상 gjs가 필요함을 알리는 줄을 작성해야 함을 기억하십"
6491"시오."
6492
6493#. (itstool) path: section/title
6494#: C/checkbutton.js.page:41 C/comboboxtext.js.page:41 C/combobox.js.page:46 C/messagedialog.js.page:43
6495#: 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
6496#: C/textview.js.page:49 C/togglebutton.js.page:40 C/treeview_simple_liststore.js.page:50
6497msgid "Creating the application window"
6498msgstr "프로그램 창 만들기"
6499
6500#. (itstool) path: section/code
6501#: C/checkbutton.js.page:42
6502#, no-wrap
6503msgid ""
6504"\n"
6505"class CheckButtonExample {\n"
6506"    // Create the application itself\n"
6507"    constructor() {\n"
6508"        this.application = new Gtk.Application({\n"
6509"            application_id: 'org.example.jscheckbutton',\n"
6510"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
6511"        });\n"
6512"\n"
6513"    // Connect 'activate' and 'startup' signals to the callback functions\n"
6514"    this.application.connect('activate', this._onActivate.bind(this));\n"
6515"    this.application.connect('startup', this._onStartup.bind(this));\n"
6516"    }\n"
6517"\n"
6518"    // Callback function for 'activate' signal presents window when active\n"
6519"    _onActivate() {\n"
6520"        this._window.present();\n"
6521"    }\n"
6522"\n"
6523"    // Callback function for 'startup' signal builds the UI\n"
6524"    _onStartup() {\n"
6525"        this._buildUI ();\n"
6526"    }\n"
6527msgstr ""
6528"\n"
6529"class CheckButtonExample {\n"
6530"    // Create the application itself\n"
6531"    constructor() {\n"
6532"        this.application = new Gtk.Application({\n"
6533"            application_id: 'org.example.jscheckbutton',\n"
6534"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
6535"        });\n"
6536"\n"
6537"    // Connect 'activate' and 'startup' signals to the callback functions\n"
6538"    this.application.connect('activate', this._onActivate.bind(this));\n"
6539"    this.application.connect('startup', this._onStartup.bind(this));\n"
6540"    }\n"
6541"\n"
6542"    // Callback function for 'activate' signal presents window when active\n"
6543"    _onActivate() {\n"
6544"        this._window.present();\n"
6545"    }\n"
6546"\n"
6547"    // Callback function for 'startup' signal builds the UI\n"
6548"    _onStartup() {\n"
6549"        this._buildUI ();\n"
6550"    }\n"
6551
6552#. (itstool) path: section/p
6553#: C/checkbutton.js.page:66
6554msgid ""
6555"All the code for this sample goes in the CheckButtonExample class. The above code creates a <link href=\"http://"
6556"www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to "
6557"go in."
6558msgstr ""
6559"이 예제의 모든 코드는 CheckButtonExample 클래스에 들어갑니다. 위 코드에서는 위젯과 창이 들어가는 <link href="
6560"\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만듭니다."
6561
6562#. (itstool) path: section/code
6563#: C/checkbutton.js.page:67
6564#, no-wrap
6565msgid ""
6566"\n"
6567"    // Build the application's UI\n"
6568"    _buildUI() {\n"
6569"\n"
6570"        // Create the application window\n"
6571"        this._window = new Gtk.ApplicationWindow({\n"
6572"            application: this.application,\n"
6573"            window_position: Gtk.WindowPosition.CENTER,\n"
6574"            default_height: 100,\n"
6575"            default_width: 300,\n"
6576"            border_width: 10,\n"
6577"            title: \"CheckButton Example\"});\n"
6578msgstr ""
6579"\n"
6580"    // Build the application's UI\n"
6581"    _buildUI() {\n"
6582"\n"
6583"        // Create the application window\n"
6584"        this._window = new Gtk.ApplicationWindow({\n"
6585"            application: this.application,\n"
6586"            window_position: Gtk.WindowPosition.CENTER,\n"
6587"            default_height: 100,\n"
6588"            default_width: 300,\n"
6589"            border_width: 10,\n"
6590"            title: \"CheckButton Example\"});\n"
6591
6592#. (itstool) path: section/p
6593#: C/checkbutton.js.page:80
6594msgid ""
6595"The _buildUI function is where we put all the code to create the application's user interface. The first step is "
6596"creating a new <link href=\"GtkApplicationWindow.js.page\">Gtk.ApplicationWindow</link> to put all our widgets "
6597"into."
6598msgstr ""
6599"_buildUI 함수는 프로그램 사용자 인터페이스를 구성하는 모든 코드를 넣는 곳입니다. 우선 모든 위젯을 넣을 새 <link "
6600"href=\"GtkApplicationWindow.js.page\">Gtk.ApplicationWindow</link> 를 만들겠습니다."
6601
6602#. (itstool) path: section/title
6603#: C/checkbutton.js.page:84
6604msgid "Creating the checkbutton"
6605msgstr "확인 단추 만들기"
6606
6607#. (itstool) path: section/code
6608#: C/checkbutton.js.page:85
6609#, no-wrap
6610msgid ""
6611"\n"
6612"        // Create the check button\n"
6613"        this._button = new Gtk.CheckButton ({label: \"Show Title\"});\n"
6614"        this._window.add (this._button);\n"
6615"\n"
6616"        // Have the check button be checked by default\n"
6617"        this._button.set_active (true);\n"
6618"\n"
6619"        // Connect the button to a function that does something when it's toggled\n"
6620"        this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
6621msgstr ""
6622"\n"
6623"        // Create the check button\n"
6624"        this._button = new Gtk.CheckButton ({label: \"Show Title\"});\n"
6625"        this._window.add (this._button);\n"
6626"\n"
6627"        // Have the check button be checked by default\n"
6628"        this._button.set_active (true);\n"
6629"\n"
6630"        // Connect the button to a function that does something when it's toggled\n"
6631"        this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
6632
6633#. (itstool) path: section/p
6634#: C/checkbutton.js.page:96
6635msgid ""
6636"This code creates the checkbutton itself. The label next to the checkbutton is created by giving the checkbutton "
6637"the \"label\" property and assigning a string value to it. Since this checkbutton toggles whether the window title "
6638"is on or off, and the window title will be on to start with, we want the box to be checked by default. Whenever "
6639"the user checks or unchecks the box, we call the _toggledCB function."
6640msgstr ""
6641"이 코드로 자체 확인 단추를 만듭니다. 확인 단추 옆 레이블은 확인 단추의 \"label\" 속성에 문자열 값을 넣어 만듭니다. "
6642"이 확인 단추는 창 제목을 나타내거나 숨긴 상태를 전환하고 프로그램을 시작할 때 창 제목이 들어온 상태여야 하기 때문"
6643"에, 기본적으로 확인 상자를 표시한 상태로 두려 합니다. 사용자가 상자에 표시했다 지울 때마다 _toggledCB 함수를 호출하"
6644"겠습니다."
6645
6646#. (itstool) path: section/code
6647#: C/checkbutton.js.page:97
6648#, no-wrap
6649msgid ""
6650"\n"
6651"        // Show the window and all child widgets\n"
6652"        this._window.show_all();\n"
6653"    }\n"
6654msgstr ""
6655"\n"
6656"        // Show the window and all child widgets\n"
6657"        this._window.show_all();\n"
6658"    }\n"
6659
6660#. (itstool) path: section/p
6661#: C/checkbutton.js.page:102
6662msgid ""
6663"This code finishes up creating the UI, by telling the window to show itself and all child widgets (which is just "
6664"the checkbutton in this case)."
6665msgstr ""
6666"이 코드는 창 자체와 모든 하위 위젯의 표시를 지시하여 사용자 인터페이스 구성을 끝냅니다(이 경우 확인 단추만 해당)."
6667
6668#. (itstool) path: section/title
6669#: C/checkbutton.js.page:106
6670msgid "Function which handles the checkbutton's toggling"
6671msgstr "확인 단추 상태 전환을 처리하는 함수입니다"
6672
6673#. (itstool) path: section/code
6674#: C/checkbutton.js.page:107
6675#, no-wrap
6676msgid ""
6677"\n"
6678"    _toggledCB() {\n"
6679"\n"
6680"        // Make the window title appear or disappear when the checkbox is toggled\n"
6681"        if (this._button.get_active() == true)\n"
6682"            this._window.set_title (\"CheckButton Example\");\n"
6683"        else\n"
6684"            this._window.set_title (\"\");\n"
6685"\n"
6686"    }\n"
6687"\n"
6688"};\n"
6689msgstr ""
6690"\n"
6691"    _toggledCB() {\n"
6692"\n"
6693"        // Make the window title appear or disappear when the checkbox is toggled\n"
6694"        if (this._button.get_active() == true)\n"
6695"            this._window.set_title (\"CheckButton Example\");\n"
6696"        else\n"
6697"            this._window.set_title (\"\");\n"
6698"\n"
6699"    }\n"
6700"\n"
6701"};\n"
6702
6703#. (itstool) path: section/p
6704#: C/checkbutton.js.page:120
6705msgid ""
6706"If the checkbutton is toggled from on to off, we want the window title to disappear. If it's toggled from off to "
6707"on, we want it to reappear. We can tell which way it was toggled by testing to see whether it's active (checked) "
6708"or not afterwards. A simple if / else statement which calls the checkbutton's get_active() method will work for "
6709"this."
6710msgstr ""
6711"CheckButton 표시를 지운 상태로 바꿀 때 창 제목을 사라지게 하려고 합니다. 다시 이걸 표시해두면 창 제목을 다시 나타나"
6712"게 하려고 합니다. 단추가 활성(표시) 상태인지 여부를 나중에 확인하는 방식으로 처리할 수 있습니다. 이 과정에서 "
6713"CheckButton의 get_active() 메서드를 호출하는 간단한 if/else 구문을 사용하겠습니다."
6714
6715#. (itstool) path: section/code
6716#: C/checkbutton.js.page:121
6717#, no-wrap
6718msgid ""
6719"\n"
6720"// Run the application\n"
6721"let app = new CheckButtonExample ();\n"
6722"app.application.run (ARGV);\n"
6723msgstr ""
6724"\n"
6725"// Run the application\n"
6726"let app = new CheckButtonExample ();\n"
6727"app.application.run (ARGV);\n"
6728
6729#. (itstool) path: section/p
6730#: C/checkbutton.js.page:126
6731msgid "Finally, we create a new instance of the finished CheckButtonExample class, and set the application running."
6732msgstr "마지막으로 완성본 CheckButtonExample 클래스의 새 인스턴스를 만들고 프로그램 실행을 설정하겠습니다."
6733
6734#. (itstool) path: section/code
6735#: C/checkbutton.js.page:131
6736#, no-wrap
6737msgid ""
6738"#!/usr/bin/gjs\n"
6739"\n"
6740"imports.gi.versions.Gtk = '3.0';\n"
6741"\n"
6742"const Gio = imports.gi.Gio;\n"
6743"const Gtk = imports.gi.Gtk;\n"
6744"\n"
6745"class CheckButtonExample {\n"
6746"\n"
6747"    // Create the application itself\n"
6748"    constructor() {\n"
6749"        this.application = new Gtk.Application({\n"
6750"            application_id: 'org.example.jscheckbutton',\n"
6751"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
6752"        });\n"
6753"\n"
6754"        // Connect 'activate' and 'startup' signals to the callback functions\n"
6755"        this.application.connect('activate', this._onActivate.bind(this));\n"
6756"        this.application.connect('startup', this._onStartup.bind(this));\n"
6757"    }\n"
6758"\n"
6759"    // Callback function for 'activate' signal presents window when active\n"
6760"    _onActivate() {\n"
6761"        this._window.present();\n"
6762"    }\n"
6763"\n"
6764"    // Callback function for 'startup' signal builds the UI\n"
6765"    _onStartup() {\n"
6766"        this._buildUI();\n"
6767"    }\n"
6768"\n"
6769"    // Build the application's UI\n"
6770"    _buildUI() {\n"
6771"\n"
6772"        // Create the application window\n"
6773"        this._window = new Gtk.ApplicationWindow({\n"
6774"            application: this.application,\n"
6775"            window_position: Gtk.WindowPosition.CENTER,\n"
6776"            default_height: 100,\n"
6777"            default_width: 300,\n"
6778"            border_width: 10,\n"
6779"            title: \"CheckButton Example\"});\n"
6780"\n"
6781"        // Create the check button\n"
6782"        this._button = new Gtk.CheckButton ({label: \"Show Title\"});\n"
6783"        this._window.add (this._button);\n"
6784"\n"
6785"        // Have the check button be checked by default\n"
6786"        this._button.set_active (true);\n"
6787"\n"
6788"        // Connect the button to a function that does something when it's toggled\n"
6789"        this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
6790"\n"
6791"        // Show the window and all child widgets\n"
6792"        this._window.show_all();\n"
6793"    }\n"
6794"\n"
6795"    _toggledCB() {\n"
6796"\n"
6797"        // Make the window title appear or disappear when the checkbox is toggled\n"
6798"        if (this._button.get_active() == true)\n"
6799"            this._window.set_title (\"CheckButton Example\");\n"
6800"        else\n"
6801"            this._window.set_title (\"\");\n"
6802"\n"
6803"    }\n"
6804"\n"
6805"};\n"
6806"\n"
6807"// Run the application\n"
6808"let app = new CheckButtonExample ();\n"
6809"app.application.run (ARGV);\n"
6810msgstr ""
6811"#!/usr/bin/gjs\n"
6812"\n"
6813"imports.gi.versions.Gtk = '3.0';\n"
6814"\n"
6815"const Gio = imports.gi.Gio;\n"
6816"const Gtk = imports.gi.Gtk;\n"
6817"\n"
6818"class CheckButtonExample {\n"
6819"\n"
6820"    // Create the application itself\n"
6821"    constructor() {\n"
6822"        this.application = new Gtk.Application({\n"
6823"            application_id: 'org.example.jscheckbutton',\n"
6824"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
6825"        });\n"
6826"\n"
6827"        // Connect 'activate' and 'startup' signals to the callback functions\n"
6828"        this.application.connect('activate', this._onActivate.bind(this));\n"
6829"        this.application.connect('startup', this._onStartup.bind(this));\n"
6830"    }\n"
6831"\n"
6832"    // Callback function for 'activate' signal presents window when active\n"
6833"    _onActivate() {\n"
6834"        this._window.present();\n"
6835"    }\n"
6836"\n"
6837"    // Callback function for 'startup' signal builds the UI\n"
6838"    _onStartup() {\n"
6839"        this._buildUI();\n"
6840"    }\n"
6841"\n"
6842"    // Build the application's UI\n"
6843"    _buildUI() {\n"
6844"\n"
6845"        // Create the application window\n"
6846"        this._window = new Gtk.ApplicationWindow({\n"
6847"            application: this.application,\n"
6848"            window_position: Gtk.WindowPosition.CENTER,\n"
6849"            default_height: 100,\n"
6850"            default_width: 300,\n"
6851"            border_width: 10,\n"
6852"            title: \"CheckButton Example\"});\n"
6853"\n"
6854"        // Create the check button\n"
6855"        this._button = new Gtk.CheckButton ({label: \"Show Title\"});\n"
6856"        this._window.add (this._button);\n"
6857"\n"
6858"        // Have the check button be checked by default\n"
6859"        this._button.set_active (true);\n"
6860"\n"
6861"        // Connect the button to a function that does something when it's toggled\n"
6862"        this._button.connect (\"toggled\", this._toggledCB.bind(this));\n"
6863"\n"
6864"        // Show the window and all child widgets\n"
6865"        this._window.show_all();\n"
6866"    }\n"
6867"\n"
6868"    _toggledCB() {\n"
6869"\n"
6870"        // Make the window title appear or disappear when the checkbox is toggled\n"
6871"        if (this._button.get_active() == true)\n"
6872"            this._window.set_title (\"CheckButton Example\");\n"
6873"        else\n"
6874"            this._window.set_title (\"\");\n"
6875"\n"
6876"    }\n"
6877"\n"
6878"};\n"
6879"\n"
6880"// Run the application\n"
6881"let app = new CheckButtonExample ();\n"
6882"app.application.run (ARGV);\n"
6883
6884#. (itstool) path: section/title
6885#: C/checkbutton.js.page:135 C/comboboxtext.js.page:176 C/combobox.js.page:233 C/messagedialog.js.page:189
6886#: C/radiobutton.js.page:274 C/scale.js.page:208 C/spinbutton.js.page:199 C/statusbar.js.page:221
6887#: C/switch.js.page:264 C/textview.js.page:248 C/togglebutton.js.page:153 C/treeview_simple_liststore.js.page:272
6888msgid "In-depth documentation"
6889msgstr "자세한 문서"
6890
6891#. (itstool) path: item/p
6892#: C/checkbutton.js.page:139
6893msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.CheckButton.html\">Gtk.CheckButton</link>"
6894msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.CheckButton.html\">Gtk.CheckButton</link>"
6895
6896#. (itstool) path: info/title
6897#: C/checkbutton.py.page:8
6898msgctxt "text"
6899msgid "CheckButton (Python)"
6900msgstr "CheckButton (Python)"
6901
6902#. (itstool) path: info/desc
6903#: C/checkbutton.py.page:19
6904msgid "A toggle button in a window"
6905msgstr "창의 토글 단추"
6906
6907#. (itstool) path: section/code
6908#: C/checkbutton.py.page:31
6909#, no-wrap
6910msgid ""
6911"from gi.repository import Gtk\n"
6912"import sys\n"
6913"\n"
6914"\n"
6915"class MyWindow(Gtk.ApplicationWindow):\n"
6916"    # a window\n"
6917"\n"
6918"    def __init__(self, app):\n"
6919"        Gtk.Window.__init__(self, title=\"CheckButton Example\", application=app)\n"
6920"        self.set_default_size(300, 100)\n"
6921"        self.set_border_width(10)\n"
6922"\n"
6923"        # a new checkbutton\n"
6924"        button = Gtk.CheckButton()\n"
6925"        #  with a label\n"
6926"        button.set_label(\"Show Title\")\n"
6927"        # connect the signal \"toggled\" emitted by the checkbutton\n"
6928"        # with the callback function toggled_cb\n"
6929"        button.connect(\"toggled\", self.toggled_cb)\n"
6930"        # by default, the checkbutton is active\n"
6931"        button.set_active(True)\n"
6932"\n"
6933"        # add the checkbutton to the window\n"
6934"        self.add(button)\n"
6935"\n"
6936"    # callback function\n"
6937"    def toggled_cb(self, button):\n"
6938"        # if the togglebutton is active, set the title of the window\n"
6939"        # as \"Checkbutton Example\"\n"
6940"        if button.get_active():\n"
6941"            self.set_title(\"CheckButton Example\")\n"
6942"        # else, set it as \"\" (empty string)\n"
6943"        else:\n"
6944"            self.set_title(\"\")\n"
6945"\n"
6946"\n"
6947"class MyApplication(Gtk.Application):\n"
6948"\n"
6949"    def __init__(self):\n"
6950"        Gtk.Application.__init__(self)\n"
6951"\n"
6952"    def do_activate(self):\n"
6953"        win = MyWindow(self)\n"
6954"        win.show_all()\n"
6955"\n"
6956"    def do_startup(self):\n"
6957"        Gtk.Application.do_startup(self)\n"
6958"\n"
6959"app = MyApplication()\n"
6960"exit_status = app.run(sys.argv)\n"
6961"sys.exit(exit_status)\n"
6962msgstr ""
6963"from gi.repository import Gtk\n"
6964"import sys\n"
6965"\n"
6966"\n"
6967"class MyWindow(Gtk.ApplicationWindow):\n"
6968"    # a window\n"
6969"\n"
6970"    def __init__(self, app):\n"
6971"        Gtk.Window.__init__(self, title=\"CheckButton Example\", application=app)\n"
6972"        self.set_default_size(300, 100)\n"
6973"        self.set_border_width(10)\n"
6974"\n"
6975"        # a new checkbutton\n"
6976"        button = Gtk.CheckButton()\n"
6977"        #  with a label\n"
6978"        button.set_label(\"Show Title\")\n"
6979"        # connect the signal \"toggled\" emitted by the checkbutton\n"
6980"        # with the callback function toggled_cb\n"
6981"        button.connect(\"toggled\", self.toggled_cb)\n"
6982"        # by default, the checkbutton is active\n"
6983"        button.set_active(True)\n"
6984"\n"
6985"        # add the checkbutton to the window\n"
6986"        self.add(button)\n"
6987"\n"
6988"    # callback function\n"
6989"    def toggled_cb(self, button):\n"
6990"        # if the togglebutton is active, set the title of the window\n"
6991"        # as \"Checkbutton Example\"\n"
6992"        if button.get_active():\n"
6993"            self.set_title(\"CheckButton Example\")\n"
6994"        # else, set it as \"\" (empty string)\n"
6995"        else:\n"
6996"            self.set_title(\"\")\n"
6997"\n"
6998"\n"
6999"class MyApplication(Gtk.Application):\n"
7000"\n"
7001"    def __init__(self):\n"
7002"        Gtk.Application.__init__(self)\n"
7003"\n"
7004"    def do_activate(self):\n"
7005"        win = MyWindow(self)\n"
7006"        win.show_all()\n"
7007"\n"
7008"    def do_startup(self):\n"
7009"        Gtk.Application.do_startup(self)\n"
7010"\n"
7011"app = MyApplication()\n"
7012"exit_status = app.run(sys.argv)\n"
7013"sys.exit(exit_status)\n"
7014
7015#. (itstool) path: section/title
7016#: C/checkbutton.py.page:36
7017msgid "Useful methods for a CheckButton widget"
7018msgstr "CheckButton 위젯의 쓸만한 메서드"
7019
7020#. (itstool) path: section/p
7021#: C/checkbutton.py.page:37
7022msgid ""
7023"In line 17 the <code>\"toggled\"</code> signal is connected to the callback function <code>toggled_cb()</code> "
7024"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
7025"\"signals-callbacks.py\"/> for a more detailed explanation."
7026msgstr ""
7027"17번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로 "
7028"<code>\"toggled\"</code> 시그널을 <code>toggled_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
7029"\"signals-callbacks.py\"/>를 참조하십시오."
7030
7031#. (itstool) path: item/p
7032#: C/checkbutton.py.page:47 C/togglebutton.py.page:44
7033msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToggleButton.html\">GtkToggleButton</link>"
7034msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToggleButton.html\">GtkToggleButton</link>"
7035
7036#. (itstool) path: item/p
7037#: C/checkbutton.py.page:48
7038msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCheckButton.html\">GtkCheckButton</link>"
7039msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCheckButton.html\">GtkCheckButton</link>"
7040
7041#. (itstool) path: info/title
7042#: C/checkbutton.vala.page:8
7043msgctxt "text"
7044msgid "CheckButton (Vala)"
7045msgstr "CheckButton(Vala)"
7046
7047#. (itstool) path: info/desc
7048#: C/checkbutton.vala.page:18
7049msgid "Create widgets with a discrete toggle button"
7050msgstr "개별 토글 단추로 위젯을 만듭니다"
7051
7052#. (itstool) path: page/code
7053#: C/checkbutton.vala.page:25
7054#, no-wrap
7055msgid ""
7056"/* A window in the application */\n"
7057"class MyWindow : Gtk.ApplicationWindow {\n"
7058"\n"
7059"\t/* The constructor */\n"
7060"\tinternal MyWindow (MyApplication app) {\n"
7061"\t\tObject (application: app, title: \"CheckButton Example\");\n"
7062"\n"
7063"\t\tthis.set_default_size (300, 100);\n"
7064"\t\tthis.border_width = 10;\n"
7065"\n"
7066"\t\tvar checkbutton = new Gtk.CheckButton.with_label (\"Show Title\");\n"
7067"\n"
7068"\t\t/* Connect the checkbutton to the\n"
7069"\t\t * callback function (aka. signal handler).\n"
7070"\t\t */\n"
7071"\t\tcheckbutton.toggled.connect (this.toggled_cb);\n"
7072"\n"
7073"\t\t/* Add the button to the this window */\n"
7074"\t\tthis.add (checkbutton);\n"
7075"\n"
7076"\t\tcheckbutton.set_active (true);\n"
7077"\t\tcheckbutton.show ();\n"
7078"\t}\n"
7079"\n"
7080"\t/* The signal handler for the 'toggled' signal of the checkbutton. */\n"
7081"\tvoid toggled_cb (Gtk.ToggleButton checkbutton) {\n"
7082"\t\tif (checkbutton.get_active())\n"
7083"\t\t\tthis.set_title (\"CheckButton Example\");\n"
7084"\t\telse\n"
7085"\t\t\tthis.set_title (\"\");\n"
7086"\t}\n"
7087"}\n"
7088"\n"
7089"/* This is the application */\n"
7090"class MyApplication : Gtk.Application {\n"
7091"\n"
7092"\t/* The constructor */\n"
7093"\tinternal MyApplication () {\n"
7094"\t\tObject (application_id: \"org.example.checkbutton\");\n"
7095"\t}\n"
7096"\n"
7097"\t/* Override the activate signal of GLib.Application */\n"
7098"\tprotected override void activate () {\n"
7099"\t\tnew MyWindow (this).show ();\n"
7100"\t}\n"
7101"\n"
7102"}\n"
7103"\n"
7104"/* main creates and runs the application */\n"
7105"int main (string[] args) {\n"
7106"\treturn new MyApplication ().run (args);\n"
7107"}\n"
7108msgstr ""
7109"/* A window in the application */\n"
7110"class MyWindow : Gtk.ApplicationWindow {\n"
7111"\n"
7112"\t/* The constructor */\n"
7113"\tinternal MyWindow (MyApplication app) {\n"
7114"\t\tObject (application: app, title: \"CheckButton Example\");\n"
7115"\n"
7116"\t\tthis.set_default_size (300, 100);\n"
7117"\t\tthis.border_width = 10;\n"
7118"\n"
7119"\t\tvar checkbutton = new Gtk.CheckButton.with_label (\"Show Title\");\n"
7120"\n"
7121"\t\t/* Connect the checkbutton to the\n"
7122"\t\t * callback function (aka. signal handler).\n"
7123"\t\t */\n"
7124"\t\tcheckbutton.toggled.connect (this.toggled_cb);\n"
7125"\n"
7126"\t\t/* Add the button to the this window */\n"
7127"\t\tthis.add (checkbutton);\n"
7128"\n"
7129"\t\tcheckbutton.set_active (true);\n"
7130"\t\tcheckbutton.show ();\n"
7131"\t}\n"
7132"\n"
7133"\t/* The signal handler for the 'toggled' signal of the checkbutton. */\n"
7134"\tvoid toggled_cb (Gtk.ToggleButton checkbutton) {\n"
7135"\t\tif (checkbutton.get_active())\n"
7136"\t\t\tthis.set_title (\"CheckButton Example\");\n"
7137"\t\telse\n"
7138"\t\t\tthis.set_title (\"\");\n"
7139"\t}\n"
7140"}\n"
7141"\n"
7142"/* This is the application */\n"
7143"class MyApplication : Gtk.Application {\n"
7144"\n"
7145"\t/* The constructor */\n"
7146"\tinternal MyApplication () {\n"
7147"\t\tObject (application_id: \"org.example.checkbutton\");\n"
7148"\t}\n"
7149"\n"
7150"\t/* Override the activate signal of GLib.Application */\n"
7151"\tprotected override void activate () {\n"
7152"\t\tnew MyWindow (this).show ();\n"
7153"\t}\n"
7154"\n"
7155"}\n"
7156"\n"
7157"/* main creates and runs the application */\n"
7158"int main (string[] args) {\n"
7159"\treturn new MyApplication ().run (args);\n"
7160"}\n"
7161
7162#. (itstool) path: item/p
7163#: C/checkbutton.vala.page:30
7164msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CheckButton.html\">Gtk.CheckButton</link>"
7165msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CheckButton.html\">Gtk.CheckButton</link>"
7166
7167#. (itstool) path: info/title
7168#: C/colorbutton.js.page:8
7169msgctxt "text"
7170msgid "ColorButton (JavaScript)"
7171msgstr "ColorButton(JavaScript)"
7172
7173#. (itstool) path: info/desc
7174#: C/colorbutton.js.page:18 C/colorbutton.py.page:19 C/colorbutton.vala.page:20
7175msgid "A button to launch a color selection dialog"
7176msgstr "색상 선택 상자를 실행하는 단추입니다"
7177
7178#. (itstool) path: page/title
7179#: C/colorbutton.js.page:21 C/colorbutton.py.page:22 C/colorbutton.vala.page:23
7180msgid "ColorButton"
7181msgstr "ColorButton"
7182
7183#. (itstool) path: page/media
7184#. This is a reference to an external file such as an image or video. When
7185#. the file changes, the md5 hash will change to let you know you need to
7186#. update your localized copy. The msgstr is not used at all. Set it to
7187#. whatever you like once you have updated your copy of the file.
7188#: C/colorbutton.js.page:22 C/colorbutton.py.page:23 C/colorbutton.vala.page:24
7189msgctxt "_"
7190msgid "external ref='media/colorbutton.png' md5='904539d26fe367bf99f9a0961cfc9a03'"
7191msgstr ""
7192
7193#. (itstool) path: page/p
7194#: C/colorbutton.js.page:23 C/colorbutton.py.page:24
7195msgid ""
7196"This ColorButton launches a color selection dialog and prints in the terminal the RGB values of the color selected."
7197msgstr "ColorButton은 색상 선택 대화 상자를 실행하고 선택한 색의 RGB 값을 터미널에 나타냅니다."
7198
7199#. (itstool) path: section/code
7200#: C/colorbutton.js.page:29
7201#, no-wrap
7202msgid ""
7203"#!/usr/bin/gjs\n"
7204"\n"
7205"imports.gi.versions.Gdk = '3.0';\n"
7206"imports.gi.versions.Gtk = '3.0';\n"
7207"\n"
7208"const Gdk = imports.gi.Gdk;\n"
7209"const GObject = imports.gi.GObject;\n"
7210"const Gtk = imports.gi.Gtk;\n"
7211"\n"
7212"class ColorbuttonExample {\n"
7213"\n"
7214"    // Create the application itself\n"
7215"    constructor() {\n"
7216"        this.application = new Gtk.Application ({ application_id: 'org.example.jscolorbutton' });\n"
7217"\n"
7218"        // Connect 'activate' and 'startup' signals to the callback functions\n"
7219"        this.application.connect('activate', this._onActivate.bind(this));\n"
7220"        this.application.connect('startup', this._onStartup.bind(this));\n"
7221"    }\n"
7222"\n"
7223"    // Callback function for 'activate' signal presents windows when active\n"
7224"    _onActivate() {\n"
7225"        this.window.present();\n"
7226"    }\n"
7227"\n"
7228"    // Callback function for 'startup' signal builds the UI\n"
7229"    _onStartup() {\n"
7230"        this._buildUI();\n"
7231"    }\n"
7232"\n"
7233"    // Build the application's UI\n"
7234"    _buildUI() {\n"
7235"\n"
7236"        // Create the application window\n"
7237"        this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
7238"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
7239"                                                   title: \"ColorButton\",\n"
7240"                                                   default_width: 150,\n"
7241"                                                   default_height: 50,\n"
7242"                                                   border_width: 10 });\n"
7243"\n"
7244"        this.button = new Gtk.ColorButton();\n"
7245"        this.color = new Gdk.RGBA();\n"
7246"        this.color.red = 0.0;\n"
7247"        this.color.green = 0.0;\n"
7248"        this.color.blue = 1.0;\n"
7249"        this.color.alpha = 0.5;\n"
7250"        this.button.set_rgba(this.color);\n"
7251"        this.button.connect(\"color-set\", this.onColorChosen.bind(this));\n"
7252"        this.label = new Gtk.Label();\n"
7253"        this.label.set_text(\"Click to choose a color\");\n"
7254"\n"
7255"        let grid = new Gtk.Grid();\n"
7256"        grid.attach(this.button, 0, 0, 2, 1);\n"
7257"        grid.attach(this.label, 0, 1, 2, 1);\n"
7258"        this.window.add(grid);\n"
7259"        this.window.show_all();\n"
7260"    }\n"
7261"\n"
7262"    onColorChosen() {\n"
7263"        let colorName = this.color.to_string();\n"
7264"        this.label.set_text(\"You chose the color \" + colorName);\n"
7265"    }\n"
7266"};\n"
7267"\n"
7268"// Run the application\n"
7269"let app = new ColorbuttonExample ();\n"
7270"app.application.run (ARGV);\n"
7271msgstr ""
7272"#!/usr/bin/gjs\n"
7273"\n"
7274"imports.gi.versions.Gdk = '3.0';\n"
7275"imports.gi.versions.Gtk = '3.0';\n"
7276"\n"
7277"const Gdk = imports.gi.Gdk;\n"
7278"const GObject = imports.gi.GObject;\n"
7279"const Gtk = imports.gi.Gtk;\n"
7280"\n"
7281"class ColorbuttonExample {\n"
7282"\n"
7283"    // Create the application itself\n"
7284"    constructor() {\n"
7285"        this.application = new Gtk.Application ({ application_id: 'org.example.jscolorbutton' });\n"
7286"\n"
7287"        // Connect 'activate' and 'startup' signals to the callback functions\n"
7288"        this.application.connect('activate', this._onActivate.bind(this));\n"
7289"        this.application.connect('startup', this._onStartup.bind(this));\n"
7290"    }\n"
7291"\n"
7292"    // Callback function for 'activate' signal presents windows when active\n"
7293"    _onActivate() {\n"
7294"        this.window.present();\n"
7295"    }\n"
7296"\n"
7297"    // Callback function for 'startup' signal builds the UI\n"
7298"    _onStartup() {\n"
7299"        this._buildUI();\n"
7300"    }\n"
7301"\n"
7302"    // Build the application's UI\n"
7303"    _buildUI() {\n"
7304"\n"
7305"        // Create the application window\n"
7306"        this.window = new Gtk.ApplicationWindow ({ application: this.application,\n"
7307"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
7308"                                                   title: \"ColorButton\",\n"
7309"                                                   default_width: 150,\n"
7310"                                                   default_height: 50,\n"
7311"                                                   border_width: 10 });\n"
7312"\n"
7313"        this.button = new Gtk.ColorButton();\n"
7314"        this.color = new Gdk.RGBA();\n"
7315"        this.color.red = 0.0;\n"
7316"        this.color.green = 0.0;\n"
7317"        this.color.blue = 1.0;\n"
7318"        this.color.alpha = 0.5;\n"
7319"        this.button.set_rgba(this.color);\n"
7320"        this.button.connect(\"color-set\", this.onColorChosen.bind(this));\n"
7321"        this.label = new Gtk.Label();\n"
7322"        this.label.set_text(\"Click to choose a color\");\n"
7323"\n"
7324"        let grid = new Gtk.Grid();\n"
7325"        grid.attach(this.button, 0, 0, 2, 1);\n"
7326"        grid.attach(this.label, 0, 1, 2, 1);\n"
7327"        this.window.add(grid);\n"
7328"        this.window.show_all();\n"
7329"    }\n"
7330"\n"
7331"    onColorChosen() {\n"
7332"        let colorName = this.color.to_string();\n"
7333"        this.label.set_text(\"You chose the color \" + colorName);\n"
7334"    }\n"
7335"};\n"
7336"\n"
7337"// Run the application\n"
7338"let app = new ColorbuttonExample ();\n"
7339"app.application.run (ARGV);\n"
7340
7341#. (itstool) path: item/p
7342#: C/colorbutton.js.page:36
7343msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ColorButton.html\">GtkColorButton</link>"
7344msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ColorButton.html\">GtkColorButton</link>"
7345
7346#. (itstool) path: item/p
7347#: C/colorbutton.js.page:37 C/colorbutton.py.page:45
7348msgid "<link href=\"http://developer.gnome.org/gdk3/stable/gdk3-RGBA-Colors.html\">RGBA Colors</link>"
7349msgstr "<link href=\"http://developer.gnome.org/gdk3/stable/gdk3-RGBA-Colors.html\">RGBA Colors</link>"
7350
7351#. (itstool) path: info/title
7352#: C/colorbutton.py.page:8
7353msgctxt "text"
7354msgid "ColorButton (Python)"
7355msgstr "ColorButton(Python)"
7356
7357#. (itstool) path: section/code
7358#: C/colorbutton.py.page:30
7359#, no-wrap
7360msgid ""
7361"from gi.repository import Gtk\n"
7362"from gi.repository import Gdk\n"
7363"import sys\n"
7364"\n"
7365"\n"
7366"class MyWindow(Gtk.ApplicationWindow):\n"
7367"\n"
7368"    def __init__(self, app):\n"
7369"        Gtk.Window.__init__(self, title=\"ColorButton\", application=app)\n"
7370"        self.set_default_size(150, 50)\n"
7371"        self.set_border_width(10)\n"
7372"\n"
7373"        # a colorbutton (which opens a dialogue window in\n"
7374"        # which we choose a color)\n"
7375"        self.button = Gtk.ColorButton()\n"
7376"        # with a default color (blue, in this instance)\n"
7377"        color = Gdk.RGBA()\n"
7378"        color.red = 0.0\n"
7379"        color.green = 0.0\n"
7380"        color.blue = 1.0\n"
7381"        color.alpha = 0.5\n"
7382"        self.button.set_rgba(color)\n"
7383"\n"
7384"        # choosing a color in the dialogue window emits a signal\n"
7385"        self.button.connect(\"color-set\", self.on_color_chosen)\n"
7386"\n"
7387"        # a label\n"
7388"        label = Gtk.Label()\n"
7389"        label.set_text(\"Click to choose a color\")\n"
7390"\n"
7391"        # a grid to attach button and label\n"
7392"        grid = Gtk.Grid()\n"
7393"        grid.attach(self.button, 0, 0, 2, 1)\n"
7394"        grid.attach(label, 0, 1, 2, 1)\n"
7395"        self.add(grid)\n"
7396"\n"
7397"    # if a new color is chosen, we print it as rgb(r,g,b) in the terminal\n"
7398"    def on_color_chosen(self, user_data):\n"
7399"        print(\"You chose the color: \" + self.button.get_rgba().to_string())\n"
7400"\n"
7401"\n"
7402"class MyApplication(Gtk.Application):\n"
7403"\n"
7404"    def __init__(self):\n"
7405"        Gtk.Application.__init__(self)\n"
7406"\n"
7407"    def do_activate(self):\n"
7408"        win = MyWindow(self)\n"
7409"        win.show_all()\n"
7410"\n"
7411"    def do_startup(self):\n"
7412"        Gtk.Application.do_startup(self)\n"
7413"\n"
7414"app = MyApplication()\n"
7415"exit_status = app.run(sys.argv)\n"
7416"sys.exit(exit_status)\n"
7417msgstr ""
7418"from gi.repository import Gtk\n"
7419"from gi.repository import Gdk\n"
7420"import sys\n"
7421"\n"
7422"\n"
7423"class MyWindow(Gtk.ApplicationWindow):\n"
7424"\n"
7425"    def __init__(self, app):\n"
7426"        Gtk.Window.__init__(self, title=\"ColorButton\", application=app)\n"
7427"        self.set_default_size(150, 50)\n"
7428"        self.set_border_width(10)\n"
7429"\n"
7430"        # a colorbutton (which opens a dialogue window in\n"
7431"        # which we choose a color)\n"
7432"        self.button = Gtk.ColorButton()\n"
7433"        # with a default color (blue, in this instance)\n"
7434"        color = Gdk.RGBA()\n"
7435"        color.red = 0.0\n"
7436"        color.green = 0.0\n"
7437"        color.blue = 1.0\n"
7438"        color.alpha = 0.5\n"
7439"        self.button.set_rgba(color)\n"
7440"\n"
7441"        # choosing a color in the dialogue window emits a signal\n"
7442"        self.button.connect(\"color-set\", self.on_color_chosen)\n"
7443"\n"
7444"        # a label\n"
7445"        label = Gtk.Label()\n"
7446"        label.set_text(\"Click to choose a color\")\n"
7447"\n"
7448"        # a grid to attach button and label\n"
7449"        grid = Gtk.Grid()\n"
7450"        grid.attach(self.button, 0, 0, 2, 1)\n"
7451"        grid.attach(label, 0, 1, 2, 1)\n"
7452"        self.add(grid)\n"
7453"\n"
7454"    # if a new color is chosen, we print it as rgb(r,g,b) in the terminal\n"
7455"    def on_color_chosen(self, user_data):\n"
7456"        print(\"You chose the color: \" + self.button.get_rgba().to_string())\n"
7457"\n"
7458"\n"
7459"class MyApplication(Gtk.Application):\n"
7460"\n"
7461"    def __init__(self):\n"
7462"        Gtk.Application.__init__(self)\n"
7463"\n"
7464"    def do_activate(self):\n"
7465"        win = MyWindow(self)\n"
7466"        win.show_all()\n"
7467"\n"
7468"    def do_startup(self):\n"
7469"        Gtk.Application.do_startup(self)\n"
7470"\n"
7471"app = MyApplication()\n"
7472"exit_status = app.run(sys.argv)\n"
7473"sys.exit(exit_status)\n"
7474
7475#. (itstool) path: section/title
7476#: C/colorbutton.py.page:34
7477msgid "Useful methods for a ColorButton widget"
7478msgstr "ColorButton 위젯에 쓸만한 메서드"
7479
7480#. (itstool) path: section/p
7481#: C/colorbutton.py.page:35
7482msgid ""
7483"<code>set_color(color)</code>, where the <code>color</code> is defined as in the example, sets the color of the "
7484"ColorButton, which by default is black. <code>get_color()</code> returns the color."
7485msgstr ""
7486"예제에서 <code>color</code>를 지정하는 <code>set_color(color)</code> 함수는 ColorButton의 색상을 설정하며, 기본값"
7487"은 검정색입니다. <code>get_color()</code> 함수에서 색상 값을 반환합니다."
7488
7489#. (itstool) path: section/p
7490#: C/colorbutton.py.page:36
7491msgid ""
7492"In line 23 the <code>\"color-set\"</code> signal is connected to the callback function <code>on_color_chosen()</"
7493"code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link "
7494"xref=\"signals-callbacks.py\"/> for a more detailed explanation."
7495msgstr ""
7496"23번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로 "
7497"<code>\"color-set\"</code> 시그널을 <code>on_color_chosen()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 "
7498"<link xref=\"signals-callbacks.py\"/>를 참조하십시오."
7499
7500#. (itstool) path: item/p
7501#: C/colorbutton.py.page:43
7502msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkColorButton.html\">GtkColorButton</link>"
7503msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkColorButton.html\">GtkColorButton</link>"
7504
7505#. (itstool) path: item/p
7506#: C/colorbutton.py.page:44
7507msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkColorChooser.html\">GtkColorChooser</link>"
7508msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkColorChooser.html\">GtkColorChooser</link>"
7509
7510#. (itstool) path: info/title
7511#: C/colorbutton.vala.page:8
7512msgctxt "text"
7513msgid "ColorButton (Vala)"
7514msgstr "ColorButton(Vala)"
7515
7516#. (itstool) path: page/p
7517#: C/colorbutton.vala.page:25
7518msgid "RGB values of the selected color are shown in the label."
7519msgstr "레이블에 선택한 색의 RGB 값을 나타냅니다."
7520
7521#. (itstool) path: page/code
7522#: C/colorbutton.vala.page:27
7523#, no-wrap
7524msgid ""
7525"/* This is the application. */\n"
7526"public class MyApplication : Gtk.Application {\n"
7527"\tGtk.Label label;\n"
7528"\n"
7529"\t/* Override the 'activate' signal of GLib.Application. */\n"
7530"\tprotected override void activate () {\n"
7531"\t\t/* Create the window of this application and show it. */\n"
7532"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
7533"\t\twindow.title = \"ColorButton\";\n"
7534"\t\twindow.set_default_size (150, 50);\n"
7535"\t\twindow.set_border_width (10);\n"
7536"\n"
7537"\t\t/* Create a new ColorButton with default blue. */\n"
7538"\t\tvar blue = Gdk.RGBA ();\n"
7539"\t\tblue.parse (\"blue\");\n"
7540"\t\tvar colorbutton = new Gtk.ColorButton.with_rgba (blue);\n"
7541"\n"
7542"\t\tlabel = new Gtk.Label (\"Click to choose a color\");\n"
7543"\n"
7544"\t\tvar grid = new Gtk.Grid ();\n"
7545"\t\tgrid.attach (colorbutton, 0, 0, 1, 1);\n"
7546"\t\tgrid.attach_next_to (label, colorbutton, Gtk.PositionType.BOTTOM, 1, 1);\n"
7547"\n"
7548"\t\tcolorbutton.color_set.connect (this.on_color_set);\n"
7549"\n"
7550"\t\twindow.add (grid);\n"
7551"\t\twindow.show_all ();\n"
7552"\t}\n"
7553"\n"
7554"\tvoid on_color_set (Gtk.ColorButton button) {\n"
7555"\t\tvar color =  button.get_rgba ();\n"
7556"\t\tlabel.set_text (\"RGBA: \" + color.to_string());\n"
7557"\t}\n"
7558"}\n"
7559"\n"
7560"/* main creates and runs the application. */\n"
7561"public int main (string[] args) {\n"
7562"\treturn new MyApplication ().run (args);\n"
7563"}\n"
7564msgstr ""
7565"/* This is the application. */\n"
7566"public class MyApplication : Gtk.Application {\n"
7567"\tGtk.Label label;\n"
7568"\n"
7569"\t/* Override the 'activate' signal of GLib.Application. */\n"
7570"\tprotected override void activate () {\n"
7571"\t\t/* Create the window of this application and show it. */\n"
7572"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
7573"\t\twindow.title = \"ColorButton\";\n"
7574"\t\twindow.set_default_size (150, 50);\n"
7575"\t\twindow.set_border_width (10);\n"
7576"\n"
7577"\t\t/* Create a new ColorButton with default blue. */\n"
7578"\t\tvar blue = Gdk.RGBA ();\n"
7579"\t\tblue.parse (\"blue\");\n"
7580"\t\tvar colorbutton = new Gtk.ColorButton.with_rgba (blue);\n"
7581"\n"
7582"\t\tlabel = new Gtk.Label (\"Click to choose a color\");\n"
7583"\n"
7584"\t\tvar grid = new Gtk.Grid ();\n"
7585"\t\tgrid.attach (colorbutton, 0, 0, 1, 1);\n"
7586"\t\tgrid.attach_next_to (label, colorbutton, Gtk.PositionType.BOTTOM, 1, 1);\n"
7587"\n"
7588"\t\tcolorbutton.color_set.connect (this.on_color_set);\n"
7589"\n"
7590"\t\twindow.add (grid);\n"
7591"\t\twindow.show_all ();\n"
7592"\t}\n"
7593"\n"
7594"\tvoid on_color_set (Gtk.ColorButton button) {\n"
7595"\t\tvar color =  button.get_rgba ();\n"
7596"\t\tlabel.set_text (\"RGBA: \" + color.to_string());\n"
7597"\t}\n"
7598"}\n"
7599"\n"
7600"/* main creates and runs the application. */\n"
7601"public int main (string[] args) {\n"
7602"\treturn new MyApplication ().run (args);\n"
7603"}\n"
7604
7605#. (itstool) path: item/p
7606#: C/colorbutton.vala.page:32
7607msgid "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.ColorButton.html\">Gtk.ColorButton</link>"
7608msgstr "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.ColorButton.html\">Gtk.ColorButton</link>"
7609
7610#. (itstool) path: item/p
7611#: C/colorbutton.vala.page:33
7612msgid "<link href=\"http://valadoc.org/gdk-3.0/Gdk.RGBA.html\">Gdk.RGBA</link>"
7613msgstr "<link href=\"http://valadoc.org/gdk-3.0/Gdk.RGBA.html\">Gdk.RGBA</link>"
7614
7615#. (itstool) path: info/title
7616#: C/comboboxtext.js.page:8
7617msgctxt "text"
7618msgid "ComboBoxText (JavaScript)"
7619msgstr "ComboBoxText(JavaScript)"
7620
7621#. (itstool) path: info/desc
7622#: C/comboboxtext.js.page:20
7623msgid "A text-only drop-down menu"
7624msgstr "텍스트 전용 드롭 다운 메뉴"
7625
7626#. (itstool) path: page/title
7627#: C/comboboxtext.js.page:23
7628msgid "ComboBoxText"
7629msgstr "ComboBoxText"
7630
7631#. (itstool) path: page/media
7632#. This is a reference to an external file such as an image or video. When
7633#. the file changes, the md5 hash will change to let you know you need to
7634#. update your localized copy. The msgstr is not used at all. Set it to
7635#. whatever you like once you have updated your copy of the file.
7636#: C/comboboxtext.js.page:24 C/combobox.c.page:26 C/combobox.py.page:24 C/combobox.vala.page:22
7637msgctxt "_"
7638msgid "external ref='media/combobox.png' md5='ab9e91bc1a58fe866cb00dd52159251d'"
7639msgstr ""
7640
7641#. (itstool) path: page/p
7642#: C/comboboxtext.js.page:25
7643msgid ""
7644"A ComboBox is a drop-down menu. The difference between a <link xref=\"combobox.js\">ComboBox</link> and a "
7645"ComboBoxText is that a ComboBoxText just has basic text options, while a full ComboBox uses a ListStore or "
7646"TreeStore (which are basically spreadsheets) to show things like branching options, or pictures to go alongside "
7647"each choice."
7648msgstr ""
7649"콤보박스는 드롭 다운 메뉴입니다. <link xref=\"combobox.js\">ComboBox</link>와 ComboBoxText의 차이점이라면 "
7650"ComboBoxText는 텍스트만 있는 위젯이고, 완전한 ComboBox는 분기 옵션이나, 각 선택 항목의 그림을 보여주는 ListStore나 "
7651"TreeStore(기본적으로 스프레드 시트 같음)를 사용하는 위젯입니다."
7652
7653#. (itstool) path: note/p
7654#: C/comboboxtext.js.page:26
7655msgid ""
7656"Unless you need the added features of a full ComboBox, or are comfortable working with ListStores and TreeStores, "
7657"you may find it a lot simpler to use a ComboBoxText whenever possible."
7658msgstr ""
7659"완전한 기능을 갖춘 ComboBox가 필요하거나, ListStore와 TreeStore를 사용하지 않은 이상 가능하다면 ComboBoxText를 사용"
7660"하는게 훨씬 간단합니다."
7661
7662#. (itstool) path: section/code
7663#: C/comboboxtext.js.page:31 C/textview.js.page:39
7664#, no-wrap
7665msgid ""
7666"\n"
7667"#!/usr/bin/gjs\n"
7668"\n"
7669"const Gtk = imports.gi.Gtk;\n"
7670"const Lang = imports.lang;\n"
7671msgstr ""
7672"\n"
7673"#!/usr/bin/gjs\n"
7674"\n"
7675"const Gtk = imports.gi.Gtk;\n"
7676"const Lang = imports.lang;\n"
7677
7678#. (itstool) path: section/code
7679#: C/comboboxtext.js.page:42
7680#, no-wrap
7681msgid ""
7682"\n"
7683"const ComboBoxTextExample = new Lang.Class ({\n"
7684"    Name: 'ComboBoxText Example',\n"
7685"\n"
7686"    // Create the application itself\n"
7687"    _init: function () {\n"
7688"        this.application = new Gtk.Application ({\n"
7689"            application_id: 'org.example.jscomboboxtext'});\n"
7690"\n"
7691"        // Connect 'activate' and 'startup' signals to the callback functions\n"
7692"        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
7693"        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
7694"    },\n"
7695"\n"
7696"    // Callback function for 'activate' signal presents windows when active\n"
7697"    _onActivate: function () {\n"
7698"        this._window.present ();\n"
7699"    },\n"
7700"\n"
7701"    // Callback function for 'startup' signal builds the UI\n"
7702"    _onStartup: function () {\n"
7703"        this._buildUI ();\n"
7704"    },\n"
7705msgstr ""
7706"\n"
7707"const ComboBoxTextExample = new Lang.Class ({\n"
7708"    Name: 'ComboBoxText Example',\n"
7709"\n"
7710"    // Create the application itself\n"
7711"    _init: function () {\n"
7712"        this.application = new Gtk.Application ({\n"
7713"            application_id: 'org.example.jscomboboxtext'});\n"
7714"\n"
7715"        // Connect 'activate' and 'startup' signals to the callback functions\n"
7716"        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
7717"        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
7718"    },\n"
7719"\n"
7720"    // Callback function for 'activate' signal presents windows when active\n"
7721"    _onActivate: function () {\n"
7722"        this._window.present ();\n"
7723"    },\n"
7724"\n"
7725"    // Callback function for 'startup' signal builds the UI\n"
7726"    _onStartup: function () {\n"
7727"        this._buildUI ();\n"
7728"    },\n"
7729
7730#. (itstool) path: section/p
7731#: C/comboboxtext.js.page:66 C/messagedialog.js.page:70
7732msgid ""
7733"All the code for this sample goes in the MessageDialogExample class. The above code creates a <link href=\"http://"
7734"www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to "
7735"go in."
7736msgstr ""
7737"이 예제의 모든 코드는 MessageDialogExample 클래스에 넣었습니다. 위 코드에서는 위젯과 창을 담아둘 <link href="
7738"\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만들었습니다."
7739
7740#. (itstool) path: section/code
7741#: C/comboboxtext.js.page:67
7742#, no-wrap
7743msgid ""
7744"\n"
7745"    // Build the application's UI\n"
7746"    _buildUI: function () {\n"
7747"\n"
7748"        // Create the application window\n"
7749"        this._window = new Gtk.ApplicationWindow  ({\n"
7750"            application: this.application,\n"
7751"            window_position: Gtk.WindowPosition.CENTER,\n"
7752"            title: \"Welcome to GNOME\",\n"
7753"            default_width: 200,\n"
7754"            border_width: 10 });\n"
7755msgstr ""
7756"\n"
7757"    // Build the application's UI\n"
7758"    _buildUI: function () {\n"
7759"\n"
7760"        // Create the application window\n"
7761"        this._window = new Gtk.ApplicationWindow  ({\n"
7762"            application: this.application,\n"
7763"            window_position: Gtk.WindowPosition.CENTER,\n"
7764"            title: \"Welcome to GNOME\",\n"
7765"            default_width: 200,\n"
7766"            border_width: 10 });\n"
7767
7768#. (itstool) path: section/p
7769#: C/comboboxtext.js.page:79 C/combobox.js.page:83 C/messagedialog.js.page:84 C/radiobutton.js.page:79
7770#: C/scale.js.page:78 C/spinbutton.js.page:81 C/switch.js.page:88 C/textview.js.page:88 C/togglebutton.js.page:81
7771#: C/treeview_simple_liststore.js.page:90
7772msgid ""
7773"The _buildUI function is where we put all the code to create the application's user interface. The first step is "
7774"creating a new <link xref=\"GtkApplicationWindow.js\">Gtk.ApplicationWindow</link> to put all our widgets into."
7775msgstr ""
7776"_buildUI 함수는 프로그램 사용자 인터페이스를 만드는 모든 코드를 넣는 곳입니다. 첫 단계에서는 모든 위젯을 우겨넣을 "
7777"새 <link xref=\"GtkApplicationWindow.js\">Gtk.ApplicationWindow</link>를 만듭니다."
7778
7779#. (itstool) path: section/title
7780#: C/comboboxtext.js.page:83
7781msgid "Creating the ComboBoxText"
7782msgstr "ComboBoxText 만들기"
7783
7784#. (itstool) path: section/code
7785#: C/comboboxtext.js.page:84
7786#, no-wrap
7787msgid ""
7788"\n"
7789"        // Create the combobox\n"
7790"        this._comboBoxText = new Gtk.ComboBoxText();\n"
7791"\n"
7792"        // Populate the combobox\n"
7793"        let distros = [\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"];\n"
7794"        for (let i = 0; i &lt; distros.length; i++)\n"
7795"            this._comboBoxText.append_text (distros[i]);\n"
7796"        this._comboBoxText.set_active (0);\n"
7797"\n"
7798"        // Connect the combobox's 'changed' signal to our callback function\n"
7799"        this._comboBoxText.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
7800msgstr ""
7801"\n"
7802"        // Create the combobox\n"
7803"        this._comboBoxText = new Gtk.ComboBoxText();\n"
7804"\n"
7805"        // Populate the combobox\n"
7806"        let distros = [\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"];\n"
7807"        for (let i = 0; i &lt; distros.length; i++)\n"
7808"            this._comboBoxText.append_text (distros[i]);\n"
7809"        this._comboBoxText.set_active (0);\n"
7810"\n"
7811"        // Connect the combobox's 'changed' signal to our callback function\n"
7812"        this._comboBoxText.connect ('changed', Lang.bind (this, this._onComboChanged));\n"
7813
7814#. (itstool) path: section/p
7815#: C/comboboxtext.js.page:97
7816msgid ""
7817"After we create the ComboBoxText, we use its <file>append_text</file> method to add text strings to it. Like the "
7818"entries in an array, they each have a number for an ID, starting with 0. To make things simpler, you can actually "
7819"create an array for your ComboBoxText entries, then use a for loop to append them in order, like we did here."
7820msgstr ""
7821"ComboBoxText를 만들고 나서 <file>append_text</file> 메서드를 사용하여 텍스트 스트링을 0번부터 시작하는 숫자 ID를 가"
7822"진 배열에 추가하겠습니다. 단순하게 갖출 목적으로 ComboBoxText 항목을 실제로 배열로 만든 다음에 순서대로 넣고, 넣은 "
7823"방식대로 for 반복문으로 붙여넣겠습니다."
7824
7825#. (itstool) path: section/p
7826#: C/comboboxtext.js.page:98
7827msgid ""
7828"After we populate the ComboBoxText, we set its first entry to be active, so that we'll see the \"Select "
7829"distribution\" line before we click on it. Then we connect its <file>changed</file> signal to the _onComboChanged "
7830"function, so that it's called whenever you make a new selection from the drop-down menu."
7831msgstr ""
7832"ComboBoxText를 갖추고 나서 첫번째 항목을 표시하여 ComboBoxText를 누르기 전에 \"Select distribution\" 줄이 나타나게 "
7833"하겠습니다. 그 다음 <file>changed</file> 시그널을 _onComboChanged  함수에 연결하여 드롭 다운 메뉴에서 새 항목을 선"
7834"택할 때마다 호출하도록 하겠습니다."
7835
7836#. (itstool) path: note/p
7837#: C/comboboxtext.js.page:99
7838msgid ""
7839"If you'd like to add an entry to a ComboBoxText, you can use the <file>insert_text</file> method. And if you'd "
7840"rather use a text string as an ID for each entry than rely on numbers alone, you can use the <file>append</file> "
7841"and <file>insert</file> methods. See the links at the bottom of this tutorial for the details of how to use them."
7842msgstr ""
7843"ComboBoxText에 항목을 추가하려면  <file>insert_text</file> 메서드를 사용할 수 있습니다. 각 항목의 ID를 숫자만이 아"
7844"닌 텍스트 문자열을 사용하려한다면 <file>append</file> 메서드와 <file>insert</file> 메서드를 사용할 수 있습니다. 활"
7845"용 방안에 대한 자세한 지침서 내용은 하단 링크를 살펴보시지요."
7846
7847#. (itstool) path: section/code
7848#: C/comboboxtext.js.page:101
7849#, no-wrap
7850msgid ""
7851"\n"
7852"        // Add the combobox to the window\n"
7853"        this._window.add (this._comboBoxText);\n"
7854"\n"
7855"        // Show the window and all child widgets\n"
7856"        this._window.show_all();\n"
7857"    },\n"
7858msgstr ""
7859"\n"
7860"        // Add the combobox to the window\n"
7861"        this._window.add (this._comboBoxText);\n"
7862"\n"
7863"        // Show the window and all child widgets\n"
7864"        this._window.show_all();\n"
7865"    },\n"
7866
7867#. (itstool) path: section/p
7868#: C/comboboxtext.js.page:109
7869msgid "Finally, we add the ComboBoxText to the window, and tell the window to show itself and the widget inside it."
7870msgstr "마지막으로 ComboBoxText를 창에 추가하고, 창 자신과 위젯을 나타내게 하겠습니다."
7871
7872#. (itstool) path: section/title
7873#: C/comboboxtext.js.page:113 C/combobox.js.page:170 C/radiobutton.js.page:181
7874msgid "Function which handles your selection"
7875msgstr "선택을 처리하는 함수"
7876
7877#. (itstool) path: section/code
7878#: C/comboboxtext.js.page:114
7879#, no-wrap
7880msgid ""
7881"\n"
7882"    _onComboChanged: function () {\n"
7883"\n"
7884"        // The responses we'll use for our messagedialog\n"
7885"        let responses = [\"\",\n"
7886"            \"Fedora is a community distro sponsored by Red Hat.\",\n"
7887"            \"Mint is a popular distro based on Ubuntu.\",\n"
7888"            \"SUSE is a name shared by two separate distros.\"];\n"
7889msgstr ""
7890"\n"
7891"    _onComboChanged: function () {\n"
7892"\n"
7893"        // The responses we'll use for our messagedialog\n"
7894"        let responses = [\"\",\n"
7895"            \"Fedora is a community distro sponsored by Red Hat.\",\n"
7896"            \"Mint is a popular distro based on Ubuntu.\",\n"
7897"            \"SUSE is a name shared by two separate distros.\"];\n"
7898
7899#. (itstool) path: section/p
7900#: C/comboboxtext.js.page:123
7901msgid ""
7902"We're going to create a pop-up <link xref=\"messagedialog.js\">MessageDialog</link>, which shows you a message "
7903"based on which distro you select. First, we create the array of responses to use. Since the first string in our "
7904"ComboBoxText is just the \"Select distribution\" message, we make the first string in our array blank."
7905msgstr ""
7906"배포판 선택 기반으로 메시지를 보여주는 <link xref=\"messagedialog.js\">MessageDialog</link> 팝업을 만들려고 합니"
7907"다. 우선, 사용할 응답 배열을 만들겠습니다. ComboBoxText의 첫 문자열은 그냥 \"Select distribution\" 메시지니까, 배열"
7908"의 첫번째 문자열은 비워두겠습니다."
7909
7910#. (itstool) path: section/code
7911#: C/comboboxtext.js.page:125
7912#, no-wrap
7913msgid ""
7914"\n"
7915"        // Which combobox item is active?\n"
7916"        let activeItem = this._comboBoxText.get_active();\n"
7917"\n"
7918"        // No messagedialog if you chose \"Select distribution\"\n"
7919"        if (activeItem != 0) {\n"
7920"            this._popUp = new Gtk.MessageDialog ({\n"
7921"                transient_for: this._window,\n"
7922"                modal: true,\n"
7923"                buttons: Gtk.ButtonsType.OK,\n"
7924"                message_type: Gtk.MessageType.INFO,\n"
7925"                text: responses[activeItem]});\n"
7926"\n"
7927"            // Connect the OK button to a handler function\n"
7928"            this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
7929"\n"
7930"            // Show the messagedialog\n"
7931"            this._popUp.show();\n"
7932"        }\n"
7933"\n"
7934"    },\n"
7935msgstr ""
7936"\n"
7937"        // Which combobox item is active?\n"
7938"        let activeItem = this._comboBoxText.get_active();\n"
7939"\n"
7940"        // No messagedialog if you chose \"Select distribution\"\n"
7941"        if (activeItem != 0) {\n"
7942"            this._popUp = new Gtk.MessageDialog ({\n"
7943"                transient_for: this._window,\n"
7944"                modal: true,\n"
7945"                buttons: Gtk.ButtonsType.OK,\n"
7946"                message_type: Gtk.MessageType.INFO,\n"
7947"                text: responses[activeItem]});\n"
7948"\n"
7949"            // Connect the OK button to a handler function\n"
7950"            this._popUp.connect ('response', Lang.bind (this, this._onDialogResponse));\n"
7951"\n"
7952"            // Show the messagedialog\n"
7953"            this._popUp.show();\n"
7954"        }\n"
7955"\n"
7956"    },\n"
7957
7958#. (itstool) path: section/p
7959#: C/comboboxtext.js.page:147
7960msgid ""
7961"Before showing a MessageDialog, we first test to make sure you didn't choose the \"Select distribution\" message. "
7962"After that, we set its text to be the entry in the array that corresponds to the active entry in our ComboBoxText. "
7963"We do that using the <file>get_active</file> method, which returns the number ID of your selection."
7964msgstr ""
7965"MessageDialog를 나타내기 전, \"Select distribution\" 메시지를 선택하지 않았는지 우선 확인해야 합니다. 확인하고 나"
7966"면 ComboBoxText의 선택 항목과 관련하여 배열의 항목 텍스트를 설정합니다. 선택 항목의 숫자 ID를 반환하는 "
7967"<file>get_active</file> 메서드를 사용하겠습니다."
7968
7969#. (itstool) path: note/p
7970#: C/comboboxtext.js.page:148
7971msgid ""
7972"Other methods you can use include <file>get_active_id,</file> which returns the text ID assigned by <file>append,</"
7973"file> and <file>get_active_text,</file> which returns the full text of the string you selected."
7974msgstr ""
7975"<file>append</file>로 할당한 텍스트 ID를 반환하는 <file>get_active_id</file> 메서드 말고도, 선택한 항목의 완전한 텍"
7976"스트를 반환하는 <file>get_active_text</file> 메서드가 있습니다."
7977
7978#. (itstool) path: section/p
7979#: C/comboboxtext.js.page:149 C/combobox.js.page:206
7980msgid ""
7981"After we create the MessageDialog, we connect its response signal to the _onDialogResponse function, then tell it "
7982"to show itself."
7983msgstr ""
7984"MessageDialog를 만들고 나면, _onDialogResponse 함수에 반응 시그널을 연결하고 MessageDialog를 나타내게 하겠습니다."
7985
7986#. (itstool) path: section/code
7987#: C/comboboxtext.js.page:151
7988#, no-wrap
7989msgid ""
7990"\n"
7991"    _onDialogResponse: function () {\n"
7992"\n"
7993"        this._popUp.destroy ();\n"
7994"\n"
7995"    }\n"
7996"\n"
7997"});\n"
7998msgstr ""
7999"\n"
8000"    _onDialogResponse: function () {\n"
8001"\n"
8002"        this._popUp.destroy ();\n"
8003"\n"
8004"    }\n"
8005"\n"
8006"});\n"
8007
8008#. (itstool) path: section/p
8009#: C/comboboxtext.js.page:160 C/combobox.js.page:217
8010msgid ""
8011"Since the only button the MessageDialog has is an OK button, we don't need to test its response_id to see which "
8012"button was clicked. All we do here is destroy the popup."
8013msgstr ""
8014"MessageDialog에는 확인 단추만 있기 때문에 response_id에서 어떤 단추를 눌렀는지 굳이 확인할 필요가 없습니다. 그냥 띄"
8015"운 창을 닫기만 하면 됩니다."
8016
8017#. (itstool) path: section/code
8018#: C/comboboxtext.js.page:162
8019#, no-wrap
8020msgid ""
8021"\n"
8022"// Run the application\n"
8023"let app = new ComboBoxTextExample ();\n"
8024"app.application.run (ARGV);\n"
8025msgstr ""
8026"\n"
8027"// Run the application\n"
8028"let app = new ComboBoxTextExample ();\n"
8029"app.application.run (ARGV);\n"
8030
8031#. (itstool) path: section/p
8032#: C/comboboxtext.js.page:167
8033msgid "Finally, we create a new instance of the finished ComboBoxTextExample class, and set the application running."
8034msgstr ""
8035"마지막으로, 코드 작성을 마무리한 ComboBoxTextExample 클래스의 새 인스턴스를 만들고, 프로그램 실행을 구성하겠습니다."
8036
8037#. (itstool) path: section/code
8038#: C/comboboxtext.js.page:172
8039#, no-wrap
8040msgid ""
8041"#!/usr/bin/gjs\n"
8042"\n"
8043"imports.gi.versions.Gtk = '3.0';\n"
8044"const Gtk = imports.gi.Gtk;\n"
8045"\n"
8046"class ComboBoxTextExample {\n"
8047"\n"
8048"    // Create the application itself\n"
8049"    constructor() {\n"
8050"        this.application = new Gtk.Application ({\n"
8051"            application_id: 'org.example.jscomboboxtext'});\n"
8052"\n"
8053"        // Connect 'activate' and 'startup' signals to the callback functions\n"
8054"        this.application.connect('activate', this._onActivate.bind(this));\n"
8055"        this.application.connect('startup', this._onStartup.bind(this));\n"
8056"    }\n"
8057"\n"
8058"    // Callback function for 'activate' signal presents windows when active\n"
8059"    _onActivate() {\n"
8060"        this._window.present ();\n"
8061"    }\n"
8062"\n"
8063"    // Callback function for 'startup' signal builds the UI\n"
8064"    _onStartup() {\n"
8065"        this._buildUI();\n"
8066"    }\n"
8067"\n"
8068"    // Build the application's UI\n"
8069"    _buildUI() {\n"
8070"\n"
8071"        // Create the application window\n"
8072"        this._window = new Gtk.ApplicationWindow  ({\n"
8073"            application: this.application,\n"
8074"            window_position: Gtk.WindowPosition.CENTER,\n"
8075"            title: \"Welcome to GNOME\",\n"
8076"            default_width: 200,\n"
8077"            border_width: 10 });\n"
8078"\n"
8079"        // Create the combobox\n"
8080"        this._comboBoxText = new Gtk.ComboBoxText();\n"
8081"\n"
8082"        // Populate the combobox\n"
8083"        let distros = [\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"];\n"
8084"        for (let i = 0; i &lt; distros.length; i++)\n"
8085"            this._comboBoxText.append_text (distros[i]);\n"
8086"        this._comboBoxText.set_active (0);\n"
8087"\n"
8088"        // Connect the combobox's 'changed' signal to our callback function\n"
8089"        this._comboBoxText.connect ('changed', this._onComboChanged.bind(this));\n"
8090"\n"
8091"        // Add the combobox to the window\n"
8092"        this._window.add (this._comboBoxText);\n"
8093"\n"
8094"        // Show the window and all child widgets\n"
8095"        this._window.show_all();\n"
8096"    }\n"
8097"\n"
8098"    _onComboChanged() {\n"
8099"\n"
8100"        // The responses we'll use for our messagedialog\n"
8101"        let responses = [\"\",\n"
8102"            \"Fedora is a community distro sponsored by Red Hat.\",\n"
8103"            \"Mint is a popular distro based on Ubuntu.\",\n"
8104"            \"SUSE is a name shared by two separate distros.\"];\n"
8105"\n"
8106"        // Which combobox item is active?\n"
8107"        let activeItem = this._comboBoxText.get_active();\n"
8108"\n"
8109"        // No messagedialog if you chose \"Select distribution\"\n"
8110"        if (activeItem != 0) {\n"
8111"            this._popUp = new Gtk.MessageDialog ({\n"
8112"                transient_for: this._window,\n"
8113"                modal: true,\n"
8114"                buttons: Gtk.ButtonsType.OK,\n"
8115"                message_type: Gtk.MessageType.INFO,\n"
8116"                text: responses[activeItem]});\n"
8117"\n"
8118"            // Connect the OK button to a handler function\n"
8119"            this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
8120"\n"
8121"            // Show the messagedialog\n"
8122"            this._popUp.show();\n"
8123"        }\n"
8124"\n"
8125"    }\n"
8126"\n"
8127"    _onDialogResponse() {\n"
8128"\n"
8129"        this._popUp.destroy ();\n"
8130"\n"
8131"    }\n"
8132"\n"
8133"};\n"
8134"\n"
8135"// Run the application\n"
8136"let app = new ComboBoxTextExample ();\n"
8137"app.application.run (ARGV);\n"
8138msgstr ""
8139"#!/usr/bin/gjs\n"
8140"\n"
8141"imports.gi.versions.Gtk = '3.0';\n"
8142"const Gtk = imports.gi.Gtk;\n"
8143"\n"
8144"class ComboBoxTextExample {\n"
8145"\n"
8146"    // Create the application itself\n"
8147"    constructor() {\n"
8148"        this.application = new Gtk.Application ({\n"
8149"            application_id: 'org.example.jscomboboxtext'});\n"
8150"\n"
8151"        // Connect 'activate' and 'startup' signals to the callback functions\n"
8152"        this.application.connect('activate', this._onActivate.bind(this));\n"
8153"        this.application.connect('startup', this._onStartup.bind(this));\n"
8154"    }\n"
8155"\n"
8156"    // Callback function for 'activate' signal presents windows when active\n"
8157"    _onActivate() {\n"
8158"        this._window.present ();\n"
8159"    }\n"
8160"\n"
8161"    // Callback function for 'startup' signal builds the UI\n"
8162"    _onStartup() {\n"
8163"        this._buildUI();\n"
8164"    }\n"
8165"\n"
8166"    // Build the application's UI\n"
8167"    _buildUI() {\n"
8168"\n"
8169"        // Create the application window\n"
8170"        this._window = new Gtk.ApplicationWindow  ({\n"
8171"            application: this.application,\n"
8172"            window_position: Gtk.WindowPosition.CENTER,\n"
8173"            title: \"Welcome to GNOME\",\n"
8174"            default_width: 200,\n"
8175"            border_width: 10 });\n"
8176"\n"
8177"        // Create the combobox\n"
8178"        this._comboBoxText = new Gtk.ComboBoxText();\n"
8179"\n"
8180"        // Populate the combobox\n"
8181"        let distros = [\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"];\n"
8182"        for (let i = 0; i &lt; distros.length; i++)\n"
8183"            this._comboBoxText.append_text (distros[i]);\n"
8184"        this._comboBoxText.set_active (0);\n"
8185"\n"
8186"        // Connect the combobox's 'changed' signal to our callback function\n"
8187"        this._comboBoxText.connect ('changed', this._onComboChanged.bind(this));\n"
8188"\n"
8189"        // Add the combobox to the window\n"
8190"        this._window.add (this._comboBoxText);\n"
8191"\n"
8192"        // Show the window and all child widgets\n"
8193"        this._window.show_all();\n"
8194"    }\n"
8195"\n"
8196"    _onComboChanged() {\n"
8197"\n"
8198"        // The responses we'll use for our messagedialog\n"
8199"        let responses = [\"\",\n"
8200"            \"Fedora is a community distro sponsored by Red Hat.\",\n"
8201"            \"Mint is a popular distro based on Ubuntu.\",\n"
8202"            \"SUSE is a name shared by two separate distros.\"];\n"
8203"\n"
8204"        // Which combobox item is active?\n"
8205"        let activeItem = this._comboBoxText.get_active();\n"
8206"\n"
8207"        // No messagedialog if you chose \"Select distribution\"\n"
8208"        if (activeItem != 0) {\n"
8209"            this._popUp = new Gtk.MessageDialog ({\n"
8210"                transient_for: this._window,\n"
8211"                modal: true,\n"
8212"                buttons: Gtk.ButtonsType.OK,\n"
8213"                message_type: Gtk.MessageType.INFO,\n"
8214"                text: responses[activeItem]});\n"
8215"\n"
8216"            // Connect the OK button to a handler function\n"
8217"            this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
8218"\n"
8219"            // Show the messagedialog\n"
8220"            this._popUp.show();\n"
8221"        }\n"
8222"\n"
8223"    }\n"
8224"\n"
8225"    _onDialogResponse() {\n"
8226"\n"
8227"        this._popUp.destroy ();\n"
8228"\n"
8229"    }\n"
8230"\n"
8231"};\n"
8232"\n"
8233"// Run the application\n"
8234"let app = new ComboBoxTextExample ();\n"
8235"app.application.run (ARGV);\n"
8236
8237#. (itstool) path: item/p
8238#: C/comboboxtext.js.page:183
8239msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ComboBoxText.html\">Gtk.ComboBoxText</link>"
8240msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ComboBoxText.html\">Gtk.ComboBoxText</link>"
8241
8242#. (itstool) path: item/p
8243#: C/comboboxtext.js.page:184 C/combobox.js.page:244 C/entry.js.page:33 C/messagedialog.js.page:198
8244msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.MessageDialog.html\">Gtk.MessageDialog</link>"
8245msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.MessageDialog.html\">Gtk.MessageDialog</link>"
8246
8247#. (itstool) path: info/title
8248#: C/combobox.c.page:8
8249msgctxt "text"
8250msgid "ComboBox (C)"
8251msgstr "ComboBox(C)"
8252
8253#. (itstool) path: info/desc
8254#: C/combobox.c.page:22 C/combobox.py.page:20 C/combobox.vala.page:18 C/combobox_multicolumn.py.page:19
8255#: C/combobox_multicolumn.vala.page:19
8256msgid "A widget used to choose from a list of items"
8257msgstr "항목 목록을 선택할 때 사용하는 위젯"
8258
8259#. (itstool) path: page/title
8260#: C/combobox.c.page:25 C/combobox.js.page:25 C/combobox.vala.page:21
8261msgid "ComboBox"
8262msgstr "ComboBox"
8263
8264#. (itstool) path: page/p
8265#: C/combobox.c.page:27 C/combobox.vala.page:23
8266msgid "This ComboBox prints to the terminal when you change your selection."
8267msgstr "이 ComboBox는 여러분이 바꿔서 선택한 내용을 터미널에 나타냅니다."
8268
8269#. (itstool) path: page/code
8270#: C/combobox.c.page:29
8271#, no-wrap
8272msgid ""
8273"\n"
8274"#include &lt;gtk/gtk.h&gt;\n"
8275"\n"
8276"/* This is the callback function. It is a handler function which reacts to the\n"
8277" * signal. In this case, if the row selected is not the first one of the\n"
8278" * ComboBox, we write its value in the terminal for the user.\n"
8279" */\n"
8280"static void\n"
8281"on_changed (GtkComboBox *widget,\n"
8282"            gpointer   user_data)\n"
8283"{\n"
8284"  GtkComboBox *combo_box = widget;\n"
8285"\n"
8286"  if (gtk_combo_box_get_active (combo_box) != 0) {\n"
8287"    gchar *distro = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(combo_box));\n"
8288"    g_print (\"You chose %s\\n\", distro);\n"
8289"    g_free (distro);\n"
8290"  }\n"
8291"\n"
8292"}\n"
8293"\n"
8294"\n"
8295"static void\n"
8296"activate (GtkApplication *app,\n"
8297"          gpointer        user_data)\n"
8298"{\n"
8299"  gint i;\n"
8300"  GtkWidget *view;\n"
8301"  GtkWidget *window;\n"
8302"  GtkWidget *combo_box;\n"
8303"\n"
8304"  /* Create a window with a title, border width, and a default size. Setting the\n"
8305"   * size to -1 means to use the \"natural\" default size.\n"
8306"   * (the size request of the window)\n"
8307"   */\n"
8308"  window = gtk_application_window_new (app);\n"
8309"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
8310"  gtk_window_set_default_size (GTK_WINDOW (window), 200, -1);\n"
8311"  gtk_container_set_border_width (GTK_CONTAINER (window), 10);\n"
8312"\n"
8313"\n"
8314"  /* Create the combo box and append your string values to it. */\n"
8315"  combo_box = gtk_combo_box_text_new ();\n"
8316"  const char *distros[] = {\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"};\n"
8317"\n"
8318" \n"
8319"  /* G_N_ELEMENTS is a macro which determines the number of elements in an array.*/ \n"
8320"  for (i = 0; i &lt; G_N_ELEMENTS (distros); i++){\n"
8321"  \tgtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), distros[i]);\n"
8322"  }\n"
8323"\n"
8324"  /* Choose to set the first row as the active one by default, from the beginning */\n"
8325"  gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);\n"
8326"\n"
8327"  /* Connect the signal emitted when a row is selected to the appropriate\n"
8328"   * callback function.\n"
8329"   */\n"
8330"  g_signal_connect (combo_box,\n"
8331"                    \"changed\",\n"
8332"                    G_CALLBACK (on_changed),\n"
8333"                    NULL);\n"
8334"\n"
8335"  /* Add it to the window */\n"
8336"  gtk_container_add (GTK_CONTAINER (window), combo_box);\n"
8337"\n"
8338"  gtk_widget_show_all (window);\n"
8339"}\n"
8340"\n"
8341"\n"
8342"int\n"
8343"main (int argc, char **argv)\n"
8344"{\n"
8345"  GtkApplication *app;\n"
8346"  int status;\n"
8347"\n"
8348"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
8349"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
8350"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
8351"  g_object_unref (app);\n"
8352"\n"
8353"  return status;\n"
8354"}\n"
8355msgstr ""
8356"\n"
8357"#include &lt;gtk/gtk.h&gt;\n"
8358"\n"
8359"/* This is the callback function. It is a handler function which reacts to the\n"
8360" * signal. In this case, if the row selected is not the first one of the\n"
8361" * ComboBox, we write its value in the terminal for the user.\n"
8362" */\n"
8363"static void\n"
8364"on_changed (GtkComboBox *widget,\n"
8365"            gpointer   user_data)\n"
8366"{\n"
8367"  GtkComboBox *combo_box = widget;\n"
8368"\n"
8369"  if (gtk_combo_box_get_active (combo_box) != 0) {\n"
8370"    gchar *distro = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(combo_box));\n"
8371"    g_print (\"You chose %s\\n\", distro);\n"
8372"    g_free (distro);\n"
8373"  }\n"
8374"\n"
8375"}\n"
8376"\n"
8377"\n"
8378"static void\n"
8379"activate (GtkApplication *app,\n"
8380"          gpointer        user_data)\n"
8381"{\n"
8382"  gint i;\n"
8383"  GtkWidget *view;\n"
8384"  GtkWidget *window;\n"
8385"  GtkWidget *combo_box;\n"
8386"\n"
8387"  /* Create a window with a title, border width, and a default size. Setting the\n"
8388"   * size to -1 means to use the \"natural\" default size.\n"
8389"   * (the size request of the window)\n"
8390"   */\n"
8391"  window = gtk_application_window_new (app);\n"
8392"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
8393"  gtk_window_set_default_size (GTK_WINDOW (window), 200, -1);\n"
8394"  gtk_container_set_border_width (GTK_CONTAINER (window), 10);\n"
8395"\n"
8396"\n"
8397"  /* Create the combo box and append your string values to it. */\n"
8398"  combo_box = gtk_combo_box_text_new ();\n"
8399"  const char *distros[] = {\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"};\n"
8400"\n"
8401" \n"
8402"  /* G_N_ELEMENTS is a macro which determines the number of elements in an array.*/ \n"
8403"  for (i = 0; i &lt; G_N_ELEMENTS (distros); i++){\n"
8404"  \tgtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), distros[i]);\n"
8405"  }\n"
8406"\n"
8407"  /* Choose to set the first row as the active one by default, from the beginning */\n"
8408"  gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);\n"
8409"\n"
8410"  /* Connect the signal emitted when a row is selected to the appropriate\n"
8411"   * callback function.\n"
8412"   */\n"
8413"  g_signal_connect (combo_box,\n"
8414"                    \"changed\",\n"
8415"                    G_CALLBACK (on_changed),\n"
8416"                    NULL);\n"
8417"\n"
8418"  /* Add it to the window */\n"
8419"  gtk_container_add (GTK_CONTAINER (window), combo_box);\n"
8420"\n"
8421"  gtk_widget_show_all (window);\n"
8422"}\n"
8423"\n"
8424"\n"
8425"int\n"
8426"main (int argc, char **argv)\n"
8427"{\n"
8428"  GtkApplication *app;\n"
8429"  int status;\n"
8430"\n"
8431"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
8432"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
8433"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
8434"  g_object_unref (app);\n"
8435"\n"
8436"  return status;\n"
8437"}\n"
8438
8439#. (itstool) path: item/p
8440#: C/combobox.c.page:37
8441msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkComboBoxText.html\">GtkComboBoxText</link>"
8442msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkComboBoxText.html\">GtkComboBoxText</link>"
8443
8444#. (itstool) path: info/title
8445#: C/combobox.js.page:8
8446msgctxt "text"
8447msgid "ComboBox (JavaScript)"
8448msgstr "ComboBox(JavaScript)"
8449
8450#. (itstool) path: info/desc
8451#: C/combobox.js.page:22
8452msgid "A customizable drop-down menu"
8453msgstr "개별 설정 가능한 드롭 다운 메뉴"
8454
8455#. (itstool) path: page/media
8456#. This is a reference to an external file such as an image or video. When
8457#. the file changes, the md5 hash will change to let you know you need to
8458#. update your localized copy. The msgstr is not used at all. Set it to
8459#. whatever you like once you have updated your copy of the file.
8460#: C/combobox.js.page:26 C/combobox_multicolumn.py.page:23 C/combobox_multicolumn.vala.page:23
8461msgctxt "_"
8462msgid "external ref='media/combobox_multicolumn.png' md5='43f16648fb11ebc7d2f70825ed0f63b3'"
8463msgstr ""
8464
8465#. (itstool) path: page/p
8466#: C/combobox.js.page:27
8467msgid ""
8468"A ComboBox is an extremely customizable drop-down menu. It holds the equivalent of a <link xref="
8469"\"treeview_simple_liststore.js\">TreeView</link> widget that appears when you click on it, complete with a "
8470"ListStore (basically a spreadsheet) that says what's in the rows and columns. In this example, our ListStore has "
8471"the name of each option in one column, and the name of a stock icon in the other, which the ComboBox then turns "
8472"into an icon for each option."
8473msgstr ""
8474"ComboBox는 완전 지멋대로 고칠 수 있는 드롭다운 메뉴입니다. 드롭다운 메뉴를 누르면 <link xref="
8475"\"treeview_simple_liststore.js\">TreeView</link> 위젯을 나타내고, 행열에 무엇이 들어있는지 알려주는 ListStore(기본"
8476"적인 스프레드시트) 위젯으로 끝내는 것과 동일한 구조를 지닙니다. 이 예제에서 ListStore에는 한 칸에 각 옵션의 이름을 "
8477"넣고 스톡 아이콘 이름을 다른 곳에 넣으며, 각 콤보박스에서 각 옵션의 아이콘을 나타내게 하겠습니다."
8478
8479#. (itstool) path: page/p
8480#: C/combobox.js.page:28
8481msgid ""
8482"You select a whole horizontal row at a time, so the icons aren't treated as separate options. They and the text "
8483"beside them make up each option you can click on."
8484msgstr ""
8485"우선 한번에 수평 줄 하나를 선택하기에 아이콘은 개별 옵션으로 취급하지 않습니다. 아이콘과 텍스트 한 묶음이 여러분이 "
8486"누를 수 있는 옵션 하나를 이룹니다."
8487
8488#. (itstool) path: note/p
8489#: C/combobox.js.page:29
8490msgid ""
8491"Working with a ListStore can be time-consuming. If you just want a simple text-only drop-down menu, take a look at "
8492"the <link xref=\"comboboxtext.js\">ComboBoxText</link>. It doesn't take as much time to set up, and is easier to "
8493"work with."
8494msgstr ""
8495"ListStrore를 다루는 과정은 시간이 좀 걸릴 수 있습니다. 간단하게 텍스트만 있는 드롭다운 메뉴를 원하면 <link xref="
8496"\"comboboxtext.js\">ComboBoxText</link> 사용을 고려하십시오. 구성에 시간이 별로 오래 걸리지 않을 뿐더러 다루기도 쉽"
8497"습니다."
8498
8499#. (itstool) path: section/code
8500#: C/combobox.js.page:34
8501#, no-wrap
8502msgid ""
8503"\n"
8504"#!/usr/bin/gjs\n"
8505"\n"
8506"imports.gi.versions.Gtk = '3.0';\n"
8507"\n"
8508"const GObject = imports.gi.GObject;\n"
8509"const Gtk = imports.gi.Gtk;\n"
8510msgstr ""
8511"\n"
8512"#!/usr/bin/gjs\n"
8513"\n"
8514"imports.gi.versions.Gtk = '3.0';\n"
8515"\n"
8516"const GObject = imports.gi.GObject;\n"
8517"const Gtk = imports.gi.Gtk;\n"
8518
8519#. (itstool) path: section/code
8520#: C/combobox.js.page:47
8521#, no-wrap
8522msgid ""
8523"\n"
8524"class ComboBoxExample {\n"
8525"\n"
8526"    // Create the application itself\n"
8527"    constructor() {\n"
8528"        this.application = new Gtk.Application ({\n"
8529"            application_id: 'org.example.jscombobox'});\n"
8530"\n"
8531"        // Connect 'activate' and 'startup' signals to the callback functions\n"
8532"        this.application.connect('activate', this._onActivate.bind(this));\n"
8533"        this.application.connect('startup', this._onStartup.bind(this));\n"
8534"    }\n"
8535"\n"
8536"    // Callback function for 'activate' signal presents windows when active\n"
8537"    _onActivate() {\n"
8538"        this._window.present ();\n"
8539"    }\n"
8540"\n"
8541"    // Callback function for 'startup' signal builds the UI\n"
8542"    _onStartup() {\n"
8543"        this._buildUI ();\n"
8544"    }\n"
8545msgstr ""
8546"\n"
8547"class ComboBoxExample {\n"
8548"\n"
8549"    // Create the application itself\n"
8550"    constructor() {\n"
8551"        this.application = new Gtk.Application ({\n"
8552"            application_id: 'org.example.jscombobox'});\n"
8553"\n"
8554"        // Connect 'activate' and 'startup' signals to the callback functions\n"
8555"        this.application.connect('activate', this._onActivate.bind(this));\n"
8556"        this.application.connect('startup', this._onStartup.bind(this));\n"
8557"    }\n"
8558"\n"
8559"    // Callback function for 'activate' signal presents windows when active\n"
8560"    _onActivate() {\n"
8561"        this._window.present ();\n"
8562"    }\n"
8563"\n"
8564"    // Callback function for 'startup' signal builds the UI\n"
8565"    _onStartup() {\n"
8566"        this._buildUI ();\n"
8567"    }\n"
8568
8569#. (itstool) path: section/p
8570#: C/combobox.js.page:70
8571msgid ""
8572"All the code for this sample goes in the ComboBoxExample class. The above code creates a <link href=\"http://www."
8573"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to go "
8574"in."
8575msgstr ""
8576"이 예제의 모든 코드는 ComboBoxExample 클래스에 넣었습니다. 위 코드에서는 위젯과 창을 담아둘 <link href=\"http://"
8577"www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만들었습니다."
8578
8579#. (itstool) path: section/code
8580#: C/combobox.js.page:71
8581#, no-wrap
8582msgid ""
8583"\n"
8584"    // Build the application's UI\n"
8585"    _buildUI() {\n"
8586"\n"
8587"        // Create the application window\n"
8588"        this._window = new Gtk.ApplicationWindow  ({\n"
8589"            application: this.application,\n"
8590"            window_position: Gtk.WindowPosition.CENTER,\n"
8591"            title: \"Welcome to GNOME\",\n"
8592"            default_width: 200,\n"
8593"            border_width: 10 });\n"
8594msgstr ""
8595"\n"
8596"    // Build the application's UI\n"
8597"    _buildUI() {\n"
8598"\n"
8599"        // Create the application window\n"
8600"        this._window = new Gtk.ApplicationWindow  ({\n"
8601"            application: this.application,\n"
8602"            window_position: Gtk.WindowPosition.CENTER,\n"
8603"            title: \"Welcome to GNOME\",\n"
8604"            default_width: 200,\n"
8605"            border_width: 10 });\n"
8606
8607#. (itstool) path: section/title
8608#: C/combobox.js.page:87 C/treeview_simple_liststore.js.page:94
8609msgid "Creating the ListStore"
8610msgstr "ListStore 만들기"
8611
8612#. (itstool) path: section/code
8613#: C/combobox.js.page:88
8614#, no-wrap
8615msgid ""
8616"\n"
8617"        // Create the liststore to put our options in\n"
8618"        this._listStore = new Gtk.ListStore();\n"
8619"        this._listStore.set_column_types ([\n"
8620"            GObject.TYPE_STRING,\n"
8621"            GObject.TYPE_STRING]);\n"
8622msgstr ""
8623"\n"
8624"        // Create the liststore to put our options in\n"
8625"        this._listStore = new Gtk.ListStore();\n"
8626"        this._listStore.set_column_types ([\n"
8627"            GObject.TYPE_STRING,\n"
8628"            GObject.TYPE_STRING]);\n"
8629
8630#. (itstool) path: section/p
8631#: C/combobox.js.page:95
8632msgid ""
8633"This ListStore works like the one used in the <link xref=\"treeview_simple_liststore.js\">TreeView</link> example. "
8634"We're giving it two columns, both strings, because one of them will contain the names of <link href=\"https://"
8635"developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html\">stock Gtk icons</link>."
8636msgstr ""
8637"ListStore는 <link xref=\"treeview_simple_liststore.js\">TreeView</link> 예제에서 사용했던 것과 비슷하게 동작합니"
8638"다. ListStore에 문자열을 저장하는 두 칸을 확보했는데요, 이 중 하나는 <link href=\"https://developer.gnome.org/"
8639"gtk3/3.4/gtk3-Stock-Items.html\">스톡 gtk 아이콘</link> 이름이 들어갑니다."
8640
8641#. (itstool) path: section/p
8642#: C/combobox.js.page:96
8643msgid ""
8644"If we'd wanted to use our own icons that weren't already built in to GNOME, we'd have needed to use the <file>gtk."
8645"gdk.Pixbuf</file> type instead. Here are a few other types you can use:"
8646msgstr ""
8647"그놈에 내장하지 않은 자체 보유 아이콘을 사용한다면, 대신 <file>gtk.gdk.Pixbuf</file> 형식을 사용해야합니다. 여러분"
8648"이 사용할 수 있는 몇가지 기타 형식을 알려드리겠습니다:"
8649
8650#. (itstool) path: item/p
8651#: C/combobox.js.page:98 C/treeview_simple_liststore.js.page:107
8652msgid "<file>GObject.TYPE_BOOLEAN</file> -- True or false"
8653msgstr "<file>GObject.TYPE_BOOLEAN</file> -- 참/거짓"
8654
8655#. (itstool) path: item/p
8656#: C/combobox.js.page:99 C/treeview_simple_liststore.js.page:108
8657msgid "<file>GObject.TYPE_FLOAT</file> -- A floating point number (one with a decimal point)"
8658msgstr "<file>GObject.TYPE_FLOAT</file> -- 소수(소수점 하나 들어감)"
8659
8660#. (itstool) path: item/p
8661#: C/combobox.js.page:100 C/treeview_simple_liststore.js.page:109
8662msgid "<file>GObject.TYPE_STRING</file> -- A string of letters and numbers"
8663msgstr "<file>GObject.TYPE_STRING</file> -- 문자, 숫자로 이루어진 문장"
8664
8665#. (itstool) path: note/p
8666#: C/combobox.js.page:102 C/treeview_simple_liststore.js.page:113
8667msgid ""
8668"You need to put the line <file>const GObject = imports.gi.GObject;</file> at the start of your application's code, "
8669"like we did in this example, if you want to be able to use GObject types."
8670msgstr ""
8671"GObject 형식을 사용할 수 있게 하려면, 우리가 예제에서 했던 것처럼 프로그램 코드 시작 부분에 <file>const GObject = "
8672"imports.gi.GObject;</file> 를 넣으세요."
8673
8674#. (itstool) path: section/code
8675#: C/combobox.js.page:104
8676#, no-wrap
8677msgid ""
8678"\n"
8679"        // This array holds our list of options and their icons\n"
8680"        let options = [{ name: \"Select\" },\n"
8681"            { name: \"New\", icon: Gtk.STOCK_NEW },\n"
8682"            { name: \"Open\", icon: Gtk.STOCK_OPEN },\n"
8683"            { name: \"Save\", icon: Gtk.STOCK_SAVE }];\n"
8684"\n"
8685"        // Put the options in the liststore\n"
8686"        for (let i = 0; i &lt; options.length; i++ ) {\n"
8687"            let option = options[i];\n"
8688"            let iter = this._listStore.append();\n"
8689"            this._listStore.set (iter, [0], [option.name]);\n"
8690"            if ('icon' in option)\n"
8691"                this._listStore.set (iter, [1], [option.icon]);\n"
8692"        }\n"
8693msgstr ""
8694"\n"
8695"        // This array holds our list of options and their icons\n"
8696"        let options = [{ name: \"Select\" },\n"
8697"            { name: \"New\", icon: Gtk.STOCK_NEW },\n"
8698"            { name: \"Open\", icon: Gtk.STOCK_OPEN },\n"
8699"            { name: \"Save\", icon: Gtk.STOCK_SAVE }];\n"
8700"\n"
8701"        // Put the options in the liststore\n"
8702"        for (let i = 0; i &lt; options.length; i++ ) {\n"
8703"            let option = options[i];\n"
8704"            let iter = this._listStore.append();\n"
8705"            this._listStore.set (iter, [0], [option.name]);\n"
8706"            if ('icon' in option)\n"
8707"                this._listStore.set (iter, [1], [option.icon]);\n"
8708"        }\n"
8709
8710#. (itstool) path: section/p
8711#: C/combobox.js.page:120
8712msgid ""
8713"Here we create an array of the text options and their corresponding icons, then put them into the ListStore in "
8714"much the same way we would for a <link xref=\"treeview_simple_liststore.js\">TreeView's</link> ListStore. We only "
8715"want to put an icon in if there's actually an icon in the options array, so we make sure to check for that first."
8716msgstr ""
8717"여기서 각각의 아이콘과 텍스트 옵션에 대한 배열을 만들고, <link xref=\"treeview_simple_liststore.js\">TreeView</"
8718"link>  ListStore와 매우 동일한 방식으로 ListStore에 배열을 넣겠습니다. 옵션 배열에 실제로 아이콘이 있을 경우에만 아"
8719"이콘을 넣을테니 우선 확인부터 해보겠습니다."
8720
8721#. (itstool) path: note/p
8722#: C/combobox.js.page:121
8723msgid ""
8724"\"Select\" isn't really an option so much as an invitation to click on our ComboBox, so it doesn't need an icon."
8725msgstr "\"선택\"은 ComboBox에서 마우스로 누르게 하는 것인 만큼 진짜 옵션은 아니니까, 아이콘이 필요가 없습니다."
8726
8727#. (itstool) path: section/title
8728#: C/combobox.js.page:125
8729msgid "Creating the ComboBox"
8730msgstr "ComboBox 만들기"
8731
8732#. (itstool) path: section/code
8733#: C/combobox.js.page:126
8734#, no-wrap
8735msgid ""
8736"\n"
8737"        // Create the combobox\n"
8738"        this._comboBox = new Gtk.ComboBox({\n"
8739"            model: this._listStore});\n"
8740msgstr ""
8741"\n"
8742"        // Create the combobox\n"
8743"        this._comboBox = new Gtk.ComboBox({\n"
8744"            model: this._listStore});\n"
8745
8746#. (itstool) path: section/p
8747#: C/combobox.js.page:131
8748msgid ""
8749"Each ComboBox has an underlying \"model\" it takes all its options from. You can use a TreeStore if you want to "
8750"have a ComboBox with branching options. In this case, we're just using the ListStore we already created."
8751msgstr ""
8752"각 ComboBox에는 자체 옵션을 가진 기반 \"모델\"이 있습니다. ComboBox에 별개 분기 옵션을 넣고 싶다면 TreeStore를 사용"
8753"할 수 있죠. 지금 같은 경우는, 그냥 이미 만든 ListStore를 사용하겠습니다."
8754
8755#. (itstool) path: section/code
8756#: C/combobox.js.page:132
8757#, no-wrap
8758msgid ""
8759"\n"
8760"        // Create some cellrenderers for the items in each column\n"
8761"        let rendererPixbuf = new Gtk.CellRendererPixbuf();\n"
8762"        let rendererText = new Gtk.CellRendererText();\n"
8763"\n"
8764"        // Pack the renderers into the combobox in the order we want to see\n"
8765"        this._comboBox.pack_start (rendererPixbuf, false);\n"
8766"        this._comboBox.pack_start (rendererText, false);\n"
8767"\n"
8768"        // Set the renderers to use the information from our liststore\n"
8769"        this._comboBox.add_attribute (rendererText, \"text\", 0);\n"
8770"        this._comboBox.add_attribute (rendererPixbuf, \"stock_id\", 1);\n"
8771msgstr ""
8772"\n"
8773"        // Create some cellrenderers for the items in each column\n"
8774"        let rendererPixbuf = new Gtk.CellRendererPixbuf();\n"
8775"        let rendererText = new Gtk.CellRendererText();\n"
8776"\n"
8777"        // Pack the renderers into the combobox in the order we want to see\n"
8778"        this._comboBox.pack_start (rendererPixbuf, false);\n"
8779"        this._comboBox.pack_start (rendererText, false);\n"
8780"\n"
8781"        // Set the renderers to use the information from our liststore\n"
8782"        this._comboBox.add_attribute (rendererText, \"text\", 0);\n"
8783"        this._comboBox.add_attribute (rendererPixbuf, \"stock_id\", 1);\n"
8784"에\n"
8785
8786#. (itstool) path: section/p
8787#: C/combobox.js.page:145
8788msgid ""
8789"This part, again, works much like creating CellRenderers and packing them into the columns of a <link xref="
8790"\"treeview_simple_liststore.js\">TreeView</link>. The biggest difference is that we don't need to create the "
8791"ComboBox's columns as separate objects. We just pack the CellRenderers into it in the order we want them to show "
8792"up, then tell them to pull information from the ListStore (and what type of information we want them to expect)."
8793msgstr ""
8794"이 부분에서는 다시 말하지만, CellRenderer를 만들고 <link xref=\"treeview_simple_liststore.js\">TreeView</link>의 칸"
8795"에 넣는 식으로 손이 많이 가고 있죠. 큰 차이점이 있다면 ComboBox의 칸을 별개 객체로 만들 필요가 없다는겁니다. 그냥 "
8796"CellRenderer를 보여주고 싶은 대로 감싸넣고, ListStore에서 정보를 가져오게 하는거죠(그리고 기대하던 정보 형식도요)."
8797
8798#. (itstool) path: section/p
8799#: C/combobox.js.page:146
8800msgid ""
8801"We use a CellRendererText to show the text, and a CellRendererPixbuf to show the icons. We can store the names of "
8802"the icons' stock types as strings, but when we display them we need a CellRenderer that's designed for pictures."
8803msgstr ""
8804"텍스트를 보여줄 때 CellRendererText를 사용하고, CellRendererPixbuf로 아이콘을 보여주겠습니다. 아이콘 스톡 이름은 문"
8805"자열로 입력하여 저장할 수 있지만은, 화면에 표시할 때는 그림을 보여주도록 설계한 CellRenderer가 필요합니다."
8806
8807#. (itstool) path: note/p
8808#: C/combobox.js.page:147
8809msgid ""
8810"Just like with a TreeView, the \"model\" (in this case a ListStore) and the \"view\" (in this case our ComboBox) "
8811"are separate. Because of that, we can do things like have the columns in one order in the ListStore, and then pack "
8812"the CellRenderers that correspond to those columns into the ComboBox in a different order. We can even create a "
8813"TreeView or other widget that shows the information in the ListStore in a different way, without it affecting our "
8814"ComboBox."
8815msgstr ""
8816"TreeView처럼, \"모델\"(이 경우, ListStore)과 \"뷰\"(이 경우, ComboBox)를 따로 분리합니다. ListStore에서 한가지 순서"
8817"를 갖춘 열으로 뭔가를 할 수 있고, ComboBox에 다른 순서로 넣은 각각의 열을  CellRenderer에 감싸두기 때문입니다. "
8818"ListStore에 정보를 저장해서 보여줄 때 ComboBox에 영향을 주지 않고도 TreeView를 만들거나 다른 위젯을 만들 수 있습니"
8819"다."
8820
8821#. (itstool) path: section/code
8822#: C/combobox.js.page:149
8823#, no-wrap
8824msgid ""
8825"\n"
8826"        // Set the first row in the combobox to be active on startup\n"
8827"        this._comboBox.set_active (0);\n"
8828"\n"
8829"        // Connect the combobox's 'changed' signal to our callback function\n"
8830"        this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
8831msgstr ""
8832"\n"
8833"        // Set the first row in the combobox to be active on startup\n"
8834"        this._comboBox.set_active (0);\n"
8835"\n"
8836"        // Connect the combobox's 'changed' signal to our callback function\n"
8837"        this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
8838
8839#. (itstool) path: section/p
8840#: C/combobox.js.page:156
8841msgid ""
8842"We want the \"Select\" text to be the part people see at first, that gets them to click on the ComboBox. So we set "
8843"it to be the active entry. We also connect the ComboBox's <file>changed</file> signal to a callback function, so "
8844"that any time someone clicks on a new option something happens. In this case, we're just going to show a popup "
8845"with a little haiku."
8846msgstr ""
8847"우선 여러 사람이 \"선택\" 텍스트를 먼저 보게한 후 ComboBox를 누르게 하려고 합니다. 그렇게 해서 \"선택\"을 활성 항목"
8848"으로 설정했습니다. 또한 ComboBox의 <file>changed</file> 시그널을 콜백 함수에 연결해서 누군가가 새 옵션을 누를 때, "
8849"어떤 일이 일어나게 했습니다. 지금 같은 경우, 간단한 시구를 보여주겠습니다."
8850
8851#. (itstool) path: section/code
8852#: C/combobox.js.page:158
8853#, no-wrap
8854msgid ""
8855"\n"
8856"        // Add the combobox to the window\n"
8857"        this._window.add (this._comboBox);\n"
8858"\n"
8859"        // Show the window and all child widgets\n"
8860"        this._window.show_all();\n"
8861"    }\n"
8862msgstr ""
8863"\n"
8864"        // Add the combobox to the window\n"
8865"        this._window.add (this._comboBox);\n"
8866"\n"
8867"        // Show the window and all child widgets\n"
8868"        this._window.show_all();\n"
8869"    }\n"
8870
8871#. (itstool) path: section/p
8872#: C/combobox.js.page:166
8873msgid "Finally, we add the ComboBox to the window, and tell the window to show itself and everything inside it."
8874msgstr "마지막으로 ComboBox를 창에 추가하고, 창에 창 자신과 창에 들어간 위젯을 보여주게 했습니다."
8875
8876#. (itstool) path: section/code
8877#: C/combobox.js.page:171
8878#, no-wrap
8879msgid ""
8880"\n"
8881"    _selected() {\n"
8882"\n"
8883"        // The silly pseudohaiku that we'll use for our messagedialog\n"
8884"        let haiku = [\"\",\n"
8885"            \"You ask for the new\\nwith no thought for the aged\\nlike fallen leaves trod.\",\n"
8886"            \"Like a simple clam\\nrevealing a lustrous pearl\\nit opens for you.\",\n"
8887"            \"A moment in time\\na memory on the breeze\\nthese things can't be saved.\"];\n"
8888msgstr ""
8889"\n"
8890"    _selected() {\n"
8891"\n"
8892"        // The silly pseudohaiku that we'll use for our messagedialog\n"
8893"        let haiku = [\"\",\n"
8894"            \"You ask for the new\\nwith no thought for the aged\\nlike fallen leaves trod.\",\n"
8895"            \"Like a simple clam\\nrevealing a lustrous pearl\\nit opens for you.\",\n"
8896"            \"A moment in time\\na memory on the breeze\\nthese things can't be saved.\"];\n"
8897
8898#. (itstool) path: section/p
8899#: C/combobox.js.page:180
8900msgid ""
8901"We're going to create a pop-up <link xref=\"messagedialog.js\">MessageDialog</link>, which shows you a silly haiku "
8902"based on which distro you select. First, we create the array of haiku to use. Since the first string in our "
8903"ComboBox is just the \"Select\" message, we make the first string in our array blank."
8904msgstr ""
8905"선택한 배포판 이름에 따라 시구 아무거나 보여주는 <link xref=\"messagedialog.js\">MessageDialog</link> 팝업을 만들"
8906"고 있죠. 우선, 사용할 시구의 배열을 만들고. ComboBox에 처음 나타날 문자열은 \"선택\" 메시지니, 배열의 첫번째 문자열"
8907"은 비워두겠습니다."
8908
8909#. (itstool) path: section/code
8910#: C/combobox.js.page:182
8911#, no-wrap
8912msgid ""
8913"\n"
8914"        // Which combobox item is active?\n"
8915"        let activeItem = this._comboBox.get_active();\n"
8916"\n"
8917"        // No messagedialog if you choose \"Select\"\n"
8918"        if (activeItem != 0) {\n"
8919"            this._popUp = new Gtk.MessageDialog ({\n"
8920"                transient_for: this._window,\n"
8921"                modal: true,\n"
8922"                buttons: Gtk.ButtonsType.OK,\n"
8923"                message_type: Gtk.MessageType.INFO,\n"
8924"                text: haiku[activeItem]});\n"
8925"\n"
8926"            // Connect the OK button to a handler function\n"
8927"            this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
8928"\n"
8929"            // Show the messagedialog\n"
8930"            this._popUp.show();\n"
8931"        }\n"
8932"\n"
8933"    }\n"
8934msgstr ""
8935"\n"
8936"        // Which combobox item is active?\n"
8937"        let activeItem = this._comboBox.get_active();\n"
8938"\n"
8939"        // No messagedialog if you choose \"Select\"\n"
8940"        if (activeItem != 0) {\n"
8941"            this._popUp = new Gtk.MessageDialog ({\n"
8942"                transient_for: this._window,\n"
8943"                modal: true,\n"
8944"                buttons: Gtk.ButtonsType.OK,\n"
8945"                message_type: Gtk.MessageType.INFO,\n"
8946"                text: haiku[activeItem]});\n"
8947"\n"
8948"            // Connect the OK button to a handler function\n"
8949"            this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
8950"\n"
8951"            // Show the messagedialog\n"
8952"            this._popUp.show();\n"
8953"        }\n"
8954"\n"
8955"    }\n"
8956
8957#. (itstool) path: section/p
8958#: C/combobox.js.page:204
8959msgid ""
8960"Before showing a MessageDialog, we first test to make sure you didn't choose the \"Select\" message. After that, "
8961"we set its text to be the haiku in the array that corresponds to the active entry in our ComboBoxText. We do that "
8962"using the <file>get_active</file> method, which returns the number ID of your selection."
8963msgstr ""
8964"MessageDialog를 보여주기 전에요, \"선택\" 메시지를 선택하지 못하게 했는지 일단 확인하겠습니다. 그 다음 ComboBoxText"
8965"의 활성 항목에 따른 배열에 시구 텍스트를 넣겠습니다. 선택 항목의 숫자 ID를 반환하는 <file>get_active</file> 메서드"
8966"를 사용하여 처리할거구요."
8967
8968#. (itstool) path: note/p
8969#: C/combobox.js.page:205
8970msgid ""
8971"Other methods you can use include <file>get_active_id</file>, which returns the text ID assigned by <file>append</"
8972"file>, and <file>get_active_text</file>, which returns the full text of the string you selected."
8973msgstr ""
8974"사용할 수 있는 또다른 메서드는 <file>append</file>로 할당한 텍스트 ID를 반환하는 <file>get_active_id</file> 메서드"
8975"하고, 선택 항목 텍스트 전체를 반환하는 <file>get_active_text</file> 메서드가 있습니다."
8976
8977#. (itstool) path: section/code
8978#: C/combobox.js.page:208
8979#, no-wrap
8980msgid ""
8981"\n"
8982"    _onDialogResponse() {\n"
8983"\n"
8984"        this._popUp.destroy ();\n"
8985"\n"
8986"    }\n"
8987"\n"
8988"};\n"
8989msgstr ""
8990"\n"
8991"    _onDialogResponse() {\n"
8992"\n"
8993"        this._popUp.destroy ();\n"
8994"\n"
8995"    }\n"
8996"\n"
8997"};\n"
8998
8999#. (itstool) path: section/code
9000#: C/combobox.js.page:219
9001#, no-wrap
9002msgid ""
9003"\n"
9004"// Run the application\n"
9005"let app = new ComboBoxExample ();\n"
9006"app.application.run (ARGV);\n"
9007msgstr ""
9008"\n"
9009"// Run the application\n"
9010"let app = new ComboBoxExample ();\n"
9011"app.application.run (ARGV);\n"
9012
9013#. (itstool) path: section/p
9014#: C/combobox.js.page:224
9015msgid "Finally, we create a new instance of the finished ComboBoxExample class, and set the application running."
9016msgstr "끝으로, ComboBoxExample 클래스의 새 인스턴스를 만들고요, 프로그램 실행을 구성하겠습니다."
9017
9018#. (itstool) path: section/code
9019#: C/combobox.js.page:229
9020#, no-wrap
9021msgid ""
9022"#!/usr/bin/gjs\n"
9023"\n"
9024"imports.gi.versions.Gtk = '3.0';\n"
9025"\n"
9026"const GObject = imports.gi.GObject;\n"
9027"const Gtk = imports.gi.Gtk;\n"
9028"\n"
9029"class ComboBoxExample {\n"
9030"\n"
9031"    // Create the application itself\n"
9032"    constructor() {\n"
9033"        this.application = new Gtk.Application ({\n"
9034"            application_id: 'org.example.jscombobox'});\n"
9035"\n"
9036"        // Connect 'activate' and 'startup' signals to the callback functions\n"
9037"        this.application.connect('activate', this._onActivate.bind(this));\n"
9038"        this.application.connect('startup', this._onStartup.bind(this));\n"
9039"    }\n"
9040"\n"
9041"    // Callback function for 'activate' signal presents windows when active\n"
9042"    _onActivate() {\n"
9043"        this._window.present ();\n"
9044"    }\n"
9045"\n"
9046"    // Callback function for 'startup' signal builds the UI\n"
9047"    _onStartup() {\n"
9048"        this._buildUI();\n"
9049"    }\n"
9050"\n"
9051"    // Build the application's UI\n"
9052"    _buildUI() {\n"
9053"\n"
9054"        // Create the application window\n"
9055"        this._window = new Gtk.ApplicationWindow  ({\n"
9056"            application: this.application,\n"
9057"            window_position: Gtk.WindowPosition.CENTER,\n"
9058"            title: \"Welcome to GNOME\",\n"
9059"            default_width: 200,\n"
9060"            border_width: 10 });\n"
9061"\n"
9062"        // Create the liststore to put our options in\n"
9063"        this._listStore = new Gtk.ListStore();\n"
9064"        this._listStore.set_column_types ([\n"
9065"            GObject.TYPE_STRING,\n"
9066"            GObject.TYPE_STRING]);\n"
9067"\n"
9068"        // This array holds our list of options and their icons\n"
9069"        let options = [{ name: \"Select\" },\n"
9070"            { name: \"New\", icon: Gtk.STOCK_NEW },\n"
9071"            { name: \"Open\", icon: Gtk.STOCK_OPEN },\n"
9072"            { name: \"Save\", icon: Gtk.STOCK_SAVE }];\n"
9073"\n"
9074"        // Put the options in the liststore\n"
9075"        for (let i = 0; i &lt; options.length; i++ ) {\n"
9076"            let option = options[i];\n"
9077"            let iter = this._listStore.append();\n"
9078"            this._listStore.set (iter, [0], [option.name]);\n"
9079"            if ('icon' in option)\n"
9080"                this._listStore.set (iter, [1], [option.icon]);\n"
9081"        }\n"
9082"\n"
9083"        // Create the combobox\n"
9084"        this._comboBox = new Gtk.ComboBox({\n"
9085"            model: this._listStore});\n"
9086"\n"
9087"        // Create some cellrenderers for the items in each column\n"
9088"        let rendererPixbuf = new Gtk.CellRendererPixbuf();\n"
9089"        let rendererText = new Gtk.CellRendererText();\n"
9090"\n"
9091"        // Pack the renderers into the combobox in the order we want to see\n"
9092"        this._comboBox.pack_start (rendererPixbuf, false);\n"
9093"        this._comboBox.pack_start (rendererText, false);\n"
9094"\n"
9095"        // Set the renderers to use the information from our liststore\n"
9096"        this._comboBox.add_attribute (rendererText, \"text\", 0);\n"
9097"        this._comboBox.add_attribute (rendererPixbuf, \"stock_id\", 1);\n"
9098"\n"
9099"        // Set the first row in the combobox to be active on startup\n"
9100"        this._comboBox.set_active (0);\n"
9101"\n"
9102"        // Connect the combobox's 'changed' signal to our callback function\n"
9103"        this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
9104"\n"
9105"        // Add the combobox to the window\n"
9106"        this._window.add (this._comboBox);\n"
9107"\n"
9108"        // Show the window and all child widgets\n"
9109"        this._window.show_all();\n"
9110"    }\n"
9111"\n"
9112"    _onComboChanged() {\n"
9113"\n"
9114"        // The silly pseudohaiku that we'll use for our messagedialog\n"
9115"        let haiku = [\"\",\n"
9116"            \"You ask for the new\\nwith no thought for the aged\\nlike fallen leaves trod.\",\n"
9117"            \"Like a simple clam\\nrevealing a lustrous pearl\\nit opens for you.\",\n"
9118"            \"A moment in time\\na memory on the breeze\\nthese things can't be saved.\"];\n"
9119"\n"
9120"        // Which combobox item is active?\n"
9121"        let activeItem = this._comboBox.get_active();\n"
9122"\n"
9123"        // No messagedialog if you choose \"Select\"\n"
9124"        if (activeItem != 0) {\n"
9125"            this._popUp = new Gtk.MessageDialog ({\n"
9126"                transient_for: this._window,\n"
9127"                modal: true,\n"
9128"                buttons: Gtk.ButtonsType.OK,\n"
9129"                message_type: Gtk.MessageType.INFO,\n"
9130"                text: haiku[activeItem]});\n"
9131"\n"
9132"            // Connect the OK button to a handler function\n"
9133"            this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
9134"\n"
9135"            // Show the messagedialog\n"
9136"            this._popUp.show();\n"
9137"        }\n"
9138"\n"
9139"    }\n"
9140"\n"
9141"    _onDialogResponse() {\n"
9142"\n"
9143"        this._popUp.destroy ();\n"
9144"\n"
9145"    }\n"
9146"\n"
9147"};\n"
9148"\n"
9149"// Run the application\n"
9150"let app = new ComboBoxExample ();\n"
9151"app.application.run (ARGV);\n"
9152msgstr ""
9153"#!/usr/bin/gjs\n"
9154"\n"
9155"imports.gi.versions.Gtk = '3.0';\n"
9156"\n"
9157"const GObject = imports.gi.GObject;\n"
9158"const Gtk = imports.gi.Gtk;\n"
9159"\n"
9160"class ComboBoxExample {\n"
9161"\n"
9162"    // Create the application itself\n"
9163"    constructor() {\n"
9164"        this.application = new Gtk.Application ({\n"
9165"            application_id: 'org.example.jscombobox'});\n"
9166"\n"
9167"        // Connect 'activate' and 'startup' signals to the callback functions\n"
9168"        this.application.connect('activate', this._onActivate.bind(this));\n"
9169"        this.application.connect('startup', this._onStartup.bind(this));\n"
9170"    }\n"
9171"\n"
9172"    // Callback function for 'activate' signal presents windows when active\n"
9173"    _onActivate() {\n"
9174"        this._window.present ();\n"
9175"    }\n"
9176"\n"
9177"    // Callback function for 'startup' signal builds the UI\n"
9178"    _onStartup() {\n"
9179"        this._buildUI();\n"
9180"    }\n"
9181"\n"
9182"    // Build the application's UI\n"
9183"    _buildUI() {\n"
9184"\n"
9185"        // Create the application window\n"
9186"        this._window = new Gtk.ApplicationWindow  ({\n"
9187"            application: this.application,\n"
9188"            window_position: Gtk.WindowPosition.CENTER,\n"
9189"            title: \"Welcome to GNOME\",\n"
9190"            default_width: 200,\n"
9191"            border_width: 10 });\n"
9192"\n"
9193"        // Create the liststore to put our options in\n"
9194"        this._listStore = new Gtk.ListStore();\n"
9195"        this._listStore.set_column_types ([\n"
9196"            GObject.TYPE_STRING,\n"
9197"            GObject.TYPE_STRING]);\n"
9198"\n"
9199"        // This array holds our list of options and their icons\n"
9200"        let options = [{ name: \"Select\" },\n"
9201"            { name: \"New\", icon: Gtk.STOCK_NEW },\n"
9202"            { name: \"Open\", icon: Gtk.STOCK_OPEN },\n"
9203"            { name: \"Save\", icon: Gtk.STOCK_SAVE }];\n"
9204"\n"
9205"        // Put the options in the liststore\n"
9206"        for (let i = 0; i &lt; options.length; i++ ) {\n"
9207"            let option = options[i];\n"
9208"            let iter = this._listStore.append();\n"
9209"            this._listStore.set (iter, [0], [option.name]);\n"
9210"            if ('icon' in option)\n"
9211"                this._listStore.set (iter, [1], [option.icon]);\n"
9212"        }\n"
9213"\n"
9214"        // Create the combobox\n"
9215"        this._comboBox = new Gtk.ComboBox({\n"
9216"            model: this._listStore});\n"
9217"\n"
9218"        // Create some cellrenderers for the items in each column\n"
9219"        let rendererPixbuf = new Gtk.CellRendererPixbuf();\n"
9220"        let rendererText = new Gtk.CellRendererText();\n"
9221"\n"
9222"        // Pack the renderers into the combobox in the order we want to see\n"
9223"        this._comboBox.pack_start (rendererPixbuf, false);\n"
9224"        this._comboBox.pack_start (rendererText, false);\n"
9225"\n"
9226"        // Set the renderers to use the information from our liststore\n"
9227"        this._comboBox.add_attribute (rendererText, \"text\", 0);\n"
9228"        this._comboBox.add_attribute (rendererPixbuf, \"stock_id\", 1);\n"
9229"\n"
9230"        // Set the first row in the combobox to be active on startup\n"
9231"        this._comboBox.set_active (0);\n"
9232"\n"
9233"        // Connect the combobox's 'changed' signal to our callback function\n"
9234"        this._comboBox.connect ('changed', this._onComboChanged.bind(this));\n"
9235"\n"
9236"        // Add the combobox to the window\n"
9237"        this._window.add (this._comboBox);\n"
9238"\n"
9239"        // Show the window and all child widgets\n"
9240"        this._window.show_all();\n"
9241"    }\n"
9242"\n"
9243"    _onComboChanged() {\n"
9244"\n"
9245"        // The silly pseudohaiku that we'll use for our messagedialog\n"
9246"        let haiku = [\"\",\n"
9247"            \"You ask for the new\\nwith no thought for the aged\\nlike fallen leaves trod.\",\n"
9248"            \"Like a simple clam\\nrevealing a lustrous pearl\\nit opens for you.\",\n"
9249"            \"A moment in time\\na memory on the breeze\\nthese things can't be saved.\"];\n"
9250"\n"
9251"        // Which combobox item is active?\n"
9252"        let activeItem = this._comboBox.get_active();\n"
9253"\n"
9254"        // No messagedialog if you choose \"Select\"\n"
9255"        if (activeItem != 0) {\n"
9256"            this._popUp = new Gtk.MessageDialog ({\n"
9257"                transient_for: this._window,\n"
9258"                modal: true,\n"
9259"                buttons: Gtk.ButtonsType.OK,\n"
9260"                message_type: Gtk.MessageType.INFO,\n"
9261"                text: haiku[activeItem]});\n"
9262"\n"
9263"            // Connect the OK button to a handler function\n"
9264"            this._popUp.connect ('response', this._onDialogResponse.bind(this));\n"
9265"\n"
9266"            // Show the messagedialog\n"
9267"            this._popUp.show();\n"
9268"        }\n"
9269"\n"
9270"    }\n"
9271"\n"
9272"    _onDialogResponse() {\n"
9273"\n"
9274"        this._popUp.destroy ();\n"
9275"\n"
9276"    }\n"
9277"\n"
9278"};\n"
9279"\n"
9280"// Run the application\n"
9281"let app = new ComboBoxExample ();\n"
9282"app.application.run (ARGV);\n"
9283
9284#. (itstool) path: item/p
9285#: C/combobox.js.page:240
9286msgid ""
9287"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.CellRendererPixbuf.html\">Gtk.CellRendererPixbuf</"
9288"link>"
9289msgstr ""
9290"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.CellRendererPixbuf.html\">Gtk.CellRendererPixbuf</"
9291"link>"
9292
9293#. (itstool) path: item/p
9294#: C/combobox.js.page:241 C/treeview_simple_liststore.js.page:279
9295msgid ""
9296"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.CellRendererText.html\">Gtk.CellRendererText</link>"
9297msgstr ""
9298"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.CellRendererText.html\">Gtk.CellRendererText</link>"
9299
9300#. (itstool) path: item/p
9301#: C/combobox.js.page:242
9302msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ComboBox.html\">Gtk.ComboBox</link>"
9303msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ComboBox.html\">Gtk.ComboBox</link>"
9304
9305#. (itstool) path: item/p
9306#: C/combobox.js.page:243 C/treeview_simple_liststore.js.page:280
9307msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ListStore.html\">Gtk.ListStore</link>"
9308msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ListStore.html\">Gtk.ListStore</link>"
9309
9310#. (itstool) path: item/p
9311#: C/combobox.js.page:245 C/treeview_simple_liststore.js.page:281
9312msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeIter.html\">Gtk.TreeIter</link>"
9313msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeIter.html\">Gtk.TreeIter</link>"
9314
9315#. (itstool) path: info/title
9316#: C/combobox.py.page:8 C/combobox_multicolumn.py.page:8
9317msgctxt "text"
9318msgid "ComboBox (Python)"
9319msgstr "ComboBox(Python)"
9320
9321#. (itstool) path: page/title
9322#: C/combobox.py.page:23
9323msgid "ComboBox (one column)"
9324msgstr "ComboBox(한 칸 짜리)"
9325
9326#. (itstool) path: page/p
9327#: C/combobox.py.page:25 C/combobox_multicolumn.py.page:24 C/combobox_multicolumn.vala.page:24
9328msgid "This ComboBox prints to the terminal your selection when you change it."
9329msgstr "이 ComboBox는 여러분이 바꿔서 선택한 내용을 터미널에 나타냅니다."
9330
9331#. (itstool) path: section/code
9332#: C/combobox.py.page:31
9333#, no-wrap
9334msgid ""
9335"from gi.repository import Gtk\n"
9336"import sys\n"
9337"\n"
9338"distros = [[\"Select distribution\"], [\"Fedora\"], [\"Mint\"], [\"Suse\"]]\n"
9339"\n"
9340"\n"
9341"class MyWindow(Gtk.ApplicationWindow):\n"
9342"\n"
9343"    def __init__(self, app):\n"
9344"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
9345"        self.set_default_size(200, -1)\n"
9346"        self.set_border_width(10)\n"
9347"\n"
9348"        # the data in the model, of type string\n"
9349"        listmodel = Gtk.ListStore(str)\n"
9350"        # append the data in the model\n"
9351"        for i in range(len(distros)):\n"
9352"            listmodel.append(distros[i])\n"
9353"\n"
9354"        # a combobox to see the data stored in the model\n"
9355"        combobox = Gtk.ComboBox(model=listmodel)\n"
9356"\n"
9357"        # a cellrenderer to render the text\n"
9358"        cell = Gtk.CellRendererText()\n"
9359"\n"
9360"        # pack the cell into the beginning of the combobox, allocating\n"
9361"        # no more space than needed\n"
9362"        combobox.pack_start(cell, False)\n"
9363"        # associate a property (\"text\") of the cellrenderer (cell) to a column (column 0)\n"
9364"        # in the model used by the combobox\n"
9365"        combobox.add_attribute(cell, \"text\", 0)\n"
9366"\n"
9367"        # the first row is the active one by default at the beginning\n"
9368"        combobox.set_active(0)\n"
9369"\n"
9370"        # connect the signal emitted when a row is selected to the callback\n"
9371"        # function\n"
9372"        combobox.connect(\"changed\", self.on_changed)\n"
9373"\n"
9374"        # add the combobox to the window\n"
9375"        self.add(combobox)\n"
9376"\n"
9377"    def on_changed(self, combo):\n"
9378"        # if the row selected is not the first one, write its value on the\n"
9379"        # terminal\n"
9380"        if combo.get_active() != 0:\n"
9381"            print(\"You chose \" + str(distros[combo.get_active()][0]) + \".\")\n"
9382"        return True\n"
9383"\n"
9384"\n"
9385"class MyApplication(Gtk.Application):\n"
9386"\n"
9387"    def __init__(self):\n"
9388"        Gtk.Application.__init__(self)\n"
9389"\n"
9390"    def do_activate(self):\n"
9391"        win = MyWindow(self)\n"
9392"        win.show_all()\n"
9393"\n"
9394"    def do_startup(self):\n"
9395"        Gtk.Application.do_startup(self)\n"
9396"\n"
9397"app = MyApplication()\n"
9398"exit_status = app.run(sys.argv)\n"
9399"sys.exit(exit_status)\n"
9400msgstr ""
9401"from gi.repository import Gtk\n"
9402"import sys\n"
9403"\n"
9404"distros = [[\"Select distribution\"], [\"Fedora\"], [\"Mint\"], [\"Suse\"]]\n"
9405"\n"
9406"\n"
9407"class MyWindow(Gtk.ApplicationWindow):\n"
9408"\n"
9409"    def __init__(self, app):\n"
9410"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
9411"        self.set_default_size(200, -1)\n"
9412"        self.set_border_width(10)\n"
9413"\n"
9414"        # the data in the model, of type string\n"
9415"        listmodel = Gtk.ListStore(str)\n"
9416"        # append the data in the model\n"
9417"        for i in range(len(distros)):\n"
9418"            listmodel.append(distros[i])\n"
9419"\n"
9420"        # a combobox to see the data stored in the model\n"
9421"        combobox = Gtk.ComboBox(model=listmodel)\n"
9422"\n"
9423"        # a cellrenderer to render the text\n"
9424"        cell = Gtk.CellRendererText()\n"
9425"\n"
9426"        # pack the cell into the beginning of the combobox, allocating\n"
9427"        # no more space than needed\n"
9428"        combobox.pack_start(cell, False)\n"
9429"        # associate a property (\"text\") of the cellrenderer (cell) to a column (column 0)\n"
9430"        # in the model used by the combobox\n"
9431"        combobox.add_attribute(cell, \"text\", 0)\n"
9432"\n"
9433"        # the first row is the active one by default at the beginning\n"
9434"        combobox.set_active(0)\n"
9435"\n"
9436"        # connect the signal emitted when a row is selected to the callback\n"
9437"        # function\n"
9438"        combobox.connect(\"changed\", self.on_changed)\n"
9439"\n"
9440"        # add the combobox to the window\n"
9441"        self.add(combobox)\n"
9442"\n"
9443"    def on_changed(self, combo):\n"
9444"        # if the row selected is not the first one, write its value on the\n"
9445"        # terminal\n"
9446"        if combo.get_active() != 0:\n"
9447"            print(\"You chose \" + str(distros[combo.get_active()][0]) + \".\")\n"
9448"        return True\n"
9449"\n"
9450"\n"
9451"class MyApplication(Gtk.Application):\n"
9452"\n"
9453"    def __init__(self):\n"
9454"        Gtk.Application.__init__(self)\n"
9455"\n"
9456"    def do_activate(self):\n"
9457"        win = MyWindow(self)\n"
9458"        win.show_all()\n"
9459"\n"
9460"    def do_startup(self):\n"
9461"        Gtk.Application.do_startup(self)\n"
9462"\n"
9463"app = MyApplication()\n"
9464"exit_status = app.run(sys.argv)\n"
9465"sys.exit(exit_status)\n"
9466
9467#. (itstool) path: section/title
9468#: C/combobox.py.page:35 C/combobox_multicolumn.py.page:35
9469msgid "Useful methods for a ComboBox widget"
9470msgstr "ComboBox 위젯에 쓸만한 함수"
9471
9472#. (itstool) path: section/p
9473#: C/combobox.py.page:36 C/combobox_multicolumn.py.page:36
9474msgid ""
9475"The ComboBox widget is designed around a <em>Model/View/Controller</em> design: the <em>Model</em> stores the "
9476"data; the <em>View</em> gets change notifications and displays the content of the model; the <em>Controller</em>, "
9477"finally, changes the state of the model and notifies the view of these changes. For more information and for a "
9478"list of useful methods for ComboBox see <link xref=\"model-view-controller.py\"/>."
9479msgstr ""
9480"ComboBox 위젯은 <em>모델/뷰/컨트롤러</em> 설계 방식따라 설계했습니다. <em>모델</em>에는 데이터가 들어가고요, "
9481"<em>View</em>에는 바뀜 알림을 받아서 모델의 내용을 표시합니다. 마지막으로, <em>컨트롤러</em>에서는, 모델의 상태를 "
9482"바꾸고 뷰가 바뀌었다는걸 알리죠. ComboBox에서 쓸만한 메서드 목록 내용은 <link xref=\"model-view-controller.py\"/>"
9483"를 확인해보시죠."
9484
9485#. (itstool) path: section/p
9486#: C/combobox.py.page:37
9487msgid ""
9488"In line 35 the <code>\"changed\"</code> signal is connected to the callback function <code>on_changed()</code> "
9489"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
9490"\"signals-callbacks.py\"/> for a more detailed explanation."
9491msgstr ""
9492"35번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로  "
9493"<code>\"changed\"</code> 시그널을 <code>on_changed()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
9494"\"signals-callbacks.py\"/>를 참조하십시오."
9495
9496#. (itstool) path: item/p
9497#: C/combobox.py.page:45 C/combobox_multicolumn.py.page:44 C/model-view-controller.py.page:190
9498msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkComboBox.html\">GtkComboBox</link>"
9499msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkComboBox.html\">GtkComboBox</link>"
9500
9501#. (itstool) path: item/p
9502#: C/combobox.py.page:46 C/combobox_multicolumn.py.page:45 C/treeview_advanced_liststore.py.page:46
9503#: C/treeview_simple_liststore.py.page:47
9504msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkListStore.html\">GtkListStore</link>"
9505msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkListStore.html\">GtkListStore</link>"
9506
9507#. (itstool) path: item/p
9508#: C/combobox.py.page:47 C/combobox_multicolumn.py.page:46 C/treeview_advanced_liststore.py.page:47
9509#: C/treeview_cellrenderertoggle.py.page:47 C/treeview_simple_liststore.py.page:48 C/treeview_treestore.py.page:47
9510msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRendererText.html\">GtkCellRendererText</link>"
9511msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRendererText.html\">GtkCellRendererText</link>"
9512
9513#. (itstool) path: item/p
9514#: C/combobox.py.page:48
9515msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellLayout.html\">GtkCellLayout</link>"
9516msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellLayout.html\">GtkCellLayout</link>"
9517
9518#. (itstool) path: item/p
9519#: C/combobox.py.page:49 C/combobox_multicolumn.py.page:49 C/treeview_advanced_liststore.py.page:49
9520#: C/treeview_simple_liststore.py.page:50
9521msgid ""
9522"<link href=\"http://git.gnome.org/browse/pygobject/tree/gi/overrides/Gtk.py\">pygobject - Python bindings for "
9523"GObject Introspection</link>"
9524msgstr ""
9525"<link href=\"http://git.gnome.org/browse/pygobject/tree/gi/overrides/Gtk.py\">pygobject - GObject 인트로스펙션 파이"
9526"썬 바인딩</link>"
9527
9528#. (itstool) path: info/title
9529#: C/combobox.vala.page:8 C/combobox_multicolumn.vala.page:8
9530msgctxt "text"
9531msgid "ComboBox (Vala)"
9532msgstr "ComboBox(Vala)"
9533
9534#. (itstool) path: page/code
9535#: C/combobox.vala.page:25
9536#, no-wrap
9537msgid ""
9538"/* A window in the application */\n"
9539"class MyWindow : Gtk.ApplicationWindow {\n"
9540"\n"
9541"\t/* An instance array of linux distributions belonging to this window. */\n"
9542"\tstring[] distros = {\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"};\n"
9543"\n"
9544"\t/* This enum makes the code more readable when we refer to\n"
9545"\t * the column as Column.DISTRO, instead of just 0.\n"
9546"\t */\n"
9547"\tenum Column {\n"
9548"\t\tDISTRO\n"
9549"\t}\n"
9550"\n"
9551"\t/* Constructor */\n"
9552"\tinternal MyWindow (MyApplication app) {\n"
9553"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
9554"\n"
9555"\t\tthis.set_default_size (200, -1);\n"
9556"\t\tthis.border_width = 10;\n"
9557"\n"
9558"\t\tGtk.ListStore liststore = new Gtk.ListStore (1, typeof (string));\n"
9559"\n"
9560"\t\tfor (int i = 0; i &lt; distros.length; i++){\n"
9561"\t\t\tGtk.TreeIter iter;\n"
9562"\t\t\tliststore.append (out iter);\n"
9563"\t\t\tliststore.set (iter, Column.DISTRO, distros[i]);\n"
9564"\t\t}\n"
9565"\n"
9566"\t\tGtk.ComboBox combobox = new Gtk.ComboBox.with_model (liststore);\n"
9567"\t\tGtk.CellRendererText cell = new Gtk.CellRendererText ();\n"
9568"\t\tcombobox.pack_start (cell, false);\n"
9569"\n"
9570"\t\tcombobox.set_attributes (cell, \"text\", Column.DISTRO);\n"
9571"\n"
9572"\t\t/* Set the first item in the list to be selected (active). */\n"
9573"\t\tcombobox.set_active (0);\n"
9574"\n"
9575"\t\t/* Connect the 'changed' signal of the combobox\n"
9576"\t\t * to the signal handler (aka. callback function).\n"
9577"\t\t */\n"
9578"\t\tcombobox.changed.connect (this.item_changed);\n"
9579"\n"
9580"\t\t/* Add the combobox to this window */\n"
9581"\t\tthis.add (combobox);\n"
9582"\t\tcombobox.show ();\n"
9583"\t}\n"
9584"\n"
9585"\t/* Signal handler for the 'changed' signal of the combobox. */\n"
9586"\tvoid item_changed (Gtk.ComboBox combo) {\n"
9587"\t\tif (combo.get_active () !=0) {\n"
9588"\t\t\tprint (\"You chose \" + distros [combo.get_active ()] +\"\\n\");\n"
9589"\t\t}\n"
9590"\t}\n"
9591"}\n"
9592"\n"
9593"/* This is the application */\n"
9594"class MyApplication : Gtk.Application {\n"
9595"\n"
9596"\t/* Constructor */\n"
9597"\tinternal MyApplication () {\n"
9598"\t\tObject (application_id: \"org.example.MyApplication\");\n"
9599"\t}\n"
9600"\n"
9601"\t/* Override the activate signal of GLib.Application,\n"
9602"\t * which is inherited by Gtk.Application.\n"
9603"\t */\n"
9604"\tprotected override void activate () {\n"
9605"\n"
9606"\t\t/* Create the window of this application\n"
9607"\t\t * and show it.\n"
9608"\t\t */\n"
9609"\t\tnew MyWindow (this).show ();\n"
9610"\t}\n"
9611"}\n"
9612"\n"
9613"/* main creates and runs the application */\n"
9614"int main (string[] args) {\n"
9615"\treturn new MyApplication ().run (args);\n"
9616"}\n"
9617msgstr ""
9618"/* A window in the application */\n"
9619"class MyWindow : Gtk.ApplicationWindow {\n"
9620"\n"
9621"\t/* An instance array of linux distributions belonging to this window. */\n"
9622"\tstring[] distros = {\"Select distribution\", \"Fedora\", \"Mint\", \"Suse\"};\n"
9623"\n"
9624"\t/* This enum makes the code more readable when we refer to\n"
9625"\t * the column as Column.DISTRO, instead of just 0.\n"
9626"\t */\n"
9627"\tenum Column {\n"
9628"\t\tDISTRO\n"
9629"\t}\n"
9630"\n"
9631"\t/* Constructor */\n"
9632"\tinternal MyWindow (MyApplication app) {\n"
9633"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
9634"\n"
9635"\t\tthis.set_default_size (200, -1);\n"
9636"\t\tthis.border_width = 10;\n"
9637"\n"
9638"\t\tGtk.ListStore liststore = new Gtk.ListStore (1, typeof (string));\n"
9639"\n"
9640"\t\tfor (int i = 0; i &lt; distros.length; i++){\n"
9641"\t\t\tGtk.TreeIter iter;\n"
9642"\t\t\tliststore.append (out iter);\n"
9643"\t\t\tliststore.set (iter, Column.DISTRO, distros[i]);\n"
9644"\t\t}\n"
9645"\n"
9646"\t\tGtk.ComboBox combobox = new Gtk.ComboBox.with_model (liststore);\n"
9647"\t\tGtk.CellRendererText cell = new Gtk.CellRendererText ();\n"
9648"\t\tcombobox.pack_start (cell, false);\n"
9649"\n"
9650"\t\tcombobox.set_attributes (cell, \"text\", Column.DISTRO);\n"
9651"\n"
9652"\t\t/* Set the first item in the list to be selected (active). */\n"
9653"\t\tcombobox.set_active (0);\n"
9654"\n"
9655"\t\t/* Connect the 'changed' signal of the combobox\n"
9656"\t\t * to the signal handler (aka. callback function).\n"
9657"\t\t */\n"
9658"\t\tcombobox.changed.connect (this.item_changed);\n"
9659"\n"
9660"\t\t/* Add the combobox to this window */\n"
9661"\t\tthis.add (combobox);\n"
9662"\t\tcombobox.show ();\n"
9663"\t}\n"
9664"\n"
9665"\t/* Signal handler for the 'changed' signal of the combobox. */\n"
9666"\tvoid item_changed (Gtk.ComboBox combo) {\n"
9667"\t\tif (combo.get_active () !=0) {\n"
9668"\t\t\tprint (\"You chose \" + distros [combo.get_active ()] +\"\\n\");\n"
9669"\t\t}\n"
9670"\t}\n"
9671"}\n"
9672"\n"
9673"/* This is the application */\n"
9674"class MyApplication : Gtk.Application {\n"
9675"\n"
9676"\t/* Constructor */\n"
9677"\tinternal MyApplication () {\n"
9678"\t\tObject (application_id: \"org.example.MyApplication\");\n"
9679"\t}\n"
9680"\n"
9681"\t/* Override the activate signal of GLib.Application,\n"
9682"\t * which is inherited by Gtk.Application.\n"
9683"\t */\n"
9684"\tprotected override void activate () {\n"
9685"\n"
9686"\t\t/* Create the window of this application\n"
9687"\t\t * and show it.\n"
9688"\t\t */\n"
9689"\t\tnew MyWindow (this).show ();\n"
9690"\t}\n"
9691"}\n"
9692"\n"
9693"/* main creates and runs the application */\n"
9694"int main (string[] args) {\n"
9695"\treturn new MyApplication ().run (args);\n"
9696"}\n"
9697
9698#. (itstool) path: item/p
9699#: C/combobox.vala.page:30 C/treeview_simple_liststore.vala.page:33
9700msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ListStore.html\">Gtk.ListStore</link>"
9701msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ListStore.html\">Gtk.ListStore</link>"
9702
9703#. (itstool) path: item/p
9704#: C/combobox.vala.page:31
9705msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ComboBox.html\">Gtk.ComboBox</link>"
9706msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ComboBox.html\">Gtk.ComboBox</link>"
9707
9708#. (itstool) path: item/p
9709#: C/combobox.vala.page:32
9710msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellRendererText.html\">Gtk.CellRendererText</link>"
9711msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellRendererText.html\">Gtk.CellRendererText</link>"
9712
9713#. (itstool) path: item/p
9714#: C/combobox.vala.page:33
9715msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellLayout.set_attributes.html\">set_attributes</link>"
9716msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellLayout.set_attributes.html\">set_attributes</link>"
9717
9718#. (itstool) path: page/title
9719#: C/combobox_multicolumn.py.page:22 C/combobox_multicolumn.vala.page:22
9720msgid "ComboBox (two columns)"
9721msgstr "ComboBox(두 칸 짜리)"
9722
9723#. (itstool) path: section/code
9724#: C/combobox_multicolumn.py.page:30
9725#, no-wrap
9726msgid ""
9727"from gi.repository import Gtk\n"
9728"import sys\n"
9729"\n"
9730"actions = [[\"Select\", None],\n"
9731"           [\"New\", Gtk.STOCK_NEW],\n"
9732"           [\"Open\", Gtk.STOCK_OPEN],\n"
9733"           [\"Save\", Gtk.STOCK_SAVE]]\n"
9734"\n"
9735"\n"
9736"class MyWindow(Gtk.ApplicationWindow):\n"
9737"\n"
9738"    def __init__(self, app):\n"
9739"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
9740"        self.set_default_size(200, -1)\n"
9741"        self.set_border_width(10)\n"
9742"\n"
9743"        # the data in the model, of type string on two columns\n"
9744"        listmodel = Gtk.ListStore(str, str)\n"
9745"        # append the data\n"
9746"        for i in range(len(actions)):\n"
9747"            listmodel.append(actions[i])\n"
9748"\n"
9749"        # a combobox to see the data stored in the model\n"
9750"        combobox = Gtk.ComboBox(model=listmodel)\n"
9751"\n"
9752"        # cellrenderers to render the data\n"
9753"        renderer_pixbuf = Gtk.CellRendererPixbuf()\n"
9754"        renderer_text = Gtk.CellRendererText()\n"
9755"\n"
9756"        # we pack the cell into the beginning of the combobox, allocating\n"
9757"        # no more space than needed;\n"
9758"        # first the image, then the text;\n"
9759"        # note that it does not matter in which order they are in the model,\n"
9760"        # the visualization is decided by the order of the cellrenderers\n"
9761"        combobox.pack_start(renderer_pixbuf, False)\n"
9762"        combobox.pack_start(renderer_text, False)\n"
9763"\n"
9764"        # associate a property of the cellrenderer to a column in the model\n"
9765"        # used by the combobox\n"
9766"        combobox.add_attribute(renderer_text, \"text\", 0)\n"
9767"        combobox.add_attribute(renderer_pixbuf, \"stock_id\", 1)\n"
9768"\n"
9769"        # the first row is the active one at the beginning\n"
9770"        combobox.set_active(0)\n"
9771"\n"
9772"        # connect the signal emitted when a row is selected to the callback\n"
9773"        # function\n"
9774"        combobox.connect(\"changed\", self.on_changed)\n"
9775"\n"
9776"        # add the combobox to the window\n"
9777"        self.add(combobox)\n"
9778"\n"
9779"    def on_changed(self, combo):\n"
9780"        # if the row selected is not the first one, write on the terminal\n"
9781"        # the value of the first column in the model\n"
9782"        if combo.get_active() != 0:\n"
9783"            print(\"You chose \" + str(actions[combo.get_active()][0]) + \"\\n\")\n"
9784"        return True\n"
9785"\n"
9786"\n"
9787"class MyApplication(Gtk.Application):\n"
9788"\n"
9789"    def __init__(self):\n"
9790"        Gtk.Application.__init__(self)\n"
9791"\n"
9792"    def do_activate(self):\n"
9793"        win = MyWindow(self)\n"
9794"        win.show_all()\n"
9795"\n"
9796"    def do_startup(self):\n"
9797"        Gtk.Application.do_startup(self)\n"
9798"\n"
9799"app = MyApplication()\n"
9800"exit_status = app.run(sys.argv)\n"
9801"sys.exit(exit_status)\n"
9802msgstr ""
9803"from gi.repository import Gtk\n"
9804"import sys\n"
9805"\n"
9806"actions = [[\"Select\", None],\n"
9807"           [\"New\", Gtk.STOCK_NEW],\n"
9808"           [\"Open\", Gtk.STOCK_OPEN],\n"
9809"           [\"Save\", Gtk.STOCK_SAVE]]\n"
9810"\n"
9811"\n"
9812"class MyWindow(Gtk.ApplicationWindow):\n"
9813"\n"
9814"    def __init__(self, app):\n"
9815"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
9816"        self.set_default_size(200, -1)\n"
9817"        self.set_border_width(10)\n"
9818"\n"
9819"        # the data in the model, of type string on two columns\n"
9820"        listmodel = Gtk.ListStore(str, str)\n"
9821"        # append the data\n"
9822"        for i in range(len(actions)):\n"
9823"            listmodel.append(actions[i])\n"
9824"\n"
9825"        # a combobox to see the data stored in the model\n"
9826"        combobox = Gtk.ComboBox(model=listmodel)\n"
9827"\n"
9828"        # cellrenderers to render the data\n"
9829"        renderer_pixbuf = Gtk.CellRendererPixbuf()\n"
9830"        renderer_text = Gtk.CellRendererText()\n"
9831"\n"
9832"        # we pack the cell into the beginning of the combobox, allocating\n"
9833"        # no more space than needed;\n"
9834"        # first the image, then the text;\n"
9835"        # note that it does not matter in which order they are in the model,\n"
9836"        # the visualization is decided by the order of the cellrenderers\n"
9837"        combobox.pack_start(renderer_pixbuf, False)\n"
9838"        combobox.pack_start(renderer_text, False)\n"
9839"\n"
9840"        # associate a property of the cellrenderer to a column in the model\n"
9841"        # used by the combobox\n"
9842"        combobox.add_attribute(renderer_text, \"text\", 0)\n"
9843"        combobox.add_attribute(renderer_pixbuf, \"stock_id\", 1)\n"
9844"\n"
9845"        # the first row is the active one at the beginning\n"
9846"        combobox.set_active(0)\n"
9847"\n"
9848"        # connect the signal emitted when a row is selected to the callback\n"
9849"        # function\n"
9850"        combobox.connect(\"changed\", self.on_changed)\n"
9851"\n"
9852"        # add the combobox to the window\n"
9853"        self.add(combobox)\n"
9854"\n"
9855"    def on_changed(self, combo):\n"
9856"        # if the row selected is not the first one, write on the terminal\n"
9857"        # the value of the first column in the model\n"
9858"        if combo.get_active() != 0:\n"
9859"            print(\"You chose \" + str(actions[combo.get_active()][0]) + \"\\n\")\n"
9860"        return True\n"
9861"\n"
9862"\n"
9863"class MyApplication(Gtk.Application):\n"
9864"\n"
9865"    def __init__(self):\n"
9866"        Gtk.Application.__init__(self)\n"
9867"\n"
9868"    def do_activate(self):\n"
9869"        win = MyWindow(self)\n"
9870"        win.show_all()\n"
9871"\n"
9872"    def do_startup(self):\n"
9873"        Gtk.Application.do_startup(self)\n"
9874"\n"
9875"app = MyApplication()\n"
9876"exit_status = app.run(sys.argv)\n"
9877"sys.exit(exit_status)\n"
9878
9879#. (itstool) path: section/p
9880#: C/combobox_multicolumn.py.page:37
9881msgid ""
9882"In line 45 the <code>\"changed\"</code> signal is connected to the callback function <code>on_changed()</code> "
9883"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
9884"\"signals-callbacks.py\"/> for a more detailed explanation."
9885msgstr ""
9886"45번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로  "
9887"<code>\"changed\"</code> 시그널을 <code>on_changed()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
9888"\"signals-callbacks.py\"/>를 참조하십시오."
9889
9890#. (itstool) path: item/p
9891#: C/combobox_multicolumn.py.page:47
9892msgid ""
9893"<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRendererPixbuf.html\">GtkCellRendererPixbuf</link>"
9894msgstr ""
9895"<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRendererPixbuf.html\">GtkCellRendererPixbuf</link>"
9896
9897#. (itstool) path: item/p
9898#: C/combobox_multicolumn.py.page:48 C/combobox_multicolumn.vala.page:42 C/toolbar.py.page:58
9899msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/gtk3-Stock-Items.html\">Stock Items</link>"
9900msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/gtk3-Stock-Items.html\">스톡 항목</link>"
9901
9902#. (itstool) path: section/code
9903#: C/combobox_multicolumn.vala.page:30
9904#, no-wrap
9905msgid ""
9906"class MyWindow : Gtk.ApplicationWindow {\n"
9907"\n"
9908"\tstring[] file = {\"Select\", \"New\", \"Open\", \"Save\"};\n"
9909"\tstring[] stock_item = {\"\",\"gtk-new\", \"gtk-open\", \"gtk-save\"};\n"
9910"\n"
9911"\tenum Column {\n"
9912"\t\tFILE,\n"
9913"\t\tSTOCK_ITEM\t\n"
9914"\t}\n"
9915"\n"
9916"\t/* Constructor */\n"
9917"\tinternal MyWindow (MyApplication app) {\n"
9918"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
9919"\n"
9920"\t\tthis.set_default_size (200, -1);\n"
9921"\t\tthis.border_width = 10;\n"
9922"\n"
9923"\t\tGtk.ListStore liststore = new Gtk.ListStore (2, typeof (string), typeof (string));\n"
9924"\n"
9925"\t\tfor (int i = 0; i &lt; file.length; i++){\n"
9926"\t\t\tGtk.TreeIter iter;\n"
9927"\t\t\tliststore.append (out iter);\n"
9928"\t\t\tliststore.set (iter, Column.FILE, file[i]);\n"
9929"\t\t\tliststore.set (iter, Column.STOCK_ITEM, stock_item[i]);\n"
9930"\t\t}\n"
9931"\n"
9932"\t\tGtk.ComboBox combobox = new Gtk.ComboBox.with_model (liststore);\n"
9933"\n"
9934"\t\t/* CellRenderers render the data. */\n"
9935"\t\tGtk.CellRendererText cell = new Gtk.CellRendererText ();\n"
9936"\t\tGtk.CellRendererPixbuf cell_pb = new Gtk.CellRendererPixbuf ();\n"
9937"\t\t\n"
9938"                /* we pack the cell into the beginning of the combobox, allocating\n"
9939"\t\t * no more space than needed;\n"
9940"\t\t * first the image, then the text;\n"
9941"\t\t * note that it does not matter in which order they are in the model,\n"
9942"\t\t * the visualization is decided by the order of the cellrenderers\n"
9943"\t\t */\n"
9944"\t\tcombobox.pack_start (cell_pb, false);\n"
9945"\t\tcombobox.pack_start (cell, false);\n"
9946"\n"
9947"\t\t/* associate a property of the cellrenderer to a column in the model\n"
9948"\t\t * used by the combobox\n"
9949"\t\t */\n"
9950"\t\tcombobox.set_attributes (cell_pb, \"stock_id\", Column.STOCK_ITEM);\n"
9951"\t\tcombobox.set_attributes (cell, \"text\", Column.FILE);\n"
9952"\n"
9953"\t\t/* Set the first item in the list to be selected (active). */\n"
9954"\t\tcombobox.set_active (0);\n"
9955"\n"
9956"\t\t/* Connect the 'changed' signal of the combobox\n"
9957"\t\t * to the signal handler (aka. callback function).\n"
9958"\t\t */\n"
9959"\t\tcombobox.changed.connect (this.item_changed);\n"
9960"\n"
9961"\t\t/* Add the combobox to this window */\n"
9962"\t\tthis.add (combobox);\n"
9963"\t\tcombobox.show ();\n"
9964"\t}\n"
9965"\n"
9966"\tvoid item_changed (Gtk.ComboBox combo) {\n"
9967"\t\tif (combo.get_active () !=0) {\n"
9968"\t\t\tprint (\"You chose \" + file [combo.get_active ()] +\"\\n\");\n"
9969"\t\t}\n"
9970"\t}\n"
9971"}\n"
9972"\n"
9973"class MyApplication : Gtk.Application {\n"
9974"        protected override void activate () {\n"
9975"                new MyWindow (this).show ();\n"
9976"        }\n"
9977"}\n"
9978"\n"
9979"int main (string[] args) {\n"
9980"\treturn new MyApplication ().run (args);\n"
9981"}\n"
9982msgstr ""
9983"class MyWindow : Gtk.ApplicationWindow {\n"
9984"\n"
9985"\tstring[] file = {\"Select\", \"New\", \"Open\", \"Save\"};\n"
9986"\tstring[] stock_item = {\"\",\"gtk-new\", \"gtk-open\", \"gtk-save\"};\n"
9987"\n"
9988"\tenum Column {\n"
9989"\t\tFILE,\n"
9990"\t\tSTOCK_ITEM\t\n"
9991"\t}\n"
9992"\n"
9993"\t/* Constructor */\n"
9994"\tinternal MyWindow (MyApplication app) {\n"
9995"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
9996"\n"
9997"\t\tthis.set_default_size (200, -1);\n"
9998"\t\tthis.border_width = 10;\n"
9999"\n"
10000"\t\tGtk.ListStore liststore = new Gtk.ListStore (2, typeof (string), typeof (string));\n"
10001"\n"
10002"\t\tfor (int i = 0; i &lt; file.length; i++){\n"
10003"\t\t\tGtk.TreeIter iter;\n"
10004"\t\t\tliststore.append (out iter);\n"
10005"\t\t\tliststore.set (iter, Column.FILE, file[i]);\n"
10006"\t\t\tliststore.set (iter, Column.STOCK_ITEM, stock_item[i]);\n"
10007"\t\t}\n"
10008"\n"
10009"\t\tGtk.ComboBox combobox = new Gtk.ComboBox.with_model (liststore);\n"
10010"\n"
10011"\t\t/* CellRenderers render the data. */\n"
10012"\t\tGtk.CellRendererText cell = new Gtk.CellRendererText ();\n"
10013"\t\tGtk.CellRendererPixbuf cell_pb = new Gtk.CellRendererPixbuf ();\n"
10014"\t\t\n"
10015"                /* we pack the cell into the beginning of the combobox, allocating\n"
10016"\t\t * no more space than needed;\n"
10017"\t\t * first the image, then the text;\n"
10018"\t\t * note that it does not matter in which order they are in the model,\n"
10019"\t\t * the visualization is decided by the order of the cellrenderers\n"
10020"\t\t */\n"
10021"\t\tcombobox.pack_start (cell_pb, false);\n"
10022"\t\tcombobox.pack_start (cell, false);\n"
10023"\n"
10024"\t\t/* associate a property of the cellrenderer to a column in the model\n"
10025"\t\t * used by the combobox\n"
10026"\t\t */\n"
10027"\t\tcombobox.set_attributes (cell_pb, \"stock_id\", Column.STOCK_ITEM);\n"
10028"\t\tcombobox.set_attributes (cell, \"text\", Column.FILE);\n"
10029"\n"
10030"\t\t/* Set the first item in the list to be selected (active). */\n"
10031"\t\tcombobox.set_active (0);\n"
10032"\n"
10033"\t\t/* Connect the 'changed' signal of the combobox\n"
10034"\t\t * to the signal handler (aka. callback function).\n"
10035"\t\t */\n"
10036"\t\tcombobox.changed.connect (this.item_changed);\n"
10037"\n"
10038"\t\t/* Add the combobox to this window */\n"
10039"\t\tthis.add (combobox);\n"
10040"\t\tcombobox.show ();\n"
10041"\t}\n"
10042"\n"
10043"\tvoid item_changed (Gtk.ComboBox combo) {\n"
10044"\t\tif (combo.get_active () !=0) {\n"
10045"\t\t\tprint (\"You chose \" + file [combo.get_active ()] +\"\\n\");\n"
10046"\t\t}\n"
10047"\t}\n"
10048"}\n"
10049"\n"
10050"class MyApplication : Gtk.Application {\n"
10051"        protected override void activate () {\n"
10052"                new MyWindow (this).show ();\n"
10053"        }\n"
10054"}\n"
10055"\n"
10056"int main (string[] args) {\n"
10057"\treturn new MyApplication ().run (args);\n"
10058"}\n"
10059
10060#. (itstool) path: item/p
10061#: C/combobox_multicolumn.vala.page:38
10062msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ComboBox.html\">GtkComboBox</link>"
10063msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ComboBox.html\">GtkComboBox</link>"
10064
10065#. (itstool) path: item/p
10066#: C/combobox_multicolumn.vala.page:39
10067msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ListStore.html\">GtkListStore</link>"
10068msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ListStore.html\">GtkListStore</link>"
10069
10070#. (itstool) path: item/p
10071#: C/combobox_multicolumn.vala.page:40
10072msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellRendererText.html\">GtkCellRendererText</link>"
10073msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellRendererText.html\">GtkCellRendererText</link>"
10074
10075#. (itstool) path: item/p
10076#: C/combobox_multicolumn.vala.page:41
10077msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellRendererPixbuf.html\">GtkCellRendererPixbuf</link>"
10078msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.CellRendererPixbuf.html\">GtkCellRendererPixbuf</link>"
10079
10080#. (itstool) path: info/title
10081#: C/cpp.page:7
10082msgctxt "link"
10083msgid "C++"
10084msgstr "C++"
10085
10086#. (itstool) path: page/title
10087#: C/cpp.page:16
10088msgid "Code samples and platform demos in C++"
10089msgstr "C++ 예제 코드 및 플랫폼 데모"
10090
10091#. (itstool) path: section/title
10092#: C/cpp.page:21 C/js.page:36 C/py.page:39 C/vala.page:30
10093msgid "Examples of applications"
10094msgstr "프로그램 예제"
10095
10096#. (itstool) path: info/title
10097#: C/dialog.c.page:8
10098msgctxt "text"
10099msgid "Dialog (C)"
10100msgstr "Dialog(C)"
10101
10102#. (itstool) path: info/desc
10103#: C/dialog.c.page:20 C/dialog.js.page:18 C/dialog.py.page:20 C/dialog.vala.page:18
10104msgid "A popup window"
10105msgstr "뜨는 창"
10106
10107#. (itstool) path: page/title
10108#: C/dialog.c.page:23 C/dialog.js.page:21 C/dialog.py.page:23 C/dialog.vala.page:21
10109msgid "Dialog"
10110msgstr "Dialog"
10111
10112#. (itstool) path: page/media
10113#. This is a reference to an external file such as an image or video. When
10114#. the file changes, the md5 hash will change to let you know you need to
10115#. update your localized copy. The msgstr is not used at all. Set it to
10116#. whatever you like once you have updated your copy of the file.
10117#: C/dialog.c.page:25 C/dialog.js.page:22 C/dialog.py.page:24 C/dialog.vala.page:22
10118msgctxt "_"
10119msgid "external ref='media/dialog.png' md5='c90a33386a600e892fe623d4072c8c38'"
10120msgstr ""
10121
10122#. (itstool) path: page/p
10123#: C/dialog.c.page:26
10124msgid "A dialog window that pops up when a button is pressed."
10125msgstr "단추를 누르면 튀어나오는 대화상자 창입니다."
10126
10127#. (itstool) path: page/code
10128#: C/dialog.c.page:28
10129#, no-wrap
10130msgid ""
10131"\n"
10132"#include &lt;gtk/gtk.h&gt;\n"
10133" \n"
10134"\n"
10135"/*Callback function in which reacts to the \"response\" signal. Be sure to place \n"
10136"it before the function it is called in*/\n"
10137"static void\n"
10138"on_response (GtkDialog *dialog,\n"
10139"             gint       response_id,\n"
10140"             gpointer   user_data)\n"
10141"{\n"
10142"  /*For demonstration purposes, this will show the int value \n"
10143"  of the response type*/\n"
10144"  g_print (\"response is %d\\n\", response_id);\n"
10145"  \n"
10146"  /*This will cause the dialog to be destroyed*/\n"
10147"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
10148"}\n"
10149"\n"
10150"\n"
10151"\n"
10152"/*Callback function in which reacts to the \"clicked\" signal*/\n"
10153"static void\n"
10154"show_dialog (GtkButton *button,\n"
10155"             gpointer   user_data)\n"
10156"{\n"
10157"  GtkWindow *window = user_data;\n"
10158"  GtkWidget *dialog;\n"
10159"  GtkWidget *content_area;\n"
10160"  GtkWidget *label;\n"
10161"\n"
10162"  gint response_id;\n"
10163"\n"
10164"  /*Create the dialog window. Modal windows prevent interaction with other \n"
10165"  windows in the same application*/\n"
10166"  dialog = gtk_dialog_new_with_buttons (\"A Gtk+ Dialog\", \n"
10167"                                        window, \n"
10168"                                        GTK_DIALOG_MODAL, \n"
10169"                                        GTK_STOCK_OK, \n"
10170"                                        GTK_RESPONSE_OK, \n"
10171"                                        NULL);\n"
10172"\n"
10173"  /*Create a label and attach it to the content area of the dialog*/\n"
10174"  content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));\n"
10175"  label = gtk_label_new (\"This demonstrates a dialog with a label\");\n"
10176"  gtk_container_add (GTK_CONTAINER (content_area), label);\n"
10177"\n"
10178"  /*The main purpose of this is to show dialog's child widget, label*/\n"
10179"  gtk_widget_show_all (dialog);\n"
10180"  \n"
10181"  /*Connecting the \"response\" signal from the user to the associated\n"
10182"  callback function*/\n"
10183"  g_signal_connect (GTK_DIALOG (dialog), \n"
10184"                    \"response\", \n"
10185"                    G_CALLBACK (on_response), \n"
10186"                    NULL);\n"
10187"\n"
10188"}\n"
10189"\n"
10190"\n"
10191"\n"
10192"static void\n"
10193"activate (GtkApplication *app,\n"
10194"          gpointer        user_data)\n"
10195"{\n"
10196"  GtkWidget *window;\n"
10197"  GtkWidget *button;\n"
10198" \n"
10199"  /*Create a window with a title and a default size*/\n"
10200"  window = gtk_application_window_new (app);\n"
10201"  gtk_window_set_title (GTK_WINDOW (window), \"GNOME Button\");\n"
10202"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 50);\n"
10203"\n"
10204"  /*Create a button with a label, and add it to the window*/\n"
10205"  button = gtk_button_new_with_label (\"Click Me\");\n"
10206"  gtk_container_add (GTK_CONTAINER (window), button);\n"
10207" \n"
10208"  /*Connecting the clicked signal to the callback*/\n"
10209"  g_signal_connect (GTK_BUTTON (button), \n"
10210"                    \"clicked\", \n"
10211"                    G_CALLBACK (show_dialog), \n"
10212"                    GTK_WINDOW (window));\n"
10213" \n"
10214"  gtk_widget_show_all (window);\n"
10215"}\n"
10216" \n"
10217"\n"
10218"\n"
10219"int\n"
10220"main (int argc, char **argv)\n"
10221"{\n"
10222"  GtkApplication *app;\n"
10223"  int status;\n"
10224" \n"
10225"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
10226"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
10227"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
10228"  g_object_unref (app);\n"
10229" \n"
10230"  return status;\n"
10231"}\n"
10232msgstr ""
10233"\n"
10234"#include &lt;gtk/gtk.h&gt;\n"
10235" \n"
10236"\n"
10237"/*Callback function in which reacts to the \"response\" signal. Be sure to place \n"
10238"it before the function it is called in*/\n"
10239"static void\n"
10240"on_response (GtkDialog *dialog,\n"
10241"             gint       response_id,\n"
10242"             gpointer   user_data)\n"
10243"{\n"
10244"  /*For demonstration purposes, this will show the int value \n"
10245"  of the response type*/\n"
10246"  g_print (\"response is %d\\n\", response_id);\n"
10247"  \n"
10248"  /*This will cause the dialog to be destroyed*/\n"
10249"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
10250"}\n"
10251"\n"
10252"\n"
10253"\n"
10254"/*Callback function in which reacts to the \"clicked\" signal*/\n"
10255"static void\n"
10256"show_dialog (GtkButton *button,\n"
10257"             gpointer   user_data)\n"
10258"{\n"
10259"  GtkWindow *window = user_data;\n"
10260"  GtkWidget *dialog;\n"
10261"  GtkWidget *content_area;\n"
10262"  GtkWidget *label;\n"
10263"\n"
10264"  gint response_id;\n"
10265"\n"
10266"  /*Create the dialog window. Modal windows prevent interaction with other \n"
10267"  windows in the same application*/\n"
10268"  dialog = gtk_dialog_new_with_buttons (\"A Gtk+ Dialog\", \n"
10269"                                        window, \n"
10270"                                        GTK_DIALOG_MODAL, \n"
10271"                                        GTK_STOCK_OK, \n"
10272"                                        GTK_RESPONSE_OK, \n"
10273"                                        NULL);\n"
10274"\n"
10275"  /*Create a label and attach it to the content area of the dialog*/\n"
10276"  content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));\n"
10277"  label = gtk_label_new (\"This demonstrates a dialog with a label\");\n"
10278"  gtk_container_add (GTK_CONTAINER (content_area), label);\n"
10279"\n"
10280"  /*The main purpose of this is to show dialog's child widget, label*/\n"
10281"  gtk_widget_show_all (dialog);\n"
10282"  \n"
10283"  /*Connecting the \"response\" signal from the user to the associated\n"
10284"  callback function*/\n"
10285"  g_signal_connect (GTK_DIALOG (dialog), \n"
10286"                    \"response\", \n"
10287"                    G_CALLBACK (on_response), \n"
10288"                    NULL);\n"
10289"\n"
10290"}\n"
10291"\n"
10292"\n"
10293"\n"
10294"static void\n"
10295"activate (GtkApplication *app,\n"
10296"          gpointer        user_data)\n"
10297"{\n"
10298"  GtkWidget *window;\n"
10299"  GtkWidget *button;\n"
10300" \n"
10301"  /*Create a window with a title and a default size*/\n"
10302"  window = gtk_application_window_new (app);\n"
10303"  gtk_window_set_title (GTK_WINDOW (window), \"GNOME Button\");\n"
10304"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 50);\n"
10305"\n"
10306"  /*Create a button with a label, and add it to the window*/\n"
10307"  button = gtk_button_new_with_label (\"Click Me\");\n"
10308"  gtk_container_add (GTK_CONTAINER (window), button);\n"
10309" \n"
10310"  /*Connecting the clicked signal to the callback*/\n"
10311"  g_signal_connect (GTK_BUTTON (button), \n"
10312"                    \"clicked\", \n"
10313"                    G_CALLBACK (show_dialog), \n"
10314"                    GTK_WINDOW (window));\n"
10315" \n"
10316"  gtk_widget_show_all (window);\n"
10317"}\n"
10318" \n"
10319"\n"
10320"\n"
10321"int\n"
10322"main (int argc, char **argv)\n"
10323"{\n"
10324"  GtkApplication *app;\n"
10325"  int status;\n"
10326" \n"
10327"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
10328"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
10329"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
10330"  g_object_unref (app);\n"
10331" \n"
10332"  return status;\n"
10333"}\n"
10334
10335#. (itstool) path: item/p
10336#: C/dialog.c.page:36
10337msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkDialog.html\">GtkDialog</link>"
10338msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkDialog.html\">GtkDialog</link>"
10339
10340#. (itstool) path: item/p
10341#: C/dialog.c.page:37 C/radiobutton.c.page:36 C/spinbutton.c.page:38 C/switch.c.page:35
10342msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkLabel.html\">GtkLabel</link>"
10343msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkLabel.html\">GtkLabel</link>"
10344
10345#. (itstool) path: info/title
10346#: C/dialog.js.page:8
10347msgctxt "text"
10348msgid "Dialog (JavaScript)"
10349msgstr "Dialog(JavaScript)"
10350
10351#. (itstool) path: page/p
10352#: C/dialog.js.page:23
10353msgid ""
10354"A customizable popup window, which has a content area and an action area. This example dialog's content area "
10355"contains a short message, and its action area contains a button which dismisses the dialog."
10356msgstr ""
10357"개별적으로 이리저리 바꿀 수 있는 팝업 대화상자에는 내용 영역과 동작 영역이 있습니다. 이 예제 대화상자의 내용 영역에"
10358"는 간단한 문구가 있으며 동작 영역에는 대화상자를 닫는 단추가 있습니다."
10359
10360#. (itstool) path: page/code
10361#: C/dialog.js.page:25
10362#, no-wrap
10363msgid ""
10364"#!/usr/bin/gjs\n"
10365"\n"
10366"imports.gi.versions.Gtk = '3.0';\n"
10367"\n"
10368"const Gio = imports.gi.Gio;\n"
10369"const GLib = imports.gi.GLib;\n"
10370"const Gtk = imports.gi.Gtk;\n"
10371"\n"
10372"class DialogExample {\n"
10373"\n"
10374"    // Create the application itself\n"
10375"    constructor() {\n"
10376"        this.application = new Gtk.Application ({\n"
10377"            application_id: 'org.example.jsdialog',\n"
10378"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
10379"        });\n"
10380"\n"
10381"        // Connect 'activate' and 'startup' signals to the callback functions\n"
10382"        this.application.connect('activate', this._onActivate.bind(this));\n"
10383"        this.application.connect('startup', this._onStartup.bind(this));\n"
10384"    }\n"
10385"\n"
10386"    // Callback function for 'activate' signal presents windows when active\n"
10387"    _onActivate() {\n"
10388"        this._window.present();\n"
10389"    }\n"
10390"\n"
10391"    // Callback function for 'startup' signal builds the UI\n"
10392"    _onStartup() {\n"
10393"        this._buildUI();\n"
10394"    }\n"
10395"\n"
10396"    // Build the application's UI\n"
10397"    _buildUI() {\n"
10398"\n"
10399"        // Create the application window\n"
10400"            this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
10401"                                                         window_position: Gtk.WindowPosition.CENTER,\n"
10402"                                                         title: \"Gtk.Dialog Example\",\n"
10403"                                                         default_height: 50,\n"
10404"                                                         default_width: 250 });\n"
10405"\n"
10406"        // Create a button\n"
10407"        this._button = new Gtk.Button ({label: \"Click Me\"});\n"
10408"        this._window.add (this._button);\n"
10409"\n"
10410"        // Bind it to the function that creates the dialog\n"
10411"        this._button.connect (\"clicked\", this._createDialog.bind(this));\n"
10412"\n"
10413"                // Show the window and all child widgets\n"
10414"                this._window.show_all();\n"
10415"    }\n"
10416"\n"
10417"    _createDialog() {\n"
10418"\n"
10419"        // Create the dialog\n"
10420"        this._dialog = new Gtk.Dialog ({ transient_for: this._window,\n"
10421"                         modal: true,\n"
10422"                         title: \"A Gtk+ dialog\" });\n"
10423"\n"
10424"        // Create the dialog's content area, which contains a message\n"
10425"        this._contentArea = this._dialog.get_content_area();\n"
10426"        this._message = new Gtk.Label ({label: \"This demonstrates a dialog with a label\"});\n"
10427"        this._contentArea.add (this._message);\n"
10428"\n"
10429"        // Create the dialog's action area, which contains a stock OK button\n"
10430"        this._actionArea = this._dialog.get_action_area();\n"
10431"        this._OKButton = Gtk.Button.new_from_stock (Gtk.STOCK_OK);\n"
10432"        this._actionArea.add (this._OKButton);\n"
10433"\n"
10434"        // Connect the button to the function that handles what it does\n"
10435"        this._OKButton.connect (\"clicked\", this._OKHandler.bind(this));\n"
10436"\n"
10437"        this._dialog.show_all();\n"
10438"    }\n"
10439"\n"
10440"    _OKHandler(dialog, response_id) {\n"
10441"\n"
10442"        // Destroy the dialog\n"
10443"        this._dialog.destroy();\n"
10444"    }\n"
10445"\n"
10446"};\n"
10447"\n"
10448"// Run the application\n"
10449"let app = new DialogExample ();\n"
10450"app.application.run (ARGV);\n"
10451msgstr ""
10452"#!/usr/bin/gjs\n"
10453"\n"
10454"imports.gi.versions.Gtk = '3.0';\n"
10455"\n"
10456"const Gio = imports.gi.Gio;\n"
10457"const GLib = imports.gi.GLib;\n"
10458"const Gtk = imports.gi.Gtk;\n"
10459"\n"
10460"class DialogExample {\n"
10461"\n"
10462"    // Create the application itself\n"
10463"    constructor() {\n"
10464"        this.application = new Gtk.Application ({\n"
10465"            application_id: 'org.example.jsdialog',\n"
10466"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
10467"        });\n"
10468"\n"
10469"        // Connect 'activate' and 'startup' signals to the callback functions\n"
10470"        this.application.connect('activate', this._onActivate.bind(this));\n"
10471"        this.application.connect('startup', this._onStartup.bind(this));\n"
10472"    }\n"
10473"\n"
10474"    // Callback function for 'activate' signal presents windows when active\n"
10475"    _onActivate() {\n"
10476"        this._window.present();\n"
10477"    }\n"
10478"\n"
10479"    // Callback function for 'startup' signal builds the UI\n"
10480"    _onStartup() {\n"
10481"        this._buildUI();\n"
10482"    }\n"
10483"\n"
10484"    // Build the application's UI\n"
10485"    _buildUI() {\n"
10486"\n"
10487"        // Create the application window\n"
10488"            this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
10489"                                                         window_position: Gtk.WindowPosition.CENTER,\n"
10490"                                                         title: \"Gtk.Dialog Example\",\n"
10491"                                                         default_height: 50,\n"
10492"                                                         default_width: 250 });\n"
10493"\n"
10494"        // Create a button\n"
10495"        this._button = new Gtk.Button ({label: \"Click Me\"});\n"
10496"        this._window.add (this._button);\n"
10497"\n"
10498"        // Bind it to the function that creates the dialog\n"
10499"        this._button.connect (\"clicked\", this._createDialog.bind(this));\n"
10500"\n"
10501"                // Show the window and all child widgets\n"
10502"                this._window.show_all();\n"
10503"    }\n"
10504"\n"
10505"    _createDialog() {\n"
10506"\n"
10507"        // Create the dialog\n"
10508"        this._dialog = new Gtk.Dialog ({ transient_for: this._window,\n"
10509"                         modal: true,\n"
10510"                         title: \"A Gtk+ dialog\" });\n"
10511"\n"
10512"        // Create the dialog's content area, which contains a message\n"
10513"        this._contentArea = this._dialog.get_content_area();\n"
10514"        this._message = new Gtk.Label ({label: \"This demonstrates a dialog with a label\"});\n"
10515"        this._contentArea.add (this._message);\n"
10516"\n"
10517"        // Create the dialog's action area, which contains a stock OK button\n"
10518"        this._actionArea = this._dialog.get_action_area();\n"
10519"        this._OKButton = Gtk.Button.new_from_stock (Gtk.STOCK_OK);\n"
10520"        this._actionArea.add (this._OKButton);\n"
10521"\n"
10522"        // Connect the button to the function that handles what it does\n"
10523"        this._OKButton.connect (\"clicked\", this._OKHandler.bind(this));\n"
10524"\n"
10525"        this._dialog.show_all();\n"
10526"    }\n"
10527"\n"
10528"    _OKHandler(dialog, response_id) {\n"
10529"\n"
10530"        // Destroy the dialog\n"
10531"        this._dialog.destroy();\n"
10532"    }\n"
10533"\n"
10534"};\n"
10535"\n"
10536"// Run the application\n"
10537"let app = new DialogExample ();\n"
10538"app.application.run (ARGV);\n"
10539
10540#. (itstool) path: item/p
10541#: C/dialog.js.page:32
10542msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Dialog.html\">Gtk.Dialog</link>"
10543msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Dialog.html\">Gtk.Dialog</link>"
10544
10545#. (itstool) path: info/title
10546#: C/dialog.py.page:8
10547msgctxt "text"
10548msgid "Dialog (Python)"
10549msgstr "Dialog(Python)"
10550
10551#. (itstool) path: page/p
10552#: C/dialog.py.page:25
10553msgid "A dialog with the response signal connected to a callback function."
10554msgstr "콜백 함수에 응답 시그널을 연결한 대화상자입니다."
10555
10556#. (itstool) path: section/code
10557#: C/dialog.py.page:32
10558#, no-wrap
10559msgid ""
10560"from gi.repository import Gtk\n"
10561"import sys\n"
10562"\n"
10563"\n"
10564"class MyWindow(Gtk.ApplicationWindow):\n"
10565"    # construct a window (the parent window)\n"
10566"\n"
10567"    def __init__(self, app):\n"
10568"        Gtk.Window.__init__(self, title=\"GNOME Button\", application=app)\n"
10569"        self.set_default_size(250, 50)\n"
10570"\n"
10571"        # a button on the parent window\n"
10572"        button = Gtk.Button(\"Click me\")\n"
10573"        # connect the signal \"clicked\" of the button with the function\n"
10574"        # on_button_click()\n"
10575"        button.connect(\"clicked\", self.on_button_click)\n"
10576"        # add the button to the window\n"
10577"        self.add(button)\n"
10578"\n"
10579"    # callback function for the signal \"clicked\" of the button in the parent\n"
10580"    # window\n"
10581"    def on_button_click(self, widget):\n"
10582"        # create a Gtk.Dialog\n"
10583"        dialog = Gtk.Dialog()\n"
10584"        dialog.set_title(\"A Gtk+ Dialog\")\n"
10585"        # The window defined in the constructor (self) is the parent of the dialog.\n"
10586"        # Furthermore, the dialog is on top of the parent window\n"
10587"        dialog.set_transient_for(self)\n"
10588"        # set modal true: no interaction with other windows of the application\n"
10589"        dialog.set_modal(True)\n"
10590"        # add a button to the dialog window\n"
10591"        dialog.add_button(button_text=\"OK\", response_id=Gtk.ResponseType.OK)\n"
10592"        # connect the \"response\" signal (the button has been clicked) to the\n"
10593"        # function on_response()\n"
10594"        dialog.connect(\"response\", self.on_response)\n"
10595"\n"
10596"        # get the content area of the dialog, add a label to it\n"
10597"        content_area = dialog.get_content_area()\n"
10598"        label = Gtk.Label(\"This demonstrates a dialog with a label\")\n"
10599"        content_area.add(label)\n"
10600"        # show the dialog\n"
10601"        dialog.show_all()\n"
10602"\n"
10603"    def on_response(self, widget, response_id):\n"
10604"        print(\"response_id is\", response_id)\n"
10605"        # destroy the widget (the dialog) when the function on_response() is called\n"
10606"        # (that is, when the button of the dialog has been clicked)\n"
10607"        widget.destroy()\n"
10608"\n"
10609"\n"
10610"class MyApplication(Gtk.Application):\n"
10611"\n"
10612"    def __init__(self):\n"
10613"        Gtk.Application.__init__(self)\n"
10614"\n"
10615"    def do_activate(self):\n"
10616"        win = MyWindow(self)\n"
10617"        win.show_all()\n"
10618"\n"
10619"    def do_startup(self):\n"
10620"        Gtk.Application.do_startup(self)\n"
10621"\n"
10622"app = MyApplication()\n"
10623"exit_status = app.run(sys.argv)\n"
10624"sys.exit(exit_status)\n"
10625msgstr ""
10626"from gi.repository import Gtk\n"
10627"import sys\n"
10628"\n"
10629"\n"
10630"class MyWindow(Gtk.ApplicationWindow):\n"
10631"    # construct a window (the parent window)\n"
10632"\n"
10633"    def __init__(self, app):\n"
10634"        Gtk.Window.__init__(self, title=\"GNOME Button\", application=app)\n"
10635"        self.set_default_size(250, 50)\n"
10636"\n"
10637"        # a button on the parent window\n"
10638"        button = Gtk.Button(\"Click me\")\n"
10639"        # connect the signal \"clicked\" of the button with the function\n"
10640"        # on_button_click()\n"
10641"        button.connect(\"clicked\", self.on_button_click)\n"
10642"        # add the button to the window\n"
10643"        self.add(button)\n"
10644"\n"
10645"    # callback function for the signal \"clicked\" of the button in the parent\n"
10646"    # window\n"
10647"    def on_button_click(self, widget):\n"
10648"        # create a Gtk.Dialog\n"
10649"        dialog = Gtk.Dialog()\n"
10650"        dialog.set_title(\"A Gtk+ Dialog\")\n"
10651"        # The window defined in the constructor (self) is the parent of the dialog.\n"
10652"        # Furthermore, the dialog is on top of the parent window\n"
10653"        dialog.set_transient_for(self)\n"
10654"        # set modal true: no interaction with other windows of the application\n"
10655"        dialog.set_modal(True)\n"
10656"        # add a button to the dialog window\n"
10657"        dialog.add_button(button_text=\"OK\", response_id=Gtk.ResponseType.OK)\n"
10658"        # connect the \"response\" signal (the button has been clicked) to the\n"
10659"        # function on_response()\n"
10660"        dialog.connect(\"response\", self.on_response)\n"
10661"\n"
10662"        # get the content area of the dialog, add a label to it\n"
10663"        content_area = dialog.get_content_area()\n"
10664"        label = Gtk.Label(\"This demonstrates a dialog with a label\")\n"
10665"        content_area.add(label)\n"
10666"        # show the dialog\n"
10667"        dialog.show_all()\n"
10668"\n"
10669"    def on_response(self, widget, response_id):\n"
10670"        print(\"response_id is\", response_id)\n"
10671"        # destroy the widget (the dialog) when the function on_response() is called\n"
10672"        # (that is, when the button of the dialog has been clicked)\n"
10673"        widget.destroy()\n"
10674"\n"
10675"\n"
10676"class MyApplication(Gtk.Application):\n"
10677"\n"
10678"    def __init__(self):\n"
10679"        Gtk.Application.__init__(self)\n"
10680"\n"
10681"    def do_activate(self):\n"
10682"        win = MyWindow(self)\n"
10683"        win.show_all()\n"
10684"\n"
10685"    def do_startup(self):\n"
10686"        Gtk.Application.do_startup(self)\n"
10687"\n"
10688"app = MyApplication()\n"
10689"exit_status = app.run(sys.argv)\n"
10690"sys.exit(exit_status)\n"
10691
10692#. (itstool) path: section/title
10693#: C/dialog.py.page:37
10694msgid "Useful methods for a Dialog widget"
10695msgstr "Dialog 위젯에 쓸만한 메서드"
10696
10697#. (itstool) path: section/p
10698#: C/dialog.py.page:38
10699msgid ""
10700"In line 16 the signal <code>\"clicked\"</code> is connected to the callback function <code>on_button_click()</"
10701"code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link "
10702"xref=\"signals-callbacks.py\"/> for a more detailed explanation."
10703msgstr ""
10704"16번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로  "
10705"<code>\"clicked\"</code> 시그널을 <code>on_button_click()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link "
10706"xref=\"signals-callbacks.py\"/>를 참조하십시오."
10707
10708#. (itstool) path: item/p
10709#: C/dialog.py.page:40
10710msgid ""
10711"Instead of <code>set_modal(True)</code> we could have <code>set_modal(False)</code> followed by "
10712"<code>set_destroy_with_parent(True)</code> that would destroy the dialog window if the main window is closed."
10713msgstr ""
10714"<code>set_modal(True)</code> 대신 <code>set_modal(False)</code>로 호출하고, 그 뒤에 "
10715"<code>set_destroy_with_parent(True)</code> 함수를 호출해서 메인 창을 닫으면 대화상자 창을 닫을 수 있게 할 수 있습니"
10716"다."
10717
10718#. (itstool) path: item/p
10719#: C/dialog.py.page:41
10720msgid ""
10721"<code>add_button(button_text=\"The Answer\", response_id=42)</code>, where <code>42</code> is any integer, is an "
10722"alternative to <code>add_button(button_text=\"text\", response_id=Gtk.ResponseType.RESPONSE)</code>, where "
10723"<code>RESPONSE</code> could be one of <code>OK, CANCEL, CLOSE, YES, NO, APPLY, HELP</code>, which in turn "
10724"correspond to the integers <code>-5, -6,..., -11</code>."
10725msgstr ""
10726"임의의 정수 값 <code>42</code>를 갖는 <code>add_button(button_text=\"The Answer\", response_id=42)</code> 대신, "
10727"<code>RESPONSE</code> 자리에 <code>-5, -6,..., -11</code> 정수형 값에 해당하는 <code>OK, CANCEL, CLOSE, YES, NO, "
10728"APPLY, HELP</code>중 하나가 오는 <code>add_button(button_text=\"text\", response_id=Gtk.ResponseType.RESPONSE)</"
10729"code> 호출 방식을 쓸 수 있습니다."
10730
10731#. (itstool) path: item/p
10732#: C/dialog.py.page:51 C/messagedialog.py.page:60
10733msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkDialog.html\">GtkDialog</link>"
10734msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkDialog.html\">GtkDialog</link>"
10735
10736#. (itstool) path: info/title
10737#: C/dialog.vala.page:8
10738msgctxt "text"
10739msgid "Dialog (Vala)"
10740msgstr "Dialog(Vala)"
10741
10742#. (itstool) path: page/p
10743#: C/dialog.vala.page:23
10744msgid "A dialog with the response signal hooked up to a callback function."
10745msgstr "콜백 함수에 응답 시그널을 걸어두는 대화상자입니다."
10746
10747#. (itstool) path: page/code
10748#: C/dialog.vala.page:25
10749#, no-wrap
10750msgid ""
10751"\n"
10752"/* A window in the application. */\n"
10753"public class MyWindow : Gtk.ApplicationWindow {\n"
10754"\n"
10755"\t/* Constructor */\n"
10756"\tinternal MyWindow (MyApplication app) {\n"
10757"\t\tObject (application: app, title: \"GNOME Button\");\n"
10758"\n"
10759"\t\tthis.window_position = Gtk.WindowPosition.CENTER;\n"
10760"\t\tthis.set_default_size (250,50);\n"
10761"\n"
10762"\t\tvar button = new Gtk.Button.with_label (\"Click Me\");\n"
10763"\n"
10764"\t\t/* Connect the button's \"clicked\" signal to\n"
10765"\t\t * the signal handler (aka. this.callback function).\n"
10766"\t\t */\n"
10767"\t\tbutton.clicked.connect (this.on_button_click);\n"
10768"\n"
10769"\t\t/* Add the button to this window and show it. */\n"
10770"\t\tthis.add (button);\n"
10771"\t\tbutton.show ();\n"
10772"\t}\n"
10773"\n"
10774"\t/* The signal handler for the buttons 'clicked' signal. */\n"
10775"\tvoid on_button_click (Gtk.Button button) {\n"
10776"\t\tvar dialog = new Gtk.Dialog.with_buttons (\"A Gtk+ Dialog\", this,\n"
10777"                                                          Gtk.DialogFlags.MODAL,\n"
10778"                                                          Gtk.Stock.OK,\n"
10779"                                                          Gtk.ResponseType.OK, null);\n"
10780"\n"
10781"\t\tvar content_area = dialog.get_content_area ();\n"
10782"\t\tvar label = new Gtk.Label (\"This demonstrates a dialog with a label\");\n"
10783"\n"
10784"\t\tcontent_area.add (label);\n"
10785"\n"
10786"\t\t/* Connect the 'response' signal of the dialog\n"
10787"\t\t * the signal handler.  It is emitted when the dialog's\n"
10788"\t\t * OK button is clicked.\n"
10789"\t\t */\n"
10790"\t\tdialog.response.connect (on_response);\n"
10791"\n"
10792"\t\t/* Show the dialog and all the widgets. */\n"
10793"\t\tdialog.show_all ();\n"
10794"\t}\n"
10795"\n"
10796"\t/* Signal handler for the 'response' signal of the dialog. */\n"
10797"        void on_response (Gtk.Dialog dialog, int response_id) {\n"
10798"\n"
10799"                /* To see the int value of the ResponseType. This is only\n"
10800"\t\t * for demonstration purposes.*/\n"
10801"                print (\"response is %d\\n\", response_id);\n"
10802"\n"
10803"\t\t/* This causes the dialog to be destroyed. */\n"
10804"                dialog.destroy ();\n"
10805"        }\n"
10806"\n"
10807"}\n"
10808"\n"
10809"/* This is the application. */\n"
10810"public class MyApplication : Gtk.Application {\n"
10811"\n"
10812"\t/* The constructor of the application. */\n"
10813"\tinternal MyApplication () {\n"
10814"\t\tObject (application_id: \"org.example.MyApplication\");\n"
10815"\t}\n"
10816"\n"
10817"\t/* Override the 'activate' signal of GLib.Application. */\n"
10818"\tprotected override void activate () {\n"
10819"\n"
10820"\t\t/* Create a window for the this application and show it. */\n"
10821"\t\tnew MyWindow (this).show ();\n"
10822"\t}\n"
10823"}\n"
10824"\n"
10825"/* The main function creates and runs the application. */\n"
10826"public int main (string[] args) {\n"
10827"\treturn new MyApplication ().run (args);\n"
10828"}\n"
10829msgstr ""
10830"\n"
10831"/* A window in the application. */\n"
10832"public class MyWindow : Gtk.ApplicationWindow {\n"
10833"\n"
10834"\t/* Constructor */\n"
10835"\tinternal MyWindow (MyApplication app) {\n"
10836"\t\tObject (application: app, title: \"GNOME Button\");\n"
10837"\n"
10838"\t\tthis.window_position = Gtk.WindowPosition.CENTER;\n"
10839"\t\tthis.set_default_size (250,50);\n"
10840"\n"
10841"\t\tvar button = new Gtk.Button.with_label (\"Click Me\");\n"
10842"\n"
10843"\t\t/* Connect the button's \"clicked\" signal to\n"
10844"\t\t * the signal handler (aka. this.callback function).\n"
10845"\t\t */\n"
10846"\t\tbutton.clicked.connect (this.on_button_click);\n"
10847"\n"
10848"\t\t/* Add the button to this window and show it. */\n"
10849"\t\tthis.add (button);\n"
10850"\t\tbutton.show ();\n"
10851"\t}\n"
10852"\n"
10853"\t/* The signal handler for the buttons 'clicked' signal. */\n"
10854"\tvoid on_button_click (Gtk.Button button) {\n"
10855"\t\tvar dialog = new Gtk.Dialog.with_buttons (\"A Gtk+ Dialog\", this,\n"
10856"                                                          Gtk.DialogFlags.MODAL,\n"
10857"                                                          Gtk.Stock.OK,\n"
10858"                                                          Gtk.ResponseType.OK, null);\n"
10859"\n"
10860"\t\tvar content_area = dialog.get_content_area ();\n"
10861"\t\tvar label = new Gtk.Label (\"This demonstrates a dialog with a label\");\n"
10862"\n"
10863"\t\tcontent_area.add (label);\n"
10864"\n"
10865"\t\t/* Connect the 'response' signal of the dialog\n"
10866"\t\t * the signal handler.  It is emitted when the dialog's\n"
10867"\t\t * OK button is clicked.\n"
10868"\t\t */\n"
10869"\t\tdialog.response.connect (on_response);\n"
10870"\n"
10871"\t\t/* Show the dialog and all the widgets. */\n"
10872"\t\tdialog.show_all ();\n"
10873"\t}\n"
10874"\n"
10875"\t/* Signal handler for the 'response' signal of the dialog. */\n"
10876"        void on_response (Gtk.Dialog dialog, int response_id) {\n"
10877"\n"
10878"                /* To see the int value of the ResponseType. This is only\n"
10879"\t\t * for demonstration purposes.*/\n"
10880"                print (\"response is %d\\n\", response_id);\n"
10881"\n"
10882"\t\t/* This causes the dialog to be destroyed. */\n"
10883"                dialog.destroy ();\n"
10884"        }\n"
10885"\n"
10886"}\n"
10887"\n"
10888"/* This is the application. */\n"
10889"public class MyApplication : Gtk.Application {\n"
10890"\n"
10891"\t/* The constructor of the application. */\n"
10892"\tinternal MyApplication () {\n"
10893"\t\tObject (application_id: \"org.example.MyApplication\");\n"
10894"\t}\n"
10895"\n"
10896"\t/* Override the 'activate' signal of GLib.Application. */\n"
10897"\tprotected override void activate () {\n"
10898"\n"
10899"\t\t/* Create a window for the this application and show it. */\n"
10900"\t\tnew MyWindow (this).show ();\n"
10901"\t}\n"
10902"}\n"
10903"\n"
10904"/* The main function creates and runs the application. */\n"
10905"public int main (string[] args) {\n"
10906"\treturn new MyApplication ().run (args);\n"
10907"}\n"
10908
10909#. (itstool) path: item/p
10910#: C/dialog.vala.page:32
10911msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.html\">Gtk.Dialog</link>"
10912msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.html\">Gtk.Dialog</link>"
10913
10914#. (itstool) path: item/p
10915#: C/dialog.vala.page:33
10916msgid ""
10917"<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.Dialog.with_buttons.html\">Gtk.Dialog.with_buttons</link>"
10918msgstr ""
10919"<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.Dialog.with_buttons.html\">Gtk.Dialog.with_buttons</link>"
10920
10921#. (itstool) path: item/p
10922#: C/dialog.vala.page:34 C/label.vala.page:33
10923msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Label.html\">Gtk.Label</link>"
10924msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Label.html\">Gtk.Label</link>"
10925
10926#. (itstool) path: item/p
10927#: C/dialog.vala.page:35
10928msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.get_content_area.html\">get_content_area</link>"
10929msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.get_content_area.html\">get_content_area</link>"
10930
10931#. (itstool) path: info/title
10932#: C/entry.c.page:8
10933msgctxt "text"
10934msgid "Entry (C)"
10935msgstr "Entry(C)"
10936
10937#. (itstool) path: info/desc
10938#: C/entry.c.page:18 C/entry.py.page:25 C/entry.vala.page:18
10939msgid "A single line text entry field"
10940msgstr "단일 행 텍스트 항목 필드"
10941
10942#. (itstool) path: page/title
10943#: C/entry.c.page:21 C/entry.js.page:21 C/entry.py.page:28 C/entry.vala.page:21
10944msgid "Entry"
10945msgstr "Entry"
10946
10947#. (itstool) path: page/media
10948#. This is a reference to an external file such as an image or video. When
10949#. the file changes, the md5 hash will change to let you know you need to
10950#. update your localized copy. The msgstr is not used at all. Set it to
10951#. whatever you like once you have updated your copy of the file.
10952#: C/entry.c.page:23 C/entry.js.page:22 C/entry.py.page:29 C/entry.vala.page:22
10953msgctxt "_"
10954msgid "external ref='media/entry.png' md5='8a828cffdcbaa4bad83342e109f28cc8'"
10955msgstr ""
10956
10957#. (itstool) path: page/p
10958#: C/entry.c.page:24 C/entry.vala.page:23
10959msgid "This application greets you in the terminal."
10960msgstr "이 프로그램은 터미널에 인사말을 남깁니다."
10961
10962#. (itstool) path: page/code
10963#: C/entry.c.page:26
10964#, no-wrap
10965msgid ""
10966"\n"
10967"#include &lt;gtk/gtk.h&gt;\n"
10968"\n"
10969"\n"
10970"\n"
10971"/*This is the callback function. It is a handler function \n"
10972"which reacts to the signal. In this case, it will grab the \n"
10973"text input from the entry box and print out a line to the user.*/\n"
10974"static void\n"
10975"on_activate (GtkEntry *entry,\n"
10976"             gpointer  user_data)\n"
10977"{\n"
10978"  const char *name;\n"
10979"  name = gtk_entry_get_text (entry);\n"
10980"\n"
10981"  g_print (\"\\nHello %s!\\n\\n\", name);\n"
10982"}\n"
10983"\n"
10984"\n"
10985"\n"
10986"static void\n"
10987"activate (GtkApplication *app,\n"
10988"          gpointer        user_data)\n"
10989"{\n"
10990"  GtkWidget *window;\n"
10991"  GtkWidget *entry_box;\n"
10992"\n"
10993"  /*Create a window with a title, a default size, \n"
10994"  and a set border width*/\n"
10995"  window = gtk_application_window_new (app);\n"
10996"  gtk_window_set_title (GTK_WINDOW (window), \"What is your name?\");\n"
10997"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 100);\n"
10998"  gtk_container_set_border_width (GTK_CONTAINER (window), 10);\n"
10999"\n"
11000"  /*Create a new entry box, and add it to the window*/\n"
11001"  entry_box = gtk_entry_new ();\n"
11002"  gtk_container_add (GTK_CONTAINER (window), entry_box);\n"
11003"\n"
11004"  /*Connecting the activate signal to the callback*/\n"
11005"  g_signal_connect (GTK_ENTRY (entry_box), \"activate\", \n"
11006"                    G_CALLBACK (on_activate), NULL);\n"
11007"\n"
11008"  gtk_widget_show_all (window);\n"
11009"}\n"
11010"\n"
11011"\n"
11012"\n"
11013"int\n"
11014"main (int argc, char **argv)\n"
11015"{\n"
11016"  GtkApplication *app;\n"
11017"  int status;\n"
11018"\n"
11019"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
11020"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
11021"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
11022"  g_object_unref (app);\n"
11023"\n"
11024"  return status;\n"
11025"}\n"
11026msgstr ""
11027"\n"
11028"#include &lt;gtk/gtk.h&gt;\n"
11029"\n"
11030"\n"
11031"\n"
11032"/*This is the callback function. It is a handler function \n"
11033"which reacts to the signal. In this case, it will grab the \n"
11034"text input from the entry box and print out a line to the user.*/\n"
11035"static void\n"
11036"on_activate (GtkEntry *entry,\n"
11037"             gpointer  user_data)\n"
11038"{\n"
11039"  const char *name;\n"
11040"  name = gtk_entry_get_text (entry);\n"
11041"\n"
11042"  g_print (\"\\nHello %s!\\n\\n\", name);\n"
11043"}\n"
11044"\n"
11045"\n"
11046"\n"
11047"static void\n"
11048"activate (GtkApplication *app,\n"
11049"          gpointer        user_data)\n"
11050"{\n"
11051"  GtkWidget *window;\n"
11052"  GtkWidget *entry_box;\n"
11053"\n"
11054"  /*Create a window with a title, a default size, \n"
11055"  and a set border width*/\n"
11056"  window = gtk_application_window_new (app);\n"
11057"  gtk_window_set_title (GTK_WINDOW (window), \"What is your name?\");\n"
11058"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 100);\n"
11059"  gtk_container_set_border_width (GTK_CONTAINER (window), 10);\n"
11060"\n"
11061"  /*Create a new entry box, and add it to the window*/\n"
11062"  entry_box = gtk_entry_new ();\n"
11063"  gtk_container_add (GTK_CONTAINER (window), entry_box);\n"
11064"\n"
11065"  /*Connecting the activate signal to the callback*/\n"
11066"  g_signal_connect (GTK_ENTRY (entry_box), \"activate\", \n"
11067"                    G_CALLBACK (on_activate), NULL);\n"
11068"\n"
11069"  gtk_widget_show_all (window);\n"
11070"}\n"
11071"\n"
11072"\n"
11073"\n"
11074"int\n"
11075"main (int argc, char **argv)\n"
11076"{\n"
11077"  GtkApplication *app;\n"
11078"  int status;\n"
11079"\n"
11080"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
11081"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
11082"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
11083"  g_object_unref (app);\n"
11084"\n"
11085"  return status;\n"
11086"}\n"
11087
11088#. (itstool) path: info/title
11089#: C/entry.js.page:8
11090msgctxt "text"
11091msgid "Entry (JavaScript)"
11092msgstr "Entry(JavaScript)"
11093
11094#. (itstool) path: info/desc
11095#: C/entry.js.page:18
11096msgid "A single-line text entry field"
11097msgstr "단일 행 텍스트 항목 필드"
11098
11099#. (itstool) path: page/p
11100#: C/entry.js.page:23
11101msgid "This application greets you by name through a pop-up window."
11102msgstr "이 프로그램은 별도로 띄우는 창에 이름을 붙여 인사말을 남깁니다."
11103
11104#. (itstool) path: page/code
11105#: C/entry.js.page:25
11106#, no-wrap
11107msgid ""
11108"#!/usr/bin/gjs\n"
11109"\n"
11110"imports.gi.versions.Gtk = '3.0';\n"
11111"\n"
11112"const Gio = imports.gi.Gio;\n"
11113"const GLib = imports.gi.GLib;\n"
11114"const Gtk = imports.gi.Gtk;\n"
11115"\n"
11116"class EntryExample {\n"
11117"\n"
11118"    // Create the application itself\n"
11119"    constructor() {\n"
11120"        this.application = new Gtk.Application({\n"
11121"            application_id: 'org.example.jsentry',\n"
11122"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
11123"        });\n"
11124"\n"
11125"        // Connect 'activate' and 'startup' signals to the callback functions\n"
11126"        this.application.connect('activate', this._onActivate.bind(this));\n"
11127"        this.application.connect('startup', this._onStartup.bind(this));\n"
11128"    }\n"
11129"\n"
11130"    // Callback function for 'activate' signal presents windows when active\n"
11131"    _onActivate() {\n"
11132"        this._window.present();\n"
11133"    }\n"
11134"\n"
11135"    // Callback function for 'startup' signal builds the UI\n"
11136"    _onStartup() {\n"
11137"        this._buildUI();\n"
11138"    }\n"
11139"\n"
11140"    // Build the application's UI\n"
11141"    _buildUI() {\n"
11142"\n"
11143"        // Create the application window\n"
11144"        this._window = new Gtk.ApplicationWindow({\n"
11145"            application: this.application,\n"
11146"            window_position: Gtk.WindowPosition.CENTER,\n"
11147"            default_height: 100,\n"
11148"            default_width: 300,\n"
11149"            border_width: 10,\n"
11150"            title: \"What is your name?\"});\n"
11151"\n"
11152"        // Create the text entry box\n"
11153"        this.entry = new Gtk.Entry ();\n"
11154"        this._window.add(this.entry);\n"
11155"\n"
11156"        // Connect the text entry box to a function that responds to what you type in\n"
11157"        this.entry.connect(\"activate\", this._hello.bind(this));\n"
11158"\n"
11159"        // Show the window and all child widgets\n"
11160"        this._window.show_all();\n"
11161"    }\n"
11162"\n"
11163"    _hello() {\n"
11164"\n"
11165"        // Create a popup dialog to greet the person who types in their name\n"
11166"        this._greeter = new Gtk.MessageDialog ({\n"
11167"            transient_for: this._window,\n"
11168"            modal: true,\n"
11169"            text: \"Hello, \" + this.entry.get_text() + \"!\",\n"
11170"            message_type: Gtk.MessageType.OTHER,\n"
11171"            buttons: Gtk.ButtonsType.OK,\n"
11172"        });\n"
11173"\n"
11174"        // Show the popup dialog\n"
11175"        this._greeter.show();\n"
11176"\n"
11177"        // Bind the OK button to the function that closes the popup\n"
11178"        this._greeter.connect (\"response\", this._okClicked.bind(this));\n"
11179"    }\n"
11180"\n"
11181"    _okClicked() {\n"
11182"        this._greeter.destroy();\n"
11183"    }\n"
11184"\n"
11185"};\n"
11186"\n"
11187"// Run the application\n"
11188"let app = new EntryExample ();\n"
11189"app.application.run (ARGV);\n"
11190msgstr ""
11191"#!/usr/bin/gjs\n"
11192"\n"
11193"imports.gi.versions.Gtk = '3.0';\n"
11194"\n"
11195"const Gio = imports.gi.Gio;\n"
11196"const GLib = imports.gi.GLib;\n"
11197"const Gtk = imports.gi.Gtk;\n"
11198"\n"
11199"class EntryExample {\n"
11200"\n"
11201"    // Create the application itself\n"
11202"    constructor() {\n"
11203"        this.application = new Gtk.Application({\n"
11204"            application_id: 'org.example.jsentry',\n"
11205"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
11206"        });\n"
11207"\n"
11208"        // Connect 'activate' and 'startup' signals to the callback functions\n"
11209"        this.application.connect('activate', this._onActivate.bind(this));\n"
11210"        this.application.connect('startup', this._onStartup.bind(this));\n"
11211"    }\n"
11212"\n"
11213"    // Callback function for 'activate' signal presents windows when active\n"
11214"    _onActivate() {\n"
11215"        this._window.present();\n"
11216"    }\n"
11217"\n"
11218"    // Callback function for 'startup' signal builds the UI\n"
11219"    _onStartup() {\n"
11220"        this._buildUI();\n"
11221"    }\n"
11222"\n"
11223"    // Build the application's UI\n"
11224"    _buildUI() {\n"
11225"\n"
11226"        // Create the application window\n"
11227"        this._window = new Gtk.ApplicationWindow({\n"
11228"            application: this.application,\n"
11229"            window_position: Gtk.WindowPosition.CENTER,\n"
11230"            default_height: 100,\n"
11231"            default_width: 300,\n"
11232"            border_width: 10,\n"
11233"            title: \"What is your name?\"});\n"
11234"\n"
11235"        // Create the text entry box\n"
11236"        this.entry = new Gtk.Entry ();\n"
11237"        this._window.add(this.entry);\n"
11238"\n"
11239"        // Connect the text entry box to a function that responds to what you type in\n"
11240"        this.entry.connect(\"activate\", this._hello.bind(this));\n"
11241"\n"
11242"        // Show the window and all child widgets\n"
11243"        this._window.show_all();\n"
11244"    }\n"
11245"\n"
11246"    _hello() {\n"
11247"\n"
11248"        // Create a popup dialog to greet the person who types in their name\n"
11249"        this._greeter = new Gtk.MessageDialog ({\n"
11250"            transient_for: this._window,\n"
11251"            modal: true,\n"
11252"            text: \"Hello, \" + this.entry.get_text() + \"!\",\n"
11253"            message_type: Gtk.MessageType.OTHER,\n"
11254"            buttons: Gtk.ButtonsType.OK,\n"
11255"        });\n"
11256"\n"
11257"        // Show the popup dialog\n"
11258"        this._greeter.show();\n"
11259"\n"
11260"        // Bind the OK button to the function that closes the popup\n"
11261"        this._greeter.connect (\"response\", this._okClicked.bind(this));\n"
11262"    }\n"
11263"\n"
11264"    _okClicked() {\n"
11265"        this._greeter.destroy();\n"
11266"    }\n"
11267"\n"
11268"};\n"
11269"\n"
11270"// Run the application\n"
11271"let app = new EntryExample ();\n"
11272"app.application.run (ARGV);\n"
11273
11274#. (itstool) path: item/p
11275#: C/entry.js.page:32
11276msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Entry.html\">Gtk.Entry</link>"
11277msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Entry.html\">Gtk.Entry</link>"
11278
11279#. (itstool) path: info/title
11280#: C/entry.py.page:8
11281msgctxt "text"
11282msgid "Entry (Python)"
11283msgstr "Entry(Python)"
11284
11285#. (itstool) path: credit/name
11286#: C/entry.py.page:21 C/label.py.page:22 C/model-view-controller.py.page:16 C/properties.py.page:16
11287#: C/signals-callbacks.py.page:16 C/strings.py.page:16 C/textview.py.page:16 C/toolbar_builder.py.page:28
11288msgid "Sebastian Pölsterl"
11289msgstr "Sebastian Pölsterl"
11290
11291#. (itstool) path: credit/years
11292#: C/entry.py.page:23 C/index.page:20 C/model-view-controller.py.page:18 C/properties.py.page:18
11293#: C/signals-callbacks.py.page:18 C/strings.py.page:18 C/textview.py.page:18 C/toolbar_builder.py.page:30
11294msgid "2011"
11295msgstr "2011"
11296
11297#. (itstool) path: page/p
11298#: C/entry.py.page:30
11299msgid "This application greets you in the terminal with the name you provide."
11300msgstr "이 프로그램은 터미널에 입력한 이름과 함께 인사를 출력합니다."
11301
11302#. (itstool) path: section/code
11303#: C/entry.py.page:36
11304#, no-wrap
11305msgid ""
11306"from gi.repository import Gtk\n"
11307"import sys\n"
11308"\n"
11309"\n"
11310"class MyWindow(Gtk.ApplicationWindow):\n"
11311"\n"
11312"    def __init__(self, app):\n"
11313"        Gtk.Window.__init__(self, title=\"What is your name?\", application=app)\n"
11314"        self.set_default_size(300, 100)\n"
11315"        self.set_border_width(10)\n"
11316"\n"
11317"        # a single line entry\n"
11318"        name_box = Gtk.Entry()\n"
11319"        # emits a signal when the Enter key is pressed, connected to the\n"
11320"        # callback function cb_activate\n"
11321"        name_box.connect(\"activate\", self.cb_activate)\n"
11322"\n"
11323"        # add the Gtk.Entry to the window\n"
11324"        self.add(name_box)\n"
11325"\n"
11326"    # the content of the entry is used to write in the terminal\n"
11327"    def cb_activate(self, entry):\n"
11328"        # retrieve the content of the widget\n"
11329"        name = entry.get_text()\n"
11330"        # print it in a nice form in the terminal\n"
11331"        print(\"Hello \" + name + \"!\")\n"
11332"\n"
11333"\n"
11334"class MyApplication(Gtk.Application):\n"
11335"\n"
11336"    def __init__(self):\n"
11337"        Gtk.Application.__init__(self)\n"
11338"\n"
11339"    def do_activate(self):\n"
11340"        win = MyWindow(self)\n"
11341"        win.show_all()\n"
11342"\n"
11343"    def do_startup(self):\n"
11344"        Gtk.Application.do_startup(self)\n"
11345"\n"
11346"app = MyApplication()\n"
11347"exit_status = app.run(sys.argv)\n"
11348"sys.exit(exit_status)\n"
11349msgstr ""
11350"from gi.repository import Gtk\n"
11351"import sys\n"
11352"\n"
11353"\n"
11354"class MyWindow(Gtk.ApplicationWindow):\n"
11355"\n"
11356"    def __init__(self, app):\n"
11357"        Gtk.Window.__init__(self, title=\"What is your name?\", application=app)\n"
11358"        self.set_default_size(300, 100)\n"
11359"        self.set_border_width(10)\n"
11360"\n"
11361"        # a single line entry\n"
11362"        name_box = Gtk.Entry()\n"
11363"        # emits a signal when the Enter key is pressed, connected to the\n"
11364"        # callback function cb_activate\n"
11365"        name_box.connect(\"activate\", self.cb_activate)\n"
11366"\n"
11367"        # add the Gtk.Entry to the window\n"
11368"        self.add(name_box)\n"
11369"\n"
11370"    # the content of the entry is used to write in the terminal\n"
11371"    def cb_activate(self, entry):\n"
11372"        # retrieve the content of the widget\n"
11373"        name = entry.get_text()\n"
11374"        # print it in a nice form in the terminal\n"
11375"        print(\"Hello \" + name + \"!\")\n"
11376"\n"
11377"\n"
11378"class MyApplication(Gtk.Application):\n"
11379"\n"
11380"    def __init__(self):\n"
11381"        Gtk.Application.__init__(self)\n"
11382"\n"
11383"    def do_activate(self):\n"
11384"        win = MyWindow(self)\n"
11385"        win.show_all()\n"
11386"\n"
11387"    def do_startup(self):\n"
11388"        Gtk.Application.do_startup(self)\n"
11389"\n"
11390"app = MyApplication()\n"
11391"exit_status = app.run(sys.argv)\n"
11392"sys.exit(exit_status)\n"
11393"수\n"
11394
11395#. (itstool) path: section/title
11396#: C/entry.py.page:40
11397msgid "Useful methods for an Entry widget"
11398msgstr "Entry 위젯에 쓸만한 메서드"
11399
11400#. (itstool) path: section/p
11401#: C/entry.py.page:41
11402msgid ""
11403"In line 14 the signal <code>\"activate\"</code> is connected to the callback function <code>cb_activate()</code> "
11404"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
11405"\"signals-callbacks.py\"/> for a more detailed explanation. Some of the signals that a Gtk.Entry widget can emit "
11406"are: <code>\"activate\"</code> (emitted when the user activates the Entry key); <code>\"backspace\"</code> "
11407"(emitted when the user activates the Backspace or Shift-Backspace keys); <code>\"copy-clipboard\"</code> (Ctrl-c "
11408"and Ctrl-Insert); <code>\"paste-clipboard\"</code> (Ctrl-v and Shift-Insert); <code>\"delete-from-cursor\"</code> "
11409"(Delete, for deleting a character; Ctrl-Delete, for deleting a word); <code>\"icon-press\"</code> (emitted when "
11410"the user clicks an activatable icon); <code>\"icon-release\"</code> (emitted on the button release from a mouse "
11411"click over an activatable icon); <code>\"insert-at-cursor\"</code> (emitted when the user initiates the insertion "
11412"of a fixed string at the cursor); <code>\"move-cursor\"</code> (emitted when the user initiates a cursor "
11413"movement); <code>\"populate-popup\"</code> (emitted before showing the context menu of the entry; it can be used "
11414"to add items to it)."
11415msgstr ""
11416"14번째 줄에서 <code>\"activate\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
11417"function</var>)</code> 콜백 함수에 연결했습니다. 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref=\"signals-"
11418"callbacks.py\"/>를 참조하십시오. Gtk.Entry 위젯에서 나타날 수 있는 일부 시그널은 <code>\"activate\"</code> (사용자"
11419"가 Entry 키를 눌렀을 때 나타남), <code>\"backspace\"</code> (사용자가 Backspace 또는 Shift-Backspace 키를 눌렀을 "
11420"때 나타남), <code>\"copy-clipboard\"</code> (Ctrl-c와 Ctrl-Insert키를 눌렀을 때), <code>\"paste-clipboard\"</code> "
11421"(Ctrl-v와 Shift-Insert 키를 눌렀을 때), <code>\"delete-from-cursor\"</code> (문자를 지울 때 Delete 키를 눌렀을 때, "
11422"단어를 지울 경우 Ctrl-Delete키를 눌렀을 때) <code>\"icon-press\"</code> (사용자가 활성화할 수 있는 아이콘을 눌렀을 "
11423"때 나타남), <code>\"icon-release\"</code> (사용자가 활성화할 수 있는 아이콘을 누른 상황에서 마우스 커서를 그 위에 "
11424"두고 단추를 뗐을 때 나타남), <code>\"insert-at-cursor\"</code> (사용자가 커서 위치에 지정 문자열을 넣기 시작할 때 "
11425"나타남), <code>\"move-cursor\"</code> (사용자가 커서 이동을 시작할 때 나타남), <code>\"populate-popup\"</code> (항"
11426"목의 단축 메뉴를 나타내기 전에 나타남. 단축 메뉴에 항목을 추가할 때 사용할 수 있습니다)이 있습니다."
11427
11428#. (itstool) path: item/p
11429#: C/entry.py.page:43
11430msgid ""
11431"<code>get_buffer()</code> and <code>set_buffer(buffer)</code>, where <code>buffer</code> is a Gtk.EntryBuffer "
11432"object, can be used to get and set the buffer for the entry."
11433msgstr ""
11434"<code>get_buffer()</code>와 <code>set_buffer(buffer)</code>는 항목의 버퍼를 가져오거나 설정할 때 사용할 수 있으며, "
11435"<code>buffer</code> 자리에는 Gtk.EntryBuffer 객체가 들어갑니다."
11436
11437#. (itstool) path: item/p
11438#: C/entry.py.page:44
11439msgid ""
11440"<code>get_text()</code> and <code>set_text(\"some text\")</code> can be used to get and set the content for the "
11441"entry."
11442msgstr ""
11443"<code>get_text()</code>와 <code>set_text(\"some text\")</code>는 항목의 텍스트 내용을 가져오고 설정할 때 사용할 수 "
11444"있습니다."
11445
11446#. (itstool) path: item/p
11447#: C/entry.py.page:45
11448msgid "<code>get_text_length()</code> is self-explanatory."
11449msgstr "<code>get_text_length()</code> 메서드는 이름 그대로 동작합니다."
11450
11451#. (itstool) path: item/p
11452#: C/entry.py.page:46
11453msgid "<code>get_text_area()</code> gets the area where the entry's text is drawn."
11454msgstr "<code>get_text_area()</code>는 항목 텍스트를 그린 영역(크기)를 가져옵니다."
11455
11456#. (itstool) path: item/p
11457#: C/entry.py.page:47
11458msgid ""
11459"If we set <code>set_visibility(False)</code> the characters in the entry are displayed as the invisible char. This "
11460"is the best available in the current font, but it can be changed with <code>set_invisible_char(ch)</code>, where "
11461"<code>ch</code> is a Unicode character. The latter method is reversed by <code>unset_invisible_char()</code>."
11462msgstr ""
11463"<code>set_visibility(False)</code>를 설정하면 항목에 나타난 문자를 숨깁니다. 현재 글꼴로 나타내는게 가장 좋지만, "
11464"<code>set_invisible_char(ch)</code>로 특정 글자를 숨길 수 있으며, <code>ch</code> 자리에는 유니코드 문자가 들어갑니"
11465"다. 후자 메서드의 반대 역할을 하는 메서드는 <code>unset_invisbile_char()</code>입니다."
11466
11467#. (itstool) path: item/p
11468#: C/entry.py.page:48
11469msgid ""
11470"<code>set_max_length(int)</code>, where <code>int</code> is an integer, truncates every entry longer than "
11471"<code>int</code> to have the desired maximum length."
11472msgstr ""
11473"<code>set_max_length(int)</code> 함수는 항목이 최대 결정 길이 <code>int</code>를 넘으면 자르며, <code>int</code> 값"
11474"은 정수형입니다."
11475
11476#. (itstool) path: item/p
11477#: C/entry.py.page:49
11478msgid ""
11479"By default, if you press the Entry key the Gtk.Entry emits the signal <code>\"activate\"</code>. If you would like "
11480"to activate the default widget for the window (set using <code>set_default(widget)</code> on the window), then use "
11481"<code>set_activates_default(True)</code>."
11482msgstr ""
11483"기본적으로 Entry 키를 누르면 <code>\"activate\"</code> 시그널을 내보냅니다. 창의 기본 위젯으로 활성화하려면(창에서 "
11484"<code>set_default(widget)</code> 메서드 호출), <code>set_activates_default(True)</code> 메서드를 호출하십시오."
11485
11486#. (itstool) path: item/p
11487#: C/entry.py.page:50
11488msgid "To set a frame around the entry: <code>set_has_frame(True)</code>."
11489msgstr "항목에 테두리를 설정하려면 <code>set_has_frame(True)</code>를 실행하십시오."
11490
11491#. (itstool) path: item/p
11492#: C/entry.py.page:51
11493msgid ""
11494"<code>set_placeholder_text(\"some text\")</code> sets the text to be displayed in the entry when it is empty and "
11495"unfocused."
11496msgstr ""
11497"<code>set_placeholder_text(\"some text\")</code> 메서드는 항목이 비어있으며 포커스를 주지 않았을 경우 나타낼 텍스트"
11498"를 설정합니다."
11499
11500#. (itstool) path: item/p
11501#: C/entry.py.page:52
11502msgid "<code>set_overwrite_mode(True)</code> and <code>set_overwrite_mode(False)</code> are self-explanatory."
11503msgstr ""
11504"<code>set_overwrite_mode(True)</code>및 <code>set_overwrite_mode(False)</code> 메서드는 이름 그대로 동작합니다."
11505
11506#. (itstool) path: item/p
11507#: C/entry.py.page:53
11508msgid "If we have <code>set_editable(False)</code> the user cannot edit the text in the widget."
11509msgstr "<code>set_editable(False)</code> 메서드를 호출하면 사용자가 위젯의 텍스트를 편집할 수 없습니다."
11510
11511#. (itstool) path: item/p
11512#: C/entry.py.page:54
11513msgid ""
11514"<code>set_completion(completion)</code>, where <code>completion</code> is a <link href=\"http://developer.gnome."
11515"org/gtk3/unstable/GtkEntryCompletion.html\"><code>Gtk.EntryCompletion</code></link>, sets completion - or disables "
11516"it if <code>completion</code> is <code>None</code>."
11517msgstr ""
11518"<code>completion</code>이 <link href=\"http://developer.gnome.org/gtk3/unstable/GtkEntryCompletion.html"
11519"\"><code>Gtk.EntryCompletion</code></link>인 <code>set_completion(completion)</code> 함수는 <code>completion</"
11520"code> 값이 <code>None</code>일 경우 completion 값을 설정하거나 비활성화합니다."
11521
11522#. (itstool) path: item/p
11523#: C/entry.py.page:55
11524msgid ""
11525"An Entry widget can display progress or activity information behind the text. We use "
11526"<code>set_progress_fraction(fraction)</code>, where <code>fraction</code> is a <code>float</code> between "
11527"<code>0.0</code> and <code>1.0</code> inclusive, to fill in the given fraction of the bar. We use "
11528"<code>set_progress_pulse_step()</code> to set the fraction of total entry width to move the progress bouncing "
11529"block for each call to <code>progress_pulse()</code>. The latter method indicates that some progress is made, and "
11530"causes the progress indicator of the entry to enter \"activity mode\", where a block bounces back and forth. Each "
11531"call to <code>progress_pulse()</code> causes the block to move by a little bit (the amount of movement per pulse "
11532"is determined, as said before, by <code>set_progress_pulse_step()</code>)."
11533msgstr ""
11534"항목 위젯에는 화면에 나타난 텍스트 이면의 진행 상황 또는 활동 정보를 나타낼 수 있습니다. 진행 표시줄 막대에 비율을 "
11535"주어 채워넣을 목적으로 <code>set_progress_fraction(fraction)</code> 함수를 사용하며, 여기서 <code>fraction</code> "
11536"은 <code>0.0</code> 과 <code>1.0</code> 사이의 <code>float</code> 값입니다. <code>progress_pulse()</code>를 호출할 "
11537"때마다 진행 표시줄 바운싱 블록을 이동할 전체 항목 너비 비율을 설정할 때 <code>set_progress_pulse_step()</code> 함수"
11538"를 사용합니다. 후자 함수는 일부 진행 과정을 끝냈고 블록이 앞뒤로 튀는 항목의 진행 상황 표시자가 \"활동 모드\"로 들"
11539"어감을 나타냅니다. 각각의 함수는 <code>progress_pulse()</code>를 호출하여블록을 약간씩 움직이게 합니다(앞에서 말한 "
11540"바와 같이 <code>set_progress_pulse_step()</code> 함수로 주기당 움직이는 정도를 결정합니다)."
11541
11542#. (itstool) path: item/p
11543#: C/entry.py.page:56
11544msgid ""
11545"An Entry widget can also show icons. These icons can be activatable by clicking, can be set up as drag source and "
11546"can have tooltips. To add an icon, use <code>set_icon_from_stock(icon_position, stock_id)</code>, or one of "
11547"<code>set_icon_from_pixbuf(icon_position, pixbuf)</code>, <code>set_icon_from_icon_name(icon_position, icon_name)</"
11548"code>, where <code>icon_position</code> is one of <code>Gtk.EntryIconPosition.PRIMARY</code> (to set the icon at "
11549"the beginning of the entry) <code>Gtk.EntryIconPosition.SECONDARY</code> (to set the icon at the end of the "
11550"entry). To set a tooltip on an icon, use <code>set_icon_tooltip_text(\"tooltip text\")</code> or "
11551"<code>set_icon_tooltip_markup(\"tooltip text in Pango markup language\")</code>."
11552msgstr ""
11553"항목 위젯은 아이콘을 나타낼 수도 있습니다. 이 아이콘은 눌렀을 떄 활성화할 수 있는데, 끌어다 놓을 수 있게 할 수 있으"
11554"며, 풍선 도움말을 설정할 수도 있습니다. 아이콘을 추가하려면 <code>set_icon_from_stock(icon_position, stock_id)</"
11555"code> 또는 <code>set_icon_from_pixbuf(icon_position, pixbuf)</code>, <code>set_icon_from_icon_name(icon_position, "
11556"icon_name)</code> 둘 중 하나를 사용하시면 되며 <code>icon_position</code> 에는 <code>Gtk.EntryIconPosition."
11557"PRIMARY</code> (항목 시작 부분에 아이콘 위치) <code>Gtk.EntryIconPosition.SECONDARY</code> (항목 뒷 부분에 아이콘 "
11558"위치) 값 중 하나가 들어갑니다 아이콘에 풍선 도움말을 설정하려면, <code>set_icon_tooltip_text(\"풍선 도움말 문장"
11559"\")</code> 또는 <code>set_icon_tooltip_markup(\"팡고 마크업 언어를 사용한 풍선 도움말 문장\")</code> 함수를 사용하"
11560"십시오."
11561
11562#. (itstool) path: item/p
11563#: C/entry.py.page:64
11564msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkEntry.html\">GtkEntry</link>"
11565msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkEntry.html\">GtkEntry</link>"
11566
11567#. (itstool) path: info/title
11568#: C/entry.vala.page:8
11569msgctxt "text"
11570msgid "Entry (Vala)"
11571msgstr "Entry(Vala)"
11572
11573#. (itstool) path: page/code
11574#: C/entry.vala.page:25
11575#, no-wrap
11576msgid ""
11577"/* A window in the application. */\n"
11578"class MyWindow : Gtk.ApplicationWindow {\n"
11579"\n"
11580"\t/* Constructor */\n"
11581"\tinternal MyWindow (MyApplication app) {\n"
11582"\t\tObject (application: app, title: \"What is your name?\");\n"
11583"\n"
11584"\t\tvar name_box = new Gtk.Entry ();\n"
11585"\n"
11586"\t\t/* Connect to the signal handler. */\n"
11587"\t\tname_box.activate.connect (this.on_activate);\n"
11588"\t\tname_box.show ();\n"
11589"\n"
11590"\t\tthis.set_default_size (300, 100);\n"
11591"\t\tthis.border_width = 10;\n"
11592"\n"
11593"\t\t/* Add the name_box to this window. */\n"
11594"\t\tthis.add (name_box);\n"
11595"\t}\n"
11596"\n"
11597"\t/* Signal handler (aka. callback function) for the 'activate'\n"
11598"\t * signal of a Gtk.Entry.\n"
11599"\t */\n"
11600"\tvoid on_activate (Gtk.Entry entry) {\n"
11601"\t\tname = entry.get_text ();\n"
11602"\t\tprint (\"\\nHello \" + name + \"!\\n\\n\");\n"
11603"\t}\n"
11604"}\n"
11605"\n"
11606"/* This is the application. */\n"
11607"class MyApplication : Gtk.Application {\n"
11608"\n"
11609"\t/* Constructor for the application. */\n"
11610"\tinternal MyApplication () {\n"
11611"\t\tObject (application_id: \"org.example.MyApplication\");\n"
11612"\t}\n"
11613"\n"
11614"\t/* Override the 'activate' signal of GLib.Application. */\n"
11615"\tprotected override void activate () {\n"
11616"\n"
11617"\t\t/* Create a new window for this application\n"
11618"\t\t * and show it. */\n"
11619"\t\tnew MyWindow (this).show ();\n"
11620"\t}\n"
11621"\n"
11622"}\n"
11623"\n"
11624"/* The main function creates and runs the application. */\n"
11625"int main (string[] args) {\n"
11626"\treturn new MyApplication ().run (args);\n"
11627"}\n"
11628msgstr ""
11629"/* A window in the application. */\n"
11630"class MyWindow : Gtk.ApplicationWindow {\n"
11631"\n"
11632"\t/* Constructor */\n"
11633"\tinternal MyWindow (MyApplication app) {\n"
11634"\t\tObject (application: app, title: \"What is your name?\");\n"
11635"\n"
11636"\t\tvar name_box = new Gtk.Entry ();\n"
11637"\n"
11638"\t\t/* Connect to the signal handler. */\n"
11639"\t\tname_box.activate.connect (this.on_activate);\n"
11640"\t\tname_box.show ();\n"
11641"\n"
11642"\t\tthis.set_default_size (300, 100);\n"
11643"\t\tthis.border_width = 10;\n"
11644"\n"
11645"\t\t/* Add the name_box to this window. */\n"
11646"\t\tthis.add (name_box);\n"
11647"\t}\n"
11648"\n"
11649"\t/* Signal handler (aka. callback function) for the 'activate'\n"
11650"\t * signal of a Gtk.Entry.\n"
11651"\t */\n"
11652"\tvoid on_activate (Gtk.Entry entry) {\n"
11653"\t\tname = entry.get_text ();\n"
11654"\t\tprint (\"\\nHello \" + name + \"!\\n\\n\");\n"
11655"\t}\n"
11656"}\n"
11657"\n"
11658"/* This is the application. */\n"
11659"class MyApplication : Gtk.Application {\n"
11660"\n"
11661"\t/* Constructor for the application. */\n"
11662"\tinternal MyApplication () {\n"
11663"\t\tObject (application_id: \"org.example.MyApplication\");\n"
11664"\t}\n"
11665"\n"
11666"\t/* Override the 'activate' signal of GLib.Application. */\n"
11667"\tprotected override void activate () {\n"
11668"\n"
11669"\t\t/* Create a new window for this application\n"
11670"\t\t * and show it. */\n"
11671"\t\tnew MyWindow (this).show ();\n"
11672"\t}\n"
11673"\n"
11674"}\n"
11675"\n"
11676"/* The main function creates and runs the application. */\n"
11677"int main (string[] args) {\n"
11678"\treturn new MyApplication ().run (args);\n"
11679"}\n"
11680
11681#. (itstool) path: item/p
11682#: C/entry.vala.page:30
11683msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Entry.html\">Gtk.Entry</link>"
11684msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Entry.html\">Gtk.Entry</link>"
11685
11686#. (itstool) path: info/title
11687#: C/filechooserdialog.py.page:8
11688msgctxt "text"
11689msgid "FileChooserDialog (Python)"
11690msgstr "FileChooserDialog(Python)"
11691
11692#. (itstool) path: info/desc
11693#: C/filechooserdialog.py.page:22
11694msgid "A dialog suitable for \"Open\" and \"Save\" commands"
11695msgstr "\"열기\" 및 \"저장\" 명령에 알맞은 대화상자"
11696
11697#. (itstool) path: page/title
11698#: C/filechooserdialog.py.page:25 C/filechooserdialog.vala.page:24
11699msgid "FileChooserDialog"
11700msgstr "FileChooserDialog"
11701
11702#. (itstool) path: page/media
11703#. This is a reference to an external file such as an image or video. When
11704#. the file changes, the md5 hash will change to let you know you need to
11705#. update your localized copy. The msgstr is not used at all. Set it to
11706#. whatever you like once you have updated your copy of the file.
11707#: C/filechooserdialog.py.page:26
11708msgctxt "_"
11709msgid "external ref='media/filechooserdialog_save.png' md5='3a7a3b71b9d3a36066857843b68ff27f'"
11710msgstr ""
11711
11712#. (itstool) path: page/p
11713#: C/filechooserdialog.py.page:27
11714msgid ""
11715"This FileChooserDialog saves a text document, which can be opened or written from scratch in a TextView (see "
11716"below)."
11717msgstr "FileChooserDialog는 TextView에 열었거나 바닥부터 새로 작성한 텍스트 문서를 저장합니다(하단 참고)."
11718
11719#. (itstool) path: page/media
11720#. This is a reference to an external file such as an image or video. When
11721#. the file changes, the md5 hash will change to let you know you need to
11722#. update your localized copy. The msgstr is not used at all. Set it to
11723#. whatever you like once you have updated your copy of the file.
11724#: C/filechooserdialog.py.page:28
11725msgctxt "_"
11726msgid "external ref='media/filechooserdialog_menu.png' md5='8a75f04127a70eba0ed68a9eb1d3bbca'"
11727msgstr ""
11728
11729#. (itstool) path: page/p
11730#: C/filechooserdialog.py.page:29
11731msgid "It is also possible to call a FileChooserDialog to open a new document."
11732msgstr "새 문서를 열 때 FileChooserDialog를 호출할 수 있습니다."
11733
11734#. (itstool) path: section/title
11735#: C/filechooserdialog.py.page:34
11736msgid "Steps to recreate the example"
11737msgstr "예제를 다시 만드는 과정"
11738
11739#. (itstool) path: item/p
11740#: C/filechooserdialog.py.page:36
11741msgid ""
11742"Create a file .ui to describe an app-menu with items \"New\", \"Open\", \"Save\", \"Save as\", and \"Quit\". This "
11743"can be done with Glade or in a text editor. See <link xref=\"#xml\"/>"
11744msgstr ""
11745"\"New\", \"Open\", \"Save\", \"Save as\", \"Quit\" 항목이 들어간 app-menu 설명 .ui 파일을 만드십시오. 글레이드 개"
11746"발 환경이나 텍스트 편집기에서 처리할 수 있습니다. <link xref=\"#xml\"/> 내용을 참고하십시오."
11747
11748#. (itstool) path: item/p
11749#: C/filechooserdialog.py.page:37
11750msgid ""
11751"Create a Python program for a Gtk.TextView with a Gtk.Buffer <code>self.buffer</code>, and a <code>self.file</"
11752"code> which will be a Gio.File and we set initially as <code>None</code>."
11753msgstr ""
11754"Gtk.TextViewGtk.Buffer <code>self.buffer</code>와 <code>None</code>으로 초기값을 설정한 Gio.File 형식의 <code>self."
11755"file</code> 로 Gtk.TextView 파이썬 프로그램을 만드십시오."
11756
11757#. (itstool) path: item/p
11758#: C/filechooserdialog.py.page:38
11759msgid ""
11760"In this program, create also the actions corresponding to the items in the app-menu, connect them to callback "
11761"functions, and import the menu in the <code>do_startup()</code> method with a Gtk.Builder."
11762msgstr ""
11763"이 프로그램에서 app-menu에 항목마다 관련 동작을 만드시고, 콜백 함수에 연결하신 다음, Gtk.Builder의 "
11764"<code>do_startup()</code> 메서드로 메뉴를 가져오십시오."
11765
11766#. (itstool) path: item/p
11767#: C/filechooserdialog.py.page:39
11768msgid ""
11769"\"New\" and \"Quit\" actions and callback functions are quite straightforward, see <link xref=\"#code\"/>. See "
11770"<link xref=\"signals-callbacks.py\"/> for a more detailed explanation of signals and callback functions."
11771msgstr ""
11772"\"새 파일\" 및 \"끝내기\" 동작과 콜백 함수는 조금 단순합니다. <link xref=\"#code\"/>를 참고해보시죠. 시그널 및 콜"
11773"백 함수에 대한 자세한 설명은 <link xref=\"signals-callbacks.py\"/>를 살펴보십시오."
11774
11775#. (itstool) path: item/p
11776#: C/filechooserdialog.py.page:40
11777msgid ""
11778"\"Open\" callback should create and open a Gtk.FileChooserDialog for \"Open\", connected with another callback "
11779"function for each of the two \"Open\" and \"Cancel\" buttons of the FileChooserDialog."
11780msgstr ""
11781"\"열기\" 콜백 함수에서는 \"열기\" 동작에 맞게 Gtk.FileChooserDialog를 만들고 연 다음, FileChooserDialog의 \"열기\" "
11782"및 \"취소\" 단추에 제각기 다른 콜백 함수를 연결해야합니다."
11783
11784#. (itstool) path: item/p
11785#: C/filechooserdialog.py.page:41
11786msgid ""
11787"\"Save as\" works basically as \"Open\", but the callback function of the \"Save\" button depends on a more "
11788"complex method <code>save_to_file()</code>."
11789msgstr ""
11790"\"다른 이름으로 저장\"은 \"열기\"와 근본적으로 비슷하게 동작하지만, \"저장\" 단추의 콜백 함수 동작은 좀 더 복잡한 "
11791"메서드 <code>save_to_file()</code>에 따릅니다."
11792
11793#. (itstool) path: item/p
11794#: C/filechooserdialog.py.page:42
11795msgid ""
11796"\"Save\" can be reduced to the case where the file is <code>None</code>, that is the case where <code>self.file</"
11797"code> is a new file, which in turn is the case \"Save as\"; and to the case where the file is not <code>None</"
11798"code>, which in turn is reduced to <code>save_to_file()</code>."
11799msgstr ""
11800"\"저장\" 동작은, <code>self.file</code> 이 새 파일이어서 파일이 <code>None</code>(없음)일 경우로 경우의 수를 줄일 "
11801"수 있으며, 이때는 \"다른 이름으로 저장\"인 경우로 되돌릴 수 있습니다. 그리고 파일이 <code>None</code>(없음) 상태가 "
11802"아닐 경우, <code>save_to_file()</code> 호출만으로 과정을 줄입니다."
11803
11804#. (itstool) path: item/p
11805#: C/filechooserdialog.py.page:43
11806msgid "Finally, the method <code>save_to_file()</code>: see <link xref=\"#code\"/>, lines 146 - 175."
11807msgstr ""
11808"마지막으로, <code>save_to_file()</code> 메서드는 <link xref=\"#code\"/> 146번째 줄부터 175번째 줄 까지의 부분을 참"
11809"고하십시오."
11810
11811#. (itstool) path: section/title
11812#: C/filechooserdialog.py.page:48
11813msgid "XML file which creates the app-menu"
11814msgstr "app-menu를 만드는 XML 파일"
11815
11816#. (itstool) path: section/code
11817#: C/filechooserdialog.py.page:49 C/filechooserdialog.vala.page:30
11818#, no-wrap
11819msgid ""
11820"&lt;?xml version=\"1.0\"?&gt;\n"
11821"&lt;interface&gt;\n"
11822"  &lt;menu id=\"appmenu\"&gt;\n"
11823"    &lt;section&gt;\n"
11824"      &lt;item&gt;\n"
11825"        &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
11826"        &lt;attribute name=\"action\"&gt;win.new&lt;/attribute&gt;\n"
11827"      &lt;/item&gt;\n"
11828"      &lt;item&gt;\n"
11829"        &lt;attribute name=\"label\"&gt;Open&lt;/attribute&gt;\n"
11830"        &lt;attribute name=\"action\"&gt;win.open&lt;/attribute&gt;\n"
11831"      &lt;/item&gt;\n"
11832"    &lt;/section&gt;\n"
11833"    &lt;section&gt;\n"
11834"      &lt;item&gt;\n"
11835"        &lt;attribute name=\"label\"&gt;Save&lt;/attribute&gt;\n"
11836"        &lt;attribute name=\"action\"&gt;win.save&lt;/attribute&gt;\n"
11837"      &lt;/item&gt;\n"
11838"      &lt;item&gt;\n"
11839"        &lt;attribute name=\"label\"&gt;Save As...&lt;/attribute&gt;\n"
11840"        &lt;attribute name=\"action\"&gt;win.save-as&lt;/attribute&gt;\n"
11841"      &lt;/item&gt;\n"
11842"    &lt;/section&gt;\n"
11843"    &lt;section&gt;\n"
11844"      &lt;item&gt;\n"
11845"        &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
11846"        &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
11847"      &lt;/item&gt;\n"
11848"    &lt;/section&gt;\n"
11849"  &lt;/menu&gt;\n"
11850"&lt;/interface&gt;\n"
11851msgstr ""
11852"&lt;?xml version=\"1.0\"?&gt;\n"
11853"&lt;interface&gt;\n"
11854"  &lt;menu id=\"appmenu\"&gt;\n"
11855"    &lt;section&gt;\n"
11856"      &lt;item&gt;\n"
11857"        &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
11858"        &lt;attribute name=\"action\"&gt;win.new&lt;/attribute&gt;\n"
11859"      &lt;/item&gt;\n"
11860"      &lt;item&gt;\n"
11861"        &lt;attribute name=\"label\"&gt;Open&lt;/attribute&gt;\n"
11862"        &lt;attribute name=\"action\"&gt;win.open&lt;/attribute&gt;\n"
11863"      &lt;/item&gt;\n"
11864"    &lt;/section&gt;\n"
11865"    &lt;section&gt;\n"
11866"      &lt;item&gt;\n"
11867"        &lt;attribute name=\"label\"&gt;Save&lt;/attribute&gt;\n"
11868"        &lt;attribute name=\"action\"&gt;win.save&lt;/attribute&gt;\n"
11869"      &lt;/item&gt;\n"
11870"      &lt;item&gt;\n"
11871"        &lt;attribute name=\"label\"&gt;Save As...&lt;/attribute&gt;\n"
11872"        &lt;attribute name=\"action\"&gt;win.save-as&lt;/attribute&gt;\n"
11873"      &lt;/item&gt;\n"
11874"    &lt;/section&gt;\n"
11875"    &lt;section&gt;\n"
11876"      &lt;item&gt;\n"
11877"        &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
11878"        &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
11879"      &lt;/item&gt;\n"
11880"    &lt;/section&gt;\n"
11881"  &lt;/menu&gt;\n"
11882"&lt;/interface&gt;\n"
11883
11884#. (itstool) path: section/code
11885#: C/filechooserdialog.py.page:54
11886#, no-wrap
11887msgid ""
11888"from gi.repository import Gtk\n"
11889"from gi.repository import Gdk\n"
11890"from gi.repository import Gio\n"
11891"from gi.repository import GObject\n"
11892"import sys\n"
11893"\n"
11894"\n"
11895"class MyWindow(Gtk.ApplicationWindow):\n"
11896"\n"
11897"    def __init__(self, app):\n"
11898"        Gtk.Window.__init__(\n"
11899"            self, title=\"FileChooserDialog Example\", application=app)\n"
11900"        self.set_default_size(400, 400)\n"
11901"\n"
11902"        # the actions for the window menu, connected to the callback functions\n"
11903"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
11904"        new_action.connect(\"activate\", self.new_callback)\n"
11905"        self.add_action(new_action)\n"
11906"\n"
11907"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
11908"        open_action.connect(\"activate\", self.open_callback)\n"
11909"        self.add_action(open_action)\n"
11910"\n"
11911"        save_action = Gio.SimpleAction.new(\"save\", None)\n"
11912"        save_action.connect(\"activate\", self.save_callback)\n"
11913"        self.add_action(save_action)\n"
11914"\n"
11915"        save_as_action = Gio.SimpleAction.new(\"save-as\", None)\n"
11916"        save_as_action.connect(\"activate\", self.save_as_callback)\n"
11917"        self.add_action(save_as_action)\n"
11918"\n"
11919"        # the file\n"
11920"        self.file = None\n"
11921"\n"
11922"        # the textview with the buffer\n"
11923"        self.buffer = Gtk.TextBuffer()\n"
11924"        textview = Gtk.TextView(buffer=self.buffer)\n"
11925"        textview.set_wrap_mode(Gtk.WrapMode.WORD)\n"
11926"\n"
11927"        # a scrolled window for the textview\n"
11928"        self.scrolled_window = Gtk.ScrolledWindow()\n"
11929"        self.scrolled_window.set_policy(\n"
11930"            Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n"
11931"        self.scrolled_window.add(textview)\n"
11932"        self.scrolled_window.set_border_width(5)\n"
11933"\n"
11934"        # add the scrolled window to the window\n"
11935"        self.add(self.scrolled_window)\n"
11936"\n"
11937"    # callback for new\n"
11938"    def new_callback(self, action, parameter):\n"
11939"        self.buffer.set_text(\"\")\n"
11940"        print(\"New file created\")\n"
11941"\n"
11942"    # callback for open\n"
11943"    def open_callback(self, action, parameter):\n"
11944"        # create a filechooserdialog to open:\n"
11945"        # the arguments are: title of the window, parent_window, action,\n"
11946"        # (buttons, response)\n"
11947"        open_dialog = Gtk.FileChooserDialog(\"Pick a file\", self,\n"
11948"                                            Gtk.FileChooserAction.OPEN,\n"
11949"                                           (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,\n"
11950"                                            Gtk.STOCK_OPEN, Gtk.ResponseType.ACCEPT))\n"
11951"\n"
11952"        # not only local files can be selected in the file selector\n"
11953"        open_dialog.set_local_only(False)\n"
11954"        # dialog always on top of the textview window\n"
11955"        open_dialog.set_modal(True)\n"
11956"        # connect the dialog with the callback function open_response_cb()\n"
11957"        open_dialog.connect(\"response\", self.open_response_cb)\n"
11958"        # show the dialog\n"
11959"        open_dialog.show()\n"
11960"\n"
11961"    # callback function for the dialog open_dialog\n"
11962"    def open_response_cb(self, dialog, response_id):\n"
11963"        open_dialog = dialog\n"
11964"        # if response is \"ACCEPT\" (the button \"Open\" has been clicked)\n"
11965"        if response_id == Gtk.ResponseType.ACCEPT:\n"
11966"            # self.file is the file that we get from the FileChooserDialog\n"
11967"            self.file = open_dialog.get_file()\n"
11968"            # an empty string (provisionally)\n"
11969"            content = \"\"\n"
11970"            try:\n"
11971"                # load the content of the file into memory:\n"
11972"                # success is a boolean depending on the success of the operation\n"
11973"                # content is self-explanatory\n"
11974"                # etags is an entity tag (can be used to quickly determine if the\n"
11975"                # file has been modified from the version on the file system)\n"
11976"                [success, content, etags] = self.file.load_contents(None)\n"
11977"            except GObject.GError as e:\n"
11978"                print(\"Error: \" + e.message)\n"
11979"            # set the content as the text into the buffer\n"
11980"            self.buffer.set_text(content, len(content))\n"
11981"            print(\"opened: \" + open_dialog.get_filename())\n"
11982"        # if response is \"CANCEL\" (the button \"Cancel\" has been clicked)\n"
11983"        elif response_id == Gtk.ResponseType.CANCEL:\n"
11984"            print(\"cancelled: FileChooserAction.OPEN\")\n"
11985"        # destroy the FileChooserDialog\n"
11986"        dialog.destroy()\n"
11987"\n"
11988"    # callback function for save_as\n"
11989"    def save_as_callback(self, action, parameter):\n"
11990"        # create a filechooserdialog to save:\n"
11991"        # the arguments are: title of the window, parent_window, action,\n"
11992"        # (buttons, response)\n"
11993"        save_dialog = Gtk.FileChooserDialog(\"Pick a file\", self,\n"
11994"                                            Gtk.FileChooserAction.SAVE,\n"
11995"                                           (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,\n"
11996"                                            Gtk.STOCK_SAVE, Gtk.ResponseType.ACCEPT))\n"
11997"        # the dialog will present a confirmation dialog if the user types a file name that\n"
11998"        # already exists\n"
11999"        save_dialog.set_do_overwrite_confirmation(True)\n"
12000"        # dialog always on top of the textview window\n"
12001"        save_dialog.set_modal(True)\n"
12002"        # if self.file has already been saved\n"
12003"        if self.file is not None:\n"
12004"            try:\n"
12005"                # set self.file as the current filename for the file chooser\n"
12006"                save_dialog.set_file(self.file)\n"
12007"            except GObject.GError as e:\n"
12008"                print(\"Error: \" + e.message)\n"
12009"        # connect the dialog to the callback function save_response_cb()\n"
12010"        save_dialog.connect(\"response\", self.save_response_cb)\n"
12011"        # show the dialog\n"
12012"        save_dialog.show()\n"
12013"\n"
12014"    # callback function for the dialog save_dialog\n"
12015"    def save_response_cb(self, dialog, response_id):\n"
12016"        save_dialog = dialog\n"
12017"        # if response is \"ACCEPT\" (the button \"Save\" has been clicked)\n"
12018"        if response_id == Gtk.ResponseType.ACCEPT:\n"
12019"            # self.file is the currently selected file\n"
12020"            self.file = save_dialog.get_file()\n"
12021"            # save to file (see below)\n"
12022"            self.save_to_file()\n"
12023"        # if response is \"CANCEL\" (the button \"Cancel\" has been clicked)\n"
12024"        elif response_id == Gtk.ResponseType.CANCEL:\n"
12025"            print(\"cancelled: FileChooserAction.SAVE\")\n"
12026"        # destroy the FileChooserDialog\n"
12027"        dialog.destroy()\n"
12028"\n"
12029"    # callback function for save\n"
12030"    def save_callback(self, action, parameter):\n"
12031"        # if self.file is not already there\n"
12032"        if self.file is not None:\n"
12033"            self.save_to_file()\n"
12034"        # self.file is a new file\n"
12035"        else:\n"
12036"            # use save_as\n"
12037"            self.save_as_callback(action, parameter)\n"
12038"\n"
12039"    # save_to_file\n"
12040"    def save_to_file(self):\n"
12041"        # get the content of the buffer, without hidden characters\n"
12042"        [start, end] = self.buffer.get_bounds()\n"
12043"        current_contents = self.buffer.get_text(start, end, False)\n"
12044"        # if there is some content\n"
12045"        if current_contents != \"\":\n"
12046"            # set the content as content of self.file.\n"
12047"            # arguments: contents, etags, make_backup, flags, GError\n"
12048"            try:\n"
12049"                self.file.replace_contents(current_contents,\n"
12050"                                           None,\n"
12051"                                           False,\n"
12052"                                           Gio.FileCreateFlags.NONE,\n"
12053"                                           None)\n"
12054"                print(\"saved: \" + self.file.get_path())\n"
12055"            except GObject.GError as e:\n"
12056"                print(\"Error: \" + e.message)\n"
12057"        # if the contents are empty\n"
12058"        else:\n"
12059"            # create (if the file does not exist) or overwrite the file in readwrite mode.\n"
12060"            # arguments: etags, make_backup, flags, GError\n"
12061"            try:\n"
12062"                self.file.replace_readwrite(None,\n"
12063"                                            False,\n"
12064"                                            Gio.FileCreateFlags.NONE,\n"
12065"                                            None)\n"
12066"                print(\"saved: \" + self.file.get_path())\n"
12067"            except GObject.GError as e:\n"
12068"                print(\"Error: \" + e.message)\n"
12069"\n"
12070"\n"
12071"class MyApplication(Gtk.Application):\n"
12072"\n"
12073"    def __init__(self):\n"
12074"        Gtk.Application.__init__(self)\n"
12075"\n"
12076"    def do_activate(self):\n"
12077"        win = MyWindow(self)\n"
12078"        win.show_all()\n"
12079"\n"
12080"    def do_startup(self):\n"
12081"        Gtk.Application.do_startup(self)\n"
12082"\n"
12083"        # app action quit, connected to the callback function\n"
12084"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
12085"        quit_action.connect(\"activate\", self.quit_callback)\n"
12086"        self.add_action(quit_action)\n"
12087"\n"
12088"        # get the menu from the ui file with a builder\n"
12089"        builder = Gtk.Builder()\n"
12090"        try:\n"
12091"            builder.add_from_file(\"filechooserdialog.ui\")\n"
12092"        except:\n"
12093"            print(\"file not found\")\n"
12094"            sys.exit()\n"
12095"        menu = builder.get_object(\"appmenu\")\n"
12096"        self.set_app_menu(menu)\n"
12097"\n"
12098"    # callback function for quit\n"
12099"    def quit_callback(self, action, parameter):\n"
12100"        self.quit()\n"
12101"\n"
12102"app = MyApplication()\n"
12103"exit_status = app.run(sys.argv)\n"
12104"sys.exit(exit_status)\n"
12105msgstr ""
12106"from gi.repository import Gtk\n"
12107"from gi.repository import Gdk\n"
12108"from gi.repository import Gio\n"
12109"from gi.repository import GObject\n"
12110"import sys\n"
12111"\n"
12112"\n"
12113"class MyWindow(Gtk.ApplicationWindow):\n"
12114"\n"
12115"    def __init__(self, app):\n"
12116"        Gtk.Window.__init__(\n"
12117"            self, title=\"FileChooserDialog Example\", application=app)\n"
12118"        self.set_default_size(400, 400)\n"
12119"\n"
12120"        # the actions for the window menu, connected to the callback functions\n"
12121"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
12122"        new_action.connect(\"activate\", self.new_callback)\n"
12123"        self.add_action(new_action)\n"
12124"\n"
12125"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
12126"        open_action.connect(\"activate\", self.open_callback)\n"
12127"        self.add_action(open_action)\n"
12128"\n"
12129"        save_action = Gio.SimpleAction.new(\"save\", None)\n"
12130"        save_action.connect(\"activate\", self.save_callback)\n"
12131"        self.add_action(save_action)\n"
12132"\n"
12133"        save_as_action = Gio.SimpleAction.new(\"save-as\", None)\n"
12134"        save_as_action.connect(\"activate\", self.save_as_callback)\n"
12135"        self.add_action(save_as_action)\n"
12136"\n"
12137"        # the file\n"
12138"        self.file = None\n"
12139"\n"
12140"        # the textview with the buffer\n"
12141"        self.buffer = Gtk.TextBuffer()\n"
12142"        textview = Gtk.TextView(buffer=self.buffer)\n"
12143"        textview.set_wrap_mode(Gtk.WrapMode.WORD)\n"
12144"\n"
12145"        # a scrolled window for the textview\n"
12146"        self.scrolled_window = Gtk.ScrolledWindow()\n"
12147"        self.scrolled_window.set_policy(\n"
12148"            Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n"
12149"        self.scrolled_window.add(textview)\n"
12150"        self.scrolled_window.set_border_width(5)\n"
12151"\n"
12152"        # add the scrolled window to the window\n"
12153"        self.add(self.scrolled_window)\n"
12154"\n"
12155"    # callback for new\n"
12156"    def new_callback(self, action, parameter):\n"
12157"        self.buffer.set_text(\"\")\n"
12158"        print(\"New file created\")\n"
12159"\n"
12160"    # callback for open\n"
12161"    def open_callback(self, action, parameter):\n"
12162"        # create a filechooserdialog to open:\n"
12163"        # the arguments are: title of the window, parent_window, action,\n"
12164"        # (buttons, response)\n"
12165"        open_dialog = Gtk.FileChooserDialog(\"Pick a file\", self,\n"
12166"                                            Gtk.FileChooserAction.OPEN,\n"
12167"                                           (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,\n"
12168"                                            Gtk.STOCK_OPEN, Gtk.ResponseType.ACCEPT))\n"
12169"\n"
12170"        # not only local files can be selected in the file selector\n"
12171"        open_dialog.set_local_only(False)\n"
12172"        # dialog always on top of the textview window\n"
12173"        open_dialog.set_modal(True)\n"
12174"        # connect the dialog with the callback function open_response_cb()\n"
12175"        open_dialog.connect(\"response\", self.open_response_cb)\n"
12176"        # show the dialog\n"
12177"        open_dialog.show()\n"
12178"\n"
12179"    # callback function for the dialog open_dialog\n"
12180"    def open_response_cb(self, dialog, response_id):\n"
12181"        open_dialog = dialog\n"
12182"        # if response is \"ACCEPT\" (the button \"Open\" has been clicked)\n"
12183"        if response_id == Gtk.ResponseType.ACCEPT:\n"
12184"            # self.file is the file that we get from the FileChooserDialog\n"
12185"            self.file = open_dialog.get_file()\n"
12186"            # an empty string (provisionally)\n"
12187"            content = \"\"\n"
12188"            try:\n"
12189"                # load the content of the file into memory:\n"
12190"                # success is a boolean depending on the success of the operation\n"
12191"                # content is self-explanatory\n"
12192"                # etags is an entity tag (can be used to quickly determine if the\n"
12193"                # file has been modified from the version on the file system)\n"
12194"                [success, content, etags] = self.file.load_contents(None)\n"
12195"            except GObject.GError as e:\n"
12196"                print(\"Error: \" + e.message)\n"
12197"            # set the content as the text into the buffer\n"
12198"            self.buffer.set_text(content, len(content))\n"
12199"            print(\"opened: \" + open_dialog.get_filename())\n"
12200"        # if response is \"CANCEL\" (the button \"Cancel\" has been clicked)\n"
12201"        elif response_id == Gtk.ResponseType.CANCEL:\n"
12202"            print(\"cancelled: FileChooserAction.OPEN\")\n"
12203"        # destroy the FileChooserDialog\n"
12204"        dialog.destroy()\n"
12205"\n"
12206"    # callback function for save_as\n"
12207"    def save_as_callback(self, action, parameter):\n"
12208"        # create a filechooserdialog to save:\n"
12209"        # the arguments are: title of the window, parent_window, action,\n"
12210"        # (buttons, response)\n"
12211"        save_dialog = Gtk.FileChooserDialog(\"Pick a file\", self,\n"
12212"                                            Gtk.FileChooserAction.SAVE,\n"
12213"                                           (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,\n"
12214"                                            Gtk.STOCK_SAVE, Gtk.ResponseType.ACCEPT))\n"
12215"        # the dialog will present a confirmation dialog if the user types a file name that\n"
12216"        # already exists\n"
12217"        save_dialog.set_do_overwrite_confirmation(True)\n"
12218"        # dialog always on top of the textview window\n"
12219"        save_dialog.set_modal(True)\n"
12220"        # if self.file has already been saved\n"
12221"        if self.file is not None:\n"
12222"            try:\n"
12223"                # set self.file as the current filename for the file chooser\n"
12224"                save_dialog.set_file(self.file)\n"
12225"            except GObject.GError as e:\n"
12226"                print(\"Error: \" + e.message)\n"
12227"        # connect the dialog to the callback function save_response_cb()\n"
12228"        save_dialog.connect(\"response\", self.save_response_cb)\n"
12229"        # show the dialog\n"
12230"        save_dialog.show()\n"
12231"\n"
12232"    # callback function for the dialog save_dialog\n"
12233"    def save_response_cb(self, dialog, response_id):\n"
12234"        save_dialog = dialog\n"
12235"        # if response is \"ACCEPT\" (the button \"Save\" has been clicked)\n"
12236"        if response_id == Gtk.ResponseType.ACCEPT:\n"
12237"            # self.file is the currently selected file\n"
12238"            self.file = save_dialog.get_file()\n"
12239"            # save to file (see below)\n"
12240"            self.save_to_file()\n"
12241"        # if response is \"CANCEL\" (the button \"Cancel\" has been clicked)\n"
12242"        elif response_id == Gtk.ResponseType.CANCEL:\n"
12243"            print(\"cancelled: FileChooserAction.SAVE\")\n"
12244"        # destroy the FileChooserDialog\n"
12245"        dialog.destroy()\n"
12246"\n"
12247"    # callback function for save\n"
12248"    def save_callback(self, action, parameter):\n"
12249"        # if self.file is not already there\n"
12250"        if self.file is not None:\n"
12251"            self.save_to_file()\n"
12252"        # self.file is a new file\n"
12253"        else:\n"
12254"            # use save_as\n"
12255"            self.save_as_callback(action, parameter)\n"
12256"\n"
12257"    # save_to_file\n"
12258"    def save_to_file(self):\n"
12259"        # get the content of the buffer, without hidden characters\n"
12260"        [start, end] = self.buffer.get_bounds()\n"
12261"        current_contents = self.buffer.get_text(start, end, False)\n"
12262"        # if there is some content\n"
12263"        if current_contents != \"\":\n"
12264"            # set the content as content of self.file.\n"
12265"            # arguments: contents, etags, make_backup, flags, GError\n"
12266"            try:\n"
12267"                self.file.replace_contents(current_contents,\n"
12268"                                           None,\n"
12269"                                           False,\n"
12270"                                           Gio.FileCreateFlags.NONE,\n"
12271"                                           None)\n"
12272"                print(\"saved: \" + self.file.get_path())\n"
12273"            except GObject.GError as e:\n"
12274"                print(\"Error: \" + e.message)\n"
12275"        # if the contents are empty\n"
12276"        else:\n"
12277"            # create (if the file does not exist) or overwrite the file in readwrite mode.\n"
12278"            # arguments: etags, make_backup, flags, GError\n"
12279"            try:\n"
12280"                self.file.replace_readwrite(None,\n"
12281"                                            False,\n"
12282"                                            Gio.FileCreateFlags.NONE,\n"
12283"                                            None)\n"
12284"                print(\"saved: \" + self.file.get_path())\n"
12285"            except GObject.GError as e:\n"
12286"                print(\"Error: \" + e.message)\n"
12287"\n"
12288"\n"
12289"class MyApplication(Gtk.Application):\n"
12290"\n"
12291"    def __init__(self):\n"
12292"        Gtk.Application.__init__(self)\n"
12293"\n"
12294"    def do_activate(self):\n"
12295"        win = MyWindow(self)\n"
12296"        win.show_all()\n"
12297"\n"
12298"    def do_startup(self):\n"
12299"        Gtk.Application.do_startup(self)\n"
12300"\n"
12301"        # app action quit, connected to the callback function\n"
12302"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
12303"        quit_action.connect(\"activate\", self.quit_callback)\n"
12304"        self.add_action(quit_action)\n"
12305"\n"
12306"        # get the menu from the ui file with a builder\n"
12307"        builder = Gtk.Builder()\n"
12308"        try:\n"
12309"            builder.add_from_file(\"filechooserdialog.ui\")\n"
12310"        except:\n"
12311"            print(\"file not found\")\n"
12312"            sys.exit()\n"
12313"        menu = builder.get_object(\"appmenu\")\n"
12314"        self.set_app_menu(menu)\n"
12315"\n"
12316"    # callback function for quit\n"
12317"    def quit_callback(self, action, parameter):\n"
12318"        self.quit()\n"
12319"\n"
12320"app = MyApplication()\n"
12321"exit_status = app.run(sys.argv)\n"
12322"sys.exit(exit_status)\n"
12323
12324#. (itstool) path: section/title
12325#: C/filechooserdialog.py.page:58
12326msgid "Useful methods for a FileChooserDialog"
12327msgstr "FileChooserDialog에 쓸만한 메서드"
12328
12329#. (itstool) path: section/p
12330#: C/filechooserdialog.py.page:59
12331msgid ""
12332"Note that the action of the FileChooserDialog can be one of the following: <code>Gtk.FileChooserAction.OPEN</code> "
12333"(the file chooser will only let the user pick an existing file) <code>Gtk.FileChooserAction.SAVE</code> (the file "
12334"chooser will let the user pick an existing file, or type in a new filename), <code>Gtk.FileChooserAction."
12335"SELECT_FOLDER</code> (the file chooser will let the user pick an existing folder), <code>Gtk.FileChooserAction."
12336"CREATE_FOLDER</code> (the file chooser will let the user name an existing or new folder)."
12337msgstr ""
12338"참고로 FileChooserDialog 동작은 <code>Gtk.FileChooserAction.OPEN</code>(사용자가 기존 파일을 선택하기만 할 수 있"
12339"음) <code>Gtk.FileChooserAction.SAVE</code>(사용자가 기존 파일을 선택하거나, 새 파일 이름을 입력할 수 있음), "
12340"<code>Gtk.FileChooserAction.SELECT_FOLDER</code>(사용자가 기존 폴더를 선택하기만 할 수 있음), <code>Gtk."
12341"FileChooserAction.CREATE_FOLDER</code>(사용자가 기존 폴더를 선택하거나, 새 폴더 이름을 입력할 수 있음) 중 하나일 "
12342"수 있습니다."
12343
12344#. (itstool) path: section/p
12345#: C/filechooserdialog.py.page:60
12346msgid "Besides the methods used in the <link xref=\"#code\"/>, we have:"
12347msgstr "<link xref=\"#code\"/>에서 사용한 메서드 주변을 보자면:"
12348
12349#. (itstool) path: item/p
12350#: C/filechooserdialog.py.page:62
12351msgid "<code>set_show_hidden(True)</code> is used to display hidden files and folders."
12352msgstr "<code>set_show_hidden(True)</code> 함수로 숨김 파일과 숨김 폴더를 나타냈습니다."
12353
12354#. (itstool) path: item/p
12355#: C/filechooserdialog.py.page:63
12356msgid ""
12357"<code>set_select_multiple(True)</code> sets that multiple files can be selected. This is only relevant if the mode "
12358"is <code>Gtk.FileChooserAction.OPEN</code> or <code>Gtk.FileChooserAction.SELECT_FOLDER</code>."
12359msgstr ""
12360"<code>set_select_multiple(True)</code> 함수로 여러 파일을 선택할 수 있게 했습니다. <code>Gtk.FileChooserAction."
12361"OPEN</code> 또는 <code>Gtk.FileChooserAction.SELECT_FOLDER</code> 모드일 때만 가능합니다."
12362
12363#. (itstool) path: item/p
12364#: C/filechooserdialog.py.page:64
12365msgid ""
12366"In a \"Save as\" dialog, <code>set_current_name(current_name)</code> sets <code>current_name</code> in the file "
12367"selector, as if entered by the user; <code>current_name</code> can be something like <em>Untitled.txt</em>. This "
12368"method should not be used except in a \"Save as\" dialog."
12369msgstr ""
12370"\"다른 이름으로 저장\" 대화 상자에서 <code>set_current_name(current_name)</code> 함수로 파일 선택 창의 "
12371"<code>current_name</code>을 마치 사용자가 입력한 것처럼 설정했습니다. <code>current_name</code> 값은 <em>Untitled."
12372"txt</em>와 같은 값이 될 수 있습니다. 이 메서드는 \"다른 이름으로 저장\" 대화상자를 제외하고느 사용하지 않는게 좋습"
12373"니다."
12374
12375#. (itstool) path: item/p
12376#: C/filechooserdialog.py.page:65
12377msgid ""
12378"The default current folder is \"recent items\". To set another folder use <code>set_current_folder_uri(uri)</"
12379"code>; but note you should use this method and cause the file chooser to show a specific folder only when you are "
12380"doing a \"Save as\" command and you already have a file saved somewhere."
12381msgstr ""
12382"기본 현재 폴더는 \"최근 항목\" 입니다. 다른 폴더를 지정하려면 <code>set_current_folder_uri(uri)</code> 함수를 사용"
12383"하십시오. 그러나 참고로 \"다른 이름으로 저장\" 명령을 사용하거나 이미 파일을 어딘가에 저장했을 경우에만 이 메서드"
12384"를 사용하여 파일 선택 대화상자를 통해 지정 폴더를 나타내야합니다."
12385
12386#. (itstool) path: item/p
12387#: C/filechooserdialog.py.page:73
12388msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkFileChooserDialog.html\">GtkFileChooserDialog</link>"
12389msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkFileChooserDialog.html\">GtkFileChooserDialog</link>"
12390
12391#. (itstool) path: item/p
12392#: C/filechooserdialog.py.page:74
12393msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkFileChooser.html\">GtkFileChooser</link>"
12394msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkFileChooser.html\">GtkFileChooser</link>"
12395
12396#. (itstool) path: item/p
12397#: C/filechooserdialog.py.page:75 C/image.c.page:34 C/label.c.page:38 C/menubar.c.page:38 C/scrolledwindow.c.page:35
12398msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkWindow.html\">GtkWindow</link>"
12399msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkWindow.html\">GtkWindow</link>"
12400
12401#. (itstool) path: item/p
12402#: C/filechooserdialog.py.page:76 C/textview.c.page:39
12403msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkTextView.html\">GtkTextView</link>"
12404msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkTextView.html\">GtkTextView</link>"
12405
12406#. (itstool) path: item/p
12407#: C/filechooserdialog.py.page:77 C/textview.c.page:38
12408msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkTextBuffer.html\">GtkTextBuffer</link>"
12409msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkTextBuffer.html\">GtkTextBuffer</link>"
12410
12411#. (itstool) path: item/p
12412#: C/filechooserdialog.py.page:78 C/scrolledwindow.c.page:36 C/textview.c.page:40
12413msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkScrolledWindow.html\">GtkScrolledWindow</link>"
12414msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkScrolledWindow.html\">GtkScrolledWindow</link>"
12415
12416#. (itstool) path: item/p
12417#: C/filechooserdialog.py.page:79
12418msgid "<link href=\"http://developer.gnome.org/gio/stable/GFile.html\">GFile</link>"
12419msgstr "<link href=\"http://developer.gnome.org/gio/stable/GFile.html\">GFile</link>"
12420
12421#. (itstool) path: item/p
12422#: C/filechooserdialog.py.page:81
12423msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkBuilder.html\">GtkBuilder</link>"
12424msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkBuilder.html\">GtkBuilder</link>"
12425
12426#. (itstool) path: info/title
12427#: C/filechooserdialog.vala.page:8
12428msgctxt "text"
12429msgid "FileChooserDialog (Vala)"
12430msgstr "FileChooserDialog (Vala)"
12431
12432#. (itstool) path: info/desc
12433#: C/filechooserdialog.vala.page:21
12434msgid "A dialog suitable for \"Open\" and \"Save\" commands."
12435msgstr "\"열기\" 및 \"저장\" 명령에 알맞은 대화상자입니다."
12436
12437#. (itstool) path: section/title
12438#: C/filechooserdialog.vala.page:26
12439msgid "Overview of the example"
12440msgstr "예제 살펴보기"
12441
12442#. (itstool) path: section/p
12443#: C/filechooserdialog.vala.page:27
12444msgid ""
12445"This example demonstrates how the FileChooserDialog can be used. It is incorporated into a very simple text editor "
12446"application. All the <link xref=\"menubar.vala#win-app\">actions</link>, including the \"open\", \"save\" and "
12447"\"save-as\" commands can be found in the <link xref=\"gmenu.vala\">app-menu</link>. Here, the app-menu is created "
12448"using an XML UI file, which is then imported into the application using Gtk.Builder."
12449msgstr ""
12450"이 예제는 FileChooserDialog를 어떻게 사용할 수 있는지 보여줍니다. 파일 선택 대화상자는 간단한 텍스트 편집기 프로그"
12451"램에 있습니다. \"열기\", \"저장\", \"다른 이름으로 저장\" 명령과 같은 모든 <link xref=\"menubar.vala#win-app\">동작"
12452"</link>은 <link xref=\"gmenu.vala\">app-menu</link>에서 찾을 수 있으며, 여기서 app-menu는 XML UI 파일로 만들고, "
12453"Gtk.Builder로 프로그램에 가져올 수 있습니다."
12454
12455#. (itstool) path: section/title
12456#: C/filechooserdialog.vala.page:29
12457msgid "XML UI file which creates the app-menu"
12458msgstr "app-menu를 만드는 XML UI 파일"
12459
12460#. (itstool) path: section/title
12461#: C/filechooserdialog.vala.page:32
12462msgid "Vala Code"
12463msgstr "Vala 코드"
12464
12465#. (itstool) path: section/code
12466#: C/filechooserdialog.vala.page:33
12467#, no-wrap
12468msgid ""
12469"class MyWindow: Gtk.ApplicationWindow {\n"
12470"\n"
12471"\t/* MyWindow instance variables. */\n"
12472"\tGLib.File? file;\n"
12473"\tGtk.TextBuffer buffer;\n"
12474"\tGtk.TextView textview;\n"
12475"\tGtk.ScrolledWindow scrolled_window;\n"
12476"\n"
12477"\t/* Create ActionEntries. */\n"
12478"\tconst ActionEntry[] actions = {\n"
12479"\t\t{ \"new\", new_cb },\n"
12480"\t\t{ \"open\", open_cb },\n"
12481"\t\t{ \"save\", save_cb },\n"
12482"\t\t{ \"save-as\", save_as_cb }\n"
12483"\t};\n"
12484"\n"
12485"\t/* Constructor creates MyWindow, and add the scrolled_window. */\n"
12486"\tinternal MyWindow (MyApplication app) {\n"
12487"\t\tObject (application: app, title: \"FileChooserDialog Example\");\n"
12488"\t\tthis.set_default_size (400, 400);\n"
12489"\n"
12490"\t\t/* Add the ActionEntries to MyWindow. */\n"
12491"\t\tthis.add_action_entries (actions, this);\n"
12492"\n"
12493"\t\tbuffer = new Gtk.TextBuffer (null); //stores text to be displayed\n"
12494"\t\ttextview = new Gtk.TextView.with_buffer (buffer); //displays TextBuffer\n"
12495"\t\ttextview.set_wrap_mode (Gtk.WrapMode.WORD); //sets line wrapping\n"
12496"\n"
12497"\t\tscrolled_window = new Gtk.ScrolledWindow (null, null);\n"
12498"\t\tscrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC,\n"
12499"\t\t                            Gtk.PolicyType.AUTOMATIC);\n"
12500"\n"
12501"\t\tscrolled_window.add (textview);\n"
12502"\t\tscrolled_window.set_border_width (5);\n"
12503"\n"
12504"        this.add (scrolled_window);\n"
12505"\t\tthis.show_all ();\n"
12506"\t}\n"
12507"\n"
12508"\tvoid new_cb (SimpleAction action, Variant? parameter) {\n"
12509"\t\tfile = null;\n"
12510"\t\tbuffer.set_text (\"\");\n"
12511"\t\tprint (\"New file created\\n\");\n"
12512"\t}\n"
12513"\n"
12514"\t/* Create FileChooserDialog in OPEN mode. */\n"
12515"\tvoid open_cb (SimpleAction action, Variant? parameter) {\n"
12516"\n"
12517"\t\tvar open_dialog = new Gtk.FileChooserDialog (\"Pick a file\",\n"
12518"\t\t                                             this as Gtk.Window,\n"
12519"\t\t                                             Gtk.FileChooserAction.OPEN,\n"
12520"\t\t                                             Gtk.Stock.CANCEL,\n"
12521"\t\t                                             Gtk.ResponseType.CANCEL,\n"
12522"\t\t                                             Gtk.Stock.OPEN,\n"
12523"\t\t                                             Gtk.ResponseType.ACCEPT);\n"
12524"\n"
12525"\t\topen_dialog.local_only = false; //allow for uri\n"
12526"\t\topen_dialog.set_modal (true);\n"
12527"\t\topen_dialog.response.connect (open_response_cb);\n"
12528"\t\topen_dialog.show ();\n"
12529"\t}\n"
12530"\n"
12531"\t/* Either open the file and load the file contents or cancel. */\n"
12532"\tvoid open_response_cb (Gtk.Dialog dialog, int response_id) {\n"
12533"\t\tvar open_dialog = dialog as Gtk.FileChooserDialog;\n"
12534"\n"
12535"\t\tswitch (response_id) {\n"
12536"\t\t\tcase Gtk.ResponseType.ACCEPT: //open the file\n"
12537"\t\t\t\tfile = open_dialog.get_file();\n"
12538"\n"
12539"\t\t\t\tuint8[] file_contents;\n"
12540"\n"
12541"\t\t\t\ttry {\n"
12542"\t\t\t\t\tfile.load_contents (null, out file_contents, null);\n"
12543"\t\t\t\t}\n"
12544"\t\t\t\tcatch (GLib.Error err) { //handle the exception\n"
12545"\t\t\t\t\terror (\"%s\\n\", err.message);\n"
12546"\t\t\t\t}\n"
12547"\t\t\t\t/* Set the buffer text to be the contents of the file. */\n"
12548"\t\t\t\tbuffer.set_text ((string) file_contents,\n"
12549"\t\t\t\t                 file_contents.length);\n"
12550"\n"
12551"\t\t\t\tprint (\"opened: %s\\n\", (open_dialog.get_filename ()));\n"
12552"\t\t\t\tbreak;\n"
12553"\n"
12554"\t\t\tcase Gtk.ResponseType.CANCEL:\n"
12555"\t\t\t\tprint (\"cancelled: FileChooserAction.OPEN\\n\");\n"
12556"\t\t\t\tbreak;\n"
12557"\t\t}\n"
12558"\t\tdialog.destroy ();\n"
12559"\t}\n"
12560"\n"
12561"\n"
12562"\t/* Create FileChooserDialog in SAVE mode. */\n"
12563"\tvoid save_as_cb (SimpleAction action, Variant? parameter) {\n"
12564"\t\tvar save_dialog = new Gtk.FileChooserDialog (\"Pick a file\",\n"
12565"\t\t                                             this as Gtk.Window,\n"
12566"\t\t                                             Gtk.FileChooserAction.SAVE,\n"
12567"\t\t                                             Gtk.Stock.CANCEL,\n"
12568"\t\t                                             Gtk.ResponseType.CANCEL,\n"
12569"\t\t                                             Gtk.Stock.SAVE,\n"
12570"\t\t                                             Gtk.ResponseType.ACCEPT);\n"
12571"\n"
12572"\t\tsave_dialog.set_do_overwrite_confirmation (true);\n"
12573"\t\tsave_dialog.set_modal (true);\n"
12574"\t\tif (file != null) {\n"
12575"\t\t\ttry {\n"
12576"\t\t\t\t(save_dialog as Gtk.FileChooser).set_file (file);\n"
12577"\t\t\t}\n"
12578"\t\t\tcatch (GLib.Error error) {\n"
12579"\t\t\t\tprint (\"%s\\n\", error.message);\n"
12580"\t\t\t}\n"
12581"\t\t}\n"
12582"\t\tsave_dialog.response.connect (save_as_response_cb);\n"
12583"\t\tsave_dialog.show ();\n"
12584"\t}\n"
12585"\n"
12586"\tvoid save_as_response_cb (Gtk.Dialog dialog, int response_id) {\n"
12587"\t\tvar save_dialog = dialog as Gtk.FileChooserDialog;\n"
12588"\n"
12589"\t\tswitch (response_id) {\n"
12590"\t\t\tcase Gtk.ResponseType.ACCEPT:\n"
12591"\t\t\t\tfile = save_dialog.get_file();\n"
12592"\t\t\t\tthis.save_to_file ();\n"
12593"\t\t\t\tbreak;\n"
12594"\t\t\tdefault:\n"
12595"\t\t\t\tbreak;\n"
12596"\t\t}\n"
12597"\t\t\tdialog.destroy ();\n"
12598"\t}\n"
12599"\n"
12600"\t/* Save the existing contents to the file.\n"
12601"\t * If file does not exist, call save_as_cb.\n"
12602"\t */\n"
12603"\tvoid save_cb (SimpleAction action, Variant? parameter) {\n"
12604"\t\tif (file != null) {\n"
12605"\t\t\tthis.save_to_file ();\n"
12606"\t\t}\n"
12607"\t\telse {\n"
12608"\t\t\tsave_as_cb (action, parameter);\n"
12609"\t\t}\n"
12610"\t}\n"
12611"\n"
12612"\tvoid save_to_file (){\n"
12613"\t\tGtk.TextIter start;\n"
12614"\t\tGtk.TextIter end;\n"
12615"\n"
12616"\t\tbuffer.get_bounds (out start, out end);\n"
12617"\t\tstring current_contents = buffer.get_text (start, end, false);\n"
12618"\t\ttry {\n"
12619"\t\t\t\tfile.replace_contents (current_contents.data, null, false,\n"
12620"\t\t\t\t                       GLib.FileCreateFlags.NONE, null, null);\n"
12621"\n"
12622"\t\t\t\tprint (\"saved: %s\\n\", file.get_path ());\n"
12623"\t\t}\n"
12624"\t\tcatch (GLib.Error err) {\n"
12625"\t\t\terror (\"%s\\n\", err.message);\n"
12626"\t\t}\n"
12627"\t}\n"
12628"}\n"
12629"\n"
12630"/* This is the application */\n"
12631"class MyApplication: Gtk.Application {\n"
12632"\tprotected override void activate () {\n"
12633"\t\tnew MyWindow (this).show_all;\n"
12634"\t}\n"
12635"\n"
12636"\tconst ActionEntry[] actions = {\n"
12637"\t\t{ \"quit\", quit_cb }\n"
12638"\t};\n"
12639"\n"
12640"\tvoid quit_cb (SimpleAction action, Variant? parameter) {\n"
12641"\t\tthis.quit ();\n"
12642"\t}\n"
12643"\n"
12644"\tprotected override void startup () {\n"
12645"\t\tbase.startup ();\n"
12646"\n"
12647"\t\t/* Setup actions */\n"
12648"\t\tthis.add_action_entries (actions, this);\n"
12649"\n"
12650"\t\t/* Setup menus */\n"
12651"\t\tvar builder = new Gtk.Builder ();\n"
12652"\t\ttry {\n"
12653"\t\t\tbuilder.add_from_file (\"filechooserdialog.ui\");\n"
12654"\t\t} catch (GLib.Error err) {\n"
12655"\t\t\terror (\"Unable to load file: %s\\n\", err.message);\n"
12656"\t\t}\n"
12657"\t\tthis.app_menu = builder.get_object (\"appmenu\") as MenuModel;\n"
12658"\t}\n"
12659"}\n"
12660"\n"
12661"/* main creates and runs the application. */\n"
12662"public int main (string[] args) {\n"
12663"\treturn new MyApplication ().run (args);\n"
12664"}\n"
12665msgstr ""
12666"class MyWindow: Gtk.ApplicationWindow {\n"
12667"\n"
12668"\t/* MyWindow instance variables. */\n"
12669"\tGLib.File? file;\n"
12670"\tGtk.TextBuffer buffer;\n"
12671"\tGtk.TextView textview;\n"
12672"\tGtk.ScrolledWindow scrolled_window;\n"
12673"\n"
12674"\t/* Create ActionEntries. */\n"
12675"\tconst ActionEntry[] actions = {\n"
12676"\t\t{ \"new\", new_cb },\n"
12677"\t\t{ \"open\", open_cb },\n"
12678"\t\t{ \"save\", save_cb },\n"
12679"\t\t{ \"save-as\", save_as_cb }\n"
12680"\t};\n"
12681"\n"
12682"\t/* Constructor creates MyWindow, and add the scrolled_window. */\n"
12683"\tinternal MyWindow (MyApplication app) {\n"
12684"\t\tObject (application: app, title: \"FileChooserDialog Example\");\n"
12685"\t\tthis.set_default_size (400, 400);\n"
12686"\n"
12687"\t\t/* Add the ActionEntries to MyWindow. */\n"
12688"\t\tthis.add_action_entries (actions, this);\n"
12689"\n"
12690"\t\tbuffer = new Gtk.TextBuffer (null); //stores text to be displayed\n"
12691"\t\ttextview = new Gtk.TextView.with_buffer (buffer); //displays TextBuffer\n"
12692"\t\ttextview.set_wrap_mode (Gtk.WrapMode.WORD); //sets line wrapping\n"
12693"\n"
12694"\t\tscrolled_window = new Gtk.ScrolledWindow (null, null);\n"
12695"\t\tscrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC,\n"
12696"\t\t                            Gtk.PolicyType.AUTOMATIC);\n"
12697"\n"
12698"\t\tscrolled_window.add (textview);\n"
12699"\t\tscrolled_window.set_border_width (5);\n"
12700"\n"
12701"        this.add (scrolled_window);\n"
12702"\t\tthis.show_all ();\n"
12703"\t}\n"
12704"\n"
12705"\tvoid new_cb (SimpleAction action, Variant? parameter) {\n"
12706"\t\tfile = null;\n"
12707"\t\tbuffer.set_text (\"\");\n"
12708"\t\tprint (\"New file created\\n\");\n"
12709"\t}\n"
12710"\n"
12711"\t/* Create FileChooserDialog in OPEN mode. */\n"
12712"\tvoid open_cb (SimpleAction action, Variant? parameter) {\n"
12713"\n"
12714"\t\tvar open_dialog = new Gtk.FileChooserDialog (\"Pick a file\",\n"
12715"\t\t                                             this as Gtk.Window,\n"
12716"\t\t                                             Gtk.FileChooserAction.OPEN,\n"
12717"\t\t                                             Gtk.Stock.CANCEL,\n"
12718"\t\t                                             Gtk.ResponseType.CANCEL,\n"
12719"\t\t                                             Gtk.Stock.OPEN,\n"
12720"\t\t                                             Gtk.ResponseType.ACCEPT);\n"
12721"\n"
12722"\t\topen_dialog.local_only = false; //allow for uri\n"
12723"\t\topen_dialog.set_modal (true);\n"
12724"\t\topen_dialog.response.connect (open_response_cb);\n"
12725"\t\topen_dialog.show ();\n"
12726"\t}\n"
12727"\n"
12728"\t/* Either open the file and load the file contents or cancel. */\n"
12729"\tvoid open_response_cb (Gtk.Dialog dialog, int response_id) {\n"
12730"\t\tvar open_dialog = dialog as Gtk.FileChooserDialog;\n"
12731"\n"
12732"\t\tswitch (response_id) {\n"
12733"\t\t\tcase Gtk.ResponseType.ACCEPT: //open the file\n"
12734"\t\t\t\tfile = open_dialog.get_file();\n"
12735"\n"
12736"\t\t\t\tuint8[] file_contents;\n"
12737"\n"
12738"\t\t\t\ttry {\n"
12739"\t\t\t\t\tfile.load_contents (null, out file_contents, null);\n"
12740"\t\t\t\t}\n"
12741"\t\t\t\tcatch (GLib.Error err) { //handle the exception\n"
12742"\t\t\t\t\terror (\"%s\\n\", err.message);\n"
12743"\t\t\t\t}\n"
12744"\t\t\t\t/* Set the buffer text to be the contents of the file. */\n"
12745"\t\t\t\tbuffer.set_text ((string) file_contents,\n"
12746"\t\t\t\t                 file_contents.length);\n"
12747"\n"
12748"\t\t\t\tprint (\"opened: %s\\n\", (open_dialog.get_filename ()));\n"
12749"\t\t\t\tbreak;\n"
12750"\n"
12751"\t\t\tcase Gtk.ResponseType.CANCEL:\n"
12752"\t\t\t\tprint (\"cancelled: FileChooserAction.OPEN\\n\");\n"
12753"\t\t\t\tbreak;\n"
12754"\t\t}\n"
12755"\t\tdialog.destroy ();\n"
12756"\t}\n"
12757"\n"
12758"\n"
12759"\t/* Create FileChooserDialog in SAVE mode. */\n"
12760"\tvoid save_as_cb (SimpleAction action, Variant? parameter) {\n"
12761"\t\tvar save_dialog = new Gtk.FileChooserDialog (\"Pick a file\",\n"
12762"\t\t                                             this as Gtk.Window,\n"
12763"\t\t                                             Gtk.FileChooserAction.SAVE,\n"
12764"\t\t                                             Gtk.Stock.CANCEL,\n"
12765"\t\t                                             Gtk.ResponseType.CANCEL,\n"
12766"\t\t                                             Gtk.Stock.SAVE,\n"
12767"\t\t                                             Gtk.ResponseType.ACCEPT);\n"
12768"\n"
12769"\t\tsave_dialog.set_do_overwrite_confirmation (true);\n"
12770"\t\tsave_dialog.set_modal (true);\n"
12771"\t\tif (file != null) {\n"
12772"\t\t\ttry {\n"
12773"\t\t\t\t(save_dialog as Gtk.FileChooser).set_file (file);\n"
12774"\t\t\t}\n"
12775"\t\t\tcatch (GLib.Error error) {\n"
12776"\t\t\t\tprint (\"%s\\n\", error.message);\n"
12777"\t\t\t}\n"
12778"\t\t}\n"
12779"\t\tsave_dialog.response.connect (save_as_response_cb);\n"
12780"\t\tsave_dialog.show ();\n"
12781"\t}\n"
12782"\n"
12783"\tvoid save_as_response_cb (Gtk.Dialog dialog, int response_id) {\n"
12784"\t\tvar save_dialog = dialog as Gtk.FileChooserDialog;\n"
12785"\n"
12786"\t\tswitch (response_id) {\n"
12787"\t\t\tcase Gtk.ResponseType.ACCEPT:\n"
12788"\t\t\t\tfile = save_dialog.get_file();\n"
12789"\t\t\t\tthis.save_to_file ();\n"
12790"\t\t\t\tbreak;\n"
12791"\t\t\tdefault:\n"
12792"\t\t\t\tbreak;\n"
12793"\t\t}\n"
12794"\t\t\tdialog.destroy ();\n"
12795"\t}\n"
12796"\n"
12797"\t/* Save the existing contents to the file.\n"
12798"\t * If file does not exist, call save_as_cb.\n"
12799"\t */\n"
12800"\tvoid save_cb (SimpleAction action, Variant? parameter) {\n"
12801"\t\tif (file != null) {\n"
12802"\t\t\tthis.save_to_file ();\n"
12803"\t\t}\n"
12804"\t\telse {\n"
12805"\t\t\tsave_as_cb (action, parameter);\n"
12806"\t\t}\n"
12807"\t}\n"
12808"\n"
12809"\tvoid save_to_file (){\n"
12810"\t\tGtk.TextIter start;\n"
12811"\t\tGtk.TextIter end;\n"
12812"\n"
12813"\t\tbuffer.get_bounds (out start, out end);\n"
12814"\t\tstring current_contents = buffer.get_text (start, end, false);\n"
12815"\t\ttry {\n"
12816"\t\t\t\tfile.replace_contents (current_contents.data, null, false,\n"
12817"\t\t\t\t                       GLib.FileCreateFlags.NONE, null, null);\n"
12818"\n"
12819"\t\t\t\tprint (\"saved: %s\\n\", file.get_path ());\n"
12820"\t\t}\n"
12821"\t\tcatch (GLib.Error err) {\n"
12822"\t\t\terror (\"%s\\n\", err.message);\n"
12823"\t\t}\n"
12824"\t}\n"
12825"}\n"
12826"\n"
12827"/* This is the application */\n"
12828"class MyApplication: Gtk.Application {\n"
12829"\tprotected override void activate () {\n"
12830"\t\tnew MyWindow (this).show_all;\n"
12831"\t}\n"
12832"\n"
12833"\tconst ActionEntry[] actions = {\n"
12834"\t\t{ \"quit\", quit_cb }\n"
12835"\t};\n"
12836"\n"
12837"\tvoid quit_cb (SimpleAction action, Variant? parameter) {\n"
12838"\t\tthis.quit ();\n"
12839"\t}\n"
12840"\n"
12841"\tprotected override void startup () {\n"
12842"\t\tbase.startup ();\n"
12843"\n"
12844"\t\t/* Setup actions */\n"
12845"\t\tthis.add_action_entries (actions, this);\n"
12846"\n"
12847"\t\t/* Setup menus */\n"
12848"\t\tvar builder = new Gtk.Builder ();\n"
12849"\t\ttry {\n"
12850"\t\t\tbuilder.add_from_file (\"filechooserdialog.ui\");\n"
12851"\t\t} catch (GLib.Error err) {\n"
12852"\t\t\terror (\"Unable to load file: %s\\n\", err.message);\n"
12853"\t\t}\n"
12854"\t\tthis.app_menu = builder.get_object (\"appmenu\") as MenuModel;\n"
12855"\t}\n"
12856"}\n"
12857"\n"
12858"/* main creates and runs the application. */\n"
12859"public int main (string[] args) {\n"
12860"\treturn new MyApplication ().run (args);\n"
12861"}\n"
12862
12863#. (itstool) path: section/title
12864#: C/filechooserdialog.vala.page:35 C/menubar.vala.page:187
12865msgid "Relevant API documentation"
12866msgstr "관련 API 문서"
12867
12868#. (itstool) path: item/p
12869#: C/filechooserdialog.vala.page:40
12870msgid "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.FileChooser.html\">FileChooser</link>"
12871msgstr "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.FileChooser.html\">FileChooser</link>"
12872
12873#. (itstool) path: item/p
12874#: C/filechooserdialog.vala.page:41
12875msgid "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.FileChooserDialog.html\">FileChooserDialog</link>"
12876msgstr "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.FileChooserDialog.html\">FileChooserDialog</link>"
12877
12878#. (itstool) path: item/p
12879#: C/filechooserdialog.vala.page:42
12880msgid "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.Builder.html\">Gtk.Builder</link>"
12881msgstr "<link href=\"http://valadoc.org/gtk+-3.0/Gtk.Builder.html\">Gtk.Builder</link>"
12882
12883#. (itstool) path: item/p
12884#: C/filechooserdialog.vala.page:43
12885msgid "<link href=\"http://valadoc.org/gio-2.0/GLib.ActionEntry.html\">GLib.ActionEntry</link>"
12886msgstr "<link href=\"http://valadoc.org/gio-2.0/GLib.ActionEntry.html\">GLib.ActionEntry</link>"
12887
12888#. (itstool) path: info/title
12889#: C/fontchooserwidget.js.page:8
12890msgctxt "text"
12891msgid "FontChooserWidget (JavaScript)"
12892msgstr "FontChooserWidget (JavaScript)"
12893
12894#. (itstool) path: info/desc
12895#: C/fontchooserwidget.js.page:18 C/fontchooserwidget.py.page:20 C/fontchooserwidget.vala.page:18
12896msgid "A widget to choose a font"
12897msgstr "글꼴을 선택하는 위젯"
12898
12899#. (itstool) path: page/title
12900#: C/fontchooserwidget.js.page:21 C/fontchooserwidget.py.page:23 C/fontchooserwidget.vala.page:21
12901msgid "FontChooserWidget"
12902msgstr "FontChooserWidget"
12903
12904#. (itstool) path: page/media
12905#. This is a reference to an external file such as an image or video. When
12906#. the file changes, the md5 hash will change to let you know you need to
12907#. update your localized copy. The msgstr is not used at all. Set it to
12908#. whatever you like once you have updated your copy of the file.
12909#: C/fontchooserwidget.js.page:23 C/fontchooserwidget.py.page:25 C/fontchooserwidget.vala.page:23
12910msgctxt "_"
12911msgid "external ref='media/fontchooserwidget.png' md5='9161245e307b432ae1313e9a9941edae'"
12912msgstr ""
12913
12914#. (itstool) path: page/p
12915#: C/fontchooserwidget.js.page:24 C/fontchooserwidget.py.page:26
12916msgid "A FontChooserWidget with a callback function."
12917msgstr "콜백 함수와 사용하는 FontChooserWidget입니다."
12918
12919#. (itstool) path: section/code
12920#: C/fontchooserwidget.js.page:30
12921#, no-wrap
12922#| msgid ""
12923#| "//!/usr/bin/gjs\n"
12924#| "\n"
12925#| "imports.gi.versions.Gtk = '3.0';\n"
12926#| "const Gtk = imports.gi.Gtk;\n"
12927#| "\n"
12928#| "class FontChooserWidgetExample {\n"
12929#| "\n"
12930#| "    // Create the application itthis\n"
12931#| "    constructor() {\n"
12932#| "        this.application = new Gtk.Application({ application_id: 'org.example.fontchooserwidget' });\n"
12933#| "\n"
12934#| "        // Connect 'activate' and 'startup' signals to the callback functions\n"
12935#| "        this.application.connect('activate', this._onActivate.bind(this));\n"
12936#| "        this.application.connect('startup', this._onStartup.bind(this));\n"
12937#| "    }\n"
12938#| "\n"
12939#| "    // Callback function for 'activate' signal presents windows when active\n"
12940#| "    _onActivate() {\n"
12941#| "        this.window.present();\n"
12942#| "    }\n"
12943#| "\n"
12944#| "    // Callback function for 'startup' signal builds the UI\n"
12945#| "    _onStartup() {\n"
12946#| "        this._buildUI();\n"
12947#| "    }\n"
12948#| "\n"
12949#| "    // Build the application's UI\n"
12950#| "    _buildUI() {\n"
12951#| "        // Create the application window\n"
12952#| "        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
12953#| "                                                    window_position: Gtk.WindowPosition.CENTER,\n"
12954#| "                                                    title: \"FontChooserWidget\",\n"
12955#| "                                                    default_width: 200,\n"
12956#| "                                                    default_height: 200,\n"
12957#| "                                                    border_width: 10 });\n"
12958#| "\n"
12959#| "        this.fontChooser = new Gtk.FontChooserWidget();\n"
12960#| "        // a default font\n"
12961#| "        this.fontChooser.set_font(\"Sans\");\n"
12962#| "        // a text to preview the font\n"
12963#| "        this.fontChooser.set_preview_text(\"This is an example of preview text!\");\n"
12964#| "\n"
12965#| "        // connect signal from the font chooser to the callback function\n"
12966#| "        this.fontChooser.connect(\"notify::font\", this._fontCb.bind(this));\n"
12967#| "\n"
12968#| "        // add the font chooser to the window\n"
12969#| "        this.window.add(this.fontChooser);\n"
12970#| "        this.window.show_all();\n"
12971#| "   }\n"
12972#| "\n"
12973#| "     // callback function:\n"
12974#| "     _fontCb() {\n"
12975#| "        // print in the terminal\n"
12976#| "        print(\"You chose the font \" + this.fontChooser.get_font());\n"
12977#| "    }\n"
12978#| "};\n"
12979#| "\n"
12980#| "// Run the application\n"
12981#| "let app = new FontChooserWidgetExample();\n"
12982#| "app.application.run (ARGV);\n"
12983msgid ""
12984"//!/usr/bin/gjs\n"
12985"\n"
12986"imports.gi.versions.Gtk = '3.0';\n"
12987"const Gtk = imports.gi.Gtk;\n"
12988"\n"
12989"class FontChooserWidgetExample {\n"
12990"\n"
12991"    // Create the application itself\n"
12992"    constructor() {\n"
12993"        this.application = new Gtk.Application({ application_id: 'org.example.fontchooserwidget' });\n"
12994"\n"
12995"        // Connect 'activate' and 'startup' signals to the callback functions\n"
12996"        this.application.connect('activate', this._onActivate.bind(this));\n"
12997"        this.application.connect('startup', this._onStartup.bind(this));\n"
12998"    }\n"
12999"\n"
13000"    // Callback function for 'activate' signal presents windows when active\n"
13001"    _onActivate() {\n"
13002"        this.window.present();\n"
13003"    }\n"
13004"\n"
13005"    // Callback function for 'startup' signal builds the UI\n"
13006"    _onStartup() {\n"
13007"        this._buildUI();\n"
13008"    }\n"
13009"\n"
13010"    // Build the application's UI\n"
13011"    _buildUI() {\n"
13012"        // Create the application window\n"
13013"        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
13014"                                                    window_position: Gtk.WindowPosition.CENTER,\n"
13015"                                                    title: \"FontChooserWidget\",\n"
13016"                                                    default_width: 200,\n"
13017"                                                    default_height: 200,\n"
13018"                                                    border_width: 10 });\n"
13019"\n"
13020"        this.fontChooser = new Gtk.FontChooserWidget();\n"
13021"        // a default font\n"
13022"        this.fontChooser.set_font(\"Sans\");\n"
13023"        // a text to preview the font\n"
13024"        this.fontChooser.set_preview_text(\"This is an example of preview text!\");\n"
13025"\n"
13026"        // connect signal from the font chooser to the callback function\n"
13027"        this.fontChooser.connect(\"notify::font\", this._fontCb.bind(this));\n"
13028"\n"
13029"        // add the font chooser to the window\n"
13030"        this.window.add(this.fontChooser);\n"
13031"        this.window.show_all();\n"
13032"   }\n"
13033"\n"
13034"     // callback function:\n"
13035"     _fontCb() {\n"
13036"        // print in the terminal\n"
13037"        print(\"You chose the font \" + this.fontChooser.get_font());\n"
13038"    }\n"
13039"};\n"
13040"\n"
13041"// Run the application\n"
13042"let app = new FontChooserWidgetExample();\n"
13043"app.application.run (ARGV);\n"
13044msgstr ""
13045"//!/usr/bin/gjs\n"
13046"\n"
13047"imports.gi.versions.Gtk = '3.0';\n"
13048"const Gtk = imports.gi.Gtk;\n"
13049"\n"
13050"class FontChooserWidgetExample {\n"
13051"\n"
13052"    // Create the application itself\n"
13053"    constructor() {\n"
13054"        this.application = new Gtk.Application({ application_id: 'org.example.fontchooserwidget' });\n"
13055"\n"
13056"        // Connect 'activate' and 'startup' signals to the callback functions\n"
13057"        this.application.connect('activate', this._onActivate.bind(this));\n"
13058"        this.application.connect('startup', this._onStartup.bind(this));\n"
13059"    }\n"
13060"\n"
13061"    // Callback function for 'activate' signal presents windows when active\n"
13062"    _onActivate() {\n"
13063"        this.window.present();\n"
13064"    }\n"
13065"\n"
13066"    // Callback function for 'startup' signal builds the UI\n"
13067"    _onStartup() {\n"
13068"        this._buildUI();\n"
13069"    }\n"
13070"\n"
13071"    // Build the application's UI\n"
13072"    _buildUI() {\n"
13073"        // Create the application window\n"
13074"        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
13075"                                                    window_position: Gtk.WindowPosition.CENTER,\n"
13076"                                                    title: \"FontChooserWidget\",\n"
13077"                                                    default_width: 200,\n"
13078"                                                    default_height: 200,\n"
13079"                                                    border_width: 10 });\n"
13080"\n"
13081"        this.fontChooser = new Gtk.FontChooserWidget();\n"
13082"        // a default font\n"
13083"        this.fontChooser.set_font(\"Sans\");\n"
13084"        // a text to preview the font\n"
13085"        this.fontChooser.set_preview_text(\"This is an example of preview text!\");\n"
13086"\n"
13087"        // connect signal from the font chooser to the callback function\n"
13088"        this.fontChooser.connect(\"notify::font\", this._fontCb.bind(this));\n"
13089"\n"
13090"        // add the font chooser to the window\n"
13091"        this.window.add(this.fontChooser);\n"
13092"        this.window.show_all();\n"
13093"   }\n"
13094"\n"
13095"     // callback function:\n"
13096"     _fontCb() {\n"
13097"        // print in the terminal\n"
13098"        print(\"You chose the font \" + this.fontChooser.get_font());\n"
13099"    }\n"
13100"};\n"
13101"\n"
13102"// Run the application\n"
13103"let app = new FontChooserWidgetExample();\n"
13104"app.application.run (ARGV);\n"
13105
13106#. (itstool) path: item/p
13107#: C/fontchooserwidget.js.page:37 C/fontchooserwidget.py.page:47
13108msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkFontChooserWidget.html\">GtkFontChooserWidget</link>"
13109msgstr ""
13110"<link href=\"http://developer.gnome.org/gtk3/unstable/GtkFontChooserWidget.html\">GtkFontChooserWidget</link>"
13111
13112#. (itstool) path: info/title
13113#: C/fontchooserwidget.py.page:8
13114msgctxt "text"
13115msgid "FontChooserWidget (Python)"
13116msgstr "FontChooserWidget (Python)"
13117
13118#. (itstool) path: section/code
13119#: C/fontchooserwidget.py.page:32
13120#, no-wrap
13121msgid ""
13122"from gi.repository import Gtk\n"
13123"import sys\n"
13124"\n"
13125"\n"
13126"class MyWindow(Gtk.ApplicationWindow):\n"
13127"\n"
13128"    def __init__(self, app):\n"
13129"        Gtk.Window.__init__(self, title=\"FontChooserWidget\", application=app)\n"
13130"\n"
13131"        # a font chooser\n"
13132"        self.font_chooser = Gtk.FontChooserWidget()\n"
13133"        # a default font\n"
13134"        self.font_chooser.set_font(\"Sans\")\n"
13135"        # a text to preview the font\n"
13136"        self.font_chooser.set_preview_text(\n"
13137"            \"This is an example of preview text!\")\n"
13138"\n"
13139"        # connect signal from the font chooser to the callback function\n"
13140"        self.font_chooser.connect(\"notify::font\", self.font_cb)\n"
13141"\n"
13142"        # add the font chooser to the window\n"
13143"        self.add(self.font_chooser)\n"
13144"\n"
13145"    # callback function:\n"
13146"    def font_cb(self, event, user_data):\n"
13147"        # print in the terminal\n"
13148"        print(\"You chose the font \" + self.font_chooser.get_font())\n"
13149"\n"
13150"\n"
13151"class MyApplication(Gtk.Application):\n"
13152"\n"
13153"    def __init__(self):\n"
13154"        Gtk.Application.__init__(self)\n"
13155"\n"
13156"    def do_activate(self):\n"
13157"        win = MyWindow(self)\n"
13158"        win.show_all()\n"
13159"\n"
13160"    def do_startup(self):\n"
13161"        Gtk.Application.do_startup(self)\n"
13162"\n"
13163"app = MyApplication()\n"
13164"exit_status = app.run(sys.argv)\n"
13165"sys.exit(exit_status)\n"
13166msgstr ""
13167"from gi.repository import Gtk\n"
13168"import sys\n"
13169"\n"
13170"\n"
13171"class MyWindow(Gtk.ApplicationWindow):\n"
13172"\n"
13173"    def __init__(self, app):\n"
13174"        Gtk.Window.__init__(self, title=\"FontChooserWidget\", application=app)\n"
13175"\n"
13176"        # a font chooser\n"
13177"        self.font_chooser = Gtk.FontChooserWidget()\n"
13178"        # a default font\n"
13179"        self.font_chooser.set_font(\"Sans\")\n"
13180"        # a text to preview the font\n"
13181"        self.font_chooser.set_preview_text(\n"
13182"            \"This is an example of preview text!\")\n"
13183"\n"
13184"        # connect signal from the font chooser to the callback function\n"
13185"        self.font_chooser.connect(\"notify::font\", self.font_cb)\n"
13186"\n"
13187"        # add the font chooser to the window\n"
13188"        self.add(self.font_chooser)\n"
13189"\n"
13190"    # callback function:\n"
13191"    def font_cb(self, event, user_data):\n"
13192"        # print in the terminal\n"
13193"        print(\"You chose the font \" + self.font_chooser.get_font())\n"
13194"\n"
13195"\n"
13196"class MyApplication(Gtk.Application):\n"
13197"\n"
13198"    def __init__(self):\n"
13199"        Gtk.Application.__init__(self)\n"
13200"\n"
13201"    def do_activate(self):\n"
13202"        win = MyWindow(self)\n"
13203"        win.show_all()\n"
13204"\n"
13205"    def do_startup(self):\n"
13206"        Gtk.Application.do_startup(self)\n"
13207"\n"
13208"app = MyApplication()\n"
13209"exit_status = app.run(sys.argv)\n"
13210"sys.exit(exit_status)\n"
13211
13212#. (itstool) path: section/title
13213#: C/fontchooserwidget.py.page:35
13214msgid "Useful methods for a FontChooserWidget"
13215msgstr "FontChooserWidget에 쓸만한 메서드"
13216
13217#. (itstool) path: section/p
13218#: C/fontchooserwidget.py.page:36
13219msgid ""
13220"In line 16 the <code>\"notify::font\"</code> signal from the widget is connected to the callback function "
13221"<code>font_cb()</code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</"
13222"code>. See <link xref=\"signals-callbacks.py\"/> for a more detailed explanation."
13223msgstr ""
13224"16번째 줄에서, <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 코드로 "
13225"<code>\"notify::font\"</code> 시그널을 <code>font_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link "
13226"xref=\"signals-callbacks.py\"/>를 참조하십시오."
13227
13228#. (itstool) path: item/p
13229#: C/fontchooserwidget.py.page:38
13230msgid ""
13231"To set the font which is initially selected, use <code>set_font(font)</code> (where <code>font</code> is the font "
13232"name) or <code>set_font_desc(font)</code> (where <code>font</code> is the PangoFontDescription)."
13233msgstr ""
13234"초기에 선택하는 글꼴을 설정하려면 <code>set_font(font)</code> (<code>font</code> 는 글꼴 이름) 또는 "
13235"<code>set_font_desc(font)</code> (<code>font</code> 는 PangoFontDescription 객체) 함수를 사용하십시오."
13236
13237#. (itstool) path: item/p
13238#: C/fontchooserwidget.py.page:39
13239msgid "To get the selected font use <code>get_font()</code> or <code>get_font_desc()</code>."
13240msgstr "선택한 글꼴을 가져오려면 <code>get_font()</code> 또는 <code>get_font_desc()</code> 함수를 사용하십시오."
13241
13242#. (itstool) path: item/p
13243#: C/fontchooserwidget.py.page:40
13244msgid "To change the text which is shown in the preview area, use <code>set_preview_text()</code>."
13245msgstr "미리 보기 화면에 나타난 텍스트를 바꾸려면 <code>set_preview_text()</code> 함수를 사용하십시오."
13246
13247#. (itstool) path: info/title
13248#: C/fontchooserwidget.vala.page:8
13249msgctxt "text"
13250msgid "FontChooserWidget (Vala)"
13251msgstr "FontChooserWidget(Vala)"
13252
13253#. (itstool) path: credit/name
13254#: C/fontchooserwidget.vala.page:13
13255msgid "Tiffany Antpoolski"
13256msgstr "Tiffany Antpoolski"
13257
13258#. (itstool) path: page/p
13259#: C/fontchooserwidget.vala.page:24
13260msgid "A FontChooserWidget with a lambda callback function."
13261msgstr "람다 콜백 함수를 사용하는 FontChooserWidget입니다."
13262
13263#. (itstool) path: section/code
13264#: C/fontchooserwidget.vala.page:30
13265#, no-wrap
13266msgid ""
13267"public class MyWindow : Gtk.ApplicationWindow {\n"
13268"        internal MyWindow (MyApplication app) {\n"
13269"                Object (application: app, title: \"FontChooserWidget\");\n"
13270"\n"
13271"\t\tvar font_chooser = new Gtk.FontChooserWidget ();\n"
13272"\t\tfont_chooser.set_font (\"Sans\");\n"
13273"\t\tfont_chooser.set_preview_text (\"This is an example of preview text!\");\n"
13274"\t\tthis.add (font_chooser);\n"
13275"\n"
13276"\t\tfont_chooser.notify[\"font\"].connect (() =&gt; {\n"
13277"\t\t\tprint (\"font: %s\\n\", font_chooser.get_font ().to_string ());\n"
13278"\t\t\tprint (\"desc: %s\\n\", font_chooser.get_font_desc ().to_string ());\n"
13279"\t\t\tprint (\"face: %s\\n\", font_chooser.get_font_face ().get_face_name ());\n"
13280"\t\t\tprint (\"size: %d\\n\", font_chooser.get_font_size ());\n"
13281"\t\t\tprint (\"family: %s\\n\", font_chooser.get_font_family ().get_name ());\n"
13282"\t\t\tprint (\"monospace: %s\\n\\n\", font_chooser.get_font_family ().is_monospace ().to_string ());\n"
13283"\t\t});\n"
13284"\n"
13285"                this.show_all ();\n"
13286"        }\n"
13287"}\n"
13288"\n"
13289"public class MyApplication : Gtk.Application {\n"
13290"        protected override void activate () {\n"
13291"                new MyWindow (this).show ();\n"
13292"        }\n"
13293"}\n"
13294"\n"
13295"public int main (string[] args) {\n"
13296"        return new MyApplication ().run (args);\n"
13297"}\n"
13298"\n"
13299msgstr ""
13300"public class MyWindow : Gtk.ApplicationWindow {\n"
13301"        internal MyWindow (MyApplication app) {\n"
13302"                Object (application: app, title: \"FontChooserWidget\");\n"
13303"\n"
13304"\t\tvar font_chooser = new Gtk.FontChooserWidget ();\n"
13305"\t\tfont_chooser.set_font (\"Sans\");\n"
13306"\t\tfont_chooser.set_preview_text (\"This is an example of preview text!\");\n"
13307"\t\tthis.add (font_chooser);\n"
13308"\n"
13309"\t\tfont_chooser.notify[\"font\"].connect (() =&gt; {\n"
13310"\t\t\tprint (\"font: %s\\n\", font_chooser.get_font ().to_string ());\n"
13311"\t\t\tprint (\"desc: %s\\n\", font_chooser.get_font_desc ().to_string ());\n"
13312"\t\t\tprint (\"face: %s\\n\", font_chooser.get_font_face ().get_face_name ());\n"
13313"\t\t\tprint (\"size: %d\\n\", font_chooser.get_font_size ());\n"
13314"\t\t\tprint (\"family: %s\\n\", font_chooser.get_font_family ().get_name ());\n"
13315"\t\t\tprint (\"monospace: %s\\n\\n\", font_chooser.get_font_family ().is_monospace ().to_string ());\n"
13316"\t\t});\n"
13317"\n"
13318"                this.show_all ();\n"
13319"        }\n"
13320"}\n"
13321"\n"
13322"public class MyApplication : Gtk.Application {\n"
13323"        protected override void activate () {\n"
13324"                new MyWindow (this).show ();\n"
13325"        }\n"
13326"}\n"
13327"\n"
13328"public int main (string[] args) {\n"
13329"        return new MyApplication ().run (args);\n"
13330"}\n"
13331"\n"
13332
13333#. (itstool) path: item/p
13334#: C/fontchooserwidget.vala.page:37
13335msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.FontChooserWidget.html\">GtkFontChooserWidget</link>"
13336msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.FontChooserWidget.html\">GtkFontChooserWidget</link>"
13337
13338#. (itstool) path: info/title
13339#: C/gmenu.c.page:8
13340msgctxt "text"
13341msgid "GMenu (C)"
13342msgstr "GMenu(C)"
13343
13344#. (itstool) path: info/desc
13345#: C/gmenu.c.page:18 C/gmenu.js.page:18 C/gmenu.vala.page:24
13346msgid "A simple implementation of GMenuModel"
13347msgstr "GMenuModel의 간단한 구현체"
13348
13349#. (itstool) path: page/title
13350#: C/gmenu.c.page:21 C/gmenu.js.page:21 C/gmenu.py.page:29 C/gmenu.vala.page:27
13351msgid "GMenu"
13352msgstr "GMenu"
13353
13354#. (itstool) path: page/media
13355#. This is a reference to an external file such as an image or video. When
13356#. the file changes, the md5 hash will change to let you know you need to
13357#. update your localized copy. The msgstr is not used at all. Set it to
13358#. whatever you like once you have updated your copy of the file.
13359#: C/gmenu.c.page:22
13360msgctxt "_"
13361msgid "external ref='media/gmenu.c.png' md5='f305fc3cae8d16d72b734ee53b559e33'"
13362msgstr ""
13363
13364#. (itstool) path: page/p
13365#: C/gmenu.c.page:23 C/gmenu.js.page:23 C/gmenu.py.page:31 C/gmenu.vala.page:32
13366msgid "A GtkApplication with a simple GMenu and SimpleActions"
13367msgstr "간단한 GMenu 및 SimpleAction과 사용하는 GtkApplication"
13368
13369#. (itstool) path: page/code
13370#: C/gmenu.c.page:26
13371#, no-wrap
13372msgid ""
13373"\n"
13374"#include &lt;gtk/gtk.h&gt;\n"
13375"\n"
13376"static void\n"
13377"new_window (GSimpleAction *action,\n"
13378"            GVariant      *parameter,\n"
13379"            gpointer       user_data)\n"
13380"{\n"
13381"  g_print (\"This does nothing. It is only a demonstration.\\n\");\n"
13382"}\n"
13383"\n"
13384"static void\n"
13385"quit (GSimpleAction *action,\n"
13386"      GVariant      *parameter,\n"
13387"      gpointer       user_data)\n"
13388"{\n"
13389"  GApplication *application = user_data;\n"
13390"\n"
13391"  g_application_quit (application);\n"
13392"}\n"
13393"\n"
13394"static void\n"
13395"startup (GtkApplication *application,\n"
13396"         gpointer        user_data)\n"
13397"{\n"
13398"  static const GActionEntry actions[] = {\n"
13399"    { \"new\", new_window },\n"
13400"    { \"quit\", quit }\n"
13401"  };\n"
13402"\n"
13403"  GMenu *menu;\n"
13404"\n"
13405"  g_action_map_add_action_entries (G_ACTION_MAP (application), actions, G_N_ELEMENTS (actions), application);\n"
13406"\n"
13407"  menu = g_menu_new ();\n"
13408"  g_menu_append (menu, \"New\", \"app.new\");\n"
13409"  g_menu_append (menu, \"Quit\", \"app.quit\");\n"
13410"  gtk_application_set_app_menu (application, G_MENU_MODEL (menu));\n"
13411"  g_object_unref (menu);\n"
13412"}\n"
13413"\n"
13414"static void\n"
13415"activate (GtkApplication *app,\n"
13416"          gpointer        user_data)\n"
13417"{\n"
13418"  GtkWidget *window;\n"
13419"\n"
13420"  window = gtk_application_window_new (app);\n"
13421"\n"
13422"  gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (app));\n"
13423"  gtk_window_set_title (GTK_WINDOW (window), \"Hello GNOME\");\n"
13424"\n"
13425"  gtk_widget_show_all (GTK_WIDGET (window));\n"
13426"}\n"
13427"\n"
13428"int\n"
13429"main (int argc, char **argv)\n"
13430"{\n"
13431"  GtkApplication *app;\n"
13432"  int status;\n"
13433"\n"
13434"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
13435"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
13436"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
13437"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
13438"  g_object_unref (app);\n"
13439"  return status;\n"
13440"}\n"
13441msgstr ""
13442"\n"
13443"#include &lt;gtk/gtk.h&gt;\n"
13444"\n"
13445"static void\n"
13446"new_window (GSimpleAction *action,\n"
13447"            GVariant      *parameter,\n"
13448"            gpointer       user_data)\n"
13449"{\n"
13450"  g_print (\"This does nothing. It is only a demonstration.\\n\");\n"
13451"}\n"
13452"\n"
13453"static void\n"
13454"quit (GSimpleAction *action,\n"
13455"      GVariant      *parameter,\n"
13456"      gpointer       user_data)\n"
13457"{\n"
13458"  GApplication *application = user_data;\n"
13459"\n"
13460"  g_application_quit (application);\n"
13461"}\n"
13462"\n"
13463"static void\n"
13464"startup (GtkApplication *application,\n"
13465"         gpointer        user_data)\n"
13466"{\n"
13467"  static const GActionEntry actions[] = {\n"
13468"    { \"new\", new_window },\n"
13469"    { \"quit\", quit }\n"
13470"  };\n"
13471"\n"
13472"  GMenu *menu;\n"
13473"\n"
13474"  g_action_map_add_action_entries (G_ACTION_MAP (application), actions, G_N_ELEMENTS (actions), application);\n"
13475"\n"
13476"  menu = g_menu_new ();\n"
13477"  g_menu_append (menu, \"New\", \"app.new\");\n"
13478"  g_menu_append (menu, \"Quit\", \"app.quit\");\n"
13479"  gtk_application_set_app_menu (application, G_MENU_MODEL (menu));\n"
13480"  g_object_unref (menu);\n"
13481"}\n"
13482"\n"
13483"static void\n"
13484"activate (GtkApplication *app,\n"
13485"          gpointer        user_data)\n"
13486"{\n"
13487"  GtkWidget *window;\n"
13488"\n"
13489"  window = gtk_application_window_new (app);\n"
13490"\n"
13491"  gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (app));\n"
13492"  gtk_window_set_title (GTK_WINDOW (window), \"Hello GNOME\");\n"
13493"\n"
13494"  gtk_widget_show_all (GTK_WIDGET (window));\n"
13495"}\n"
13496"\n"
13497"int\n"
13498"main (int argc, char **argv)\n"
13499"{\n"
13500"  GtkApplication *app;\n"
13501"  int status;\n"
13502"\n"
13503"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
13504"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
13505"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
13506"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
13507"  g_object_unref (app);\n"
13508"  return status;\n"
13509"}\n"
13510
13511#. (itstool) path: info/title
13512#: C/gmenu.js.page:8
13513msgctxt "text"
13514msgid "GMenu (JavaScript)"
13515msgstr "GMenu(JavaScript)"
13516
13517#. (itstool) path: page/media
13518#. This is a reference to an external file such as an image or video. When
13519#. the file changes, the md5 hash will change to let you know you need to
13520#. update your localized copy. The msgstr is not used at all. Set it to
13521#. whatever you like once you have updated your copy of the file.
13522#: C/gmenu.js.page:22
13523msgctxt "_"
13524msgid "external ref='media/gmenu.js.png' md5='16b8bee122197771ec8498dac42f196b'"
13525msgstr ""
13526
13527#. (itstool) path: page/code
13528#: C/gmenu.js.page:25
13529#, no-wrap
13530msgid ""
13531"#!/usr/bin/gjs\n"
13532"\n"
13533"imports.gi.versions.Gtk = '3.0';\n"
13534"\n"
13535"const Gio = imports.gi.Gio;\n"
13536"const GLib = imports.gi.GLib;\n"
13537"const Gtk = imports.gi.Gtk;\n"
13538"\n"
13539"class Application {\n"
13540"\n"
13541"    //create the application\n"
13542"    constructor() {\n"
13543"        this.application = new Gtk.Application ({\n"
13544"            application_id: 'org.example.myapp',\n"
13545"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
13546"        });\n"
13547"\n"
13548"       //connect to 'activate' and 'startup' signals to the callback functions\n"
13549"       this.application.connect('activate', this._onActivate.bind(this));\n"
13550"       this.application.connect('startup', this._onStartup.bind(this));\n"
13551"    }\n"
13552"\n"
13553"    //create the UI (in this case it's just the ApplicationWindow\n"
13554"    _buildUI() {\n"
13555"        this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
13556"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
13557"                                                   title: \"Welcome to GNOME\" });\n"
13558"\n"
13559"        //uncommenting the line below will change the window size\n"
13560"        //this._window.set_default_size(600, 400);\n"
13561"\n"
13562"        //show the window and all child widgets (none in this case)\n"
13563"        this._window.show_all();\n"
13564"    }\n"
13565"\n"
13566"    _showNew() {\n"
13567"        print(\"This doesn't do anything. It is only a demonstration.\");\n"
13568"    }\n"
13569"\n"
13570"    _showAbout() {\n"
13571"        print(\"No AboutDialog here.  This is only a demonstration.\");\n"
13572"    }\n"
13573"\n"
13574"    //create the menu items and connect the signals to the callback functions.\n"
13575"    _initMenus() {\n"
13576"        let menu = new Gio.Menu();\n"
13577"        menu.append(\"New\",'app.new');\n"
13578"        menu.append(\"About\", 'app.about');\n"
13579"        menu.append(\"Quit\",'app.quit');\n"
13580"        this.application.set_app_menu(menu);\n"
13581"\n"
13582"        let newAction = new Gio.SimpleAction ({ name: 'new' });\n"
13583"        newAction.connect('activate', () =&gt; { this._showNew(); });\n"
13584"        this.application.add_action(newAction);\n"
13585"\n"
13586"        let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
13587"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
13588"        this.application.add_action(aboutAction);\n"
13589"\n"
13590"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
13591"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
13592"         this.application.add_action(quitAction);\n"
13593"    }\n"
13594"\n"
13595"    //callback function for 'activate' signal\n"
13596"    _onActivate() {\n"
13597"        this._window.present();\n"
13598"    }\n"
13599"\n"
13600"    //callback function for 'startup' signal\n"
13601"    _onStartup() {\n"
13602"        //You must call _initMenus() before calling _buildUI().\n"
13603"        this._initMenus();\n"
13604"        this._buildUI();\n"
13605"    }\n"
13606"};\n"
13607"\n"
13608"//run the application\n"
13609"let app = new Application ();\n"
13610"app.application.run (ARGV);\n"
13611msgstr ""
13612"#!/usr/bin/gjs\n"
13613"\n"
13614"imports.gi.versions.Gtk = '3.0';\n"
13615"\n"
13616"const Gio = imports.gi.Gio;\n"
13617"const GLib = imports.gi.GLib;\n"
13618"const Gtk = imports.gi.Gtk;\n"
13619"\n"
13620"class Application {\n"
13621"\n"
13622"    //create the application\n"
13623"    constructor() {\n"
13624"        this.application = new Gtk.Application ({\n"
13625"            application_id: 'org.example.myapp',\n"
13626"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
13627"        });\n"
13628"\n"
13629"       //connect to 'activate' and 'startup' signals to the callback functions\n"
13630"       this.application.connect('activate', this._onActivate.bind(this));\n"
13631"       this.application.connect('startup', this._onStartup.bind(this));\n"
13632"    }\n"
13633"\n"
13634"    //create the UI (in this case it's just the ApplicationWindow\n"
13635"    _buildUI() {\n"
13636"        this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
13637"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
13638"                                                   title: \"Welcome to GNOME\" });\n"
13639"\n"
13640"        //uncommenting the line below will change the window size\n"
13641"        //this._window.set_default_size(600, 400);\n"
13642"\n"
13643"        //show the window and all child widgets (none in this case)\n"
13644"        this._window.show_all();\n"
13645"    }\n"
13646"\n"
13647"    _showNew() {\n"
13648"        print(\"This doesn't do anything. It is only a demonstration.\");\n"
13649"    }\n"
13650"\n"
13651"    _showAbout() {\n"
13652"        print(\"No AboutDialog here.  This is only a demonstration.\");\n"
13653"    }\n"
13654"\n"
13655"    //create the menu items and connect the signals to the callback functions.\n"
13656"    _initMenus() {\n"
13657"        let menu = new Gio.Menu();\n"
13658"        menu.append(\"New\",'app.new');\n"
13659"        menu.append(\"About\", 'app.about');\n"
13660"        menu.append(\"Quit\",'app.quit');\n"
13661"        this.application.set_app_menu(menu);\n"
13662"\n"
13663"        let newAction = new Gio.SimpleAction ({ name: 'new' });\n"
13664"        newAction.connect('activate', () =&gt; { this._showNew(); });\n"
13665"        this.application.add_action(newAction);\n"
13666"\n"
13667"        let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
13668"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
13669"        this.application.add_action(aboutAction);\n"
13670"\n"
13671"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
13672"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
13673"         this.application.add_action(quitAction);\n"
13674"    }\n"
13675"\n"
13676"    //callback function for 'activate' signal\n"
13677"    _onActivate() {\n"
13678"        this._window.present();\n"
13679"    }\n"
13680"\n"
13681"    //callback function for 'startup' signal\n"
13682"    _onStartup() {\n"
13683"        //You must call _initMenus() before calling _buildUI().\n"
13684"        this._initMenus();\n"
13685"        this._buildUI();\n"
13686"    }\n"
13687"};\n"
13688"\n"
13689"//run the application\n"
13690"let app = new Application ();\n"
13691"app.application.run (ARGV);\n"
13692
13693#. (itstool) path: info/title
13694#: C/gmenu.py.page:8
13695msgctxt "text"
13696msgid "GMenu (Python)"
13697msgstr "GMenu(Python)"
13698
13699#. (itstool) path: info/desc
13700#: C/gmenu.py.page:26
13701msgid "A simple implementation of GMenu"
13702msgstr "GMenu의 간단한 구현체"
13703
13704#. (itstool) path: page/media
13705#. This is a reference to an external file such as an image or video. When
13706#. the file changes, the md5 hash will change to let you know you need to
13707#. update your localized copy. The msgstr is not used at all. Set it to
13708#. whatever you like once you have updated your copy of the file.
13709#: C/gmenu.py.page:30
13710msgctxt "_"
13711msgid "external ref='media/gmenu.py.png' md5='52c68b34d5d566f37e9f803dedb6353a'"
13712msgstr ""
13713
13714#. (itstool) path: section/code
13715#: C/gmenu.py.page:37
13716#, no-wrap
13717msgid ""
13718"\n"
13719"    from gi.repository import Gtk\n"
13720"from gi.repository import Gio\n"
13721"import sys\n"
13722"\n"
13723"\n"
13724"class MyWindow(Gtk.ApplicationWindow):\n"
13725"\n"
13726"    def __init__(self, app):\n"
13727"        Gtk.Window.__init__(self, title=\"GMenu Example\", application=app)\n"
13728"\n"
13729"\n"
13730"class MyApplication(Gtk.Application):\n"
13731"\n"
13732"    def __init__(self):\n"
13733"        Gtk.Application.__init__(self)\n"
13734"\n"
13735"    def do_activate(self):\n"
13736"        win = MyWindow(self)\n"
13737"        win.show_all()\n"
13738"\n"
13739"    def do_startup(self):\n"
13740"        # start the application\n"
13741"        Gtk.Application.do_startup(self)\n"
13742"\n"
13743"        # create a menu\n"
13744"        menu = Gio.Menu()\n"
13745"        # append to the menu three options\n"
13746"        menu.append(\"New\", \"app.new\")\n"
13747"        menu.append(\"About\", \"app.about\")\n"
13748"        menu.append(\"Quit\", \"app.quit\")\n"
13749"        # set the menu as menu of the application\n"
13750"        self.set_app_menu(menu)\n"
13751"\n"
13752"        # create an action for the option \"new\" of the menu\n"
13753"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
13754"        # connect it to the callback function new_cb\n"
13755"        new_action.connect(\"activate\", self.new_cb)\n"
13756"        # add the action to the application\n"
13757"        self.add_action(new_action)\n"
13758"\n"
13759"        # option \"about\"\n"
13760"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
13761"        about_action.connect(\"activate\", self.about_cb)\n"
13762"        self.add_action(about_action)\n"
13763"\n"
13764"        # option \"quit\"\n"
13765"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
13766"        quit_action.connect(\"activate\", self.quit_cb)\n"
13767"        self.add_action(quit_action)\n"
13768"\n"
13769"    # callback function for \"new\"\n"
13770"    def new_cb(self, action, parameter):\n"
13771"        print(\"This does nothing. It is only a demonstration.\")\n"
13772"\n"
13773"    # callback function for \"about\"\n"
13774"    def about_cb(self, action, parameter):\n"
13775"        print(\"No AboutDialog for you. This is only a demonstration.\")\n"
13776"\n"
13777"    # callback function for \"quit\"\n"
13778"    def quit_cb(self, action, parameter):\n"
13779"        print(\"You have quit.\")\n"
13780"        self.quit()\n"
13781"\n"
13782"app = MyApplication()\n"
13783"exit_status = app.run(sys.argv)\n"
13784"sys.exit(exit_status)\n"
13785msgstr ""
13786"\n"
13787"    from gi.repository import Gtk\n"
13788"from gi.repository import Gio\n"
13789"import sys\n"
13790"\n"
13791"\n"
13792"class MyWindow(Gtk.ApplicationWindow):\n"
13793"\n"
13794"    def __init__(self, app):\n"
13795"        Gtk.Window.__init__(self, title=\"GMenu Example\", application=app)\n"
13796"\n"
13797"\n"
13798"class MyApplication(Gtk.Application):\n"
13799"\n"
13800"    def __init__(self):\n"
13801"        Gtk.Application.__init__(self)\n"
13802"\n"
13803"    def do_activate(self):\n"
13804"        win = MyWindow(self)\n"
13805"        win.show_all()\n"
13806"\n"
13807"    def do_startup(self):\n"
13808"        # start the application\n"
13809"        Gtk.Application.do_startup(self)\n"
13810"\n"
13811"        # create a menu\n"
13812"        menu = Gio.Menu()\n"
13813"        # append to the menu three options\n"
13814"        menu.append(\"New\", \"app.new\")\n"
13815"        menu.append(\"About\", \"app.about\")\n"
13816"        menu.append(\"Quit\", \"app.quit\")\n"
13817"        # set the menu as menu of the application\n"
13818"        self.set_app_menu(menu)\n"
13819"\n"
13820"        # create an action for the option \"new\" of the menu\n"
13821"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
13822"        # connect it to the callback function new_cb\n"
13823"        new_action.connect(\"activate\", self.new_cb)\n"
13824"        # add the action to the application\n"
13825"        self.add_action(new_action)\n"
13826"\n"
13827"        # option \"about\"\n"
13828"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
13829"        about_action.connect(\"activate\", self.about_cb)\n"
13830"        self.add_action(about_action)\n"
13831"\n"
13832"        # option \"quit\"\n"
13833"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
13834"        quit_action.connect(\"activate\", self.quit_cb)\n"
13835"        self.add_action(quit_action)\n"
13836"\n"
13837"    # callback function for \"new\"\n"
13838"    def new_cb(self, action, parameter):\n"
13839"        print(\"This does nothing. It is only a demonstration.\")\n"
13840"\n"
13841"    # callback function for \"about\"\n"
13842"    def about_cb(self, action, parameter):\n"
13843"        print(\"No AboutDialog for you. This is only a demonstration.\")\n"
13844"\n"
13845"    # callback function for \"quit\"\n"
13846"    def quit_cb(self, action, parameter):\n"
13847"        print(\"You have quit.\")\n"
13848"        self.quit()\n"
13849"\n"
13850"app = MyApplication()\n"
13851"exit_status = app.run(sys.argv)\n"
13852"sys.exit(exit_status)\n"
13853
13854#. (itstool) path: section/title
13855#: C/gmenu.py.page:42
13856msgid "Useful methods for a GSimpleAction and a GMenu"
13857msgstr "GSimpleAction과 GMenu에 쓸만한 메서드"
13858
13859#. (itstool) path: section/p
13860#: C/gmenu.py.page:44
13861msgid ""
13862"In line 33 the signal <code>\"activate\"</code> from the action <code>new_action</code> (not the menu!) is "
13863"connected to the callback function <code>new_cb()</code> using <code><var>action</var>.connect(<var>signal</var>, "
13864"<var>callback function</var>)</code>. See <link xref=\"signals-callbacks.py\"/> for a more detailed explanation."
13865msgstr ""
13866"33번째 줄에서 <code>new_action</code> 동작의 <code>\"activate\"</code> 시그널은 <code><var>widget</var>."
13867"connect(<var>signal</var>, <var>callback function</var>)</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link "
13868"xref=\"signals-callbacks.py\"/>를 참조하십시오."
13869
13870#. (itstool) path: section/p
13871#: C/gmenu.py.page:46
13872msgid "Useful methods for a GSimpleAction:"
13873msgstr "GSimpleAction에 쓸만한 메서드:"
13874
13875#. (itstool) path: item/p
13876#: C/gmenu.py.page:48
13877msgid ""
13878"To create a new action that is <em>stateless</em>, that is, an action that do not retain or depend on a state "
13879"given by the action itself, use"
13880msgstr ""
13881"동작 자체에 주어진 상태를 유지하거나 이에 따르지 않아 <em>상태를 반영하지 않는</em> 새 동작을 만들려면 다음 코드를 "
13882"사용하십시오."
13883
13884#. (itstool) path: item/code
13885#: C/gmenu.py.page:49
13886#, no-wrap
13887msgid ""
13888"\n"
13889"action = Gio.SimpleAction.new(\"name\", parameter_type)"
13890msgstr ""
13891"\n"
13892"action = Gio.SimpleAction.new(\"name\", parameter_type)"
13893
13894#. (itstool) path: item/p
13895#: C/gmenu.py.page:51
13896msgid ""
13897"where <code>\"name\"</code> is the name of the action and <code>parameter_type</code> is the type of the "
13898"parameters that the action receives when being activated. This can be <code>None</code>, or <code>GLib.VariantType."
13899"new('s')</code> if the parameter is of type <code>str</code>, or instead of <code>'s'</code> a character as "
13900"described <link href=\"http://developer.gnome.org/glib/unstable/glib-GVariantType.html\">here</link>. To create a "
13901"new <em>stateful</em> (i.e. not stateless) action, use"
13902msgstr ""
13903"여기서 <code>\"name\"</code>는 동작 이름,  <code>parameter_type</code>은 활성화했을 때 받는 동작을 나타내는 매개변"
13904"수 형식입니다. <code>parameter_type</code> 값은 <code>None</code> 또는, 매개변수 값 형식이 <code>str</code> 일 경"
13905"우 <code>GLib.VariantType.new('s')</code> 또는 <link href=\"http://developer.gnome.org/glib/unstable/glib-"
13906"GVariantType.html\">여기</link>서 설명한대로 <code>'s'</code> 문자를 그냥 쓰면 됩니다. 새 <em>상태 반영</em>(무상"
13907"태 아님) 동작을 만들려면 다음 코드를 사용하십시오."
13908
13909#. (itstool) path: item/code
13910#: C/gmenu.py.page:52
13911#, no-wrap
13912msgid ""
13913"\n"
13914"action = Gio.SimpleAction.new_stateful(\"name\", parameter_type, initial_state)"
13915msgstr ""
13916"\n"
13917"action = Gio.SimpleAction.new_stateful(\"name\", parameter_type, initial_state)"
13918
13919#. (itstool) path: item/p
13920#: C/gmenu.py.page:54
13921msgid ""
13922"where <code>initial_state</code> is defined as a GVariant - for instance <code>Glib.Variant.new_string('start')</"
13923"code>; for a list of possibilities see <link href=\"http://developer.gnome.org/glib/unstable/glib-GVariant.html"
13924"\">here</link>."
13925msgstr ""
13926"여기서 <code>initial_state</code>는 GVariant 형식으로 정의합니다. 이를 테면 <code>Glib.Variant."
13927"new_string('start')</code> 코드가 있습니다. 가능한 코드를 보려면 <link href=\"http://developer.gnome.org/glib/"
13928"unstable/glib-GVariant.html\">이 문서</link>를 참고하십시오."
13929
13930#. (itstool) path: item/p
13931#: C/gmenu.py.page:55
13932msgid ""
13933"<code>set_enabled(True)</code> sets the action as enabled; an action must be enabled in order to be activated or "
13934"in order to have its state changed from outside callers. This should only be called by the implementor of the "
13935"action. Users of the action should not attempt to modify its enabled flag."
13936msgstr ""
13937"<code>set_enabled(True)</code> 함수는 동작 활성화를 설정하며, 활성화하거나 외부 호출자가 상태를 바꾸게 하려면 반드"
13938"시 동작을 활성화해야 합니다. 이 함수는 동작 구현체에서만 호출해야 합니다. 동작 사용자는 활성 플래그를 수정하지 못하"
13939"게 해야합니다."
13940
13941#. (itstool) path: item/p
13942#: C/gmenu.py.page:56
13943msgid ""
13944"<code>set_state(state)</code>, where <code>state</code> is a GVariant, sets the state of the action, updating the "
13945"'state' property to the given value. This should only be called by the implementor of the action; users of the "
13946"action should instead call <code>change_state(state)</code> (where <code>state</code> is as above) to request the "
13947"change."
13948msgstr ""
13949"<code>set_state(state)</code> 함수는 주어진 값으로 'state' 속성 값을 업데이트하여 동작의 상태를 설정하며, "
13950"<code>state</code> 는 GVariant 형식입니다. 이 함수는 동작 구현체에서만 호출해야합니다. 동작 사용자는 상태 전환을 요"
13951"청하려면 이 함수 대신 <code>change_state(state)</code>(<code>state</code> 값은 위에서 설명) 함수를 사용해야합니다."
13952
13953#. (itstool) path: section/p
13954#: C/gmenu.py.page:59
13955msgid "Useful methods for a GMenu:"
13956msgstr "GMenu에 쓸만한 메서드:"
13957
13958#. (itstool) path: item/p
13959#: C/gmenu.py.page:61
13960msgid ""
13961"To insert an item in the menu in position <code>position</code>, use <code>insert(position, label, "
13962"detailed_action)</code>, where <code>label</code> is the label that will appear in the menu and "
13963"<code>detailed_action</code> is a string composed of the name of the action to which we prepend the prefix "
13964"<code>app.</code>. A more detailed discussion of this can be found in <link xref=\"menubar.py#win-app\"/>."
13965msgstr ""
13966"항목을 메뉴의 <code>position</code> 위치에 넣으려면 <code>insert(position, label, detailed_action)</code> 함수를 활"
13967"용하십시오. 여기서 <code>label</code> 은 메뉴에 나타나는 레이블이며, <code>detailed_action</code> 는 앞에 "
13968"<code>app.</code>이 뭍는 동작 이름으로 이루어진 문자열이 들어갑니다. 이 부분에 대한 자세한 이야기에는 <link xref="
13969"\"menubar.py#win-app\"/>에 있습니다."
13970
13971#. (itstool) path: item/p
13972#: C/gmenu.py.page:62
13973msgid ""
13974"To append or prepend an item in the menu use respectively <code>append(label, detailed_action)</code> and "
13975"<code>prepend(label, detailed_action)</code>."
13976msgstr ""
13977"메뉴에 항목을 뒤에 붙이려면 <code>append(label, detailed_action)</code> 함수를, 앞에 붙이려면 <code>prepend(label, "
13978"detailed_action)</code> 함수를 사용하십시오."
13979
13980#. (itstool) path: item/p
13981#: C/gmenu.py.page:63
13982msgid ""
13983"Another way of adding items to the menu is to create them as <code>GMenuItem</code>s and use "
13984"<code>insert_item(position, item)</code>, <code>append_item(item)</code>, or <code>prepend_item(item)</code>; so "
13985"for instance we might have:"
13986msgstr ""
13987"메뉴에 항목을 추가하는 다른 방법으로는 <code>GMenuItem</code> 항목을 만들고 <code>insert_item(position, item)</"
13988"code>, <code>append_item(item)</code>, <code>prepend_item(item)</code> 함수를 사용하는 방법입니다. 그러니까 예를 들"
13989"면 다음 코드와 같습니다:"
13990
13991#. (itstool) path: item/code
13992#: C/gmenu.py.page:64
13993#, no-wrap
13994msgid ""
13995"\n"
13996"about = Gio.MenuItem.new(\"About\", \"app.about\")\n"
13997"menu.append_item(about)"
13998msgstr ""
13999"\n"
14000"about = Gio.MenuItem.new(\"About\", \"app.about\")\n"
14001"menu.append_item(about)"
14002
14003#. (itstool) path: item/p
14004#: C/gmenu.py.page:68
14005msgid ""
14006"We can also add a whole subsection in a menu using <code>insert_section(position, label, section)</code>, "
14007"<code>append_section(label, section)</code>, or <code>prepend_section(label, section)</code>, where <code>label</"
14008"code> is the title of the subsection."
14009msgstr ""
14010"메뉴에 <code>insert_section(position, label, section)</code>, <code>append_section(label, section)</code>, "
14011"<code>prepend_section(label, section)</code> 함수로 전체 하위 섹션을 추가할 수 있습니다. 여기서 <code>label</code>"
14012"은 하위 섹션의 제목입니다."
14013
14014#. (itstool) path: item/p
14015#: C/gmenu.py.page:69
14016msgid ""
14017"To add a submenu that will expand and collapse, use <code>insert_submenu(position, label, section)</code>, "
14018"<code>append_submenu(label, section)</code>, or <code>prepend_submenu(label, section)</code>, where <code>label</"
14019"code> is the title of the subsection."
14020msgstr ""
14021"나타내고 숨길 하위 메뉴를 추가하려면 <code>insert_submenu(position, label, section)</code>, "
14022"<code>append_submenu(label, section)</code>, <code>prepend_submenu(label, section)</code> 함수를 사용하십시오. 여기"
14023"서 <code>label</code>은 하위 섹션의 제목입니다."
14024
14025#. (itstool) path: item/p
14026#: C/gmenu.py.page:70
14027msgid "To remove an item from the menu, use <code>remove(position)</code>."
14028msgstr "메뉴 항목을 제거하려면 <code>remove(position)</code> 함수를 사용하십시오."
14029
14030#. (itstool) path: item/p
14031#: C/gmenu.py.page:71
14032msgid "To set a label for the menu, use <code>set_label(label)</code>."
14033msgstr "메뉴에 레이블을 설정하려면 <code>set_label(label)</code> 함수를 사용하십시오."
14034
14035#. (itstool) path: item/p
14036#: C/gmenu.py.page:82
14037msgid "<link href=\"http://developer.gnome.org/glib/unstable/glib-GVariantType.html\">GVariantType</link>"
14038msgstr "<link href=\"http://developer.gnome.org/glib/unstable/glib-GVariantType.html\">GVariantType</link>"
14039
14040#. (itstool) path: item/p
14041#: C/gmenu.py.page:83
14042msgid "<link href=\"http://developer.gnome.org/glib/unstable/glib-GVariant.html\">GVariant</link>"
14043msgstr "<link href=\"http://developer.gnome.org/glib/unstable/glib-GVariant.html\">GVariant</link>"
14044
14045#. (itstool) path: info/title
14046#: C/gmenu.vala.page:8
14047msgctxt "text"
14048msgid "GMenu (Vala)"
14049msgstr "GMenu (Vala)"
14050
14051#. (itstool) path: page/media
14052#. This is a reference to an external file such as an image or video. When
14053#. the file changes, the md5 hash will change to let you know you need to
14054#. update your localized copy. The msgstr is not used at all. Set it to
14055#. whatever you like once you have updated your copy of the file.
14056#: C/gmenu.vala.page:28
14057msgctxt "_"
14058msgid "external ref='media/gmenu.vala.png' md5='7a9f381fc3ed5bf8d1c50d2acb095400'"
14059msgstr ""
14060
14061#. (itstool) path: note/p
14062#: C/gmenu.vala.page:30
14063msgid "<em style=\"strong\">You need to be running GTK+-3.4 or later for this to work</em>"
14064msgstr "<em style=\"strong\">이 코드가 동작하려면 GTK+-3.4 이상이 필요합니다</em>"
14065
14066#. (itstool) path: page/code
14067#: C/gmenu.vala.page:34
14068#, no-wrap
14069msgid ""
14070"/* A window in the application. */\n"
14071"public class Window : Gtk.ApplicationWindow {\n"
14072"\n"
14073"\t/* Constructor */\n"
14074"\tpublic Window (Application app) {\n"
14075"\t\tObject (application: app, title: \"Gmenu Example\");\n"
14076"\n"
14077"\t\tvar about_action = new SimpleAction (\"about\", null);\n"
14078"\n"
14079"\t\t/* Connect the 'activate' signal to the\n"
14080"\t\t * signal handler (aka. callback).\n"
14081"\t\t */\n"
14082"\t\tabout_action.activate.connect (this.about_cb);\n"
14083"\n"
14084"\t\t/* Add the action to this window. */\n"
14085"\t\tthis.add_action (about_action);\n"
14086"\n"
14087"\t\tthis.show ();\n"
14088"\t}\n"
14089"\n"
14090"\t/* Signal handler for 'activate' signal of the SimpleAction. */\n"
14091"\tvoid about_cb (SimpleAction simple, Variant? parameter) {\n"
14092"\t\tprint (\"This does nothing.  It is only a demonstration.\\n\");\n"
14093"\t}\n"
14094"}\n"
14095"\n"
14096"/* This is the Application. */\n"
14097"public class Application : Gtk.Application {\n"
14098"\n"
14099"\t/* Constructor */\n"
14100"\tpublic Application () {\n"
14101"\t\tObject (application_id: \"org.example.application\");\n"
14102"\t}\n"
14103"\n"
14104"\t/* Override the 'activate' signal of GLib.Application. */\n"
14105"\tprotected override void activate () {\n"
14106"\n"
14107"\t\t/* Create a new window for this application. */\n"
14108"\t\tnew Window (this);\n"
14109"\t}\n"
14110"\n"
14111"\t/* Override the 'startup' signal of GLib.Application. */\n"
14112"\tprotected override void startup () {\n"
14113"\t\tbase.startup ();\n"
14114"\n"
14115"\t\tvar menu = new Menu ();\n"
14116"\t\tmenu.append (\"About\", \"win.about\");\n"
14117"\t\tmenu.append (\"Quit\", \"app.quit\");\n"
14118"\t\tthis.app_menu = menu;\n"
14119"\n"
14120"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
14121"\t\tquit_action.activate.connect (this.quit);\n"
14122"\t\tthis.add_action (quit_action);\n"
14123"\t}\n"
14124"}\n"
14125"\n"
14126"/* main function creates Application and runs it. */\n"
14127"int main (string[] args) {\n"
14128"\treturn new Application ().run (args);\n"
14129"}\n"
14130msgstr ""
14131"/* A window in the application. */\n"
14132"public class Window : Gtk.ApplicationWindow {\n"
14133"\n"
14134"\t/* Constructor */\n"
14135"\tpublic Window (Application app) {\n"
14136"\t\tObject (application: app, title: \"Gmenu Example\");\n"
14137"\n"
14138"\t\tvar about_action = new SimpleAction (\"about\", null);\n"
14139"\n"
14140"\t\t/* Connect the 'activate' signal to the\n"
14141"\t\t * signal handler (aka. callback).\n"
14142"\t\t */\n"
14143"\t\tabout_action.activate.connect (this.about_cb);\n"
14144"\n"
14145"\t\t/* Add the action to this window. */\n"
14146"\t\tthis.add_action (about_action);\n"
14147"\n"
14148"\t\tthis.show ();\n"
14149"\t}\n"
14150"\n"
14151"\t/* Signal handler for 'activate' signal of the SimpleAction. */\n"
14152"\tvoid about_cb (SimpleAction simple, Variant? parameter) {\n"
14153"\t\tprint (\"This does nothing.  It is only a demonstration.\\n\");\n"
14154"\t}\n"
14155"}\n"
14156"\n"
14157"/* This is the Application. */\n"
14158"public class Application : Gtk.Application {\n"
14159"\n"
14160"\t/* Constructor */\n"
14161"\tpublic Application () {\n"
14162"\t\tObject (application_id: \"org.example.application\");\n"
14163"\t}\n"
14164"\n"
14165"\t/* Override the 'activate' signal of GLib.Application. */\n"
14166"\tprotected override void activate () {\n"
14167"\n"
14168"\t\t/* Create a new window for this application. */\n"
14169"\t\tnew Window (this);\n"
14170"\t}\n"
14171"\n"
14172"\t/* Override the 'startup' signal of GLib.Application. */\n"
14173"\tprotected override void startup () {\n"
14174"\t\tbase.startup ();\n"
14175"\n"
14176"\t\tvar menu = new Menu ();\n"
14177"\t\tmenu.append (\"About\", \"win.about\");\n"
14178"\t\tmenu.append (\"Quit\", \"app.quit\");\n"
14179"\t\tthis.app_menu = menu;\n"
14180"\n"
14181"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
14182"\t\tquit_action.activate.connect (this.quit);\n"
14183"\t\tthis.add_action (quit_action);\n"
14184"\t}\n"
14185"}\n"
14186"\n"
14187"/* main function creates Application and runs it. */\n"
14188"int main (string[] args) {\n"
14189"\treturn new Application ().run (args);\n"
14190"}\n"
14191
14192#. (itstool) path: item/p
14193#: C/gmenu.vala.page:41
14194msgid "<link href=\"http://www.valadoc.org/gio-2.0/GLib.Menu.Menu.html\">Menu</link>"
14195msgstr "<link href=\"http://www.valadoc.org/gio-2.0/GLib.Menu.Menu.html\">Menu</link>"
14196
14197#. (itstool) path: item/p
14198#: C/gmenu.vala.page:42
14199msgid "<link href=\"http://www.valadoc.org/gio-2.0/GLib.Menu.append.html\">append</link>"
14200msgstr "<link href=\"http://www.valadoc.org/gio-2.0/GLib.Menu.append.html\">append</link>"
14201
14202#. (itstool) path: item/p
14203#: C/gmenu.vala.page:43
14204msgid "<link href=\"http://www.valadoc.org/gio-2.0/GLib.SimpleAction.html\">SimpleAction</link>"
14205msgstr "<link href=\"http://www.valadoc.org/gio-2.0/GLib.SimpleAction.html\">SimpleAction</link>"
14206
14207#. (itstool) path: item/p
14208#: C/gmenu.vala.page:44
14209msgid "<link href=\"http://www.valadoc.org/gio-2.0/GLib.ActionMap.add_action.html\">add_action</link>"
14210msgstr "<link href=\"http://www.valadoc.org/gio-2.0/GLib.ActionMap.add_action.html\">add_action</link>"
14211
14212#. (itstool) path: info/title
14213#: C/grid.c.page:8
14214msgctxt "text"
14215msgid "Grid (C)"
14216msgstr "Grid (C)"
14217
14218#. (itstool) path: info/desc
14219#: C/grid.c.page:18 C/grid.js.page:22 C/grid.py.page:26 C/grid.vala.page:20
14220msgid "Pack widgets in rows and columns"
14221msgstr "위젯을 행열 방향으로 감쌉니다"
14222
14223#. (itstool) path: page/title
14224#: C/grid.c.page:21 C/grid.js.page:25 C/grid.py.page:29
14225msgid "Grid"
14226msgstr "Grid"
14227
14228#. (itstool) path: page/media
14229#. This is a reference to an external file such as an image or video. When
14230#. the file changes, the md5 hash will change to let you know you need to
14231#. update your localized copy. The msgstr is not used at all. Set it to
14232#. whatever you like once you have updated your copy of the file.
14233#: C/grid.c.page:23 C/grid.js.page:26 C/grid.vala.page:24
14234msgctxt "_"
14235msgid "external ref='media/grid.png' md5='27d45da115401127456a3b854dcfc5be'"
14236msgstr ""
14237
14238#. (itstool) path: page/p
14239#: C/grid.c.page:24 C/grid.vala.page:25
14240msgid "A button widget connected to a progress bar."
14241msgstr "진행 표시줄에 연결한 단추 위젯입니다."
14242
14243#. (itstool) path: page/code
14244#: C/grid.c.page:26
14245#, no-wrap
14246msgid ""
14247"\n"
14248"#include &lt;gtk/gtk.h&gt;\n"
14249"\n"
14250"\n"
14251"\n"
14252"/*Signal handler for the \"clicked\" signal of the Button. Each\n"
14253"click generates a progress bar pulse*/\n"
14254"static void\n"
14255"on_button_click (GtkButton *button,\n"
14256"                 gpointer   user_data)\n"
14257"{\n"
14258"  GtkProgressBar *progress_bar = user_data;\n"
14259"  gtk_progress_bar_pulse (progress_bar);\n"
14260"}\n"
14261"\n"
14262"\n"
14263"\n"
14264"static void\n"
14265"activate (GtkApplication *app,\n"
14266"          gpointer        user_data)\n"
14267"{\n"
14268"  GtkWidget *grid;\n"
14269"  GtkWidget *window;\n"
14270"  GtkWidget *button;\n"
14271"  GtkWidget *progress_bar;\n"
14272"\n"
14273"  /*Create the window and set a title*/\n"
14274"  window = gtk_application_window_new (app);\n"
14275"  gtk_window_set_title (GTK_WINDOW (window), \"Grid Example\");\n"
14276"\n"
14277"  /*Create a button with a label*/\n"
14278"  button = gtk_button_new_with_label (\"Button\");\n"
14279"\n"
14280"  /*Create the progress bar*/\n"
14281"  progress_bar = gtk_progress_bar_new ();\n"
14282"\n"
14283"  /*Create a grid and attach the button and progress bar\n"
14284"  accordingly*/\n"
14285"  grid = gtk_grid_new ();\n"
14286"  gtk_grid_attach (GTK_GRID (grid), button, 1, 1, 1, 1);\n"
14287"  gtk_grid_attach_next_to (GTK_GRID (grid), \n"
14288"                           progress_bar, \n"
14289"                           button, \n"
14290"                           GTK_POS_BOTTOM, 1, 1);\n"
14291"\n"
14292"  /*Connecting the clicked signal to the callback function*/\n"
14293"  g_signal_connect (GTK_BUTTON (button), \"clicked\", \n"
14294"                    G_CALLBACK (on_button_click), progress_bar);\n"
14295"\n"
14296"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
14297"\n"
14298"  gtk_widget_show_all (window);\n"
14299"}\n"
14300"\n"
14301"\n"
14302"\n"
14303"int\n"
14304"main (int argc, char **argv)\n"
14305"{\n"
14306"  GtkApplication *app;\n"
14307"  int status;\n"
14308"\n"
14309"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
14310"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
14311"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
14312"  g_object_unref (app);\n"
14313"\n"
14314"  return status;\n"
14315"}\n"
14316msgstr ""
14317"\n"
14318"#include &lt;gtk/gtk.h&gt;\n"
14319"\n"
14320"\n"
14321"\n"
14322"/*Signal handler for the \"clicked\" signal of the Button. Each\n"
14323"click generates a progress bar pulse*/\n"
14324"static void\n"
14325"on_button_click (GtkButton *button,\n"
14326"                 gpointer   user_data)\n"
14327"{\n"
14328"  GtkProgressBar *progress_bar = user_data;\n"
14329"  gtk_progress_bar_pulse (progress_bar);\n"
14330"}\n"
14331"\n"
14332"\n"
14333"\n"
14334"static void\n"
14335"activate (GtkApplication *app,\n"
14336"          gpointer        user_data)\n"
14337"{\n"
14338"  GtkWidget *grid;\n"
14339"  GtkWidget *window;\n"
14340"  GtkWidget *button;\n"
14341"  GtkWidget *progress_bar;\n"
14342"\n"
14343"  /*Create the window and set a title*/\n"
14344"  window = gtk_application_window_new (app);\n"
14345"  gtk_window_set_title (GTK_WINDOW (window), \"Grid Example\");\n"
14346"\n"
14347"  /*Create a button with a label*/\n"
14348"  button = gtk_button_new_with_label (\"Button\");\n"
14349"\n"
14350"  /*Create the progress bar*/\n"
14351"  progress_bar = gtk_progress_bar_new ();\n"
14352"\n"
14353"  /*Create a grid and attach the button and progress bar\n"
14354"  accordingly*/\n"
14355"  grid = gtk_grid_new ();\n"
14356"  gtk_grid_attach (GTK_GRID (grid), button, 1, 1, 1, 1);\n"
14357"  gtk_grid_attach_next_to (GTK_GRID (grid), \n"
14358"                           progress_bar, \n"
14359"                           button, \n"
14360"                           GTK_POS_BOTTOM, 1, 1);\n"
14361"\n"
14362"  /*Connecting the clicked signal to the callback function*/\n"
14363"  g_signal_connect (GTK_BUTTON (button), \"clicked\", \n"
14364"                    G_CALLBACK (on_button_click), progress_bar);\n"
14365"\n"
14366"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
14367"\n"
14368"  gtk_widget_show_all (window);\n"
14369"}\n"
14370"\n"
14371"\n"
14372"\n"
14373"int\n"
14374"main (int argc, char **argv)\n"
14375"{\n"
14376"  GtkApplication *app;\n"
14377"  int status;\n"
14378"\n"
14379"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
14380"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
14381"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
14382"  g_object_unref (app);\n"
14383"\n"
14384"  return status;\n"
14385"}\n"
14386
14387#. (itstool) path: item/p
14388#: C/grid.c.page:34 C/progressbar.c.page:35
14389msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkProgressBar.html\">GtkProgressBar</link>"
14390msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkProgressBar.html\">GtkProgressBar</link>"
14391
14392#. (itstool) path: info/title
14393#: C/grid.js.page:8
14394msgctxt "text"
14395msgid "Grid (JavaScript)"
14396msgstr "Grid(JavaScript)"
14397
14398#. (itstool) path: page/p
14399#: C/grid.js.page:27
14400msgid "A button widget connected to a progress bar, inside of a grid which handles the layout."
14401msgstr "단추 위젯은 배치를 다루는 격자의 진행 표시에 연결합니다."
14402
14403#. (itstool) path: page/code
14404#: C/grid.js.page:29
14405#, no-wrap
14406msgid ""
14407"#!/usr/bin/gjs\n"
14408"\n"
14409"imports.gi.versions.Gtk = '3.0';\n"
14410"\n"
14411"const Gio = imports.gi.Gio;\n"
14412"const GLib = imports.gi.GLib;\n"
14413"const Gtk = imports.gi.Gtk;\n"
14414"\n"
14415"class GridExample {\n"
14416"\n"
14417"    /* Create the application itself\n"
14418"       This boilerplate code is needed to build any GTK+ application. */\n"
14419"    constructor() {\n"
14420"        this.application = new Gtk.Application ({\n"
14421"            application_id: 'org.example.jsgrid',\n"
14422"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
14423"        });\n"
14424"\n"
14425"        // Connect 'activate' and 'startup' signals to the callback functions\n"
14426"        this.application.connect('activate', this._onActivate.bind(this));\n"
14427"        this.application.connect('startup', this._onStartup.bind(this));\n"
14428"    }\n"
14429"\n"
14430"    // Callback function for 'activate' signal presents windows when active\n"
14431"    _onActivate() {\n"
14432"        this._window.present();\n"
14433"    }\n"
14434"\n"
14435"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
14436"    _onStartup() {\n"
14437"        this._buildUI();\n"
14438"    }\n"
14439"\n"
14440"    // Build the application's UI\n"
14441"    _buildUI() {\n"
14442"\n"
14443"        // Create the application window\n"
14444"            this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
14445"                                                         window_position: Gtk.WindowPosition.CENTER,\n"
14446"                                                         title: \"Grid Example\"});\n"
14447"\n"
14448"        // Create the grid\n"
14449"        this.Grid = new Gtk.Grid ();\n"
14450"\n"
14451"        // Create the widgets inside the grid\n"
14452"        this.progressBar = new Gtk.ProgressBar ();\n"
14453"        this.Button = new Gtk.Button ({ label: \"Button\" });\n"
14454"        this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
14455"\n"
14456"        // Assemble the grid\n"
14457"        this._window.add (this.Grid);\n"
14458"        this.Grid.attach (this.Button, 1, 1, 1, 1);\n"
14459"        this.Grid.attach_next_to (this.progressBar, this.Button, Gtk.PositionType.BOTTOM, 1, 1);\n"
14460"\n"
14461"                // Show the window and all child widgets\n"
14462"                this._window.show_all();\n"
14463"    }\n"
14464"\n"
14465"    // Here's the function that says what happens when the button is clicked\n"
14466"    _clickHandler() {\n"
14467"        this.progressBar.pulse ();\n"
14468"    }\n"
14469"\n"
14470"\n"
14471"};\n"
14472"\n"
14473"// Run the application\n"
14474"let app = new GridExample ();\n"
14475"app.application.run (ARGV);\n"
14476msgstr ""
14477"#!/usr/bin/gjs\n"
14478"\n"
14479"imports.gi.versions.Gtk = '3.0';\n"
14480"\n"
14481"const Gio = imports.gi.Gio;\n"
14482"const GLib = imports.gi.GLib;\n"
14483"const Gtk = imports.gi.Gtk;\n"
14484"\n"
14485"class GridExample {\n"
14486"\n"
14487"    /* Create the application itself\n"
14488"       This boilerplate code is needed to build any GTK+ application. */\n"
14489"    constructor() {\n"
14490"        this.application = new Gtk.Application ({\n"
14491"            application_id: 'org.example.jsgrid',\n"
14492"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
14493"        });\n"
14494"\n"
14495"        // Connect 'activate' and 'startup' signals to the callback functions\n"
14496"        this.application.connect('activate', this._onActivate.bind(this));\n"
14497"        this.application.connect('startup', this._onStartup.bind(this));\n"
14498"    }\n"
14499"\n"
14500"    // Callback function for 'activate' signal presents windows when active\n"
14501"    _onActivate() {\n"
14502"        this._window.present();\n"
14503"    }\n"
14504"\n"
14505"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
14506"    _onStartup() {\n"
14507"        this._buildUI();\n"
14508"    }\n"
14509"\n"
14510"    // Build the application's UI\n"
14511"    _buildUI() {\n"
14512"\n"
14513"        // Create the application window\n"
14514"            this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
14515"                                                         window_position: Gtk.WindowPosition.CENTER,\n"
14516"                                                         title: \"Grid Example\"});\n"
14517"\n"
14518"        // Create the grid\n"
14519"        this.Grid = new Gtk.Grid ();\n"
14520"\n"
14521"        // Create the widgets inside the grid\n"
14522"        this.progressBar = new Gtk.ProgressBar ();\n"
14523"        this.Button = new Gtk.Button ({ label: \"Button\" });\n"
14524"        this.Button.connect (\"clicked\", this._clickHandler.bind(this));\n"
14525"\n"
14526"        // Assemble the grid\n"
14527"        this._window.add (this.Grid);\n"
14528"        this.Grid.attach (this.Button, 1, 1, 1, 1);\n"
14529"        this.Grid.attach_next_to (this.progressBar, this.Button, Gtk.PositionType.BOTTOM, 1, 1);\n"
14530"\n"
14531"                // Show the window and all child widgets\n"
14532"                this._window.show_all();\n"
14533"    }\n"
14534"\n"
14535"    // Here's the function that says what happens when the button is clicked\n"
14536"    _clickHandler() {\n"
14537"        this.progressBar.pulse ();\n"
14538"    }\n"
14539"\n"
14540"\n"
14541"};\n"
14542"\n"
14543"// Run the application\n"
14544"let app = new GridExample ();\n"
14545"app.application.run (ARGV);\n"
14546
14547#. (itstool) path: item/p
14548#: C/grid.js.page:37
14549msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Grid.html\">Gtk.Grid</link>"
14550msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Grid.html\">Gtk.Grid</link>"
14551
14552#. (itstool) path: item/p
14553#: C/grid.js.page:38 C/progressbar.js.page:42
14554msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ProgressBar.html\">Gtk.ProgressBar</link>"
14555msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ProgressBar.html\">Gtk.ProgressBar</link>"
14556
14557#. (itstool) path: info/title
14558#: C/grid.py.page:8
14559msgctxt "text"
14560msgid "Grid (Python)"
14561msgstr "Grid(Python)"
14562
14563#. (itstool) path: page/media
14564#. This is a reference to an external file such as an image or video. When
14565#. the file changes, the md5 hash will change to let you know you need to
14566#. update your localized copy. The msgstr is not used at all. Set it to
14567#. whatever you like once you have updated your copy of the file.
14568#: C/grid.py.page:31
14569msgctxt "_"
14570msgid "external ref='media/grid_simple.png' md5='c806f2e69b30373d4d2e08b41d6cc1f6'"
14571msgstr ""
14572
14573#. (itstool) path: page/p
14574#: C/grid.py.page:32
14575msgid "Some labels in a grid."
14576msgstr "그리드에 레이블 몇 개를 넣어봤습니다."
14577
14578#. (itstool) path: section/code
14579#: C/grid.py.page:38
14580#, no-wrap
14581msgid ""
14582"from gi.repository import Gtk\n"
14583"import sys\n"
14584"\n"
14585"\n"
14586"class MyWindow(Gtk.ApplicationWindow):\n"
14587"\n"
14588"    def __init__(self, app):\n"
14589"        Gtk.Window.__init__(self, title=\"Grid Example\", application=app)\n"
14590"\n"
14591"        # three labels\n"
14592"        label_top_left = Gtk.Label(label=\"This is Top Left\")\n"
14593"        label_top_right = Gtk.Label(label=\"This is Top Right\")\n"
14594"        label_bottom = Gtk.Label(label=\"This is Bottom\")\n"
14595"\n"
14596"        # a grid\n"
14597"        grid = Gtk.Grid()\n"
14598"\n"
14599"        # some space between the columns of the grid\n"
14600"        grid.set_column_spacing(20)\n"
14601"\n"
14602"        # in the grid:\n"
14603"        # attach the first label in the top left corner\n"
14604"        grid.attach(label_top_left, 0, 0, 1, 1)\n"
14605"        # attach the second label\n"
14606"        grid.attach(label_top_right, 1, 0, 1, 1)\n"
14607"        # attach the third label below the first label\n"
14608"        grid.attach_next_to(\n"
14609"            label_bottom, label_top_left, Gtk.PositionType.BOTTOM, 2, 1)\n"
14610"\n"
14611"        # add the grid to the window\n"
14612"        self.add(grid)\n"
14613"\n"
14614"\n"
14615"class MyApplication(Gtk.Application):\n"
14616"\n"
14617"    def __init__(self):\n"
14618"        Gtk.Application.__init__(self)\n"
14619"\n"
14620"    def do_activate(self):\n"
14621"        win = MyWindow(self)\n"
14622"        win.show_all()\n"
14623"\n"
14624"app = MyApplication()\n"
14625"exit_status = app.run(sys.argv)\n"
14626"sys.exit(exit_status)\n"
14627msgstr ""
14628"from gi.repository import Gtk\n"
14629"import sys\n"
14630"\n"
14631"\n"
14632"class MyWindow(Gtk.ApplicationWindow):\n"
14633"\n"
14634"    def __init__(self, app):\n"
14635"        Gtk.Window.__init__(self, title=\"Grid Example\", application=app)\n"
14636"\n"
14637"        # three labels\n"
14638"        label_top_left = Gtk.Label(label=\"This is Top Left\")\n"
14639"        label_top_right = Gtk.Label(label=\"This is Top Right\")\n"
14640"        label_bottom = Gtk.Label(label=\"This is Bottom\")\n"
14641"\n"
14642"        # a grid\n"
14643"        grid = Gtk.Grid()\n"
14644"\n"
14645"        # some space between the columns of the grid\n"
14646"        grid.set_column_spacing(20)\n"
14647"\n"
14648"        # in the grid:\n"
14649"        # attach the first label in the top left corner\n"
14650"        grid.attach(label_top_left, 0, 0, 1, 1)\n"
14651"        # attach the second label\n"
14652"        grid.attach(label_top_right, 1, 0, 1, 1)\n"
14653"        # attach the third label below the first label\n"
14654"        grid.attach_next_to(\n"
14655"            label_bottom, label_top_left, Gtk.PositionType.BOTTOM, 2, 1)\n"
14656"\n"
14657"        # add the grid to the window\n"
14658"        self.add(grid)\n"
14659"\n"
14660"\n"
14661"class MyApplication(Gtk.Application):\n"
14662"\n"
14663"    def __init__(self):\n"
14664"        Gtk.Application.__init__(self)\n"
14665"\n"
14666"    def do_activate(self):\n"
14667"        win = MyWindow(self)\n"
14668"        win.show_all()\n"
14669"\n"
14670"app = MyApplication()\n"
14671"exit_status = app.run(sys.argv)\n"
14672"sys.exit(exit_status)\n"
14673
14674#. (itstool) path: section/title
14675#: C/grid.py.page:42
14676msgid "Useful methods for a Grid widget"
14677msgstr "Grid 위젯에 쓸만한 메서드"
14678
14679#. (itstool) path: item/p
14680#: C/grid.py.page:45
14681msgid ""
14682"To attach a widget <code>child</code> in position <code>left, top</code> in a slot of given <code>width, height</"
14683"code> use <code>attach(child, top, left, width, height)</code>. If a widget <code>sibling</code> is already in "
14684"place, we can also use <code>attach_next_to(child, sibling, side, width, height)</code>, where <code>side</code> "
14685"is one of <code>Gtk.PositionType.LEFT, Gtk.PositionType.RIGHT, Gtk.PositionType.TOP, Gtk.PositionType.BOTTOM</"
14686"code>."
14687msgstr ""
14688"<code>width, height</code> 크기로 <code>left, top</code> 위치에 <code>child</code>  위젯을 붙이려면 "
14689"<code>attach(child, top, left, width, height)</code> 함수를 사용하십시오, <code>sibling</code> 위젯을 이미 두었다"
14690"면 <code>attach_next_to(child, sibling, side, width, height)</code> 함수를 사용할 수 있습니다. 여기서 <code>side</"
14691"code> 값은 <code>Gtk.PositionType.LEFT, Gtk.PositionType.RIGHT, Gtk.PositionType.TOP, Gtk.PositionType.BOTTOM</"
14692"code> 중 하나입니다."
14693
14694#. (itstool) path: item/p
14695#: C/grid.py.page:46
14696msgid ""
14697"<code>insert_row(position)</code> and <code>insert_column(position)</code> do exactly what they say; children "
14698"which are attached at or below this position are moved one row down, and children which span across this position "
14699"are grown to span the new row. <code>insert_next_to(sibling, side)</code> inserts a row or column at the specified "
14700"position. The new row or column is placed next to <code>sibling</code>, on the side determined by <code>side</"
14701"code>; if side is <code>Gtk.PositionType.TOP</code> or <code>Gtk.PositionType.BOTTOM</code>, a row is inserted, if "
14702"side is <code>Gtk.PositionType.LEFT</code> or <code>Gtk.PositionType.RIGHT</code>, a column is inserted."
14703msgstr ""
14704"<code>insert_row(position)</code> 함수와 <code>insert_column(position)</code> 함수는 주어진 이름대로 정확하게 동작"
14705"합니다. 이 위치 옆에 붙은 하위 요소 또는 아래에 붙은 하위 요소를 한줄 아래로 내리며, 이 위치의 하위 요소는 (종,횡 "
14706"방향으로) 새 줄을 확장합니다. <code>insert_next_to(sibling, side)</code>  함수는 지정 위치에 줄이나 행을 넣습니다. "
14707"즉, 이 함수는 새 줄 또는 행을 <code>sibling</code> 다음의 <code>side</code>에서 지정한 위치에 넣습니다. "
14708"<code>side</code> 값이 <code>Gtk.PositionType.TOP</code> 또는 <code>Gtk.PositionType.BOTTOM</code>이면 새 줄을 넣"
14709"고, <code>Gtk.PositionType.LEFT</code> 또는 <code>Gtk.PositionType.RIGHT</code>면 새 칸을 넣습니다."
14710
14711#. (itstool) path: item/p
14712#: C/grid.py.page:47
14713msgid ""
14714"<code>set_row_homogeneous(True)</code> and <code>set_column_homogeneous(True)</code> ensure that (respectively) "
14715"every row or every column has the same width or height."
14716msgstr ""
14717"<code>set_row_homogeneous(True)</code> 함수는 각각 모든 줄의 높이를 동일하게 설정하며 "
14718"<code>set_column_homogeneous(True)</code> 함수는 모든 칸의 너비를 동일하게 설정합니다."
14719
14720#. (itstool) path: item/p
14721#: C/grid.py.page:48
14722msgid ""
14723"<code>set_row_spacing(spacing)</code> and <code>set_column_spacing(spacing)</code> force a spacing between "
14724"(respectively) rows or columns. The value of <code>spacing</code> can be between <code>0</code>, which is the "
14725"default value, and <code>32767</code>."
14726msgstr ""
14727"<code>set_row_spacing(spacing)</code>함수는 줄 간격을 강제로 설정하고 <code>set_column_spacing(spacing)</code> 함수"
14728"는 칸 간격을 강제로 설정합니다. <code>spacing</code> 값은 기본값 <code>0</code>에서 <code>32767</code>값 사이입니"
14729"다."
14730
14731#. (itstool) path: item/p
14732#: C/grid.py.page:59 C/label.py.page:105 C/separator.c.page:41 C/separator.py.page:42 C/switch.py.page:46
14733msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkLabel.html\">GtkLabel</link>"
14734msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkLabel.html\">GtkLabel</link>"
14735
14736#. (itstool) path: item/p
14737#: C/grid.py.page:60 C/paned.c.page:38 C/paned.py.page:44 C/scrolledwindow.py.page:47
14738msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkImage.html\">GtkImage</link>"
14739msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkImage.html\">GtkImage</link>"
14740
14741#. (itstool) path: item/p
14742#: C/grid.py.page:61 C/radiobutton.py.page:50 C/separator.c.page:40 C/separator.py.page:41 C/switch.py.page:47
14743#: C/toolbar_builder.py.page:196
14744msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkGrid.html\">GtkGrid</link>"
14745msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkGrid.html\">GtkGrid</link>"
14746
14747#. (itstool) path: info/title
14748#: C/grid.vala.page:8
14749msgctxt "text"
14750msgid "Grid (Vala)"
14751msgstr "Grid(Vala)"
14752
14753#. (itstool) path: page/title
14754#: C/grid.vala.page:23
14755msgid "Grid widget"
14756msgstr "그리드 위젯"
14757
14758#. (itstool) path: page/code
14759#: C/grid.vala.page:27
14760#, no-wrap
14761msgid ""
14762"public class MyWindow : Gtk.ApplicationWindow {\n"
14763"\n"
14764"\tGtk.Widget progress_bar;\n"
14765"\n"
14766"\tinternal MyWindow (MyApplication app) {\n"
14767"\t\tObject (application: app, title: \"Grid Example\");\n"
14768"\t\tvar grid = new Gtk.Grid();\n"
14769"\t\tprogress_bar = new Gtk.ProgressBar ();\n"
14770"\t\tprogress_bar.show ();\n"
14771"\n"
14772"\t\tvar button = new Gtk.Button.with_label (\"Button\");\n"
14773"\t\tbutton.clicked.connect (on_button_click);\n"
14774"\t\tbutton.show ();\n"
14775"\n"
14776"\t\tthis.add(grid);\n"
14777"\t\tgrid.attach(button, 0, 1, 1, 1);\n"
14778"\t\tgrid.attach_next_to (progress_bar, button, Gtk.PositionType.BOTTOM, 1, 1);\n"
14779"\t\tgrid.show ();\n"
14780"\t}\n"
14781"\n"
14782"\tvoid on_button_click (Gtk.Button button) {\n"
14783"\t\t(progress_bar as Gtk.ProgressBar).pulse ();\n"
14784"\t}\n"
14785"}\n"
14786"\n"
14787"public class MyApplication : Gtk.Application {\n"
14788"\tprotected override void activate () {\n"
14789"\n"
14790"\t\tnew MyWindow (this).show ();\n"
14791"\t}\n"
14792"\n"
14793"\tinternal MyApplication () {\n"
14794"\t\tObject (application_id: \"org.example.MyApplication\");\n"
14795"\n"
14796"\t}\n"
14797"}\n"
14798"\n"
14799"public int main (string[] args) {\n"
14800"\treturn new MyApplication ().run (args);\n"
14801"}\n"
14802msgstr ""
14803"public class MyWindow : Gtk.ApplicationWindow {\n"
14804"\n"
14805"\tGtk.Widget progress_bar;\n"
14806"\n"
14807"\tinternal MyWindow (MyApplication app) {\n"
14808"\t\tObject (application: app, title: \"Grid Example\");\n"
14809"\t\tvar grid = new Gtk.Grid();\n"
14810"\t\tprogress_bar = new Gtk.ProgressBar ();\n"
14811"\t\tprogress_bar.show ();\n"
14812"\n"
14813"\t\tvar button = new Gtk.Button.with_label (\"Button\");\n"
14814"\t\tbutton.clicked.connect (on_button_click);\n"
14815"\t\tbutton.show ();\n"
14816"\n"
14817"\t\tthis.add(grid);\n"
14818"\t\tgrid.attach(button, 0, 1, 1, 1);\n"
14819"\t\tgrid.attach_next_to (progress_bar, button, Gtk.PositionType.BOTTOM, 1, 1);\n"
14820"\t\tgrid.show ();\n"
14821"\t}\n"
14822"\n"
14823"\tvoid on_button_click (Gtk.Button button) {\n"
14824"\t\t(progress_bar as Gtk.ProgressBar).pulse ();\n"
14825"\t}\n"
14826"}\n"
14827"\n"
14828"public class MyApplication : Gtk.Application {\n"
14829"\tprotected override void activate () {\n"
14830"\n"
14831"\t\tnew MyWindow (this).show ();\n"
14832"\t}\n"
14833"\n"
14834"\tinternal MyApplication () {\n"
14835"\t\tObject (application_id: \"org.example.MyApplication\");\n"
14836"\n"
14837"\t}\n"
14838"}\n"
14839"\n"
14840"public int main (string[] args) {\n"
14841"\treturn new MyApplication ().run (args);\n"
14842"}\n"
14843
14844#. (itstool) path: item/p
14845#: C/grid.vala.page:32
14846msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Grid.html\">Gtk.Grid</link>"
14847msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Grid.html\">Gtk.Grid</link>"
14848
14849#. (itstool) path: info/title
14850#: C/GtkApplicationWindow.c.page:8
14851msgctxt "text"
14852msgid "ApplicationWindow (C)"
14853msgstr "ApplicationWindow (C)"
14854
14855#. (itstool) path: info/desc
14856#: C/GtkApplicationWindow.c.page:18
14857msgid "A toplevel window which can contain other widgets, and support GMenu"
14858msgstr "다른 위젯을 넣을 수 있고 GMenu를 지원하는 최상위 창"
14859
14860#. (itstool) path: page/title
14861#: C/GtkApplicationWindow.c.page:21 C/GtkApplicationWindow.js.page:21 C/GtkApplicationWindow.py.page:28
14862#: C/GtkApplicationWindow.vala.page:21
14863msgid "ApplicationWindow"
14864msgstr "ApplicationWindow"
14865
14866#. (itstool) path: page/media
14867#. (itstool) path: td/media
14868#. This is a reference to an external file such as an image or video. When
14869#. the file changes, the md5 hash will change to let you know you need to
14870#. update your localized copy. The msgstr is not used at all. Set it to
14871#. whatever you like once you have updated your copy of the file.
14872#: C/GtkApplicationWindow.c.page:22 C/GtkApplicationWindow.js.page:22 C/GtkApplicationWindow.py.page:29
14873#: C/GtkApplicationWindow.vala.page:22 C/window.c.page:22 C/window.js.page:25 C/window.py.page:33
14874#: C/window.vala.page:25
14875msgctxt "_"
14876msgid "external ref='media/window.png' md5='eb0cde3530978619c25bddfaeb453345'"
14877msgstr ""
14878
14879#. (itstool) path: page/p
14880#: C/GtkApplicationWindow.c.page:23
14881msgid "A minimal GtkApplication with a GtkApplicationWindow"
14882msgstr "GtkApplicationWindow를 사용하는 작은 GtkApplication"
14883
14884#. (itstool) path: page/code
14885#: C/GtkApplicationWindow.c.page:25
14886#, no-wrap
14887msgid ""
14888"#include &lt;gtk/gtk.h&gt;\n"
14889"\n"
14890"static void\n"
14891"activate (GtkApplication *app,\n"
14892"          gpointer        user_data)\n"
14893"{\n"
14894"  GtkWidget *window;\n"
14895"\n"
14896"  window = gtk_application_window_new (app);\n"
14897"  gtk_window_set_title (GTK_WINDOW (window), \"Hello GNOME\");\n"
14898"  gtk_widget_show_all (window);\n"
14899"}\n"
14900"\n"
14901"int\n"
14902"main (int argc, char **argv)\n"
14903"{\n"
14904"  GtkApplication *app;\n"
14905"  int status;\n"
14906"\n"
14907"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
14908"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
14909"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
14910"  g_object_unref (app);\n"
14911"  return status;\n"
14912"}\n"
14913msgstr ""
14914"#include &lt;gtk/gtk.h&gt;\n"
14915"\n"
14916"static void\n"
14917"activate (GtkApplication *app,\n"
14918"          gpointer        user_data)\n"
14919"{\n"
14920"  GtkWidget *window;\n"
14921"\n"
14922"  window = gtk_application_window_new (app);\n"
14923"  gtk_window_set_title (GTK_WINDOW (window), \"Hello GNOME\");\n"
14924"  gtk_widget_show_all (window);\n"
14925"}\n"
14926"\n"
14927"int\n"
14928"main (int argc, char **argv)\n"
14929"{\n"
14930"  GtkApplication *app;\n"
14931"  int status;\n"
14932"\n"
14933"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
14934"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
14935"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
14936"  g_object_unref (app);\n"
14937"  return status;\n"
14938"}\n"
14939
14940#. (itstool) path: item/p
14941#: C/GtkApplicationWindow.c.page:31
14942msgid "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkApplicationWindow.html\">GtkApplicationWindow</link>"
14943msgstr "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkApplicationWindow.html\">GtkApplicationWindow</link>"
14944
14945#. (itstool) path: info/title
14946#: C/GtkApplicationWindow.js.page:8
14947msgctxt "text"
14948msgid "ApplicationWindow (JavaScript)"
14949msgstr "ApplicationWindow (JavaScript)"
14950
14951#. (itstool) path: info/desc
14952#: C/GtkApplicationWindow.js.page:18 C/GtkApplicationWindow.py.page:25 C/GtkApplicationWindow.vala.page:18
14953msgid "GtkWindow subclass with GtkApplication support"
14954msgstr "GtkApplication을 지원하는 GtkWindow 하위 클래스"
14955
14956#. (itstool) path: page/p
14957#: C/GtkApplicationWindow.js.page:23
14958msgid "A simple GtkApplicationWindow which can support Menus."
14959msgstr "Menu를 지원하는 간단한 GtkApplicationWindow 입니다."
14960
14961#. (itstool) path: page/code
14962#: C/GtkApplicationWindow.js.page:25
14963#, no-wrap
14964msgid ""
14965"\n"
14966"#!/usr/bin/gjs\n"
14967"\n"
14968"imports.gi.versions.Gtk = '3.0';\n"
14969"\n"
14970"const Gio = imports.gi.Gio;\n"
14971"const GLib = imports.gi.GLib;\n"
14972"const Gtk = imports.gi.Gtk;\n"
14973"\n"
14974"class Application {\n"
14975"\n"
14976"    //create the application\n"
14977"    constructor() {\n"
14978"        this.application = new Gtk.Application ({\n"
14979"            application_id: 'org.example.myapp',\n"
14980"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
14981"        });\n"
14982"\n"
14983"       //connect to 'activate' and 'startup' signals to the callback functions\n"
14984"       this.application.connect('activate', this._onActivate.bind(this));\n"
14985"       this.application.connect('startup', this._onStartup.bind(this));\n"
14986"    }\n"
14987"\n"
14988"    //create the UI (in this case it's just the ApplicationWindow\n"
14989"    _buildUI() {\n"
14990"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
14991"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
14992"                                                   title: \"Welcome to GNOME\" });\n"
14993"\n"
14994"        //uncommenting the line below will change the window size\n"
14995"        //this._window.set_default_size(600, 400);\n"
14996"\n"
14997"        //show the window and all child widgets (none in this case)\n"
14998"        this._window.show_all();\n"
14999"    }\n"
15000"\n"
15001"    //callback function for 'activate' signal\n"
15002"    _onActivate() {\n"
15003"        this._window.present();\n"
15004"    }\n"
15005"\n"
15006"    //callback function for 'startup' signal\n"
15007"    _onStartup() {\n"
15008"        this._buildUI();\n"
15009"    }\n"
15010"};\n"
15011"\n"
15012"//run the application\n"
15013"let app = new Application ();\n"
15014"app.application.run (ARGV);\n"
15015msgstr ""
15016"\n"
15017"#!/usr/bin/gjs\n"
15018"\n"
15019"imports.gi.versions.Gtk = '3.0';\n"
15020"\n"
15021"const Gio = imports.gi.Gio;\n"
15022"const GLib = imports.gi.GLib;\n"
15023"const Gtk = imports.gi.Gtk;\n"
15024"\n"
15025"class Application {\n"
15026"\n"
15027"    //create the application\n"
15028"    constructor() {\n"
15029"        this.application = new Gtk.Application ({\n"
15030"            application_id: 'org.example.myapp',\n"
15031"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
15032"        });\n"
15033"\n"
15034"       //connect to 'activate' and 'startup' signals to the callback functions\n"
15035"       this.application.connect('activate', this._onActivate.bind(this));\n"
15036"       this.application.connect('startup', this._onStartup.bind(this));\n"
15037"    }\n"
15038"\n"
15039"    //create the UI (in this case it's just the ApplicationWindow\n"
15040"    _buildUI() {\n"
15041"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
15042"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
15043"                                                   title: \"Welcome to GNOME\" });\n"
15044"\n"
15045"        //uncommenting the line below will change the window size\n"
15046"        //this._window.set_default_size(600, 400);\n"
15047"\n"
15048"        //show the window and all child widgets (none in this case)\n"
15049"        this._window.show_all();\n"
15050"    }\n"
15051"\n"
15052"    //callback function for 'activate' signal\n"
15053"    _onActivate() {\n"
15054"        this._window.present();\n"
15055"    }\n"
15056"\n"
15057"    //callback function for 'startup' signal\n"
15058"    _onStartup() {\n"
15059"        this._buildUI();\n"
15060"    }\n"
15061"};\n"
15062"\n"
15063"//run the application\n"
15064"let app = new Application ();\n"
15065"app.application.run (ARGV);\n"
15066
15067#. (itstool) path: info/title
15068#: C/GtkApplicationWindow.py.page:8
15069msgctxt "text"
15070msgid "ApplicationWindow (Python)"
15071msgstr "ApplicationWindow (Python)"
15072
15073#. (itstool) path: page/p
15074#: C/GtkApplicationWindow.py.page:30
15075msgid "The simplest GtkApplication Window which can support <link xref=\"gmenu.py\"/>."
15076msgstr "<link xref=\"gmenu.py\"/>를 지원할 수 있는 간단한 GtkApplication 창입니다."
15077
15078#. (itstool) path: section/code
15079#: C/GtkApplicationWindow.py.page:37
15080#, no-wrap
15081msgid ""
15082"from gi.repository import Gtk\n"
15083"import sys\n"
15084"\n"
15085"# a Gtk ApplicationWindow\n"
15086"\n"
15087"\n"
15088"class MyWindow(Gtk.ApplicationWindow):\n"
15089"    # constructor: the title is \"Welcome to GNOME\" and the window belongs\n"
15090"    # to the application app\n"
15091"\n"
15092"    def __init__(self, app):\n"
15093"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
15094"\n"
15095"\n"
15096"class MyApplication(Gtk.Application):\n"
15097"    # constructor of the Gtk Application\n"
15098"\n"
15099"    def __init__(self):\n"
15100"        Gtk.Application.__init__(self)\n"
15101"\n"
15102"    # create and activate a MyWindow, with self (the MyApplication) as\n"
15103"    # application the window belongs to.\n"
15104"    # Note that the function in C activate() becomes do_activate() in Python\n"
15105"    def do_activate(self):\n"
15106"        win = MyWindow(self)\n"
15107"        # show the window and all its content\n"
15108"        # this line could go in the constructor of MyWindow as well\n"
15109"        win.show_all()\n"
15110"\n"
15111"    # start up the application\n"
15112"    # Note that the function in C startup() becomes do_startup() in Python\n"
15113"    def do_startup(self):\n"
15114"        Gtk.Application.do_startup(self)\n"
15115"\n"
15116"# create and run the application, exit with the value returned by\n"
15117"# running the program\n"
15118"app = MyApplication()\n"
15119"exit_status = app.run(sys.argv)\n"
15120"sys.exit(exit_status)\n"
15121msgstr ""
15122"from gi.repository import Gtk\n"
15123"import sys\n"
15124"\n"
15125"# a Gtk ApplicationWindow\n"
15126"\n"
15127"\n"
15128"class MyWindow(Gtk.ApplicationWindow):\n"
15129"    # constructor: the title is \"Welcome to GNOME\" and the window belongs\n"
15130"    # to the application app\n"
15131"\n"
15132"    def __init__(self, app):\n"
15133"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
15134"\n"
15135"\n"
15136"class MyApplication(Gtk.Application):\n"
15137"    # constructor of the Gtk Application\n"
15138"\n"
15139"    def __init__(self):\n"
15140"        Gtk.Application.__init__(self)\n"
15141"\n"
15142"    # create and activate a MyWindow, with self (the MyApplication) as\n"
15143"    # application the window belongs to.\n"
15144"    # Note that the function in C activate() becomes do_activate() in Python\n"
15145"    def do_activate(self):\n"
15146"        win = MyWindow(self)\n"
15147"        # show the window and all its content\n"
15148"        # this line could go in the constructor of MyWindow as well\n"
15149"        win.show_all()\n"
15150"\n"
15151"    # start up the application\n"
15152"    # Note that the function in C startup() becomes do_startup() in Python\n"
15153"    def do_startup(self):\n"
15154"        Gtk.Application.do_startup(self)\n"
15155"\n"
15156"# create and run the application, exit with the value returned by\n"
15157"# running the program\n"
15158"app = MyApplication()\n"
15159"exit_status = app.run(sys.argv)\n"
15160"sys.exit(exit_status)\n"
15161
15162#. (itstool) path: section/title
15163#: C/GtkApplicationWindow.py.page:41
15164msgid "Useful methods for a Gtk.ApplicationWindow widget"
15165msgstr "Gtk.ApplicationWindow 위젯에 쓸만한 메서드"
15166
15167#. (itstool) path: item/p
15168#: C/GtkApplicationWindow.py.page:44 C/window.py.page:54
15169msgid ""
15170"<code>set_default_size(200, 100)</code> sets the default size of the window to a width of <code>200</code> and a "
15171"height of <code>100</code>; if instead of a positive number we pass <code>-1</code> we have the default size."
15172msgstr ""
15173"<code>set_default_size(200, 100)</code> 함수는 창의 기본 크기를 너비 <code>200</code>, 높이 <code>100</code>으로 설"
15174"정합니다. 양수를 넣지 않을 때는 기본 크기를 설정할 때 대신 <code>-1</code> 값을 전달합니다."
15175
15176#. (itstool) path: item/p
15177#: C/GtkApplicationWindow.py.page:45 C/window.py.page:55
15178msgid ""
15179"<code>set_position(Gtk.WindowPosition.CENTER)</code> centers the window. Other options are <code>Gtk."
15180"WindowPosition.NONE, Gtk.WindowPosition.MOUSE, Gtk.WindowPosition.CENTER_ALWAYS, Gtk.WindowPosition."
15181"CENTER_ON_PARENT</code>."
15182msgstr ""
15183"<code>set_position(Gtk.WindowPosition.CENTER)</code> 함수는 창을 가운데에 놓습니다. 다른 옵션으로는 <code>Gtk."
15184"WindowPosition.NONE, Gtk.WindowPosition.MOUSE, Gtk.WindowPosition.CENTER_ALWAYS, Gtk.WindowPosition."
15185"CENTER_ON_PARENT</code>가 있습니다."
15186
15187#. (itstool) path: info/title
15188#: C/GtkApplicationWindow.vala.page:8
15189msgctxt "text"
15190msgid "ApplicationWindow (Vala)"
15191msgstr "ApplicationWindow (Vala)"
15192
15193#. (itstool) path: page/p
15194#: C/GtkApplicationWindow.vala.page:23
15195msgid "The simplest GtkApplication Window which can support Menus."
15196msgstr "메뉴를 지원하는 간단한 GtkApplication 창입니다."
15197
15198#. (itstool) path: page/code
15199#: C/GtkApplicationWindow.vala.page:25
15200#, no-wrap
15201msgid ""
15202"\n"
15203"/* This is the application. */\n"
15204"public class MyApplication : Gtk.Application {\n"
15205"\t/* Override the 'activate' signal of GLib.Application. */\n"
15206"\tprotected override void activate () {\n"
15207"\t\t/* Create the window of this application and show it. */\n"
15208"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
15209"\t\twindow.title = \"Welcome to GNOME\";\n"
15210"\t\twindow.show ();\n"
15211"\t}\n"
15212"}\n"
15213"\n"
15214"/* main creates and runs the application. */\n"
15215"public int main (string[] args) {\n"
15216"\treturn new MyApplication ().run (args);\n"
15217"}\n"
15218msgstr ""
15219"\n"
15220"/* This is the application. */\n"
15221"public class MyApplication : Gtk.Application {\n"
15222"\t/* Override the 'activate' signal of GLib.Application. */\n"
15223"\tprotected override void activate () {\n"
15224"\t\t/* Create the window of this application and show it. */\n"
15225"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
15226"\t\twindow.title = \"Welcome to GNOME\";\n"
15227"\t\twindow.show ();\n"
15228"\t}\n"
15229"}\n"
15230"\n"
15231"/* main creates and runs the application. */\n"
15232"public int main (string[] args) {\n"
15233"\treturn new MyApplication ().run (args);\n"
15234"}\n"
15235
15236#. (itstool) path: item/p
15237#: C/GtkApplicationWindow.vala.page:31 C/label.vala.page:31
15238msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Application.html.content.tpl\">Gtk.Application</link>"
15239msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Application.html.content.tpl\">Gtk.Application</link>"
15240
15241#. (itstool) path: info/title
15242#: C/guitar-tuner.c.page:8
15243msgctxt "text"
15244msgid "Guitar tuner (C)"
15245msgstr "기타 조율기(C)"
15246
15247#. (itstool) path: info/desc
15248#: C/guitar-tuner.c.page:11 C/guitar-tuner.py.page:11
15249msgid ""
15250"Use GTK+ and GStreamer to build a simple guitar tuner application for GNOME. Shows off how to use the interface "
15251"designer."
15252msgstr ""
15253"GTK+와 지스트리머를 간단한 그놈용 기타 조율기 프로그램을 만들어보겠습니다. 인터페이스 디자이너 사용법을 나타냅니다."
15254
15255#. (itstool) path: credit/name
15256#: C/guitar-tuner.c.page:19 C/guitar-tuner.cpp.page:17 C/guitar-tuner.py.page:19 C/guitar-tuner.vala.page:18
15257#: C/image-viewer.c.page:19 C/image-viewer.cpp.page:17 C/image-viewer.js.page:19 C/image-viewer.py.page:19
15258#: C/image-viewer.vala.page:19 C/index.page:18 C/magic-mirror.vala.page:19 C/photo-wall.c.page:18
15259#: C/record-collection.js.page:19
15260msgid "Johannes Schmid"
15261msgstr "Johannes Schmid"
15262
15263#. (itstool) path: page/title
15264#: C/guitar-tuner.c.page:29 C/guitar-tuner.cpp.page:27 C/guitar-tuner.js.page:20 C/guitar-tuner.py.page:34
15265#: C/guitar-tuner.vala.page:32
15266msgid "Guitar tuner"
15267msgstr "기타 조율기"
15268
15269#. (itstool) path: synopsis/p
15270#: C/guitar-tuner.c.page:32 C/guitar-tuner.cpp.page:30 C/guitar-tuner.py.page:37
15271msgid ""
15272"In this tutorial, we're going to make a program which plays tones that you can use to tune a guitar. You will "
15273"learn how to:"
15274msgstr "이 지침서에서, 기타 조율에 사용할 수 있는 음색을 재생하는 프로그램을 만들겠습니다. 다음 내용을 배워나갑니다:"
15275
15276#. (itstool) path: item/p
15277#: C/guitar-tuner.c.page:34 C/guitar-tuner.cpp.page:32 C/guitar-tuner.py.page:39
15278msgid "Set up a basic project in Anjuta"
15279msgstr "안주타에서 기본 프로젝트 설정"
15280
15281#. (itstool) path: item/p
15282#: C/guitar-tuner.c.page:35 C/guitar-tuner.cpp.page:33 C/guitar-tuner.py.page:40
15283msgid "Create a simple GUI with Anjuta's UI designer"
15284msgstr "안주타 사용자 인터페이스 디자이너에서 간단한 GUI 만들기"
15285
15286#. (itstool) path: item/p
15287#: C/guitar-tuner.c.page:36 C/guitar-tuner.cpp.page:34 C/guitar-tuner.py.page:41
15288msgid "Use GStreamer to play sounds"
15289msgstr "지스트리머를 사용하여 소리 재생하기"
15290
15291#. (itstool) path: synopsis/p
15292#: C/guitar-tuner.c.page:38 C/guitar-tuner.cpp.page:36 C/guitar-tuner.py.page:43 C/guitar-tuner.vala.page:41
15293#: C/image-viewer.js.page:39 C/image-viewer.py.page:39 C/image-viewer.vala.page:46 C/magic-mirror.vala.page:39
15294msgid "You'll need the following to be able to follow this tutorial:"
15295msgstr "이 지침을 따라갈 수 있으려면 다음이 필요합니다:"
15296
15297#. (itstool) path: item/p
15298#: C/guitar-tuner.c.page:40 C/guitar-tuner.cpp.page:38 C/guitar-tuner.py.page:45 C/image-viewer.js.page:41
15299#: C/image-viewer.py.page:41 C/magic-mirror.vala.page:41
15300msgid "An installed copy of the <link xref=\"getting-ready\">Anjuta IDE</link>"
15301msgstr "<link xref=\"getting-ready\">안주타 IDE</link> 설치 사본"
15302
15303#. (itstool) path: item/p
15304#: C/guitar-tuner.c.page:41
15305msgid "Basic knowledge of the C programming language"
15306msgstr "C 프로그래밍 언어 기본 지식"
15307
15308#. (itstool) path: page/media
15309#. This is a reference to an external file such as an image or video. When
15310#. the file changes, the md5 hash will change to let you know you need to
15311#. update your localized copy. The msgstr is not used at all. Set it to
15312#. whatever you like once you have updated your copy of the file.
15313#: C/guitar-tuner.c.page:45 C/guitar-tuner.cpp.page:43 C/guitar-tuner.js.page:37 C/guitar-tuner.py.page:50
15314#: C/guitar-tuner.vala.page:48
15315msgctxt "_"
15316msgid "external ref='media/guitar-tuner.png' md5='35e615e0f5e293671d00c5c414ac2f6b'"
15317msgstr ""
15318
15319#. (itstool) path: section/title
15320#: C/guitar-tuner.c.page:48 C/guitar-tuner.cpp.page:46 C/guitar-tuner.py.page:53 C/image-viewer.c.page:42
15321#: C/image-viewer.cpp.page:40 C/image-viewer.js.page:50 C/image-viewer.py.page:49 C/image-viewer.vala.page:57
15322#: C/magic-mirror.vala.page:50 C/message-board.c.page:46 C/photo-wall.c.page:52 C/record-collection.js.page:53
15323msgid "Create a project in Anjuta"
15324msgstr "안주타에서 프로젝트 만들기"
15325
15326#. (itstool) path: section/p
15327#: C/guitar-tuner.c.page:49 C/guitar-tuner.cpp.page:47 C/guitar-tuner.py.page:54 C/guitar-tuner.vala.page:52
15328#: C/image-viewer.c.page:43 C/image-viewer.cpp.page:41 C/image-viewer.js.page:51 C/image-viewer.py.page:50
15329#: C/image-viewer.vala.page:58 C/magic-mirror.vala.page:51 C/photo-wall.c.page:53 C/record-collection.js.page:54
15330msgid ""
15331"Before you start coding, you'll need to set up a new project in Anjuta. This will create all of the files you need "
15332"to build and run the code later on. It's also useful for keeping everything together."
15333msgstr ""
15334"코딩을 시작하기 전에 안주타에서 새 프로젝트를 설정해야합니다. 이 프로그램은 빌드에 필요한 모든 파일을 만들고 그 다"
15335"음 코드를 실행합니다. 또한 이 모든 상태를 유지 관리하는데 쓸만합니다."
15336
15337#. (itstool) path: item/p
15338#: C/guitar-tuner.c.page:52 C/guitar-tuner.cpp.page:50 C/guitar-tuner.py.page:57 C/image-viewer.c.page:46
15339#: C/image-viewer.cpp.page:44 C/image-viewer.js.page:54 C/image-viewer.py.page:53 C/magic-mirror.vala.page:54
15340#: C/photo-wall.c.page:56 C/record-collection.js.page:57
15341msgid ""
15342"Start Anjuta and click <guiseq><gui>File</gui><gui>New</gui><gui>Project</gui></guiseq> to open the project wizard."
15343msgstr ""
15344"안주타를 시작하고 <guiseq><gui>파일</gui><gui>새로 만들기</gui><gui>프로젝트</gui></guiseq> 를 눌러 프로젝트 마법사"
15345"를 여십시오."
15346
15347#. (itstool) path: item/p
15348#: C/guitar-tuner.c.page:55
15349msgid ""
15350"Choose <gui>GTK+ (Simple)</gui> from the <gui>C</gui> tab, click <gui>Continue</gui>, and fill out your details on "
15351"the next few pages. Use <file>guitar-tuner</file> as project name and directory."
15352msgstr ""
15353"<gui>C</gui> 탭에서 <gui>GTK+ (단순)</gui>를 선택하고, <gui>계속</gui>을 누른 다음, 나타난 페이지에서 몇가지 자세"
15354"한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>guitar-tuner</file>를 입력하십시오."
15355
15356#. (itstool) path: item/p
15357#: C/guitar-tuner.c.page:58
15358msgid ""
15359"Make sure that <gui>Configure external packages</gui> is switched <gui>ON</gui>. On the next page, select "
15360"<em>gstreamer-0.10</em> from the list to include the GStreamer library in your project."
15361msgstr ""
15362"<gui>외부 패키지 설정</gui>을 <gui>켬</gui>으로 설정했는지 확인하십시오. 다음 페이지의 목록에서 "
15363"<em>gstreamer-0.10</em>를 선택하여 프로젝트에 지스트리머 라이브러리를 넣으십시오."
15364
15365#. (itstool) path: item/p
15366#: C/guitar-tuner.c.page:62 C/image-viewer.c.page:57 C/photo-wall.c.page:71
15367msgid ""
15368"Click <gui>Apply</gui> and the project will be created for you. Open <file>src/main.c</file> from the "
15369"<gui>Project</gui> or <gui>File</gui> tabs. You should see some code which starts with the lines:"
15370msgstr ""
15371"<gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/main.c</"
15372"file> 파일을 여십시오. 다음 줄로 시작하는 일부 코드를 볼 수 있어야합니다:"
15373
15374#. (itstool) path: item/code
15375#: C/guitar-tuner.c.page:63 C/image-viewer.c.page:58 C/photo-wall.c.page:72
15376#, no-wrap
15377msgid ""
15378"\n"
15379"#include &lt;config.h&gt;\n"
15380"#include &lt;gtk/gtk.h&gt;"
15381msgstr ""
15382"\n"
15383"#include &lt;config.h&gt;\n"
15384"#include &lt;gtk/gtk.h&gt;"
15385
15386#. (itstool) path: section/title
15387#: C/guitar-tuner.c.page:71 C/guitar-tuner.cpp.page:69 C/guitar-tuner.vala.page:74 C/image-viewer.c.page:66
15388#: C/image-viewer.cpp.page:66 C/image-viewer.vala.page:113 C/magic-mirror.vala.page:78
15389msgid "Build the code for the first time"
15390msgstr "첫 코드 작성"
15391
15392#. (itstool) path: section/p
15393#: C/guitar-tuner.c.page:72
15394msgid ""
15395"C is a rather verbose language, so don't be surprised that the file contains quite a lot of code. Most of it is "
15396"template code. It loads an (empty) window from the user interface description file and shows it. More details are "
15397"given below; skip this list if you understand the basics:"
15398msgstr ""
15399"C는 장황하게 하나하나 다 따지고 들어가야 하는 언어니, 좀 많은 코드가 들어가 있는 파일에 놀라지 않으셔도 됩니다. 대"
15400"부분은 서식 코드입니다. 이 코드에서는 사용자 인터페이스 설명 파일에서 (빈) 창을 불러와 열고 화면에 나타냅니다. 자세"
15401"한 내용은 아래에 있습니다. 기본을 이미 알고 있다면 이 부분은 건너뛰십시오:"
15402
15403#. (itstool) path: item/p
15404#: C/guitar-tuner.c.page:76 C/image-viewer.c.page:71
15405msgid ""
15406"The three <code>#include</code> lines at the top include the <code>config</code> (useful autoconf build defines), "
15407"<code>gtk</code> (user interface) and <code>gi18n</code> (internationalization) libraries. Functions from these "
15408"libraries are used in the rest of the code."
15409msgstr ""
15410"상단의 <code>#include</code> 세 줄은 <code>config</code>(쓸만한 autoconf 빌드 정의),  <code>gtk</code>(사용자 인터"
15411"페이스), <code>gi18n</code>(국제화) 라이브러리입니다. 이 라이브러리의 함수를 나머지 코드에서 사용하겠습니다."
15412
15413#. (itstool) path: item/p
15414#: C/guitar-tuner.c.page:79
15415msgid ""
15416"The <code>create_window</code> function creates a new window by opening a GtkBuilder file (<file>src/guitar-tuner."
15417"ui</file>, defined a few lines above), connecting its signals and then displaying it in a window. The GtkBuilder "
15418"file contains a description of a user interface and all of its elements. You can use Anjuta's editor to design "
15419"GtkBuilder user interfaces."
15420msgstr ""
15421"<code>create_window</code> 함수는 GtkBuilder 파일(<file>src/guitar-tuner.ui</file> 위 몇 줄 지정)을 열어 새 창을 만"
15422"들고, 시그널을 연결한 다음, 창에 띄웁니다. GtkBuilder 파일에는 사용자 인터페이스 설명 정보와 구성요소 모두가 들어있"
15423"습니다. GtkBuilder 사용자 인터페이스를 설계할 때 안주타 편집기를 사용할 수 있습니다."
15424
15425#. (itstool) path: item/p
15426#: C/guitar-tuner.c.page:80 C/image-viewer.c.page:75 C/image-viewer.vala.page:123
15427msgid ""
15428"Connecting signals is how you define what happens when you push a button, or when some other event happens. Here, "
15429"the <code>destroy</code> function is called (and quits the app) when you close the window."
15430msgstr ""
15431"시그널 연결은 단추를 누르거나 어떤 동작을 취할 때 처리할 일을 정의하는 방식입니다. 여기서 창을 닫을 때 "
15432"<code>destroy</code> 함수를 호출(하고 앱을 끝내기)합니다."
15433
15434#. (itstool) path: item/p
15435#: C/guitar-tuner.c.page:83 C/image-viewer.c.page:78
15436msgid ""
15437"The <code>main</code> function is run by default when you start a C application. It calls a few functions which "
15438"set up and then run the application. The <code>gtk_main</code> function starts the GTK main loop, which runs the "
15439"user interface and starts listening for events (like clicks and key presses)."
15440msgstr ""
15441"<code>main</code> 함수는 C 프로그램을 시작할 때 기본으로 실행하는 함수입니다. 이 함수에서 몇가지 함수를 호출하여 설"
15442"정하고 프로그램을 실행합니다. <code>gtk_main</code> 함수는 사용자 인터페이스를 실행하고 사용자 반응(마우스 단추 누"
15443"름, 키보드 키 누름)대기를 시작하는 GTK 메인 루프 시작 함수입니다."
15444
15445#. (itstool) path: item/p
15446#: C/guitar-tuner.c.page:86 C/image-viewer.c.page:81
15447msgid ""
15448"The <code>ENABLE_NLS</code> conditional definition sets up <code>gettext</code>, which is a framework for "
15449"translating applications. These functions specify how translation tools should handle your app when you run them."
15450msgstr ""
15451"<code>ENABLE_NLS</code> 상태 정의는 프로그램을 번역하는 프레임워크 <code>gettext</code>를 설정합니다. 이 함수는 프"
15452"로그램을 실행할 때 번역 도구가 프로그램을 어떻게 다뤄야 하는지를 설정합니다."
15453
15454#. (itstool) path: section/p
15455#: C/guitar-tuner.c.page:90 C/guitar-tuner.cpp.page:84 C/image-viewer.c.page:85 C/image-viewer.cpp.page:82
15456#: C/image-viewer.vala.page:133 C/magic-mirror.vala.page:93
15457msgid ""
15458"This code is ready to be used, so you can compile it by clicking <guiseq><gui>Build</gui><gui>Build Project</gui></"
15459"guiseq> (or press <keyseq><key>Shift</key><key>F7</key></keyseq>)."
15460msgstr ""
15461"이 코드를 사용할 준비가 됐으니 <guiseq><gui>빌드</gui><gui>프로젝트 빌드</gui></guiseq>(또는 <keyseq><key>Shift</"
15462"key><key>F7</key></keyseq> 키 누름)를 눌러 코드를 컴파일할 수 있습니다."
15463
15464#. (itstool) path: section/p
15465#: C/guitar-tuner.c.page:91 C/guitar-tuner.cpp.page:85 C/image-viewer.c.page:86 C/image-viewer.cpp.page:83
15466msgid ""
15467"Press <gui>Execute</gui> on the next window that appears to configure a debug build. You only need to do this "
15468"once, for the first build."
15469msgstr "디버깅 빌드 설정이 나타나는 다음 창에서 <gui>실행</gui> 을 누르십시오. 처음 빌드할 때 한번만 하면 됩니다."
15470
15471#. (itstool) path: section/title
15472#: C/guitar-tuner.c.page:95 C/guitar-tuner.cpp.page:89 C/guitar-tuner.py.page:96 C/guitar-tuner.vala.page:96
15473msgid "Create the user interface"
15474msgstr "사용자 인터페이스 만들기"
15475
15476#. (itstool) path: section/p
15477#: C/guitar-tuner.c.page:96 C/guitar-tuner.cpp.page:90
15478msgid ""
15479"A description of the user interface (UI) is contained in the GtkBuilder file. To edit the user interface, open "
15480"<file>src/guitar_tuner.ui</file>. This will switch to the interface designer. The design window is in the center; "
15481"widgets and widgets' properties are on the left, and the palette of available widgets is on the right."
15482msgstr ""
15483"사용자 인터페이스(UI) 설명은 GtkBuilder 파일에 있습니다. 사용자 인터페이스를 편집하려면 <file>src/guitar_tuner.ui</"
15484"file> 파일을 여십시오. 이 과정에서 바로 인터페이스 디자이너로 넘어갑니다. 설계 창은 가운데에 있고 위젯과 위젯 속성"
15485"은 왼편에, 사용할 수 있는 위젯은 오른편에 있습니다."
15486
15487#. (itstool) path: section/p
15488#: C/guitar-tuner.c.page:98 C/guitar-tuner.cpp.page:92 C/guitar-tuner.py.page:99
15489msgid ""
15490"The layout of every UI in GTK+ is organized using boxes and tables. Let's use a vertical <gui>GtkButtonBox</gui> "
15491"here to assign six <gui>GtkButtons</gui>, one for each of the six guitar strings."
15492msgstr ""
15493"GTK+의 모든 UI 배치는 상자와 표로 구성합니다. 가로 방향 <gui>GtkButtonBox</gui>를 여기서 사용하여 각 기타 줄에 해당"
15494"하는 여섯 개의 <gui>GtkButtons</gui> 단추를 넣어보겠습니다."
15495
15496#. (itstool) path: section/media
15497#. This is a reference to an external file such as an image or video. When
15498#. the file changes, the md5 hash will change to let you know you need to
15499#. update your localized copy. The msgstr is not used at all. Set it to
15500#. whatever you like once you have updated your copy of the file.
15501#: C/guitar-tuner.c.page:100 C/guitar-tuner.cpp.page:94 C/guitar-tuner.py.page:101 C/guitar-tuner.vala.page:101
15502msgctxt "_"
15503msgid "external ref='media/guitar-tuner-glade.png' md5='f6606525443ab2160f53a87a454364d0'"
15504msgstr ""
15505
15506#. (itstool) path: item/p
15507#: C/guitar-tuner.c.page:104 C/guitar-tuner.cpp.page:98 C/guitar-tuner.py.page:105
15508msgid ""
15509"Select a <gui>GtkButtonBox</gui> from the <gui>Container</gui> section of the <gui>Palette</gui> on the right and "
15510"put it into the window. In the <gui>Properties</gui> pane, set the number of elements to 6 (for the six strings) "
15511"and the orientation to vertical."
15512msgstr ""
15513"우측 <gui>팔레트</gui>의 <gui>컨테이너</gui> 섹션에서 <gui>GtkButtonBox</gui> 를 선택하여 창에 가져다 높으십시오. "
15514"<gui>속성</gui> 창에서 구성 요소 수를 6(기타 줄 6개)으로 설정하고, 방향은 세로(vertical)로 설정하십시오."
15515
15516#. (itstool) path: item/p
15517#: C/guitar-tuner.c.page:108 C/guitar-tuner.cpp.page:102 C/guitar-tuner.py.page:109
15518msgid "Now, choose a <gui>GtkButton</gui> from the palette and put it into the first part of the box."
15519msgstr "이제 팔레트에서 <gui>GtkButton</gui> 를 선택하고 상자의 처음 부분에 가져다 놓으십시오."
15520
15521#. (itstool) path: item/p
15522#: C/guitar-tuner.c.page:111 C/guitar-tuner.py.page:112
15523msgid ""
15524"While the button is still selected, change the <gui>Label</gui> property in the <gui>Widgets</gui> tab to <gui>E</"
15525"gui>. This will be the low E string."
15526msgstr ""
15527"단추를 선택한 상태에서 <gui>위젯</gui> 탭의 <gui>레이블</gui> 속성을 <gui>E</gui>로 바꾸십시오. 기타의 낮은 E 줄을 "
15528"의미합니다."
15529
15530#. (itstool) path: item/p
15531#: C/guitar-tuner.c.page:114 C/guitar-tuner.py.page:115
15532msgid ""
15533"Switch to the <gui>Signals</gui> tab (inside the <gui>Widgets</gui> tab) and look for the <code>clicked</code> "
15534"signal of the button. You can use this to connect a signal handler that will be called when the button is clicked "
15535"by the user. To do this, click on the signal and type <code>on_button_clicked</code> in the <gui>Handler</gui> "
15536"column and press <key>Return</key>."
15537msgstr ""
15538"<gui>시그널</gui> 탭(<gui>위젯</gui> 탭에 있음)으로 옮겨가서 단추의 <code>clicked</code> 시그널을 찾아보십시오. 이 "
15539"시그널을 사용자가 단추를 눌렀을 때 호출할 시그널 핸들러에 연결할 수 있습니다. 이렇게 하려면, 시그널을 누르고 <gui>"
15540"핸들러</gui> 칸에 <code>on_button_clicked</code>를 입력하신 다음 <key>Return</key>키를 누르십시오."
15541
15542#. (itstool) path: item/p
15543#: C/guitar-tuner.c.page:117 C/guitar-tuner.py.page:118 C/guitar-tuner.vala.page:122
15544msgid ""
15545"Repeat the above steps for the other buttons, adding the next 5 strings with the names <em>A</em>, <em>D</em>, "
15546"<em>G</em>, <em>B</em>, and <em>e</em>."
15547msgstr ""
15548"다른 단추에 대해서도 그 다음 줄 이름 <em>A</em>, <em>D</em>, <em>G</em>, <em>B</em>, <em>e</em>를 추가하여 위 단계"
15549"를 반복하십시오."
15550
15551#. (itstool) path: item/p
15552#: C/guitar-tuner.c.page:120 C/guitar-tuner.py.page:121 C/guitar-tuner.vala.page:125
15553msgid "Save the UI design (by clicking <guiseq><gui>File</gui><gui>Save</gui></guiseq>) and keep it open."
15554msgstr "UI 디자인을 저장(<guiseq><gui>파일</gui><gui>저장</gui></guiseq> 누름)하시고 열어둔 상태로 두십시오."
15555
15556#. (itstool) path: section/title
15557#: C/guitar-tuner.c.page:126 C/guitar-tuner.vala.page:203
15558msgid "Creating the signal handler"
15559msgstr "시그널 핸들러 만들기"
15560
15561#. (itstool) path: section/p
15562#: C/guitar-tuner.c.page:127 C/guitar-tuner.py.page:128
15563msgid ""
15564"In the UI designer, you made it so that all of the buttons will call the same function, <gui>on_button_clicked</"
15565"gui>, when they are clicked. We need to add that function in the source file."
15566msgstr ""
15567"UI 디자이너에서 모든 단추를 누르면 동일한 <gui>on_button_clicked</gui> 함수를 호출하도록 할 수 있습니다. 이 함수를 "
15568"소스 파일에 추가해야합니다."
15569
15570#. (itstool) path: section/p
15571#: C/guitar-tuner.c.page:128
15572msgid ""
15573"To do this, open <file>main.c</file> while the user interface file is still open. Switch to the <gui>Signals</gui> "
15574"tab, which you already used to set the signal name. Now take the row where you set the <gui>clicked</gui> signal "
15575"and drag it into to the source file at a position that is outside any function. The following code will be added "
15576"to your source file:"
15577msgstr ""
15578"이렇게 하려면, 사용자 인터페이스 파일을 열어둔 상태에서 <file>main.c</file> 파일을 여십시오. 시그널 이름을 설정하는"
15579"데 사용한 <gui>시그널</gui> 탭으로 옮겨가십시오. 이제 <gui>clicked</gui> 시그널을 설정한 줄로 가서, 이 항목을 소스 "
15580"파일의 함수 바깥에 끌어다 놓으십시오. 그러면 다음 코드가 소스 파일에 들어갑니다:"
15581
15582#. (itstool) path: section/code
15583#: C/guitar-tuner.c.page:131
15584#, no-wrap
15585msgid ""
15586"\n"
15587"void on_button_clicked (GtkWidget* button, gpointer user_data)\n"
15588"{\n"
15589"\n"
15590"}"
15591msgstr ""
15592"\n"
15593"void on_button_clicked (GtkWidget* button, gpointer user_data)\n"
15594"{\n"
15595"\n"
15596"}"
15597
15598#. (itstool) path: section/p
15599#: C/guitar-tuner.c.page:136
15600msgid ""
15601"This signal handler has two arguments: a pointer to the <code>GtkWidget</code> that called the function (in our "
15602"case, always a <code>GtkButton</code>), and a pointer to some \"user data\" that you can define, but which we "
15603"won't be using here. (You can set the user data by calling <code>gtk_builder_connect_signals</code>; it is "
15604"normally used to pass a pointer to a data structure that you might need to access inside the signal handler.)"
15605msgstr ""
15606"이 시그널 핸들러는 함수로 호출하는 <code>GtkWidget</code>(이 경우 항상 <code>GtkButton</code>)의 포인터, 그리고 여"
15607"러분이 정의할 수 있지만 여기서는 활용하지 않을 \"사용자 데이터\" 포인터를 인자로 두고 있습니다"
15608"(<code>gtk_builder_connect_signals</code>를 호출하여 사용자 데이터를 설정할 수 있습니다. 보통 시그널 핸들러 내에서 "
15609"접근할 데이터 구조의 포인터를 전달할 때 사용합니다)."
15610
15611#. (itstool) path: section/p
15612#: C/guitar-tuner.c.page:137 C/guitar-tuner.py.page:136
15613msgid "For now, we'll leave the signal handler empty while we work on writing the code to produce sounds."
15614msgstr "이제 소리를 내는 코드를 작성하는 동안 시그널 핸들러를 비워두겠습니다."
15615
15616#. (itstool) path: section/title
15617#: C/guitar-tuner.c.page:141 C/guitar-tuner.cpp.page:118 C/guitar-tuner.js.page:39 C/guitar-tuner.py.page:140
15618#: C/guitar-tuner.vala.page:131
15619msgid "GStreamer pipelines"
15620msgstr "지스트리머 파이프라인"
15621
15622#. (itstool) path: section/p
15623#: C/guitar-tuner.c.page:142 C/guitar-tuner.js.page:40 C/guitar-tuner.py.page:141
15624msgid ""
15625"GStreamer is GNOME's multimedia framework — you can use it for playing, recording, and processing video, audio, "
15626"webcam streams and the like. Here, we'll be using it to produce single-frequency tones."
15627msgstr ""
15628"지스트리머는 그놈 멀티미디어 프레임워크입니다. 동영상 오디오 웹캠 스트림 같은걸 재생, 녹음/녹화, 처리할 때 지스트리"
15629"머를 사용할 수 있습니다. 여기서는 단일 주파수 음색을 만들 때 사용하겠습니다."
15630
15631#. (itstool) path: section/p
15632#: C/guitar-tuner.c.page:143 C/guitar-tuner.cpp.page:121 C/guitar-tuner.js.page:41 C/guitar-tuner.py.page:142
15633msgid ""
15634"Conceptually, GStreamer works as follows: You create a <em>pipeline</em> containing several processing elements "
15635"going from the <em>source</em> to the <em>sink</em> (output). The source can be an image file, a video, or a music "
15636"file, for example, and the output could be a widget or the soundcard."
15637msgstr ""
15638"개념적으로 지스트리머 동작은 다음과 같습니다. (우선) <em>source</em>에서  <em>sink</em>(출력)으로 내보낼 수많은 처"
15639"리 요소가 들어간 <em>파이프라인</em>을 만듭니다. source는 그림 파일, 동영상, 음악 파일일 수 있으며, 출력 대상은 위"
15640"젯 또는 사운드 카드가 될 수 있습니다."
15641
15642#. (itstool) path: section/p
15643#: C/guitar-tuner.c.page:144 C/guitar-tuner.cpp.page:122 C/guitar-tuner.js.page:42 C/guitar-tuner.py.page:143
15644#: C/guitar-tuner.vala.page:134
15645msgid ""
15646"Between source and sink, you can apply various filters and converters to handle effects, format conversions and so "
15647"on. Each element of the pipeline has properties which can be used to change its behaviour."
15648msgstr ""
15649"source와 sink 사이에서 다양한 필터와 변환 프로그램을 적용하여 효과를 처리하거나, 형식을 변환하는 등을 할 수 있습니"
15650"다. 각 파이프라인 구성 요소에는 동작을 바꿀 수 있는 속성이 있습니다."
15651
15652#. (itstool) path: section/media
15653#. This is a reference to an external file such as an image or video. When
15654#. the file changes, the md5 hash will change to let you know you need to
15655#. update your localized copy. The msgstr is not used at all. Set it to
15656#. whatever you like once you have updated your copy of the file.
15657#: C/guitar-tuner.c.page:145 C/guitar-tuner.cpp.page:123 C/guitar-tuner.js.page:43 C/guitar-tuner.py.page:144
15658#: C/guitar-tuner.vala.page:135
15659msgctxt "_"
15660msgid "external ref='media/guitar-tuner-pipeline.png' md5='5adc952909d92af5dae6954781b4ad5f'"
15661msgstr ""
15662
15663#. (itstool) path: media/p
15664#: C/guitar-tuner.c.page:146 C/guitar-tuner.cpp.page:124 C/guitar-tuner.js.page:44 C/guitar-tuner.py.page:145
15665#: C/guitar-tuner.vala.page:136
15666msgid "An example GStreamer pipeline."
15667msgstr "지스트리머 파이프라인 예제입니다."
15668
15669#. (itstool) path: section/title
15670#: C/guitar-tuner.c.page:151 C/guitar-tuner.py.page:150 C/guitar-tuner.vala.page:141
15671msgid "Set up the pipeline"
15672msgstr "파이프라인 구성"
15673
15674#. (itstool) path: section/p
15675#: C/guitar-tuner.c.page:152 C/guitar-tuner.cpp.page:135 C/guitar-tuner.py.page:151
15676msgid ""
15677"In this simple example we will use a tone generator source called <code>audiotestsrc</code> and send the output to "
15678"the default system sound device, <code>autoaudiosink</code>. We only need to configure the frequency of the tone "
15679"generator; this is accessible through the <code>freq</code> property of <code>audiotestsrc</code>."
15680msgstr ""
15681"여기 단순 예제에서는 <code>audiotestsrc</code> 라는 음 재생기 소스를 사용하고 기본 시스템 사운드 장치 "
15682"<code>autoaudiosink</code>로 출력을 내보내겠습니다. 우리는 여기서 음 재생기 주파수를 설정해야합니다.  "
15683"<code>audiotestsrc</code>의 <code>freq</code> 속성을 사용하면 됩니다."
15684
15685#. (itstool) path: section/p
15686#: C/guitar-tuner.c.page:154
15687msgid ""
15688"Insert the following line into <file>main.c</file>, just below the <code>#include &lt;gtk/gtk.h&gt;</code> line:"
15689msgstr "다음 줄을 <file>main.c</file>에 <code>#include &lt;gtk/gtk.h&gt;</code> 줄 바로 밑에 넣으십시오:"
15690
15691#. (itstool) path: section/code
15692#: C/guitar-tuner.c.page:155
15693#, no-wrap
15694msgid "#include &lt;gst/gst.h&gt;"
15695msgstr "#include &lt;gst/gst.h&gt;"
15696
15697#. (itstool) path: section/p
15698#: C/guitar-tuner.c.page:156
15699msgid ""
15700"This includes the GStreamer library. You also need to add a line to initialize GStreamer; put the following code "
15701"on the line above the <code>gtk_init</code> call in the <code>main</code> function:"
15702msgstr ""
15703"여기에 지스트리머 라이브러리가 들어있습니다. 아래 줄을 추가해서 지스트리머를 초기화해야합니다. <code>main</code>  "
15704"함수의 <code>gtk_init</code> 함수 호출 위에 다음 코드를 넣으십시오:"
15705
15706#. (itstool) path: section/code
15707#: C/guitar-tuner.c.page:157
15708#, no-wrap
15709msgid "gst_init (&amp;argc, &amp;argv);"
15710msgstr "gst_init (&amp;argc, &amp;argv);"
15711
15712#. (itstool) path: section/p
15713#: C/guitar-tuner.c.page:158
15714msgid ""
15715"Then, copy the following function into <file>main.c</file> above the empty <code>on_button_clicked</code> function:"
15716msgstr ""
15717"다음, 아래의 함수를 <file>main.c</file> 함수의 위에서 만들어 비워둔 <code>on_button_clicked</code> 함수에 복사해넣"
15718"으십시오:"
15719
15720#. (itstool) path: section/code
15721#: C/guitar-tuner.c.page:159
15722#, no-wrap
15723msgid ""
15724"static void\n"
15725"play_sound (gdouble frequency)\n"
15726"{\n"
15727"\tGstElement *source, *sink;\n"
15728"\tGstElement *pipeline;\n"
15729"\n"
15730"\tpipeline = gst_pipeline_new (\"note\");\n"
15731"\tsource   = gst_element_factory_make (\"audiotestsrc\",\n"
15732"\t                                     \"source\");\n"
15733"\tsink     = gst_element_factory_make (\"autoaudiosink\",\n"
15734"\t                                     \"output\");\n"
15735"\n"
15736"\t/* set frequency */\n"
15737"\tg_object_set (source, \"freq\", frequency, NULL);\n"
15738"\n"
15739"\tgst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);\n"
15740"\tgst_element_link (source, sink);\n"
15741"\n"
15742"\tgst_element_set_state (pipeline, GST_STATE_PLAYING);\n"
15743"\n"
15744"\t/* stop it after 500ms */\n"
15745"\tg_timeout_add (LENGTH, (GSourceFunc) pipeline_stop, pipeline);\n"
15746"}"
15747msgstr ""
15748"static void\n"
15749"play_sound (gdouble frequency)\n"
15750"{\n"
15751"\tGstElement *source, *sink;\n"
15752"\tGstElement *pipeline;\n"
15753"\n"
15754"\tpipeline = gst_pipeline_new (\"note\");\n"
15755"\tsource   = gst_element_factory_make (\"audiotestsrc\",\n"
15756"\t                                     \"source\");\n"
15757"\tsink     = gst_element_factory_make (\"autoaudiosink\",\n"
15758"\t                                     \"output\");\n"
15759"\n"
15760"\t/* set frequency */\n"
15761"\tg_object_set (source, \"freq\", frequency, NULL);\n"
15762"\n"
15763"\tgst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);\n"
15764"\tgst_element_link (source, sink);\n"
15765"\n"
15766"\tgst_element_set_state (pipeline, GST_STATE_PLAYING);\n"
15767"\n"
15768"\t/* stop it after 500ms */\n"
15769"\tg_timeout_add (LENGTH, (GSourceFunc) pipeline_stop, pipeline);\n"
15770"}"
15771
15772#. (itstool) path: item/p
15773#: C/guitar-tuner.c.page:185
15774msgid ""
15775"The first five lines create source and sink GStreamer elements (<code>GstElement</code>), and a pipeline element "
15776"(which will be used as a container for the other two elements). The pipeline is given the name \"note\"; the "
15777"source is named \"source\" and is set to the <code>audiotestsrc</code> source; and the sink is named \"output\" "
15778"and set to the <code>autoaudiosink</code> sink (default sound card output)."
15779msgstr ""
15780"처음 다섯줄에서는 source와 sink 지스트리머 구성 요소(<code>GstElement</code>), 파이프라인 구성 요소(source와 sink"
15781"의 컨테이너로 활용)를 만듭니다. 파이프라인 이름은 \"note\"라고 지어둡니다. source는 \"source\"로 이름 붙이고 "
15782"<code>audiotestsrc</code>로 설정합니다. sink는 \"output\"으로 이름 붙이고 <code>autoaudiosink</code> sink로 설정합"
15783"니다(기본은 사운드 카드 출력)."
15784
15785#. (itstool) path: item/p
15786#: C/guitar-tuner.c.page:188
15787msgid ""
15788"The call to <code>g_object_set</code> sets the <code>freq</code> property of the source element to "
15789"<code>frequency</code>, which is passed as an argument to the <code>play_sound</code> function. This is just the "
15790"frequency of the note in Hertz; some useful frequencies will be defined later on."
15791msgstr ""
15792"<code>g_object_set</code> 호출로 source 구성 요소의 <code>freq</code> 속성 값을 <code>play_sound</code> 함수에 인자"
15793"로 전달할 <code>frequency</code> 로 설정합니다. 이 변수는 헤르쯔 단위의 음 주파수일 뿐입니다. 쓸만한 주파수는 나중"
15794"에 설정하겠습니다."
15795
15796#. (itstool) path: item/p
15797#: C/guitar-tuner.c.page:191
15798msgid ""
15799"<code>gst_bin_add_many</code> puts the source and sink into the pipeline. The pipeline is a <code>GstBin</code>, "
15800"which is just an element that can contain multiple other GStreamer elements. In general, you can add as many "
15801"elements as you like to the pipeline by adding more arguments to <code>gst_bin_add_many</code>."
15802msgstr ""
15803"<code>gst_bin_add_many</code>는 파이프 라인에 source와 sink를 둡니다. 파이프라인은 다른 지스트리머 구성 요소 여러가"
15804"지를 둘 수 있는 <code>GstBin</code> 입니다. 보통 여러분은 <code>gst_bin_add_many</code>에 더 많은 인자를 넣어 파이"
15805"프라인에 더 많은 구성요소를 추가할 수 있습니다."
15806
15807#. (itstool) path: item/p
15808#: C/guitar-tuner.c.page:194
15809msgid ""
15810"Next, <code>gst_element_link</code> is used to connect the elements together, so the output of <code>source</code> "
15811"(a tone) goes into the input of <code>sink</code> (which is then output to the sound card). "
15812"<code>gst_element_set_state</code> is then used to start playback, by setting the state of the pipeline to playing "
15813"(<code>GST_STATE_PLAYING</code>)."
15814msgstr ""
15815"다음, 구성 요소 각각을 연결하여 <code>source</code>(음) 출력을 <code>sink</code> (사운드 카드 출력) 입력으로 보낼 "
15816"때 <code>gst_element_link</code> 함수를 사용합니다. 그 다음 <code>gst_element_set_state</code> 함수로 파이프라인 상"
15817"태를 재생(<code>GST_STATE_PLAYING</code>)으로 두어 음을 재생합니다."
15818
15819#. (itstool) path: section/title
15820#: C/guitar-tuner.c.page:201 C/guitar-tuner.py.page:191
15821msgid "Stopping playback"
15822msgstr "재생 정지"
15823
15824#. (itstool) path: section/p
15825#: C/guitar-tuner.c.page:202
15826msgid ""
15827"We don't want to play an annoying tone forever, so the last thing <code>play_sound</code> does is to call "
15828"<code>g_timeout_add</code>. This sets a timeout for stopping the sound; it waits for <code>LENGTH</code> "
15829"milliseconds before calling the function <code>pipeline_stop</code>, and will keep calling it until "
15830"<code>pipeline_stop</code> returns <code>FALSE</code>."
15831msgstr ""
15832"음을 무한정 지겹게 재생하고 싶지는 않기 때문에 <code>play_sound</code> 함수에서 <code>g_timeout_add</code> 함수를 "
15833"호출합니다. 이 함수에서 음 재생을 멈출 제한 시간을 설정합니다.  <code>pipeline_stop</code> 함수를 호출하기 전에 "
15834"<code>LENGTH</code> 밀리초 동안 기다리며, <code>pipeline_stop</code>함수에서 <code>FALSE</code> 값을 반환하기 전에"
15835"는 함수 호출을 지속합니다."
15836
15837#. (itstool) path: section/p
15838#: C/guitar-tuner.c.page:203
15839msgid ""
15840"Now, we'll write the <code>pipeline_stop</code> function which is called by <code>g_timeout_add</code>. Insert the "
15841"following code <em>above</em> the <code>play_sound</code> function:"
15842msgstr ""
15843"이제 <code>g_timeout_add</code> 함수에서 호출할 <code>pipeline_stop</code> 함수를 작성하겠습니다. 다음 코드를 "
15844"<code>play_sound</code> <em>상단</em>에 넣으십시오:"
15845
15846#. (itstool) path: section/code
15847#: C/guitar-tuner.c.page:204
15848#, no-wrap
15849msgid ""
15850"\n"
15851"#define LENGTH 500 /* Length of playing in ms */\n"
15852"\n"
15853"static gboolean\n"
15854"pipeline_stop (GstElement* pipeline)\n"
15855"{\n"
15856"\tgst_element_set_state (pipeline, GST_STATE_NULL);\n"
15857"\tg_object_unref (pipeline);\n"
15858"\n"
15859"\treturn FALSE;\n"
15860"}"
15861msgstr ""
15862"\n"
15863"#define LENGTH 500 /* Length of playing in ms */\n"
15864"\n"
15865"static gboolean\n"
15866"pipeline_stop (GstElement* pipeline)\n"
15867"{\n"
15868"\tgst_element_set_state (pipeline, GST_STATE_NULL);\n"
15869"\tg_object_unref (pipeline);\n"
15870"\n"
15871"\treturn FALSE;\n"
15872"}"
15873
15874#. (itstool) path: section/p
15875#: C/guitar-tuner.c.page:215
15876msgid ""
15877"The call to <code>gst_element_set_state</code> stops the playback of the pipeline and <code>g_object_unref</code> "
15878"unreferences the pipeline, destroying it and freeing its memory."
15879msgstr ""
15880"<code>gst_element_set_state</code> 함수 호출로 파이프라인 재생을 멈추며, <code>g_object_unref</code> 함수로 파이프"
15881"라인 참조를 해제하고 파이프라인 자체를 파괴한 다음, 할당한 메모리 공간을 놓아줍니다."
15882
15883#. (itstool) path: section/title
15884#: C/guitar-tuner.c.page:219 C/guitar-tuner.py.page:208
15885msgid "Define the tones"
15886msgstr "음색 정의"
15887
15888#. (itstool) path: section/p
15889#: C/guitar-tuner.c.page:220
15890msgid ""
15891"We want to play the correct sound when the user clicks a button. First of all, we need to know the frequencies for "
15892"the six guitar strings, which are defined (at the top of <file>main.c</file>) as follows:"
15893msgstr ""
15894"사용자가 단추를 눌렀을 때 올바른 소리를 재생하고자합니다. 우선 다음과 같이 (<file>main.c</file> 상단에) 정의한 기"
15895"타 6현의 주파수를 알아야합니다:"
15896
15897#. (itstool) path: section/code
15898#: C/guitar-tuner.c.page:221
15899#, no-wrap
15900msgid ""
15901"\n"
15902"/* Frequencies of the strings */\n"
15903"#define NOTE_E 329.63\n"
15904"#define NOTE_A 440\n"
15905"#define NOTE_D 587.33\n"
15906"#define NOTE_G 783.99\n"
15907"#define NOTE_B 987.77\n"
15908"#define NOTE_e 1318.5"
15909msgstr ""
15910"\n"
15911"/* Frequencies of the strings */\n"
15912"#define NOTE_E 329.63\n"
15913"#define NOTE_A 440\n"
15914"#define NOTE_D 587.33\n"
15915"#define NOTE_G 783.99\n"
15916"#define NOTE_B 987.77\n"
15917"#define NOTE_e 1318.5"
15918
15919#. (itstool) path: section/p
15920#: C/guitar-tuner.c.page:229 C/guitar-tuner.py.page:222
15921msgid ""
15922"Now to flesh out the signal handler that we defined earlier, <code>on_button_clicked</code>. We could have "
15923"connected every button to a different signal handler, but that would lead to a lot of code duplication. Instead, "
15924"we can use the label of the button to figure out which button was clicked:"
15925msgstr ""
15926"이제 이전에 정의한 시그널 핸들러 <code>on_button_clicked</code> 에 내용을 추가할 차례입니다. 모든 단추에 각기 다른 "
15927"시그널 핸들러를 연결할 수 있지만, 같은 코드를 여러번 반복할 수 있습니다. 대신, 어떤 단추를 눌렀는지 확인할 용도로 "
15928"단추 레이블을 활용할 수 있습니다:"
15929
15930#. (itstool) path: section/code
15931#: C/guitar-tuner.c.page:230
15932#, no-wrap
15933msgid ""
15934"\n"
15935"/* Callback for the buttons */\n"
15936"void on_button_clicked (GtkButton* button,\n"
15937"                        gpointer user_data)\n"
15938"{\n"
15939"\tconst gchar* text = gtk_button_get_label (button);\n"
15940"\n"
15941"\tif (g_str_equal (text, _(\"E\")))\n"
15942"\t    play_sound (NOTE_E);\n"
15943"\telse if (g_str_equal (text, _(\"A\")))\n"
15944"\t    play_sound (NOTE_A);\n"
15945"\telse if (g_str_equal (text, _(\"G\")))\n"
15946"\t    play_sound (NOTE_G);\n"
15947"\telse if (g_str_equal (text, _(\"D\")))\n"
15948"\t    play_sound (NOTE_D);\n"
15949"\telse if (g_str_equal (text, _(\"B\")))\n"
15950"\t    play_sound (NOTE_B);\n"
15951"\telse if (g_str_equal (text, _(\"e\")))\n"
15952"\t    play_sound (NOTE_e);\n"
15953"}\n"
15954msgstr ""
15955"\n"
15956"/* Callback for the buttons */\n"
15957"void on_button_clicked (GtkButton* button,\n"
15958"                        gpointer user_data)\n"
15959"{\n"
15960"\tconst gchar* text = gtk_button_get_label (button);\n"
15961"\n"
15962"\tif (g_str_equal (text, _(\"E\")))\n"
15963"\t    play_sound (NOTE_E);\n"
15964"\telse if (g_str_equal (text, _(\"A\")))\n"
15965"\t    play_sound (NOTE_A);\n"
15966"\telse if (g_str_equal (text, _(\"G\")))\n"
15967"\t    play_sound (NOTE_G);\n"
15968"\telse if (g_str_equal (text, _(\"D\")))\n"
15969"\t    play_sound (NOTE_D);\n"
15970"\telse if (g_str_equal (text, _(\"B\")))\n"
15971"\t    play_sound (NOTE_B);\n"
15972"\telse if (g_str_equal (text, _(\"e\")))\n"
15973"\t    play_sound (NOTE_e);\n"
15974"}\n"
15975
15976#. (itstool) path: section/p
15977#: C/guitar-tuner.c.page:251
15978msgid ""
15979"A pointer to the <code>GtkButton</code> that was clicked is passed as an argument (<code>button</code>) to "
15980"<code>on_button_clicked</code>. We can get the text of that button using <code>gtk_button_get_label</code>."
15981msgstr ""
15982"누른 <code>GtkButton</code>의 포인터를 <code>on_button_clicked</code>의 인자(<code>button</code>)로 전달합니다. 단"
15983"추의 글자는 <code>gtk_button_get_label</code> 함수로 가져올 수 있습니다."
15984
15985#. (itstool) path: section/p
15986#: C/guitar-tuner.c.page:252
15987msgid ""
15988"The text is then compared to the notes that we have using <code>g_str_equal</code>, and <code>play_sound</code> is "
15989"called with the frequency appropriate for that note. This plays the tone; we have a working guitar tuner!"
15990msgstr ""
15991"<code>g_str_equal</code> 함수로 이 글자를 비교한 후, 음에 맞는 주파수로 <code>play_sound</code> 함수를 호출합니다. "
15992"이 절차로 음을 재생합니다. 이제 동작하는 기타 조율기가 만들어졌군요!"
15993
15994#. (itstool) path: section/title
15995#: C/guitar-tuner.c.page:256 C/guitar-tuner.cpp.page:255 C/guitar-tuner.vala.page:253 C/image-viewer.c.page:222
15996#: C/image-viewer.cpp.page:210 C/image-viewer.vala.page:280 C/photo-wall.c.page:392
15997msgid "Build and run the application"
15998msgstr "프로그램 빌드 및 실행"
15999
16000#. (itstool) path: section/p
16001#: C/guitar-tuner.c.page:257 C/guitar-tuner.vala.page:254 C/image-viewer.c.page:223 C/image-viewer.cpp.page:211
16002#: C/image-viewer.vala.page:281
16003msgid ""
16004"All of the code should now be ready to go. Click <guiseq><gui>Build</gui><gui>Build Project</gui></guiseq> to "
16005"build everything again, and then <guiseq><gui>Run</gui><gui>Execute</gui></guiseq> to start the application."
16006msgstr ""
16007"모든 코드를 실행할 준비가 됐습니다. <guiseq><gui>빌드</gui><gui>프로젝트 빌드</gui></guiseq>를 눌러 프로젝트 전체"
16008"를 다시 빌드하고, <guiseq><gui>실행</gui><gui>실행</gui></guiseq>을 눌러 프로그램을 시작하십시오."
16009
16010#. (itstool) path: section/p
16011#: C/guitar-tuner.c.page:258 C/guitar-tuner.cpp.page:257 C/guitar-tuner.vala.page:255
16012msgid ""
16013"If you haven't already done so, choose the <file>Debug/src/guitar-tuner</file> application in the dialog that "
16014"appears. Finally, hit <gui>Run</gui> and enjoy!"
16015msgstr ""
16016"아직 끝내지 않았다면 나타난 대화상자에서 <file>Debug/src/guitar-tuner</file>  프로그램을 선택하십시오. 마지막으로 "
16017"<gui>Run</gui>를 눌러 만든 프로그램을 즐기시죠!"
16018
16019#. (itstool) path: section/title
16020#: C/guitar-tuner.c.page:262 C/guitar-tuner.cpp.page:261 C/guitar-tuner.js.page:242 C/guitar-tuner.py.page:240
16021#: C/guitar-tuner.vala.page:259 C/image-viewer.c.page:228 C/image-viewer.cpp.page:216 C/image-viewer.js.page:316
16022#: C/image-viewer.py.page:230 C/image-viewer.vala.page:288 C/magic-mirror.vala.page:150 C/photo-wall.c.page:400
16023#: C/record-collection.js.page:297
16024msgid "Reference Implementation"
16025msgstr "참조 구현체"
16026
16027#. (itstool) path: section/p
16028#: C/guitar-tuner.c.page:263
16029msgid ""
16030"If you run into problems with the tutorial, compare your code with this <link href=\"guitar-tuner/guitar-tuner.c"
16031"\">reference code</link>."
16032msgstr ""
16033"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"guitar-tuner/guitar-tuner.c\">참조 코드</link>와 여러"
16034"분의 코드를 비교해보십시오."
16035
16036#. (itstool) path: section/title
16037#: C/guitar-tuner.c.page:267 C/guitar-tuner.cpp.page:274 C/guitar-tuner.py.page:245 C/guitar-tuner.vala.page:270
16038#: C/image-viewer.c.page:233 C/image-viewer.cpp.page:221 C/image-viewer.js.page:321 C/image-viewer.py.page:235
16039#: C/image-viewer.vala.page:293
16040msgid "Next steps"
16041msgstr "다음 단계"
16042
16043#. (itstool) path: section/p
16044#: C/guitar-tuner.c.page:268 C/guitar-tuner.cpp.page:275 C/guitar-tuner.py.page:246 C/guitar-tuner.vala.page:271
16045#: C/image-viewer.c.page:234 C/image-viewer.cpp.page:222 C/image-viewer.js.page:322 C/image-viewer.py.page:236
16046#: C/image-viewer.vala.page:294
16047msgid "Here are some ideas for how you can extend this simple demonstration:"
16048msgstr "여기 간단한 시험 프로그램에 여러분이 추가로 넣을 수 있는 몇가지 아이디어가 있습니다:"
16049
16050#. (itstool) path: item/p
16051#: C/guitar-tuner.c.page:271 C/guitar-tuner.cpp.page:278 C/guitar-tuner.py.page:249 C/guitar-tuner.vala.page:274
16052msgid "Have the program automatically cycle through the notes."
16053msgstr "프로그램에 음 재생 자동 주기 기능 넣기."
16054
16055#. (itstool) path: item/p
16056#: C/guitar-tuner.c.page:274 C/guitar-tuner.cpp.page:281 C/guitar-tuner.py.page:252 C/guitar-tuner.vala.page:277
16057msgid "Make the program play recordings of real guitar strings being plucked."
16058msgstr "프로그램에 실제 기타 현을 퉁겼을 때의 음을 녹음하여 재생하기."
16059
16060#. (itstool) path: item/p
16061#: C/guitar-tuner.c.page:275 C/guitar-tuner.cpp.page:282 C/guitar-tuner.py.page:253 C/guitar-tuner.vala.page:278
16062msgid ""
16063"To do this, you would need to set up a more complicated GStreamer pipeline which allows you to load and play back "
16064"music files. You'll have to choose <link href=\"http://gstreamer.freedesktop.org/documentation/plugins.html"
16065"\">decoder and demuxer</link> GStreamer elements based on the file format of your recorded sounds — MP3s use "
16066"different elements to Ogg Vorbis files, for example."
16067msgstr ""
16068"이 동작을 구현하려면 음악 파일을 불러와서 재생할 수 있도록 지스트리머 파이프라인을 좀 더 복잡하게 설정해야합니다. "
16069"녹음 음원의 파일 형식에 따른<link href=\"http://gstreamer.freedesktop.org/documentation/plugins.html\">decoder와 "
16070"demuxer</link> 지스트리머 구성 요소를 선택해야 할 수도 있습니다. 예를 들자면 MP3는 Ogg Vorbis 파일과는 다른 구성 요"
16071"소를 활용합니다."
16072
16073#. (itstool) path: item/p
16074#: C/guitar-tuner.c.page:276 C/guitar-tuner.cpp.page:283 C/guitar-tuner.py.page:254 C/guitar-tuner.vala.page:279
16075msgid ""
16076"You might need to connect the elements in more complicated ways too. This could involve using <link href=\"http://"
16077"gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-intro-basics.html\">GStreamer concepts</"
16078"link> that we didn't cover in this tutorial, such as <link href=\"http://gstreamer.freedesktop.org/data/doc/"
16079"gstreamer/head/manual/html/section-intro-basics-pads.html\">pads</link>. You may also find the <cmd>gst-inspect</"
16080"cmd> command useful."
16081msgstr ""
16082"좀 더 복잡한 식으로 구성 요소를 연결해야 할 수도 있습니다. <link href=\"http://gstreamer.freedesktop.org/data/doc/"
16083"gstreamer/head/manual/html/section-intro-basics-pads.html\">pads</link>와 같이 우리가 지침서에서 다룰 수 없는 "
16084"<link href=\"http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-intro-basics.html\">지스"
16085"트리머 개념</link>이 들어갈 수도 있습니다. 쓸만한 <cmd>gst-inspect</cmd>  명령을 찾아볼 수도 있습니다."
16086
16087#. (itstool) path: item/p
16088#: C/guitar-tuner.c.page:279 C/guitar-tuner.cpp.page:286 C/guitar-tuner.py.page:257 C/guitar-tuner.vala.page:282
16089msgid "Automatically analyze notes that the user plays."
16090msgstr "사용자 연주 음을 자동으로 분석."
16091
16092#. (itstool) path: item/p
16093#: C/guitar-tuner.c.page:280 C/guitar-tuner.cpp.page:287 C/guitar-tuner.py.page:258 C/guitar-tuner.vala.page:283
16094msgid ""
16095"You could connect a microphone and record sounds from it using an <link href=\"http://gstreamer.freedesktop.org/"
16096"data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-autoaudiosrc.html\">input source</"
16097"link>. Perhaps some form of <link href=\"http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-"
16098"plugins/html/gst-plugins-good-plugins-plugin-spectrum.html\">spectrum analysis</link> would allow you to figure "
16099"out what notes are being played?"
16100msgstr ""
16101"마이크를 연결하고 <link href=\"http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/"
16102"html/gst-plugins-good-plugins-autoaudiosrc.html\">input source</link>로 음을 녹음할 수 있습니다. 아마도 <link href="
16103"\"http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-"
16104"plugin-spectrum.html\">스펙트럼 분석</link> 같은 것으로 어떤 음을 재생했는지 알 수 있겠죠?"
16105
16106#. (itstool) path: info/desc
16107#: C/guitar-tuner.cpp.page:9
16108msgid ""
16109"Use GTKmm and GStreamermm to build a simple guitar tuner application for GNOME. Shows off how to use the interface "
16110"designer."
16111msgstr ""
16112"GTKmm과 Gstreamermm을 활용하여 간단한 그놈용 기타 조율 프로그램을 만들어보겠습니다. 인터페이스 디자이너 활용 방법"
16113"을 보여드립니다."
16114
16115#. (itstool) path: item/p
16116#: C/guitar-tuner.cpp.page:39
16117msgid "Basic knowledge of the C++ programming language"
16118msgstr "C++ 프로그래밍 언어 기본 지식"
16119
16120#. (itstool) path: item/p
16121#: C/guitar-tuner.cpp.page:53
16122msgid ""
16123"Choose <gui>GTKmm (Simple)</gui> from the <gui>C++</gui> tab, click <gui>Forward</gui>, and fill out your details "
16124"on the next few pages. Use <file>guitar-tuner</file> as project name and directory."
16125msgstr ""
16126"<gui>C++</gui> 탭에서 <gui>GTKmm (단순)</gui>을 선택한 후 <gui>다음</gui> 을 누르고 다음 페이지 몇 군데에서 자세한 "
16127"내용을 채워나가십시오. 프로젝트 이름과 디렉터리 이름은 <file>guitar-tuner</file>로 설정하십시오."
16128
16129#. (itstool) path: item/p
16130#: C/guitar-tuner.cpp.page:56
16131msgid ""
16132"Make sure that <gui>Configure external packages</gui> is selected. On the next page, select <em>gstreamermm-0.10</"
16133"em> from the list to include the GStreamermm library in your project."
16134msgstr ""
16135"<gui>외부 패키지 설정</gui>을 선택했는지 확인하십시오. 다음 페이지 목록에서 <em>gstreamermm-0.10</em>을 선택하고 프"
16136"로젝트에 GStreamermm 라이브러리를 넣으십시오."
16137
16138#. (itstool) path: item/p
16139#: C/guitar-tuner.cpp.page:60
16140msgid ""
16141"Click <gui>Finished</gui> and the project will be created for you. Open <file>src/main.cc</file> from the "
16142"<gui>Project</gui> or <gui>File</gui> tabs. You should see some code which starts with the lines:"
16143msgstr ""
16144"<gui>마침</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/main.cc</"
16145"file> 파일을 여십시오. 다음 줄로 시작하는 일부 코드가 나타납니다:"
16146
16147#. (itstool) path: item/code
16148#: C/guitar-tuner.cpp.page:61
16149#, no-wrap
16150msgid ""
16151"\n"
16152"#include &lt;gtkmm.h&gt;\n"
16153"#include &lt;iostream&gt;"
16154msgstr ""
16155"\n"
16156"#include &lt;gtkmm.h&gt;\n"
16157"#include &lt;iostream&gt;"
16158
16159#. (itstool) path: section/p
16160#: C/guitar-tuner.cpp.page:70 C/image-viewer.cpp.page:67
16161msgid ""
16162"This is a very basic C++ code setting up GTKmm. More details are given below; skip this list if you understand the "
16163"basics:"
16164msgstr ""
16165"이 부분은 GTKmm을 구성한 매우 간단한 C++ 코드입니다. 더 자세한 내용은 아래를 보십시오. 기본을 이해하고 있다면 이 부"
16166"분을 건너 뛰십시오:"
16167
16168#. (itstool) path: item/p
16169#: C/guitar-tuner.cpp.page:74
16170msgid ""
16171"The three <code>#include</code> lines at the top include the <code>config</code> (useful autoconf build defines), "
16172"<code>gtkmm</code> (user interface) and <code>iostream</code> (STL). Functions from these libraries are used in "
16173"the rest of the code."
16174msgstr ""
16175"상단의 <code>#include</code> 세 줄은 <code>config</code>(쓸만한 autoconf 빌드 정의), <code>gtkmm</code>(사용자 인터"
16176"페이스), <code>iostream</code>(STL) 라이브러리입니다. 이 라이브러리의 함수는 코드 나머지 부분에서 활용합니다."
16177
16178#. (itstool) path: item/p
16179#: C/guitar-tuner.cpp.page:77
16180msgid ""
16181"The <code>main</code> function creates a new window by opening a GtkBuilder file (<file>src/guitar-tuner.ui</"
16182"file>, defined a few lines above) and then displaying it in a window. The GtkBuilder file contains a description "
16183"of a user interface and all of its elements. You can use Anjuta's editor to design GtkBuilder user interfaces."
16184msgstr ""
16185"<code>main</code> 함수는 GtkBuilder 파일(위 몇 줄을 정의한 <file>src/guitar-tuner.ui</file>)을 열어 새 창을 만들고 "
16186"창 안에 구성 요소를 표시합니다. GtkBuilder 파일에는 사용자 인터페이스 설명과 구성 요소 모드가 들어있습니다. "
16187"GtkBuilder 사용자 인터페이스를 만들 때 안주타 편집기를 사용할 수 있습니다."
16188
16189#. (itstool) path: item/p
16190#: C/guitar-tuner.cpp.page:80
16191msgid ""
16192"Afterwards it calls a few functions which set up and then run the application. The <code>kit.run</code> function "
16193"starts the GTKmm main loop, which runs the user interface and starts listening for events (like clicks and key "
16194"presses)."
16195msgstr ""
16196"그 다음 프로그램을 설정하고 실행할 몇가지 함수를 호출합니다. <code>kit.run</code> 함수는 사용자 인터페이스를 실행하"
16197"고 이벤트(마우스 단추 누름, 키보드 키 누름)를 기다리는 GTKmm 메인 루프를 시작합니다."
16198
16199#. (itstool) path: item/p
16200#: C/guitar-tuner.cpp.page:105
16201msgid ""
16202"While the button is still selected, change the <gui>Label</gui> property in the <gui>Widgets</gui> tab to <gui>E</"
16203"gui>. This will be the low E string. Also change the <gui>Name</gui> property to <gui>button_E</gui>. This is the "
16204"name we will refer to the widget later in code."
16205msgstr ""
16206"단추를 선택한 상태에서 <gui>위젯</gui> 탭의 <gui>레이블</gui> 속성을 <gui>E</gui>로 바꾸십시오. 기타의 낮은 E 줄을 "
16207"의미합니다. 또한 <gui>이름</gui> 속성을 <gui>button_E</gui> 값으로 바꾸십시오. 나중에 코드에서 위젯을 참조할 이름입"
16208"니다."
16209
16210#. (itstool) path: item/p
16211#: C/guitar-tuner.cpp.page:109
16212msgid ""
16213"Repeat the above steps for the other buttons, adding the next 5 strings with the labels <em>A</em>, <em>D</em>, "
16214"<em>G</em>, <em>B</em>, and <em>e</em> and the names <em>button_A</em>, etc."
16215msgstr ""
16216"위 단계를 다음 5현을 대해 <em>A</em>, <em>D</em>, <em>G</em>, <em>B</em>, <em>e</em> 레이블로 추가하는 단추에도 반"
16217"복하시고 <em>button_A</em>와 같은 식으로 이름을 부여하십시오."
16218
16219#. (itstool) path: item/p
16220#: C/guitar-tuner.cpp.page:112
16221msgid "Save the UI design (by clicking <guiseq><gui>File</gui><gui>Save</gui></guiseq>) and close the file."
16222msgstr "UI 디자인을 저장(<guiseq><gui>파일</gui><gui>저장</gui></guiseq> 누름)하고 파일을 닫으십시오."
16223
16224#. (itstool) path: section/p
16225#: C/guitar-tuner.cpp.page:119
16226msgid ""
16227"GStreamer is GNOME's multimedia framework — you can use it for playing, recording, and processing video, audio, "
16228"webcam streams and the like. Here, we'll be using it to produce single-frequency tones. GStreamermm is the C++ "
16229"binding to GStreamer which we will use here."
16230msgstr ""
16231"지스트리머는 그놈 멀티미디어 프레임워크입니다. 동영상 오디오 웹캠 스트림 같은걸 재생, 녹음/녹화, 처리할 때 지스트리"
16232"머를 사용할 수 있습니다. 여기서는 단일 주파수 음색을 만들 때 사용하겠습니다. GStreamermm은 여기서 우리가 사용할 지"
16233"스트리머 C++ 바인딩입니다."
16234
16235#. (itstool) path: section/title
16236#: C/guitar-tuner.cpp.page:129
16237msgid "Using GStreamermm"
16238msgstr "GStreamermm 사용"
16239
16240#. (itstool) path: section/p
16241#: C/guitar-tuner.cpp.page:130
16242msgid ""
16243"To use GStreamermm, it has to be initialised. We do that by adding the following line of code next to the "
16244"<code>Gtk::Main kit(argc, argv);</code> line in <file>main.cc</file>:"
16245msgstr ""
16246"GStreamermm을 사용하려면 초기화해야합니다. <file>main.cc</file>의 <code>Gtk::Main kit(argc, argv);</code> 다음에 코"
16247"드 몇 줄을 추가하겠습니다:"
16248
16249#. (itstool) path: section/code
16250#: C/guitar-tuner.cpp.page:132
16251#, no-wrap
16252msgid "\tGst::init (argc, argv);"
16253msgstr "\tGst::init (argc, argv);"
16254
16255#. (itstool) path: section/p
16256#: C/guitar-tuner.cpp.page:133
16257msgid ""
16258"While we are on it, also make sure that the <file>gstreamermm.h</file> is included in <file>main.cc</file> "
16259"properly."
16260msgstr ""
16261"여기에 있는 동안 <file>gstreamermm.h</file> 파일을 <file>main.cc</file> 파일에 제대로 넣었는지도 확인하십시오."
16262
16263#. (itstool) path: section/p
16264#: C/guitar-tuner.cpp.page:137
16265msgid ""
16266"To simplify the handling of the pipeline we will define a helper class <code>Sound</code>. We do that in "
16267"<file>main.cc</file> in order to keep this example simple, whereas you might usually want to use a separate file:"
16268msgstr ""
16269"파이프라인 처리를 단순하게 할 목적으로 <code>Sound</code> 보조 클래스를 정의하겠습니다. 여러분은 다른 파일에 정의하"
16270"고 싶겠지만 이 예제의 단순함을 유지할 목적으로 <file>main.cc</file>에서 진행하겠습니다:"
16271
16272#. (itstool) path: section/code
16273#: C/guitar-tuner.cpp.page:140
16274#, no-wrap
16275msgid ""
16276"\n"
16277"class Sound\n"
16278"{\n"
16279"\tpublic:\n"
16280"\t\tSound();\n"
16281"\n"
16282"\t\tvoid start_playing(double frequency);\n"
16283"\t\tbool stop_playing();\n"
16284"\n"
16285"\tprivate:\n"
16286"\t\tGlib::RefPtr&lt;Gst::Pipeline&gt; m_pipeline;\n"
16287"\t\tGlib::RefPtr&lt;Gst::Element&gt; m_source;\n"
16288"\t\tGlib::RefPtr&lt;Gst::Element&gt; m_sink;\n"
16289"};\n"
16290"\n"
16291"Sound::Sound()\n"
16292"{\n"
16293"\tm_pipeline = Gst::Pipeline::create(\"note\");\n"
16294"\tm_source = Gst::ElementFactory::create_element(\"audiotestsrc\",\n"
16295"\t                                               \"source\");\n"
16296"\tm_sink = Gst::ElementFactory::create_element(\"autoaudiosink\",\n"
16297"\t                                             \"output\");\n"
16298"\tm_pipeline-&gt;add(m_source);\n"
16299"\tm_pipeline-&gt;add(m_sink);\n"
16300"\tm_source-&gt;link(m_sink);\n"
16301"}\n"
16302"\n"
16303"void Sound::start_playing (double frequency)\n"
16304"{\n"
16305"\tm_source-&gt;set_property(\"freq\", frequency);\n"
16306"\tm_pipeline-&gt;set_state(Gst::STATE_PLAYING);\n"
16307"\n"
16308"\t/* stop it after 200ms */\n"
16309"\tGlib::signal_timeout().connect(sigc::mem_fun(*this, &amp;Sound::stop_playing),\n"
16310"\t                               200);\n"
16311"}\n"
16312"\n"
16313"bool Sound::stop_playing()\n"
16314"{\n"
16315"\tm_pipeline-&gt;set_state(Gst::STATE_NULL);\n"
16316"\treturn false;\n"
16317"}\n"
16318msgstr ""
16319"\n"
16320"class Sound\n"
16321"{\n"
16322"\tpublic:\n"
16323"\t\tSound();\n"
16324"\n"
16325"\t\tvoid start_playing(double frequency);\n"
16326"\t\tbool stop_playing();\n"
16327"\n"
16328"\tprivate:\n"
16329"\t\tGlib::RefPtr&lt;Gst::Pipeline&gt; m_pipeline;\n"
16330"\t\tGlib::RefPtr&lt;Gst::Element&gt; m_source;\n"
16331"\t\tGlib::RefPtr&lt;Gst::Element&gt; m_sink;\n"
16332"};\n"
16333"\n"
16334"Sound::Sound()\n"
16335"{\n"
16336"\tm_pipeline = Gst::Pipeline::create(\"note\");\n"
16337"\tm_source = Gst::ElementFactory::create_element(\"audiotestsrc\",\n"
16338"\t                                               \"source\");\n"
16339"\tm_sink = Gst::ElementFactory::create_element(\"autoaudiosink\",\n"
16340"\t                                             \"output\");\n"
16341"\tm_pipeline-&gt;add(m_source);\n"
16342"\tm_pipeline-&gt;add(m_sink);\n"
16343"\tm_source-&gt;link(m_sink);\n"
16344"}\n"
16345"\n"
16346"void Sound::start_playing (double frequency)\n"
16347"{\n"
16348"\tm_source-&gt;set_property(\"freq\", frequency);\n"
16349"\tm_pipeline-&gt;set_state(Gst::STATE_PLAYING);\n"
16350"\n"
16351"\t/* stop it after 200ms */\n"
16352"\tGlib::signal_timeout().connect(sigc::mem_fun(*this, &amp;Sound::stop_playing),\n"
16353"\t                               200);\n"
16354"}\n"
16355"\n"
16356"bool Sound::stop_playing()\n"
16357"{\n"
16358"\tm_pipeline-&gt;set_state(Gst::STATE_NULL);\n"
16359"\treturn false;\n"
16360"}\n"
16361
16362#. (itstool) path: section/p
16363#: C/guitar-tuner.cpp.page:184
16364msgid "The code has the following purpose:"
16365msgstr "이 코드는 다음 목적으로 작성합니다:"
16366
16367#. (itstool) path: item/p
16368#: C/guitar-tuner.cpp.page:187
16369msgid ""
16370"In the constructor, source and sink GStreamer elements (<code>Gst::Element</code>) are created, and a pipeline "
16371"element (which will be used as a container for the other two elements). The pipeline is given the name \"note\"; "
16372"the source is named \"source\" and is set to the <code>audiotestsrc</code> source; and the sink is named \"output"
16373"\" and set to the <code>autoaudiosink</code> sink (default sound card output). After the elements have been added "
16374"to the pipeline and linked together, the pipeline is ready to run."
16375msgstr ""
16376"생성자에서 source 지스트리머 구성요소와 sink 지스트리머 구성요소(<code>Gst::Element</code>), 파이프라인 지스트리머 "
16377"구성요소(앞서 말한 구성 요소의 컨테이너로 활용)를 만듭니다. 파이프라인 이름은 \"note\"라고 지어둡니다. source는 "
16378"\"source\"로 이름 붙이고 <code>audiotestsrc</code>로 설정합니다. sink는 \"output\"으로 이름 붙이고 "
16379"<code>autoaudiosink</code> sink로 설정합니다(사운드 카드 출력이 기본). 구성 요소를 파이프라인에 추가하고 서로 연결"
16380"한 다음에는 파이프라인 실행 준비가 끝납니다."
16381
16382#. (itstool) path: item/p
16383#: C/guitar-tuner.cpp.page:190
16384msgid ""
16385"<code>start_playing</code> sets the source element to play a particular frequency and then starts the pipeline so "
16386"the sound actually starts playing. As we don't want to have the annoying sound for ages, a timeout is set up to "
16387"stop the pipeline after 200 ms by calling <code>stop_playing</code>."
16388msgstr ""
16389"<code>start_playing</code>은 각 주파수를 재생할 source 구성 요소를 설정하고 파이프라인을 시작하여 소리를 실제로 재"
16390"생하게 합니다. 소리를 영원히 짜증나게 재생하고 싶지는 않기에 <code>stop_playing</code>을 200ms 후에 호출하여 파이프"
16391"라인 동작을 멈추도록 제한 시간을 설정합니다."
16392
16393#. (itstool) path: item/p
16394#: C/guitar-tuner.cpp.page:195
16395msgid ""
16396"In <code>stop_playing</code> which is called when the timeout has elapsed, the pipeline is stopped and as such "
16397"there isn't any sound output anymore. As GStreamermm uses reference counting through the <code>Glib::RefPtr</code> "
16398"object, the memory is automatically freed once the <code>Sound</code> class is destroyed."
16399msgstr ""
16400"제한 시간에 도달했을 때 호출하는 <code>stop_playing</code> 함수에서는, 파이프라인을 멈추어 더 이상 소리가 나지 않"
16401"게 합니다. GStreamermm에서 <code>Glib::RefPtr</code> 객체로 참조 카운팅을 하기 때문에 <code>Sound</code> 클래스를 "
16402"해체하면 메모리를 자동으로 해제합니다."
16403
16404#. (itstool) path: section/title
16405#: C/guitar-tuner.cpp.page:203
16406msgid "Connecting the signals"
16407msgstr "시그널에 연결하기"
16408
16409#. (itstool) path: section/p
16410#: C/guitar-tuner.cpp.page:204
16411msgid ""
16412"We want to play the correct sound when the user clicks a button. That means that we have to connect to the signal "
16413"that is fired when the user clicks the button. We also want to provide information to the called function which "
16414"tone to play. GTKmm makes that quite easy as we can easily bind information with the <em>sigc</em> library."
16415msgstr ""
16416"사용자가 단추를 눌렀을 때 제대로 된 음을 재생하려고 합니다. 무슨 얘기냐면 사용자가 단추를 누르면 나오는 시그널을 실"
16417"행할 함수에 연결해야 한다는 뜻입니다. 또한 재생할 음에 대한 정보를 호출 함수에 넘겨주려고 합니다. GTKmm에서는 "
16418"<em>sigc</em> 라이브러리에서 정보를 바인딩해서 쉽게 처리할 수 있습니다."
16419
16420#. (itstool) path: section/p
16421#: C/guitar-tuner.cpp.page:209
16422msgid ""
16423"The function that is called when the user clicks a button can be pretty simple, as all the interesting stuff is "
16424"done in the helper class now:"
16425msgstr ""
16426"관심있어 하는 부분을 이제는 보조 클래스에서 처리하므로, 사용자가 단추를 눌렀을 때 호출하는 함수가 약간 간단할 수 있"
16427"습니다:"
16428
16429#. (itstool) path: section/code
16430#: C/guitar-tuner.cpp.page:211
16431#, no-wrap
16432msgid ""
16433"\n"
16434"static void\n"
16435"on_button_clicked(double frequency, Sound* sound)\n"
16436"{\n"
16437"\tsound-&gt;start_playing (frequency);\n"
16438"}\n"
16439msgstr ""
16440"\n"
16441"static void\n"
16442"on_button_clicked(double frequency, Sound* sound)\n"
16443"{\n"
16444"\tsound-&gt;start_playing (frequency);\n"
16445"}\n"
16446
16447#. (itstool) path: section/p
16448#: C/guitar-tuner.cpp.page:218
16449msgid ""
16450"It only calls the helper class we defined before to play the correct frequencies. With some more clever code we "
16451"would also have been able to directly connect to the class without using the function but we will leave that to "
16452"use as an exercise."
16453msgstr ""
16454"이 코드에서는 올바른 주파수 음을 재생하려 앞서 정의한 보조 클래스를 호출하기만 합니다. 더 멋진 코드에서는 함수를 활"
16455"용하지 않고 클래스에 직접 연결할 수 있겠지만, 그냥 이대로를 연습용으로 두겠습니다."
16456
16457#. (itstool) path: section/p
16458#: C/guitar-tuner.cpp.page:222
16459msgid ""
16460"The code to set up the signals should be added to the <code>main()</code> function just after the <code>builder-"
16461"&gt;get_widget(\"main_window\", main_win);</code> line:"
16462msgstr ""
16463"시그널을 설정하는 코드는 <code>main()</code> 함수의 <code>builder-&gt;get_widget(\"main_window\", main_win);</"
16464"code> 코드 줄 바로 다음에 추가하십시오:"
16465
16466#. (itstool) path: section/code
16467#: C/guitar-tuner.cpp.page:224
16468#, no-wrap
16469msgid ""
16470"\n"
16471"Sound sound;\n"
16472"Gtk::Button* button;\n"
16473"\n"
16474"builder-&gt;get_widget(\"button_E\", button);\n"
16475"button-&gt;signal_clicked().connect (sigc::bind&lt;double, Sound*&gt;(sigc::ptr_fun(&amp;on_button_clicked),\n"
16476"                                              329.63, &amp;sound));\n"
16477msgstr ""
16478"\n"
16479"Sound sound;\n"
16480"Gtk::Button* button;\n"
16481"\n"
16482"builder-&gt;get_widget(\"button_E\", button);\n"
16483"button-&gt;signal_clicked().connect (sigc::bind&lt;double, Sound*&gt;(sigc::ptr_fun(&amp;on_button_clicked),\n"
16484"                                              329.63, &amp;sound));\n"
16485
16486#. (itstool) path: item/p
16487#: C/guitar-tuner.cpp.page:234
16488msgid ""
16489"At first we create an instance of our helper class that we want to use now and declare a variable for the button "
16490"we want to connect to."
16491msgstr "우선 당장 쓰려는 보조 클래스의 인스턴스를 만들고 연결하고자 하는 단추의 변수를 선언하겠습니다."
16492
16493#. (itstool) path: item/p
16494#: C/guitar-tuner.cpp.page:238
16495msgid ""
16496"Next, we receive the button object from the user interface that was created out of the user interface file. "
16497"Remember that <em>button_E</em> is the name we gave to the first button."
16498msgstr ""
16499"그 다음 사용자 인터페이스 파일에서 만든 사용자 인터페이스에서 단추 객체를 가져오겠습니다. 기억하시겠지만 "
16500"<em>button_E</em>가 첫번째 단추에 지어준 이름이죠."
16501
16502#. (itstool) path: item/p
16503#: C/guitar-tuner.cpp.page:242
16504msgid ""
16505"Finally we connect the <em>clicked</em> signal. This isn't fully straightforward because this is done in a fully "
16506"type-safe way and we actually want to pass the frequency and our helper class to the signal handler. <code>sigc::"
16507"ptr_fun(&amp;on_button_clicked)</code> creates a <em>slot</em> for the <code>on_button_clicked</code> method we "
16508"defined above. With <code>sigc::bind</code> we are able to pass additional arguments to the slot and in this case "
16509"we pass the frequency (as double) and our helper class."
16510msgstr ""
16511"마지막으로 <em>clicked</em> 시그널을 연결하겠습니다. 그다지 간단하지 않은 과정인데 자료형에 안전한 방식으로 끝낼 일"
16512"이며 실제로 주파수 정보와 보조 클래스를 시그널 핸들러로 전달하고 싶어하기 때문입니다. <code>sigc::ptr_fun(&amp;"
16513"on_button_clicked)</code> 메서드는 위에서 우리가 정의한 <code>on_button_clicked</code> 메서드의 <em>slot</em>을 만"
16514"듭니다. <code>sigc::bind</code>로 슬롯에 추가 인자를 전달할 수 있는데, 이 경우 우리는 주파수(double 형식) 값과 보"
16515"조 클래스를 전달합니다."
16516
16517#. (itstool) path: section/p
16518#: C/guitar-tuner.cpp.page:249
16519msgid ""
16520"Now that we have set up the <em>E</em> button we also need to connect the other buttons according to their "
16521"frequencies: 440 for A, 587.33 for D, 783.99 for G, 987.77 for B and 1318.5 for the high E. This is done in the "
16522"same way, just passing a different frequency to the handler."
16523msgstr ""
16524"이제 <em>E</em> 단추를 설정했고, 다른 단추에도 해당 주파수 값으로 연결해야합니다. A에는 440, D에는 587.33, G에는 "
16525"783.99, B에는 987.77, 높은 E에는 1318.5 이런 식이죠. 그냥 핸들러에 다른 주파수 값을 전달하는 동일한 방식으로 처리"
16526"할 수 있습니다."
16527
16528#. (itstool) path: section/p
16529#: C/guitar-tuner.cpp.page:256
16530msgid ""
16531"All of the code should now be ready to go. Click <guiseq><gui>Build</gui><gui>Build Project</gui></guiseq> to "
16532"build everything again, and then <guiseq><gui>Run</gui><gui>Run</gui></guiseq> to start the application."
16533msgstr ""
16534"모든 코드가 동작할 준비가 끝났습니다. <guiseq><gui>빌드</gui><gui>프로젝트 빌드</gui></guiseq>를 눌러 모두 다시 빌"
16535"드하시고, <guiseq><gui>실행</gui><gui>실행</gui></guiseq>을 눌러 프로그램을 시작하십시오."
16536
16537#. (itstool) path: section/p
16538#: C/guitar-tuner.cpp.page:262
16539msgid ""
16540"If you run into problems with the tutorial, compare your code with this <link href=\"guitar-tuner/guitar-tuner.cc"
16541"\">reference code</link>."
16542msgstr ""
16543"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"guitar-tuner/guitar-tuner.cc\">참조 코드</link>와 여"
16544"러분의 코드를 비교해보십시오."
16545
16546#. (itstool) path: section/title
16547#: C/guitar-tuner.cpp.page:266
16548msgid "Further Reading"
16549msgstr "더 읽을거리"
16550
16551#. (itstool) path: section/p
16552#: C/guitar-tuner.cpp.page:267
16553msgid ""
16554"Many of the things shown above are explained in detail in the <link href=\"http://library.gnome.org/devel/gtkmm-"
16555"tutorial/stable/\">GTKmm book</link> which also covers a lot more key concept for using the full power of GTKmm. "
16556"You might also be interested in the <link href=\"http://library.gnome.org/devel/gstreamermm/\">GStreamermm "
16557"reference documentation</link>."
16558msgstr ""
16559"위에 보여드린 예제 대부분에 대해서는, GTKmm의 완벽한 힘을 활용하여 더 핵심적인 개념을 다루는 <link href=\"http://"
16560"library.gnome.org/devel/gtkmm-tutorial/stable/\">GTKmm book</link>에서 더 자세한 내용을 다룹니다. <link href="
16561"\"http://library.gnome.org/devel/gstreamermm/\">GStreamermm 참고 문서</link>에도 관심이 있으실지도 모르겠습니다."
16562
16563#. (itstool) path: info/title
16564#: C/guitar-tuner.js.page:7
16565msgctxt "text"
16566msgid "Guitar tuner (JavaScript)"
16567msgstr "Guitar tuner (JavaScript)"
16568
16569#. (itstool) path: info/desc
16570#: C/guitar-tuner.js.page:17
16571msgid "Use GTK+ and GStreamer to build a simple guitar tuner application for GNOME."
16572msgstr "그놈용 단순 기타 조율 프로그램을 만들 때 GTK+와 지스트리머를 사용합니다."
16573
16574#. (itstool) path: synopsis/p
16575#: C/guitar-tuner.js.page:23
16576msgid ""
16577"In this tutorial we'll construct a small application, Guitar Tuner, using JavaScript and GTK+ and GStreamer. To do "
16578"and run all the code examples yourself, you need an editor to write code in, terminal and GNOME 3. or higher "
16579"installed into your computer."
16580msgstr ""
16581"이 따라하기 지침에서는 JavaScript와 GTK+, 지스트리머로, 간단한 기타 조율 프로그램을 구성해보겠습니다. 여러분이 직"
16582"접 코드 예제를 작성하고 실행해보려면, 코드를 작성할 편집기, 터미널, 그놈 3 이상을 컴퓨터에 설치해야합니다."
16583
16584#. (itstool) path: item/p
16585#: C/guitar-tuner.js.page:25
16586msgid "<link xref=\"#gstreamer\">GStreamer pipelines</link>"
16587msgstr "<link xref=\"#gstreamer\">지스트리머 파이프라인</link>"
16588
16589#. (itstool) path: item/p
16590#: C/guitar-tuner.js.page:26 C/weatherAppMain.js.page:23
16591msgid "<link xref=\"#script\">Script for running the application</link>"
16592msgstr "<link xref=\"#script\">실행 프로그램 스크립트</link>"
16593
16594#. (itstool) path: item/p
16595#: C/guitar-tuner.js.page:27 C/weatherAppMain.js.page:24
16596msgid "<link xref=\"#imports\">Libraries to import</link>"
16597msgstr "<link xref=\"#imports\">가져올 라이브러리</link>"
16598
16599#. (itstool) path: item/p
16600#: C/guitar-tuner.js.page:28 C/weatherAppMain.js.page:25
16601msgid "<link xref=\"#mainwindow\">Creating the main window for the application</link>"
16602msgstr "<link xref=\"#mainwindow\">프로그램 메인 창 만들기</link>"
16603
16604#. (itstool) path: item/p
16605#: C/guitar-tuner.js.page:29
16606msgid "<link xref=\"#buttons\">Buttons for the tunes</link>"
16607msgstr "<link xref=\"#buttons\">조율 단추</link>"
16608
16609#. (itstool) path: item/p
16610#: C/guitar-tuner.js.page:30
16611msgid "<link xref=\"#playSound\">Making the sounds with GStreamer</link>"
16612msgstr "<link xref=\"#playSound\">지스트리머로 소리 만들기</link>"
16613
16614#. (itstool) path: item/p
16615#: C/guitar-tuner.js.page:31
16616msgid "<link xref=\"#connecting\">Connecting buttons to playSound</link>"
16617msgstr "<link xref=\"#connecting\">소리 재생 단추에 연결</link>"
16618
16619#. (itstool) path: item/p
16620#: C/guitar-tuner.js.page:32
16621msgid "<link xref=\"#guitarjs\">The whole program</link>"
16622msgstr "<link xref=\"#guitarjs\">전체 프로그램</link>"
16623
16624#. (itstool) path: item/p
16625#: C/guitar-tuner.js.page:33
16626msgid "<link xref=\"#terminal\">Running the application form Terminal</link>"
16627msgstr "<link xref=\"#terminal\">터미널에서 프로그램 실행</link>"
16628
16629#. (itstool) path: page/p
16630#: C/guitar-tuner.js.page:36 C/weatherApp.js.page:40
16631msgid "After reading this tutorial, you should see this in your screen:"
16632msgstr "지침서를 읽고 나면 이 내용을 화면에서 볼 수 있어야합니다:"
16633
16634#. (itstool) path: section/title
16635#: C/guitar-tuner.js.page:48 C/hello-world.js.page:46 C/weatherAppMain.js.page:33
16636msgid "Script for running the application"
16637msgstr "실행 프로그램 스크립트"
16638
16639#. (itstool) path: section/code
16640#: C/guitar-tuner.js.page:49 C/weatherAppMain.js.page:34
16641#, no-wrap
16642msgid ""
16643"\n"
16644"  #!/usr/bin/gjs"
16645msgstr ""
16646"\n"
16647"  #!/usr/bin/gjs"
16648
16649#. (itstool) path: section/p
16650#: C/guitar-tuner.js.page:51
16651msgid ""
16652"This line tells how to run the script. It needs to be the first line of the code and it needs to be executable. To "
16653"get the execution rights go to terminal and run in right folder: chmod +x scriptname. Or you can use the graphical "
16654"filemanager. Just go to the right folder where your code is, right click you code file, choose properties, click "
16655"the permissions tab and check the box for allow executing file as a program"
16656msgstr ""
16657"이 줄은 스크립트 실행 방법을 알려줍니다. 이 부분은 코드의 처음 부분에 들어가야하며, 스크립트 파일을 실행할 수 있어"
16658"야합니다. 실행 권한을 가져오려면 터미널을 열고 올바른 폴더에서 chmod +x scriptname 명령을 실행하십시오. 또는 그래"
16659"픽 파일 관리자를 활용할 수 있습니다. 코드가 있는 적절한 폴더에 들어가서 코드를 작성한 파일에 마우스 커서를 두고 오"
16660"른쪽 단추를 누른 다음, 속성, 권한 탭을 선택하시고 파일을 프로그램처럼 실행하도록 상자에 표시하십시오."
16661
16662#. (itstool) path: section/code
16663#: C/guitar-tuner.js.page:56
16664#, no-wrap
16665msgid ""
16666"\n"
16667"var Gtk = imports.gi.Gtk;\n"
16668"var Gst = imports.gi.Gst;\n"
16669"\n"
16670"const Mainloop = imports.mainloop;"
16671msgstr ""
16672"\n"
16673"var Gtk = imports.gi.Gtk;\n"
16674"var Gst = imports.gi.Gst;\n"
16675"\n"
16676"const Mainloop = imports.mainloop;"
16677
16678#. (itstool) path: section/p
16679#: C/guitar-tuner.js.page:61
16680msgid ""
16681"In order to have a working program we need to import a few GObject Introspection -libraries to our use. For "
16682"working UI, we need Gtk and for Gstreamer to work we need Gst. These are imported in the beginning so we have them "
16683"at use everywhere. Also in the beginning we import a construct Mainloop to handle the timeout to be used with the "
16684"tuning sounds."
16685msgstr ""
16686"프로그램을 동작하게 하려면 GObject Introspection 라이브러리를 임포팅해야합니다. UI를 동작하게 하려면 Gtk를, 지스트"
16687"리머를 동작하게 하려면 Gst를 임포팅해야합니다. 코드 시작 부분에서 임포팅해서 어디서든 활용할 수 있게 합니다. 또한 "
16688"조율음의 재생 시간 제한을 처리할 Mainloop 생성자를 임포팅하겠습니다."
16689
16690#. (itstool) path: section/title
16691#: C/guitar-tuner.js.page:64 C/hello-world.js.page:61 C/hello-world.py.page:52 C/hello-world.vala.page:44
16692#: C/weatherAppMain.js.page:49
16693msgid "Creating the main window for the application"
16694msgstr "프로그램 메인 창 만들기"
16695
16696#. (itstool) path: section/code
16697#: C/guitar-tuner.js.page:65
16698#, no-wrap
16699msgid ""
16700"\n"
16701"Gtk.init(null, 0);\n"
16702"Gst.init(null, 0);\n"
16703"\n"
16704"var guitarwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL, border_width: 100});\n"
16705"guitarwindow.title = \"Guitar Tuner\";\n"
16706"guitarwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
16707"\n"
16708"guitarwindow.show();\n"
16709"Gtk.main();"
16710msgstr ""
16711"\n"
16712"Gtk.init(null, 0);\n"
16713"Gst.init(null, 0);\n"
16714"\n"
16715"var guitarwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL, border_width: 100});\n"
16716"guitarwindow.title = \"Guitar Tuner\";\n"
16717"guitarwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
16718"\n"
16719"guitarwindow.show();\n"
16720"Gtk.main();"
16721
16722#. (itstool) path: section/p
16723#: C/guitar-tuner.js.page:75
16724msgid ""
16725"Importing Gtk and Gst is not enough, we need to initialize them in order to get them working. When Gtk and Gst are "
16726"up and running we need to create the window for the application. Later we are going to put all the buttons for "
16727"making sounds inside this window. In order to get the window showing, we need to tell it to show and we need also "
16728"to run the code with the Gtk.main()"
16729msgstr ""
16730"Gtk와 Gst를 임포팅 하는 것만으로는 충분치 않기에 동작하려면 초기화해야합니다. Gtk와 Gst를 띄우고 나면 프로그램 창"
16731"을 만들어야합니다. 그 다음 이 창에서 소리를 낼 모든 단추를 만들어 두겠습니다. 창을 띄우려면, 화면에 나타내라고 직"
16732"접 알려야 하며, Gtk.main()으로 코드를 실행해야합니다."
16733
16734#. (itstool) path: section/title
16735#: C/guitar-tuner.js.page:78
16736msgid "Buttons for the tunes"
16737msgstr "조율 단추"
16738
16739#. (itstool) path: section/code
16740#: C/guitar-tuner.js.page:79
16741#, no-wrap
16742msgid ""
16743"\n"
16744"var guitar_box = new Gtk.ButtonBox ({orientation: Gtk.Orientation.VERTICAL, spacing: 10});\n"
16745"\n"
16746"var E = new Gtk.Button({label: \"E\"});\n"
16747"var A = new Gtk.Button({label: \"A\"});\n"
16748"var D = new Gtk.Button({label: \"D\"});\n"
16749"var G = new Gtk.Button({label: \"G\"});\n"
16750"var B = new Gtk.Button({label: \"B\"});\n"
16751"var e = new Gtk.Button({label: \"e\"});\n"
16752"\n"
16753"guitar_box.add(E);\n"
16754"guitar_box.add(A);\n"
16755"guitar_box.add(D);\n"
16756"guitar_box.add(G);\n"
16757"guitar_box.add(B);\n"
16758"guitar_box.add(e);\n"
16759"\n"
16760"guitarwindow.add(guitar_box);\n"
16761"\n"
16762"guitar_box.show_all();"
16763msgstr ""
16764"\n"
16765"var guitar_box = new Gtk.ButtonBox ({orientation: Gtk.Orientation.VERTICAL, spacing: 10});\n"
16766"\n"
16767"var E = new Gtk.Button({label: \"E\"});\n"
16768"var A = new Gtk.Button({label: \"A\"});\n"
16769"var D = new Gtk.Button({label: \"D\"});\n"
16770"var G = new Gtk.Button({label: \"G\"});\n"
16771"var B = new Gtk.Button({label: \"B\"});\n"
16772"var e = new Gtk.Button({label: \"e\"});\n"
16773"\n"
16774"guitar_box.add(E);\n"
16775"guitar_box.add(A);\n"
16776"guitar_box.add(D);\n"
16777"guitar_box.add(G);\n"
16778"guitar_box.add(B);\n"
16779"guitar_box.add(e);\n"
16780"\n"
16781"guitarwindow.add(guitar_box);\n"
16782"\n"
16783"guitar_box.show_all();"
16784
16785#. (itstool) path: section/p
16786#: C/guitar-tuner.js.page:99
16787msgid ""
16788"Because Gtk.Window can only contain a single widget, we need to create something under it to be able to add all "
16789"the necessary buttons inside it. In this example we use Buttonbox. After creating the Buttonbox we create buttons "
16790"with necessary labels. After we have the buttons we need to add them to the Buttonbox and the Buttonbox must be "
16791"added to the Gtk.Window and everything in the Buttonbox must be shown."
16792msgstr ""
16793"Gtk.Window는 단일 위젯을 둘 수 있기 때문에 단추를 안에 다 넣을 수 있으려면 무언가를 만들어야합니다. 이 예제에서 "
16794"Buttonbox를 사용하겠습니다. Buttonbox를 만들고 나면, 각 단추를 만들어 필요한 레이블을 붙이겠습니다. 이 단추를 만들"
16795"고 나면 Buttonbox에 넣고 Buttonbox를 Gtk.Window에 넣어 Buttonbox에 넣은 모든 단추가 나타나야합니다."
16796
16797#. (itstool) path: section/p
16798#: C/guitar-tuner.js.page:100
16799msgid ""
16800"After this stage you should have a window appearing to your screen showing 6 buttons. Right now the buttons don't "
16801"do anything and we shall address that issue later. Before we can connect the button signals to something we need "
16802"to code that something first."
16803msgstr ""
16804"이 단계가 끝나면 단추 6개가 뜨는 창이 화면에 나타나야합니다. 바로 지금은 단추가 아무 동작을 하지 않으며 이 문제는 "
16805"나중에 처리하겠습니다. 단추 시그널을 어딘가에 연결할 수 있기 전에는 무언가를 먼저 코드로 작성해야합니다."
16806
16807#. (itstool) path: section/title
16808#: C/guitar-tuner.js.page:103
16809msgid "Making the sounds with GStreamer"
16810msgstr "지스트리머로 소리 만들기"
16811
16812#. (itstool) path: section/code
16813#: C/guitar-tuner.js.page:104
16814#, no-wrap
16815msgid ""
16816"\n"
16817"var frequencies = {E: 329.63, A: 440,\tD: 587.33,\tG: 783.99,\tB: 987.77,\te: 1318.5}\n"
16818"\n"
16819"function playSound(frequency){\n"
16820"  var pipeline = new Gst.Pipeline({name: \"note\"});\n"
16821"  var source = Gst.ElementFactory.make(\"audiotestsrc\",\"source\");\n"
16822"  var sink = Gst.ElementFactory.make(\"autoaudiosink\",\"output\");\n"
16823"\n"
16824"  source.set_property('freq', frequency);\n"
16825"  pipeline.add(source);\n"
16826"  pipeline.add(sink);\n"
16827"  source.link(sink);\n"
16828"  pipeline.set_state(Gst.State.PLAYING);\n"
16829"\n"
16830"  Mainloop.timeout_add(500, function () {\n"
16831"    pipeline.set_state(Gst.State.NULL);\n"
16832"\t  return false;\n"
16833"  });\n"
16834"}"
16835msgstr ""
16836"\n"
16837"var frequencies = {E: 329.63, A: 440,\tD: 587.33,\tG: 783.99,\tB: 987.77,\te: 1318.5}\n"
16838"\n"
16839"function playSound(frequency){\n"
16840"  var pipeline = new Gst.Pipeline({name: \"note\"});\n"
16841"  var source = Gst.ElementFactory.make(\"audiotestsrc\",\"source\");\n"
16842"  var sink = Gst.ElementFactory.make(\"autoaudiosink\",\"output\");\n"
16843"\n"
16844"  source.set_property('freq', frequency);\n"
16845"  pipeline.add(source);\n"
16846"  pipeline.add(sink);\n"
16847"  source.link(sink);\n"
16848"  pipeline.set_state(Gst.State.PLAYING);\n"
16849"\n"
16850"  Mainloop.timeout_add(500, function () {\n"
16851"    pipeline.set_state(Gst.State.NULL);\n"
16852"\t  return false;\n"
16853"  });\n"
16854"}"
16855
16856#. (itstool) path: section/p
16857#: C/guitar-tuner.js.page:123
16858msgid ""
16859"The first thing we need to do is decide what tunes we want to make when we push a button. The frequencies list "
16860"takes care of that. After that we get to actually making the sounds with the function playSound. For function "
16861"playSound we give as an input a frequency (that we just defined in the frequencies variable). First thing we need "
16862"to construct is a pipeline, a source and a sink. For the source we set the frequency. To the pipeline we add both "
16863"the source and the sink and then we tell it to keep playing. As a last thing we use the const Mainloop to get the "
16864"pipeline to stop after a 500ms."
16865msgstr ""
16866"우리가 먼저 해야 할 일은 단추를 눌렀을 때 어떤 음을 낼지를 결정하는 일입니다. 주파수 목록이 이런 역할을 합니다. 그 "
16867"다음 실제로 playSound 함수로 소리를 냅니다. playSound 함수로 소리를 낼 때 주파수를 입력값(바로 위에서 정의한 "
16868"frequencies 변수 값)으로 넣습니다. 우선 파이프라인, source, sink를 만들어야합니다. source에 주파수를 설정하겠습니"
16869"다. 파이프라인에 source와 sink를 추가하고, 재생 상태를 유지하라고 지시하겠습니다. 마지막으로 const Mainloop를 활용"
16870"하여 파이프라인 동작을 500ms 후에 멈추게 하겠습니다."
16871
16872#. (itstool) path: section/p
16873#: C/guitar-tuner.js.page:124
16874msgid ""
16875"Now we have the method of playing a tune when clicking a button. Next well make the connections between pushing a "
16876"button and playing the correct sound from that button."
16877msgstr ""
16878"이제 단추를 눌렀을 때 음을 재생하는 메서드를 작성했습니다. 다음 단추를 누르면 단추에서 올바른 음을 재생하도록 연결"
16879"하겠습니다."
16880
16881#. (itstool) path: section/title
16882#: C/guitar-tuner.js.page:127
16883msgid "Connecting buttons to playSound"
16884msgstr "소리 재생 단추에 연결"
16885
16886#. (itstool) path: section/code
16887#: C/guitar-tuner.js.page:128
16888#, no-wrap
16889msgid ""
16890"\n"
16891"E.connect(\"clicked\", function() {\n"
16892"  playSound(frequencies.E);\n"
16893"});\n"
16894"A.connect(\"clicked\", function(){\n"
16895"  playSound(frequencies.A);\n"
16896"});\n"
16897"D.connect(\"clicked\", function(){\n"
16898"  playSound(frequencies.D);\n"
16899"});\n"
16900"G.connect(\"clicked\", function(){\n"
16901"  playSound(frequencies.G);\n"
16902"});\n"
16903"B.connect(\"clicked\", function(){\n"
16904"  playSound(frequencies.B);\n"
16905"});\n"
16906"e.connect(\"clicked\", function(){\n"
16907"  playSound(frequencies.e);\n"
16908"});"
16909msgstr ""
16910"\n"
16911"E.connect(\"clicked\", function() {\n"
16912"  playSound(frequencies.E);\n"
16913"});\n"
16914"A.connect(\"clicked\", function(){\n"
16915"  playSound(frequencies.A);\n"
16916"});\n"
16917"D.connect(\"clicked\", function(){\n"
16918"  playSound(frequencies.D);\n"
16919"});\n"
16920"G.connect(\"clicked\", function(){\n"
16921"  playSound(frequencies.G);\n"
16922"});\n"
16923"B.connect(\"clicked\", function(){\n"
16924"  playSound(frequencies.B);\n"
16925"});\n"
16926"e.connect(\"clicked\", function(){\n"
16927"  playSound(frequencies.e);\n"
16928"});"
16929
16930#. (itstool) path: section/p
16931#: C/guitar-tuner.js.page:147
16932msgid ""
16933"The method of connecting button clicks to playSound with the correct tune is by using the connect method of the "
16934"button widget. So we choose a button to be connected and type <code>E.connect(\"clicked\", function()"
16935"{playSound(frequencies.E);});</code> The <code>connect</code> tells that when pushing E, something should happen. "
16936"The <code>clicked</code> tells the type of the signal happening to E and then in the <code>function(){};</code> we "
16937"call playSound with the correct note that should be associated with the button."
16938msgstr ""
16939" 올바른 음 값을 주어 playSound를 호출하는 연결 단추 메서드는 단추 위젯의 연결 메서드를 활용합니다. 따라서 연결한 단"
16940"추를 선택하고 <code>E.connect(\"clicked\", function(){playSound(frequencies.E);});</code> 를 입력하십시오.  "
16941"<code>connect</code> 함수는 E를 눌렀을 때 일어날 일을 지시합니다.  <code>clicked</code>는 E에서 나타나는 시그널 형"
16942"식을,  <code>function(){};</code> 은 단추와 관련있는 올바른 음을 재생할 playSound 입니다."
16943
16944#. (itstool) path: section/title
16945#: C/guitar-tuner.js.page:157
16946msgid "The whole program"
16947msgstr "전체 프로그램"
16948
16949#. (itstool) path: section/p
16950#: C/guitar-tuner.js.page:158
16951msgid ""
16952"So this is what all the parts combined looks like. When running this code, you should be able to tune your guitar "
16953"(if you have correctly calibrated speakers)."
16954msgstr ""
16955"따라서 이 부분은 모든 부분을 합친 것과 같은 부분입니다. 코드를 실행하면 (음을 제대로 보정한 스피커를 연결했을 경"
16956"우) 여러분 스스로가 기타를 조율할 수 있어야합니다."
16957
16958#. (itstool) path: section/code
16959#: C/guitar-tuner.js.page:159
16960#, no-wrap
16961msgid ""
16962"\n"
16963"#!/usr/bin/gjs\n"
16964"var Gtk = imports.gi.Gtk;\n"
16965"var Gst = imports.gi.Gst;\n"
16966"\n"
16967"const Mainloop = imports.mainloop;\n"
16968"\n"
16969"Gtk.init(null, 0);\n"
16970"Gst.init(null, 0);\n"
16971"\n"
16972"var guitarwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL, border_width: 100});\n"
16973"guitarwindow.title = \"Guitar Tuner\";\n"
16974"guitarwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
16975"\n"
16976"var guitar_box = new Gtk.ButtonBox ({orientation: Gtk.Orientation.VERTICAL, spacing: 10});\n"
16977"\n"
16978"var E = new Gtk.Button({label: \"E\"});\n"
16979"var A = new Gtk.Button({label: \"A\"});\n"
16980"var D = new Gtk.Button({label: \"D\"});\n"
16981"var G = new Gtk.Button({label: \"G\"});\n"
16982"var B = new Gtk.Button({label: \"B\"});\n"
16983"var e = new Gtk.Button({label: \"e\"});\n"
16984"\n"
16985"var frequencies = {E: 329.63, A: 440,\tD: 587.33,\tG: 783.99,\tB: 987.77,\te: 1318.5}\n"
16986"\n"
16987"\n"
16988"function playSound(frequency){\n"
16989"  var pipeline = new Gst.Pipeline({name: \"note\"});\n"
16990"\n"
16991"  var source = Gst.ElementFactory.make(\"audiotestsrc\",\"source\");\n"
16992"  var sink = Gst.ElementFactory.make(\"autoaudiosink\",\"output\");\n"
16993"\n"
16994"  source.set_property('freq', frequency);\n"
16995"  pipeline.add(source);\n"
16996"  pipeline.add(sink);\n"
16997"  source.link(sink);\n"
16998"  pipeline.set_state(Gst.State.PLAYING);\n"
16999"\n"
17000"  Mainloop.timeout_add(500, function () {\n"
17001"    pipeline.set_state(Gst.State.NULL);\n"
17002"\t  return false;\n"
17003"});\n"
17004"}\n"
17005"\n"
17006"E.connect(\"clicked\", function() {\n"
17007"  playSound(frequencies.E);\n"
17008"});\n"
17009"A.connect(\"clicked\", function(){\n"
17010"  playSound(frequencies.A);\n"
17011"});\n"
17012"D.connect(\"clicked\", function(){\n"
17013"  playSound(frequencies.D);\n"
17014"});\n"
17015"G.connect(\"clicked\", function(){\n"
17016"  playSound(frequencies.G);\n"
17017"});\n"
17018"B.connect(\"clicked\", function(){\n"
17019"  playSound(frequencies.B);\n"
17020"});\n"
17021"e.connect(\"clicked\", function(){\n"
17022"  playSound(frequencies.e);\n"
17023"});\n"
17024"\n"
17025"guitar_box.add(E);\n"
17026"guitar_box.add(A);\n"
17027"guitar_box.add(D);\n"
17028"guitar_box.add(G);\n"
17029"guitar_box.add(B);\n"
17030"guitar_box.add(e);\n"
17031"\n"
17032"guitarwindow.add(guitar_box);\n"
17033"\n"
17034"guitar_box.show_all();\n"
17035"guitarwindow.show();\n"
17036"Gtk.main();"
17037msgstr ""
17038"\n"
17039"#!/usr/bin/gjs\n"
17040"var Gtk = imports.gi.Gtk;\n"
17041"var Gst = imports.gi.Gst;\n"
17042"\n"
17043"const Mainloop = imports.mainloop;\n"
17044"\n"
17045"Gtk.init(null, 0);\n"
17046"Gst.init(null, 0);\n"
17047"\n"
17048"var guitarwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL, border_width: 100});\n"
17049"guitarwindow.title = \"Guitar Tuner\";\n"
17050"guitarwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
17051"\n"
17052"var guitar_box = new Gtk.ButtonBox ({orientation: Gtk.Orientation.VERTICAL, spacing: 10});\n"
17053"\n"
17054"var E = new Gtk.Button({label: \"E\"});\n"
17055"var A = new Gtk.Button({label: \"A\"});\n"
17056"var D = new Gtk.Button({label: \"D\"});\n"
17057"var G = new Gtk.Button({label: \"G\"});\n"
17058"var B = new Gtk.Button({label: \"B\"});\n"
17059"var e = new Gtk.Button({label: \"e\"});\n"
17060"\n"
17061"var frequencies = {E: 329.63, A: 440,\tD: 587.33,\tG: 783.99,\tB: 987.77,\te: 1318.5}\n"
17062"\n"
17063"\n"
17064"function playSound(frequency){\n"
17065"  var pipeline = new Gst.Pipeline({name: \"note\"});\n"
17066"\n"
17067"  var source = Gst.ElementFactory.make(\"audiotestsrc\",\"source\");\n"
17068"  var sink = Gst.ElementFactory.make(\"autoaudiosink\",\"output\");\n"
17069"\n"
17070"  source.set_property('freq', frequency);\n"
17071"  pipeline.add(source);\n"
17072"  pipeline.add(sink);\n"
17073"  source.link(sink);\n"
17074"  pipeline.set_state(Gst.State.PLAYING);\n"
17075"\n"
17076"  Mainloop.timeout_add(500, function () {\n"
17077"    pipeline.set_state(Gst.State.NULL);\n"
17078"\t  return false;\n"
17079"});\n"
17080"}\n"
17081"\n"
17082"E.connect(\"clicked\", function() {\n"
17083"  playSound(frequencies.E);\n"
17084"});\n"
17085"A.connect(\"clicked\", function(){\n"
17086"  playSound(frequencies.A);\n"
17087"});\n"
17088"D.connect(\"clicked\", function(){\n"
17089"  playSound(frequencies.D);\n"
17090"});\n"
17091"G.connect(\"clicked\", function(){\n"
17092"  playSound(frequencies.G);\n"
17093"});\n"
17094"B.connect(\"clicked\", function(){\n"
17095"  playSound(frequencies.B);\n"
17096"});\n"
17097"e.connect(\"clicked\", function(){\n"
17098"  playSound(frequencies.e);\n"
17099"});\n"
17100"\n"
17101"guitar_box.add(E);\n"
17102"guitar_box.add(A);\n"
17103"guitar_box.add(D);\n"
17104"guitar_box.add(G);\n"
17105"guitar_box.add(B);\n"
17106"guitar_box.add(e);\n"
17107"\n"
17108"guitarwindow.add(guitar_box);\n"
17109"\n"
17110"guitar_box.show_all();\n"
17111"guitarwindow.show();\n"
17112"Gtk.main();"
17113
17114#. (itstool) path: section/title
17115#: C/guitar-tuner.js.page:237
17116msgid "Running the application form Terminal"
17117msgstr "터미널에서 프로그램 실행"
17118
17119#. (itstool) path: section/p
17120#: C/guitar-tuner.js.page:238
17121msgid "To run this application open Terminal, go to the folder where your application is stored and then run"
17122msgstr "프로그램을 실행하려면 터미널을 열고, 프로그램을 저장한 폴더로 들어간 후 실행하십시오"
17123
17124#. (itstool) path: section/screen
17125#: C/guitar-tuner.js.page:238
17126#, no-wrap
17127msgid " <output style=\"prompt\">$ </output><input> GJS_PATH=`pwd` gjs guitarTuner.js</input> "
17128msgstr " <output style=\"prompt\">$ </output><input> GJS_PATH=`pwd` gjs guitarTuner.js</input> "
17129
17130#. (itstool) path: section/p
17131#: C/guitar-tuner.js.page:243
17132msgid ""
17133"If you run into problems with the tutorial, compare your code with this <link href=\"guitar-tuner/guitar-tuner.js"
17134"\">reference code</link>."
17135msgstr ""
17136"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"guitar-tuner/guitar-tuner.js\">참조 코드</link>와 여"
17137"러분의 코드를 비교해보십시오."
17138
17139#. (itstool) path: info/title
17140#: C/guitar-tuner.py.page:8
17141msgctxt "text"
17142msgid "Guitar tuner (Python)"
17143msgstr "기타 조율기(Python)"
17144
17145#. (itstool) path: item/p
17146#: C/guitar-tuner.py.page:46
17147msgid "Basic knowledge of the Python programming language"
17148msgstr "파이썬 프로그래밍 언어 기본 지식"
17149
17150#. (itstool) path: item/p
17151#: C/guitar-tuner.py.page:60
17152msgid ""
17153"Choose <gui>PyGTK (automake)</gui> from the <gui>Python</gui> tab, click <gui>Continue</gui>, and fill out your "
17154"details on the next few pages. Use <file>guitar-tuner</file> as project name and directory."
17155msgstr ""
17156"<gui>파이썬</gui> 탭에서 <gui>PyGTK (automake)</gui>를 선택하고 <gui>계속</gui>을 누르신 다음 몇가지 페이지에서 세"
17157"부 내용을 채워나가십시오. 프로젝트 이름과 디렉터리 이름을 <file>guitar-tuner</file>로 정하십시오."
17158
17159#. (itstool) path: item/p
17160#: C/guitar-tuner.py.page:63
17161msgid ""
17162"Click <gui>Apply</gui> and the project will be created for you. Open <file>src/guitar_tuner.py</file> from the "
17163"<gui>Project</gui> or <gui>File</gui> tabs. You should see some code which starts with the lines:"
17164msgstr ""
17165"<gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/"
17166"guitar_tuner.py</file> 파일을 여십시오. 다음 줄로 시작하는 코드가 나타납니다:"
17167
17168#. (itstool) path: item/code
17169#: C/guitar-tuner.py.page:64
17170#, no-wrap
17171msgid ""
17172"\n"
17173"from gi.repository import Gtk, GdkPixbuf, Gdk\n"
17174"import os, sys"
17175msgstr ""
17176"\n"
17177"from gi.repository import Gtk, GdkPixbuf, Gdk\n"
17178"import os, sys"
17179
17180#. (itstool) path: section/title
17181#: C/guitar-tuner.py.page:72
17182msgid "Run the code for the first time"
17183msgstr "첫 코드 실행"
17184
17185#. (itstool) path: section/p
17186#: C/guitar-tuner.py.page:73
17187msgid ""
17188"Most of the code in the file is template code. It loads an (empty) window from the user interface description file "
17189"and shows it. More details are given below; skip this list if you understand the basics:"
17190msgstr ""
17191"이 파일의 대부분의 코드는 코드 서식입니다. 사용자 인터페이스 설명 파일에서 (빈)창을 불러오고 보여줍니다. 더 자세한 "
17192"내용은 아래에 있습니다. 기본을 알고 계신다면 이 부분은 건너 뛰십시오:"
17193
17194#. (itstool) path: item/p
17195#: C/guitar-tuner.py.page:77
17196msgid ""
17197"The <code>import</code> lines at the top include the tell Python to load the user interface and system libraries "
17198"needed."
17199msgstr ""
17200"상단의 <code>import</code> 줄은 파이썬에 사용자 인터페이스와 시스템 라이브러리가 필요함을 알리는 내용이 들어갑니다."
17201
17202#. (itstool) path: item/p
17203#: C/guitar-tuner.py.page:81
17204msgid ""
17205"A class is declared that will be the main class for our application. In the <code>__init__</code> method the main "
17206"window is loaded from the GtkBuilder file (<file>src/guitar-tuner.ui</file>) and the signals are connected."
17207msgstr ""
17208"프로그램의 주 클래스가 될 클래스를 선언합니다. <code>__init__</code> 메서드에서는 GtkBuilder 파일(<file>src/guitar-"
17209"tuner.ui</file>)에서 메인 창을 불러오고 시그널을 연결합니다."
17210
17211#. (itstool) path: item/p
17212#: C/guitar-tuner.py.page:84
17213msgid ""
17214"Connecting signals is how you define what happens when you push a button, or when some other event happens. Here, "
17215"the <code>destroy</code> method is called (and quits the app) when you close the window."
17216msgstr ""
17217"시그널을 연결하는건 단추를 누르거나 어떤 일이 일어나면 동작이 일어나게 하는 방편입니다. 여기서 <code>destroy</"
17218"code> 메서드는 창을 닫을 때 호출(하고 프로그램을 끝내기)합니다."
17219
17220#. (itstool) path: item/p
17221#: C/guitar-tuner.py.page:87
17222msgid ""
17223"The <code>main</code> function is run by default when you start a Python application. It just creates an instance "
17224"of the main class and starts the main loop to bring up the window."
17225msgstr ""
17226"<code>main</code>은 파이썬 프로그램을 시작할 때 기본으로 시작합니다. 메인 클래스의 인스턴스를 만들고 창을 띄우는 메"
17227"인 루프를 시작합니다."
17228
17229#. (itstool) path: section/p
17230#: C/guitar-tuner.py.page:92
17231msgid ""
17232"This code is ready to be used, so you can run it by clicking <guiseq><gui>Run</gui><gui>Execute</gui></guiseq>."
17233msgstr ""
17234"이 코드를 사용할 준비가 되었으니 <guiseq><gui>실행</gui><gui>실행</gui></guiseq>을 눌러 프로그램을 실행할 수 있습니"
17235"다."
17236
17237#. (itstool) path: section/p
17238#: C/guitar-tuner.py.page:97
17239msgid ""
17240"A description of the user interface (UI) is contained in the GtkBuilder file. To edit the user interface, open "
17241"<file>src/guitar_tuner.ui</file>. This will switch to the interface designer. The design window is in the center; "
17242"widgets and widgets' properties are on the right, and the palette of available widgets is on the left."
17243msgstr ""
17244"사용자 인터페이스(UI) 설명은 GtkBuilder 파일에 있습니다. 사용자 인터페이스를 편집하려면 <file>src/guitar_tuner.ui</"
17245"file> 파일을 여십시오. 이 파일을 열면 인터페이스 디자이너로 이동합니다. 디자인 창은 가운데에 있고, 위젯과 위젯 속성"
17246"은 오른편에, 쓸 수 있는 위젯의 팔레트는 왼편에 있습니다."
17247
17248#. (itstool) path: section/title
17249#: C/guitar-tuner.py.page:127
17250msgid "Write the signal handler"
17251msgstr "시그널 핸들러 작성"
17252
17253#. (itstool) path: section/p
17254#: C/guitar-tuner.py.page:129
17255msgid ""
17256"To do this, open <file>guitar_tuner.py</file> while the user interface file is still open. Switch to the "
17257"<gui>Signals</gui> tab, which you already used to set the signal name. Now take the row where you set the "
17258"<gui>clicked</gui> signal and drag it into to the source file inside the class. The following code will be added "
17259"to your source file:"
17260msgstr ""
17261"진행하려면 사용자 인터페이스 파일을 열어둔 상태에서 <file>guitar_tuner.py</file> 파일을 여십시오. 앞에서 시그널 이"
17262"름을 설정한 <gui>시그널</gui> 탭으로 가십시오. 이제 <gui>clicked</gui> 시그널 줄로 가서 소스 파일의 클래스에 이 시"
17263"그널을 끌어다 넣으십시오. 소스 파일에 다음 코드가 들어갑니다:"
17264
17265#. (itstool) path: section/code
17266#: C/guitar-tuner.py.page:131
17267#, no-wrap
17268msgid ""
17269"\n"
17270"def on_button_clicked (self, button):\n"
17271msgstr ""
17272"\n"
17273"def on_button_clicked (self, button):\n"
17274
17275#. (itstool) path: section/p
17276#: C/guitar-tuner.py.page:135
17277msgid ""
17278"This signal handler has two arguments: the usual Python class pointer, and the <code>Gtk.Button</code> that called "
17279"the function."
17280msgstr "이 시그널 핸들러에는 파이썬 클래스 포인터와 함수를 호출하는 <code>Gtk.Button</code> 인자가 있습니다."
17281
17282#. (itstool) path: section/p
17283#: C/guitar-tuner.py.page:153
17284msgid "Change the import line in <file>guitar_tuner.py</file>, just at the beginning to :"
17285msgstr "<file>guitar_tuner.py</file> 파일에 import 줄을 다음과 같이 바꾸십시오:"
17286
17287#. (itstool) path: section/code
17288#: C/guitar-tuner.py.page:154
17289#, no-wrap
17290msgid "from gi.repository import Gtk, Gst, GObject "
17291msgstr "from gi.repository import Gtk, Gst, GObject "
17292
17293#. (itstool) path: section/p
17294#: C/guitar-tuner.py.page:155
17295msgid ""
17296"The <code>Gst</code> includes the GStreamer library. You also need to initialise GStreamer properly which is done "
17297"in the <code>main()</code> method with this call added above the <code>app = GUI()</code> line:"
17298msgstr ""
17299"<code>Gst</code>에는 지스트리머 라이브러리가 들어있습니다. <code>app = GUI()</code> 줄 위에 추가한 이 호출과 "
17300"<code>main()</code> 메서드 안의 코드로 지스트리머 속성을 초기화해야합니다:"
17301
17302#. (itstool) path: section/code
17303#: C/guitar-tuner.py.page:158
17304#, no-wrap
17305msgid "Gst.init_check(sys.argv)"
17306msgstr "Gst.init_check(sys.argv)"
17307
17308#. (itstool) path: section/p
17309#: C/guitar-tuner.py.page:159
17310msgid "Then, copy the following function into the class in <file>guitar_tuner.py</file> somewhere:"
17311msgstr "그 다음 <file>guitar_tuner.py</file>의 클래스 어딘가에 다음 함수 코드를 복사하십시오:"
17312
17313#. (itstool) path: section/code
17314#: C/guitar-tuner.py.page:160
17315#, no-wrap
17316msgid ""
17317"\n"
17318"def play_sound(self, frequency):\n"
17319"\tpipeline = Gst.Pipeline(name='note')\n"
17320"\tsource = Gst.ElementFactory.make('audiotestsrc', 'src')\n"
17321"\tsink = Gst.ElementFactory.make('autoaudiosink', 'output')\n"
17322"\n"
17323"\tsource.set_property('freq', frequency)\n"
17324"\tpipeline.add(source)\n"
17325"\tpipeline.add(sink)\n"
17326"\tsource.link(sink)\n"
17327"\tpipeline.set_state(Gst.State.PLAYING)\n"
17328"\n"
17329"\tGObject.timeout_add(self.LENGTH, self.pipeline_stop, pipeline)"
17330msgstr ""
17331"\n"
17332"def play_sound(self, frequency):\n"
17333"\tpipeline = Gst.Pipeline(name='note')\n"
17334"\tsource = Gst.ElementFactory.make('audiotestsrc', 'src')\n"
17335"\tsink = Gst.ElementFactory.make('autoaudiosink', 'output')\n"
17336"\n"
17337"\tsource.set_property('freq', frequency)\n"
17338"\tpipeline.add(source)\n"
17339"\tpipeline.add(sink)\n"
17340"\tsource.link(sink)\n"
17341"\tpipeline.set_state(Gst.State.PLAYING)\n"
17342"\n"
17343"\tGObject.timeout_add(self.LENGTH, self.pipeline_stop, pipeline)"
17344
17345#. (itstool) path: item/p
17346#: C/guitar-tuner.py.page:175
17347msgid ""
17348"The first three lines create source and sink GStreamer elements and a pipeline element (which will be used as a "
17349"container for the other two elements). The pipeline is given the name \"note\"; the source is named \"source\" and "
17350"is set to the <code>audiotestsrc</code> source; and the sink is named \"output\" and set to the "
17351"<code>autoaudiosink</code> sink (default sound card output)."
17352msgstr ""
17353"처음 세 줄에서는 source와 sink 지스트리머 구성 요소, 파이프라인 구성 요소(source와 sink의 컨테이너로 활용)를 만듭니"
17354"다. 파이프라인 이름은 \"note\"라고 지어둡니다. source는 \"source\"로 이름 붙이고 <code>audiotestsrc</code>로 설정합"
17355"니다. sink는 \"output\"으로 이름 붙이고 <code>autoaudiosink</code> sink로 설정합니다(기본은 사운드 카드 출력)."
17356
17357#. (itstool) path: item/p
17358#: C/guitar-tuner.py.page:178
17359msgid ""
17360"The call to <code>source.set_property</code> sets the <code>freq</code> property of the source element to "
17361"<code>frequency</code>, which was passed as an argument to the <code>play_sound</code> function. This is just the "
17362"frequency of the note in Hertz; some useful frequencies will be defined later on."
17363msgstr ""
17364"<code>source.set_property</code> 호출에서는 source 구성 요소의 <code>freq</code> 속성에 <code>play_sound</code> 함"
17365"수의 인자로 전달한 <code>frequency</code> 값을 설정합니다. 이 값은 헤르쯔 단위의 음 주파수입니다. 쓸만한 주파수는 "
17366"나중에 정의하겠습니다."
17367
17368#. (itstool) path: item/p
17369#: C/guitar-tuner.py.page:181
17370msgid ""
17371"The next two lines call <code>pipeline.add</code>, putting the source and sink into the pipeline. The pipeline can "
17372"contain multiple other GStreamer elements. In general, you can add as many elements as you like to the pipeline by "
17373"calling its <code>add</code> method repeatedly."
17374msgstr ""
17375"다음 두 줄에서는 source 구성 요소와 sink 구성 요소를 파이프라인에 두는 <code>pipeline.add</code> 함수를 호출합니"
17376"다. 파이프라인에는 여러 지스트리머 구성 요소를 넣을 수 있습니다. 보통 <code>add</code> 메서드를 반복적으로 호출하"
17377"여 파이프라인에 원하는 만큼 구성 요소를 넣을 수 있습니다."
17378
17379#. (itstool) path: item/p
17380#: C/guitar-tuner.py.page:184
17381msgid ""
17382"Next <code>pipeline.set_state</code> is used to start playback, by setting the state of the pipeline to playing "
17383"(<code>Gst.State.PLAYING</code>)."
17384msgstr ""
17385"다음 <code>pipeline.set_state</code> 함수는 파이프라인 상태를 재생 상태(<code>Gst.State.PLAYING</code>)로 설정하여 "
17386"음 재생을 시작할 때 사용합니다."
17387
17388#. (itstool) path: section/p
17389#: C/guitar-tuner.py.page:192
17390msgid ""
17391"We don't want to play an annoying tone forever, so the last thing <code>play_sound</code> does is to call "
17392"<code>GObject.timeout_add</code>. This sets a timeout for stopping the sound; it waits for <code>LENGTH</code> "
17393"milliseconds before calling the function <code>pipeline_stop</code>, and will keep calling it until "
17394"<code>pipeline_stop</code> returns <code>False</code>."
17395msgstr ""
17396"음을 짜증나게 무한정 재생하고 싶진 않기에 <code>play_sound</code> 함수에서 마지막으로 할 일은 <code>GObject."
17397"timeout_add</code> 함수를 호출하는 일입니다. 이 함수는 음 재생을 멈출 제한 시간을 설정합니다. <code>pipeline_stop</"
17398"code> 함수를 호출하기 전 <code>LENGTH</code> 밀리초동안 기다리고 <code>pipeline_stop</code> 함수에서 <code>False</"
17399"code>를 반환하기 전까지 계속 호출합니다."
17400
17401#. (itstool) path: section/p
17402#: C/guitar-tuner.py.page:193
17403msgid ""
17404"Now, we'll write the <code>pipeline_stop</code> function which is called by <code>GObject.timeout_add</code>. "
17405"Insert the following code <em>above</em> the <code>play_sound</code> function:"
17406msgstr ""
17407"이제 <code>GObject.timeout_add</code> 함수에서 호출할  <code>pipeline_stop</code> 함수를 작성하겠습니다. 다음 코드"
17408"를 <code>play_sound</code> 함수 <em>상단</em>에 넣으십시오:"
17409
17410#. (itstool) path: section/code
17411#: C/guitar-tuner.py.page:194
17412#, no-wrap
17413msgid ""
17414"\n"
17415"def pipeline_stop(self, pipeline):\n"
17416"\tpipeline.set_state(Gst.State.NULL)\n"
17417"\treturn False\n"
17418msgstr ""
17419"\n"
17420"def pipeline_stop(self, pipeline):\n"
17421"\tpipeline.set_state(Gst.State.NULL)\n"
17422"\treturn False\n"
17423
17424#. (itstool) path: section/p
17425#: C/guitar-tuner.py.page:199
17426msgid ""
17427"You need to define the <code>LENGTH</code> constant inside the class, so add this code at the beginning of the "
17428"main class:"
17429msgstr "클래스 안에 <code>LENGTH</code> 상수를 정의해야 하므로, 메인 클래스 시작 부분에 다음 코드를 추가하겠습니다:"
17430
17431#. (itstool) path: section/code
17432#: C/guitar-tuner.py.page:201
17433#, no-wrap
17434msgid ""
17435"\n"
17436"LENGTH = 500\n"
17437msgstr ""
17438"\n"
17439"LENGTH = 500\n"
17440
17441#. (itstool) path: section/p
17442#: C/guitar-tuner.py.page:204
17443msgid "The call to <code>pipeline.set_state</code> stops the playback of the pipeline."
17444msgstr "<code>pipeline.set_state</code> 함수를 호출하면 파이프라인 재생을 멈춥니다."
17445
17446#. (itstool) path: section/p
17447#: C/guitar-tuner.py.page:209
17448msgid ""
17449"We want to play the correct sound when the user clicks a button. First of all, we need to know the frequencies for "
17450"the six guitar strings, which are defined (at the beginning of the main class) inside a dictionary so we can "
17451"easily map them to the names of the strings:"
17452msgstr ""
17453"사용자가 단추를 누르면 올바른 음을 나게 해보겠습니다. 우선 (메인 클래스 시작 부분) 딕셔너리에 정의한 기타 각 여섯줄"
17454"의 주파수를 알아내어 기타 줄에 이름에 쉽게 대응할 수 있어야합니다:"
17455
17456#. (itstool) path: section/code
17457#: C/guitar-tuner.py.page:211
17458#, no-wrap
17459msgid ""
17460"\n"
17461"# Frequencies of the strings\n"
17462"frequencies = {\n"
17463"\t'E': 329.63,\n"
17464"\t'A': 440,\n"
17465"\t'D': 587.33,\n"
17466"\t'G': 783.99,\n"
17467"\t'B': 987.77,\n"
17468"\t'e': 1318.5\n"
17469"}\n"
17470msgstr ""
17471"\n"
17472"# Frequencies of the strings\n"
17473"frequencies = {\n"
17474"\t'E': 329.63,\n"
17475"\t'A': 440,\n"
17476"\t'D': 587.33,\n"
17477"\t'G': 783.99,\n"
17478"\t'B': 987.77,\n"
17479"\t'e': 1318.5\n"
17480"}\n"
17481
17482#. (itstool) path: section/code
17483#: C/guitar-tuner.py.page:223
17484#, no-wrap
17485msgid ""
17486"\n"
17487"def on_button_clicked(self, button):\n"
17488"\tlabel = button.get_child()\n"
17489"\ttext = label.get_label()\n"
17490"\n"
17491"\tself.play_sound (self.frequencies[text])\n"
17492msgstr ""
17493"\n"
17494"def on_button_clicked(self, button):\n"
17495"\tlabel = button.get_child()\n"
17496"\ttext = label.get_label()\n"
17497"\n"
17498"\tself.play_sound (self.frequencies[text])\n"
17499
17500#. (itstool) path: section/p
17501#: C/guitar-tuner.py.page:230
17502msgid ""
17503"The button that was clicked is passed as an argument (<code>button</code>) to <code>on_button_clicked</code>. We "
17504"can get the label of that button by using <code>button.get_child</code>, and then get the text from that label "
17505"using <code>label.get_label</code>."
17506msgstr ""
17507"누른 단추는 <code>on_button_clicked</code> 함수에 인자(<code>button</code>)로 전달합니다. <code>button.get_child</"
17508"code> 함수로 단추 레이블 객체를 가져올 수 있고, 해당 레이블 객체에서 <code>label.get_label</code>을 사용하여 텍스트"
17509"를 가져올 수 있습니다."
17510
17511#. (itstool) path: section/p
17512#: C/guitar-tuner.py.page:231
17513msgid ""
17514"The label text is then used as a key for the dictionary and <code>play_sound</code> is called with the frequency "
17515"appropriate for that note. This plays the tone; we have a working guitar tuner!"
17516msgstr ""
17517"레이블 텍스트는 딕셔너리의 키로 사용하며 음에 해당하는 적당한 주파수로 <code>play_sound</code>를 호출합니다. 이 코"
17518"드로 음을 재생합니다. 이렇게 해서 동작하는 기타 조율 프로그램을 만듭니다!"
17519
17520#. (itstool) path: section/title
17521#: C/guitar-tuner.py.page:235 C/image-viewer.js.page:311 C/image-viewer.py.page:225 C/record-collection.js.page:292
17522msgid "Run the application"
17523msgstr "프로그램 실행"
17524
17525#. (itstool) path: section/p
17526#: C/guitar-tuner.py.page:236
17527msgid ""
17528"All of the code should now be ready to go. Click <guiseq><gui>Run</gui><gui>Execute</gui></guiseq> to start the "
17529"application. Enjoy!"
17530msgstr ""
17531"모든 코드를 실행할 준비를 마쳤습니다. <guiseq><gui>실행</gui><gui>실행</gui></guiseq>을 눌러 프로그램을 시작하시고 "
17532"즐기세요!"
17533
17534#. (itstool) path: section/p
17535#: C/guitar-tuner.py.page:241
17536msgid ""
17537"If you run into problems with the tutorial, compare your code with this <link href=\"guitar-tuner/guitar-tuner.py"
17538"\">reference code</link>."
17539msgstr ""
17540"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"guitar-tuner/guitar-tuner.py\">참조 코드</link>와 여"
17541"러분의 코드를 비교해보십시오."
17542
17543#. (itstool) path: info/desc
17544#: C/guitar-tuner.vala.page:10
17545msgid ""
17546"Use <link href=\"http://developer.gnome.org/platform-overview/stable/gtk\">GTK+</link> and <link href=\"http://"
17547"developer.gnome.org/platform-overview/stable/gstreamer\">GStreamer</link> to build a simple guitar tuner "
17548"application for GNOME. Shows off how to use the interface designer."
17549msgstr ""
17550"간단한 그놈용 기타 조율 프로그램을 만들 때 <link href=\"http://developer.gnome.org/platform-overview/stable/gtk"
17551"\">GTK+</link>와 <link href=\"http://developer.gnome.org/platform-overview/stable/gstreamer\">지스트리머</link>를 "
17552"활용합니다. 인터페이스 사용 방법을 보여드립니다."
17553
17554#. (itstool) path: synopsis/p
17555#: C/guitar-tuner.vala.page:35
17556msgid ""
17557"In this tutorial you will create an application which plays tones that you can use to tune a guitar. You will "
17558"learn how to:"
17559msgstr ""
17560"이 따라하기 지침서를 통해 기타를 조율할 때 활용할 수 있는 기타 음 재생 프로그램을 만듭니다. 다음 내용을 배웁니다:"
17561
17562#. (itstool) path: item/p
17563#: C/guitar-tuner.vala.page:37
17564msgid "Set up a basic project using the <link xref=\"getting-ready\">Anjuta IDE</link>."
17565msgstr "<link xref=\"getting-ready\">안주타 IDE</link>로 기본 프로젝트를 설정합니다."
17566
17567#. (itstool) path: item/p
17568#: C/guitar-tuner.vala.page:38
17569msgid "Create a simple GUI with <app>Anjuta</app>'s UI designer."
17570msgstr "<app>안주타</app> 사용자 인터페이스 디자이너로 간단한 GUI를 만듭니다."
17571
17572#. (itstool) path: item/p
17573#: C/guitar-tuner.vala.page:39
17574msgid ""
17575"Use the <link href=\"http://developer.gnome.org/platform-overview/stable/gstreamer\">GStreamer</link> library to "
17576"play sounds."
17577msgstr ""
17578"소리 재생에 <link href=\"http://developer.gnome.org/platform-overview/stable/gstreamer\">지스트리머</link> 라이브러"
17579"리를 사용합니다."
17580
17581#. (itstool) path: item/p
17582#: C/guitar-tuner.vala.page:43 C/image-viewer.vala.page:48
17583msgid "Basic knowledge of the <link href=\"https://live.gnome.org/Vala/Tutorial\">Vala</link> programming language."
17584msgstr "<link href=\"https://live.gnome.org/Vala/Tutorial\">Vala</link> 프로그래밍 언어 기본 지식."
17585
17586#. (itstool) path: item/p
17587#: C/guitar-tuner.vala.page:44 C/image-viewer.vala.page:49
17588msgid "An installed copy of <app>Anjuta</app>."
17589msgstr "<app>안주타</app> 설치 사본."
17590
17591#. (itstool) path: section/title
17592#: C/guitar-tuner.vala.page:51
17593msgid "Create a project in <app>Anjuta</app>"
17594msgstr "<app>안주타</app> 프로젝트 만들기"
17595
17596#. (itstool) path: item/p
17597#: C/guitar-tuner.vala.page:55 C/image-viewer.vala.page:63
17598msgid ""
17599"Start <app>Anjuta</app> and click <gui>Create a new project</gui> or <guiseq><gui>File</gui><gui>New</"
17600"gui><gui>Project</gui></guiseq> to open the project wizard."
17601msgstr ""
17602"<app>안주타</app> 를 시작하고 <gui>새 프로젝트 만들기</gui> 또는 <guiseq><gui>파일</gui><gui>새로 만들기</gui><gui>"
17603"프로젝트</gui></guiseq> 를 눌러 프로젝트 마법사를 여십시오."
17604
17605#. (itstool) path: item/p
17606#: C/guitar-tuner.vala.page:58
17607msgid ""
17608"Click on the <gui>Vala</gui> tab and select <gui>GTK+ (Simple)</gui>. Click <gui>Continue</gui>, and fill out your "
17609"details on the next few pages. Use <file>guitar-tuner</file> as project name and directory."
17610msgstr ""
17611"<gui>Vala</gui> 탭을 누른 후 <gui>GTK+ (단순)</gui> 항목을 선택하십시오. <gui>계속</gui>을 누르고 다음 일부 페이지"
17612"에서 세부 내용을 채워나가십시오. 프로젝트 이름과 디렉터리 이름을 <file>guitar-tuner</file>로 설정하십시오."
17613
17614#. (itstool) path: item/p
17615#: C/guitar-tuner.vala.page:61
17616msgid ""
17617"Make sure that <gui>Configure external packages</gui> is switched <gui>ON</gui>. On the next page, select <link "
17618"href=\"http://valadoc.org/gstreamer-0.10/index.htm\"><em>gstreamer-0.10</em></link> from the list to include the "
17619"GStreamer library in your project. Click <gui>Continue</gui>"
17620msgstr ""
17621"<gui>외부 패키지 설정</gui>을 <gui>켬</gui>으로 설정했는지 확인하십시오. 다음 페이지의 목록에서 <link href="
17622"\"http://valadoc.org/gstreamer-0.10/index.htm\"><em>gstreamer-0.10</em></link>를 선택하여 프로젝트에 지스트리머 라"
17623"이브러리를 넣으십시오. <gui>계속</gui>을 누르십시오."
17624
17625#. (itstool) path: item/p
17626#: C/guitar-tuner.vala.page:65
17627msgid ""
17628"Click <gui>Apply</gui> and the project will be created for you. From the <gui>Project</gui> or <gui>Files</gui> "
17629"tab, open <file>src/guitar_tuner.vala</file> by double-clicking on it. You should see some code which starts with "
17630"the lines:"
17631msgstr ""
17632"<gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/"
17633"guitar_tuner.vala</file> 파일을 두 번 눌러 여십시오. 다음 줄로 시작하는 일부 코드를 볼 수 있습니다:"
17634
17635#. (itstool) path: item/code
17636#: C/guitar-tuner.vala.page:66 C/magic-mirror.vala.page:70
17637#, no-wrap
17638msgid ""
17639"\n"
17640"using GLib;\n"
17641"using Gtk;"
17642msgstr ""
17643"\n"
17644"using GLib;\n"
17645"using Gtk;"
17646
17647#. (itstool) path: section/p
17648#: C/guitar-tuner.vala.page:75
17649msgid ""
17650"The code loads an (empty) window from the user interface description file and displays it. More details are given "
17651"below; you may choose to skip this list if you understand the basics:"
17652msgstr ""
17653"이 코드는 (빈) 창을 사용자 인터페이스 설명 파일에서 불러오고 화면에 나타냅니다. 자세한 내용은 아래에 있습니다. 기본"
17654"을 이해하셨다면 이 부분은 넘어가셔도 됩니다:"
17655
17656#. (itstool) path: item/p
17657#: C/guitar-tuner.vala.page:79 C/magic-mirror.vala.page:82
17658msgid "The two <code>using</code> lines import namespaces so we don't have to name them explicitly."
17659msgstr "<code>using</code> 선언부 두줄은 이름 여역을 가져오므로 굳이 이름을 적어넣을 필요는 없습니다."
17660
17661#. (itstool) path: item/p
17662#: C/guitar-tuner.vala.page:82
17663msgid ""
17664"The constructor of the <code>Main</code> class creates a new window by opening a GtkBuilder file (<file>src/guitar-"
17665"tuner.ui</file>, defined a few lines above), connecting its signals and then displaying it in a window. This "
17666"GtkBuilder file contains a description of a user interface and all of its elements. You can use Anjuta's editor to "
17667"design GtkBuilder user interfaces."
17668msgstr ""
17669"<code>Main</code> 클래스 생성자는 GtkBuilder 파일을 열어 새 창을 만들고(위 몇 줄에 정의한 <file>src/guitar-tuner."
17670"ui</file>), 시그널을 연결한 다음 창을 화면에 띄웁니다. GtkBiulder 파일에는 사용자 인터페이스 설명과 구성요소 모두"
17671"를 담고 있습니다. 안주타 편집기를 사용하여 GtkBuilder 사용자 인터페이스를 디자인할 수 있습니다."
17672
17673#. (itstool) path: note/p
17674#: C/guitar-tuner.vala.page:84
17675msgid ""
17676"Connecting signals is how you define what happens when you push a button, or when some other event happens. Here, "
17677"the <code>on_destroy</code> function is called (and quits the app) when you close the window."
17678msgstr ""
17679"시그널 연결은 단추를 눌렀을 때 또는 다른 어떤 일이 일어났을 때 일어날 행동을 정의하는 방식입니다. 여기서 "
17680"<code>on_destroy</code> 함수는 창을 닫을 때 호출(하고 끝내기) 합니다."
17681
17682#. (itstool) path: item/p
17683#: C/guitar-tuner.vala.page:88
17684msgid ""
17685"The static <code>main</code> function is run by default when you start a Vala application. It calls a few "
17686"functions which create the Main class, set up and then run the application. The <code>Gtk.main</code> function "
17687"starts the GTK main loop, which runs the user interface and starts listening for events (like clicks and key "
17688"presses)."
17689msgstr ""
17690"정적 <code>main</code> 함수는 Vala 프로그램을 시작할 때 기본으로 실행합니다. Main 클래스를 만들고 설정한 다음 프로"
17691"그램을 실행하는 일부 함수를 호출합니다. <code>Gtk.main</code> 함수는 사용자 인터페이스를 실행하고 (마우스 누름과 "
17692"키 누름 같은) 이벤트를 기다리기 시작하는 GTK 메인 루프를 시작합니다."
17693
17694#. (itstool) path: section/p
17695#: C/guitar-tuner.vala.page:92
17696msgid ""
17697"This code is ready to be used, so you can compile it by clicking <guiseq><gui>Build</gui><gui>Build Project</gui></"
17698"guiseq> (or press <keyseq><key>Shift</key><key>F7</key></keyseq>). When you do this, a dialog will appear. Change "
17699"the <gui>Configuration</gui> to <gui>Default</gui> and then click <gui>Execute</gui> to configure the build "
17700"directory. You only need to do this once, for the first build."
17701msgstr ""
17702"이 코드를 사용할 준비가 끝났기에 <guiseq><gui>빌드</gui><gui>프로젝트 빌드</gui></guiseq>(또는 <keyseq><key>Shift</"
17703"key><key>F7</key></keyseq>키)를 눌러 컴파일할 수 있습니다. 이 과정을 수행하면 대화상자가 나타납니다.  <gui>설정</"
17704"gui>을 <gui>기본</gui>으로 바꾸고 <gui>실행</gui>을 눌러 빌드 디렉터리를 설정하십시오. 처음 빌드하실 때 한 번만 실"
17705"행하시면 됩니다."
17706
17707#. (itstool) path: section/p
17708#: C/guitar-tuner.vala.page:97
17709msgid ""
17710"A description of the user interface (UI) is contained in the GtkBuilder file <file>src/guitar_tuner.ui</file> "
17711"defined at the top of the class. To edit the user interface, open <file>src/guitar_tuner.ui</file> by double-"
17712"clicking on it in the <gui>Project</gui> or <gui>Files</gui> section. This will switch to the interface designer. "
17713"The design window is in the center; <gui>Widgets</gui> and the widget properties are on the right, and the "
17714"<gui>Palette</gui> of available widgets is on the left."
17715msgstr ""
17716"사용자 인터페이스(UI)설명은 클래서 상단에 정의한 <file>src/guitar_tuner.ui</file> GtkBuilder 파일에 있습니다. 사용"
17717"자 인터페이스를 편집하려면 <gui>프로젝트</gui> 또는 <gui>파일</gui> 섹션에서 <file>src/guitar_tuner.ui</file> 파일"
17718"을 두 번 눌러 여십시오. 이 동작을 통해 인터페이스 디자이너 프로그램으로 옮겨갑니다. 디자인 창은 가운데 있고, <gui>"
17719"위젯</gui> 과 위젯 속성은 오른편에, 사용할 수 있는 위젯의 <gui>팔레트</gui>는 왼편에 있습니다."
17720
17721#. (itstool) path: section/p
17722#: C/guitar-tuner.vala.page:99
17723msgid ""
17724"The layout of every UI in GTK+ is organized using boxes and tables. Let's use a vertical GtkButtonBox here to "
17725"assign six GtkButtons, one for each of the six guitar strings."
17726msgstr ""
17727"GTK+의 모든 UI 배치는 상자와 테이블 안에 모아둡니다. 기타 줄 각 한개를 의미하는 GtkButton 6개를 모아둘 수직 방향 "
17728"GtkButtonBox를 사용해보겠습니다."
17729
17730#. (itstool) path: item/p
17731#: C/guitar-tuner.vala.page:105
17732msgid ""
17733"In the <gui>Palette</gui> tab, from the <gui>Containers</gui> section, select a <gui>Button Box</gui> "
17734"(GtkButtonBox) by clicking on the icon. Then click on the design window in the center to place it into the window. "
17735"A dialog will display where you can set the <gui>Number of items</gui> to <input>6</input>. Then click "
17736"<gui>Create</gui>."
17737msgstr ""
17738"<gui>컨테이너</gui> 섹션의 <gui>팔레트-</gui> 탭에서 아이콘을 눌러 <gui>Button Box</gui>(GtkButtonBox)를 선택하십시"
17739"오. 그 후 디자인 창 한가운데를 눌러 창에 넣으십시오. <gui>항목 수</gui>를 <input>6</input>으로 설정할 수 있는 대화"
17740"상자가 나타납니다. 설정하고 나면 <gui>만들기</gui>를 누르십시오."
17741
17742#. (itstool) path: note/p
17743#: C/guitar-tuner.vala.page:106
17744msgid ""
17745"You can also change the <gui>Number of elements</gui> and the <gui>Orientation</gui> in the <gui>General</gui> tab "
17746"on the right."
17747msgstr "우측 <gui>일반</gui> 탭에서 <gui>항목 수</gui>와 <gui>방향</gui>을 설정할 수도 있습니다."
17748
17749#. (itstool) path: item/p
17750#: C/guitar-tuner.vala.page:110
17751msgid ""
17752"Now, from the <gui>Control and Display</gui> section of the <gui>Palette</gui> choose a <gui>Button</gui> "
17753"(GtkButton) by clicking on it. Place it into the first section of the GtkButtonBox by clicking in the first "
17754"section."
17755msgstr ""
17756"이제 <gui>팔레트</gui>의 <gui>컨트롤 및 표시</gui> 섹션에서  <gui>Button</gui> (GtkButton)을 눌러 선택하십시오. 처"
17757"음 섹션을 눌러서 GtkButtonBox의 처음 섹션에 두십시오."
17758
17759#. (itstool) path: item/p
17760#: C/guitar-tuner.vala.page:113
17761msgid ""
17762"While the button is still selected, scroll down in the <gui>General</gui> tab on the right to the <gui>Label</gui> "
17763"property, and change it to <gui>E</gui>. This will be the low E guitar string."
17764msgstr ""
17765"단추를 선택한 상태라면 우측 <gui>일반</gui> 탭에서 스크롤을 내려 <gui>레이블</gui> 속성을 찾아 <gui>E</gui>로 바꾸"
17766"십시오. 낮은 E 음 기타 현 입니다."
17767
17768#. (itstool) path: note/p
17769#: C/guitar-tuner.vala.page:114
17770msgid "The <gui>General</gui> tab is located in the <gui>Widgets</gui> section on the right."
17771msgstr "<gui>일반</gui> 탭은 우측 <gui>위젯</gui> 섹션에 있습니다."
17772
17773#. (itstool) path: item/p
17774#: C/guitar-tuner.vala.page:119
17775msgid ""
17776"Click on the <gui>Signals</gui> tab in the <gui>Widgets</gui> section on the right, and look for the "
17777"<code>clicked</code> signal of the button. You can use this to connect a signal handler that will be called when "
17778"the button is clicked by the user. To do this, click on the signal and type <code>main_on_button_clicked</code> in "
17779"the <gui>Handler</gui> column and press the <key>Enter</key>."
17780msgstr ""
17781"우측의 <gui>위젯</gui> 섹션에서 <gui>시그널</gui>을 누르고 단추의 <code>clicked</code> 시그널을 찾으십시오. 단추를 "
17782"사용자가 눌렀을 때 호출할 시그널 핸들러에 이 시그널을 연결할 수 있습니다. 이렇게 하려면 시그널을 선택하고 <gui>핸들"
17783"러</gui> 열에 <code>main_on_button_clicked</code>를 입력한 후 <key>Enter</key>키를 누르십시오."
17784
17785#. (itstool) path: section/p
17786#: C/guitar-tuner.vala.page:132
17787msgid ""
17788"This section will show you how to create the code to produce sounds. <link href=\"http://developer.gnome.org/"
17789"platform-overview/stable/gstreamer\">GStreamer</link> is GNOME's multimedia framework — you can use it for "
17790"playing, recording, and processing video, audio, webcam streams and the like. Here, we'll be using it to produce "
17791"single-frequency tones."
17792msgstr ""
17793"이 섹션은 음을 재생하는 코드를 작성하는 법을 보여줍니다. <link href=\"http://developer.gnome.org/platform-overview/"
17794"stable/gstreamer\">지스트리머</link>는 그놈 멀티미디어 프레임워크입니다. 동영상, 오디오, 웹캠 스트림 같은 매체를 재"
17795"생하고, 녹음/녹화하고 처리할 때 이 프레임워크를 사용할 수 있습니다. 여기서는 단일 주파수 음을 재생할 때 이 프레임워"
17796"크를 사용하겠습니다."
17797
17798#. (itstool) path: section/p
17799#: C/guitar-tuner.vala.page:133
17800msgid ""
17801"Conceptually, GStreamer works as follows: You create a <link href=\"http://gstreamer.freedesktop.org/data/doc/"
17802"gstreamer/head/manual/html/section-intro-basics-bins.html\"><em>pipeline</em></link> containing several processing "
17803"elements going from the <em>source</em> to the <em>sink</em> (output). The source can be an image file, a video, "
17804"or a music file, for example, and the output could be a widget or the soundcard."
17805msgstr ""
17806"개념상 지스트리머든 다음과 같이 동작합니다.  <em>source</em>에서 <em>sink</em>(출력)으로의 다양한 처리 흐름을 담는 "
17807"<link href=\"http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-intro-basics-bins.html"
17808"\"><em>파이프라인</em></link>을 만듭니다. source는 그림 파일, 동영상, 음악 파일이 될 수 있으며, 출력 모양새는 위젯 "
17809"또는 사운드 카드의 출력일 수 있습니다."
17810
17811#. (itstool) path: section/p
17812#: C/guitar-tuner.vala.page:142
17813msgid ""
17814"In this example we will use a tone generator source called <code>audiotestsrc</code> and send the output to the "
17815"default system sound device, <code>autoaudiosink</code>. We only need to configure the frequency of the tone "
17816"generator; this is accessible through the <code>freq</code> property of <code>audiotestsrc</code>."
17817msgstr ""
17818"여기 단순 예제에서는 <code>audiotestsrc</code> 라는 음 재생기 소스를 사용하고 기본 시스템 사운드 장치 "
17819"<code>autoaudiosink</code>로 출력을 내보내겠습니다. 우리는 여기서 음 재생기 주파수만 설정하면 됩니다.  "
17820"<code>audiotestsrc</code>의 <code>freq</code> 속성을 사용하면 됩니다."
17821
17822#. (itstool) path: section/p
17823#: C/guitar-tuner.vala.page:144
17824msgid ""
17825"We need to add a line to initialize GStreamer; put the following code on the line above the <code>Gtk.init</code> "
17826"call in the <code>main</code> function:"
17827msgstr ""
17828"지스트리머를 초기화하는 코드 한 줄을 넣어야합니다. 다음 코드를 <code>main</code> 함수의 <code>Gtk.init</code> 코드 "
17829"위에 넣으십시오:"
17830
17831#. (itstool) path: section/code
17832#: C/guitar-tuner.vala.page:145
17833#, no-wrap
17834msgid "Gst.init (ref args);"
17835msgstr "Gst.init (ref args);"
17836
17837#. (itstool) path: section/p
17838#: C/guitar-tuner.vala.page:146
17839msgid "Then, copy the following function into <file>guitar_tuner.vala</file> inside our <code>Main</code> class:"
17840msgstr ""
17841"그리고 다음 함수 코드를 <code>Main</code> 클래스의 <file>guitar_tuner.vala</file> 파일 안에 복사해넣으십시오:"
17842
17843#. (itstool) path: section/code
17844#: C/guitar-tuner.vala.page:147
17845#, no-wrap
17846msgid ""
17847"\n"
17848"Gst.Element sink;\n"
17849"Gst.Element source;\n"
17850"Gst.Pipeline pipeline;\n"
17851"\n"
17852"private void play_sound(double frequency)\n"
17853"{\n"
17854"\tpipeline = new Gst.Pipeline (\"note\");\n"
17855"\tsource   = Gst.ElementFactory.make (\"audiotestsrc\",\n"
17856"\t                                    \"source\");\n"
17857"\tsink     = Gst.ElementFactory.make (\"autoaudiosink\",\n"
17858"\t                                    \"output\");\n"
17859"\n"
17860"\t/* set frequency */\n"
17861"\tsource.set (\"freq\", frequency);\n"
17862"\n"
17863"\tpipeline.add (source);\n"
17864"\tpipeline.add (sink);\n"
17865"\tsource.link (sink);\n"
17866"\n"
17867"\tpipeline.set_state (Gst.State.PLAYING);\n"
17868"\n"
17869"\t/* stop it after 200ms */\n"
17870"\tvar time = new TimeoutSource(200);\n"
17871"\n"
17872"\ttime.set_callback(() =&gt; {\n"
17873"\t\tpipeline.set_state (Gst.State.NULL);\n"
17874"\t\treturn false;\n"
17875"\t});\n"
17876"\ttime.attach(null);\n"
17877"}"
17878msgstr ""
17879"\n"
17880"Gst.Element sink;\n"
17881"Gst.Element source;\n"
17882"Gst.Pipeline pipeline;\n"
17883"\n"
17884"private void play_sound(double frequency)\n"
17885"{\n"
17886"\tpipeline = new Gst.Pipeline (\"note\");\n"
17887"\tsource   = Gst.ElementFactory.make (\"audiotestsrc\",\n"
17888"\t                                    \"source\");\n"
17889"\tsink     = Gst.ElementFactory.make (\"autoaudiosink\",\n"
17890"\t                                    \"output\");\n"
17891"\n"
17892"\t/* set frequency */\n"
17893"\tsource.set (\"freq\", frequency);\n"
17894"\n"
17895"\tpipeline.add (source);\n"
17896"\tpipeline.add (sink);\n"
17897"\tsource.link (sink);\n"
17898"\n"
17899"\tpipeline.set_state (Gst.State.PLAYING);\n"
17900"\n"
17901"\t/* stop it after 200ms */\n"
17902"\tvar time = new TimeoutSource(200);\n"
17903"\n"
17904"\ttime.set_callback(() =&gt; {\n"
17905"\t\tpipeline.set_state (Gst.State.NULL);\n"
17906"\t\treturn false;\n"
17907"\t});\n"
17908"\ttime.attach(null);\n"
17909"}"
17910
17911#. (itstool) path: item/p
17912#: C/guitar-tuner.vala.page:181
17913msgid ""
17914"The first three lines create source and sink GStreamer elements (<link href=\"http://valadoc.org/gstreamer-0.10/"
17915"Gst.Element.html\"><code>Gst.Element</code></link>), and a <link href=\"http://valadoc.org/gstreamer-0.10/Gst."
17916"Pipeline.html\">pipeline element</link> (which will be used as a container for the other two elements). Those are "
17917"class variables so they are defined outside the method. The pipeline is given the name \"note\"; the source is "
17918"named \"source\" and is set to the <code>audiotestsrc</code> source; and the sink is named \"output\" and set to "
17919"the <code>autoaudiosink</code> sink (default sound card output)."
17920msgstr ""
17921"처음 다섯줄에서는 source와 sink 지스트리머 구성 요소(<link href=\"http://valadoc.org/gstreamer-0.10/Gst.Element."
17922"html\"><code>Gst.Element</code></link>), <link href=\"http://valadoc.org/gstreamer-0.10/Gst.Pipeline.html\">파이프"
17923"라인 구성 요소</link>(source와 sink의 컨테이너로 활용)를 만듭니다. 여기 언급한 구성요소는 클래스 변수이므로 밖에서"
17924"는 메서드로 정의합니다. 파이프라인 이름은 \"note\"라고 지어둡니다. source는 \"source\"로 이름 붙이고 "
17925"<code>audiotestsrc</code>로 설정합니다. sink는 \"output\"으로 이름 붙이고 <code>autoaudiosink</code> sink로 설정합"
17926"니다(기본은 사운드 카드 출력)."
17927
17928#. (itstool) path: item/p
17929#: C/guitar-tuner.vala.page:184
17930msgid ""
17931"The call to <link href=\"http://valadoc.org/gobject-2.0/GLib.Object.set.html\"><code>source.set</code></link> sets "
17932"the <code>freq</code> property of the source element to <code>frequency</code>, which is passed in as an argument "
17933"to the <code>play_sound</code> function. This is just the frequency of the note in Hertz; some useful frequencies "
17934"will be defined later on."
17935msgstr ""
17936"<code>play_sound</code> 함수 인자로 넘긴 <code>frequency</code> 값을 <link href=\"http://valadoc.org/gobject-2.0/"
17937"GLib.Object.set.html\"><code>source.set</code></link> 호출로 source 구성 요소의 <code>freq</code>  속성을 설정합니"
17938"다. 이 값은 헤르쯔 단위의 주파수입니다 쓸만한 주파수 값은 나중에 정의하겠습니다."
17939
17940#. (itstool) path: item/p
17941#: C/guitar-tuner.vala.page:187
17942msgid ""
17943"<link href=\"http://valadoc.org/gstreamer-0.10/Gst.Bin.add.html\"><code>pipeline.add</code></link> puts the source "
17944"and sink into the pipeline. The pipeline is a <link href=\"http://valadoc.org/gstreamer-0.10/Gst.Bin.html"
17945"\"><code>Gst.Bin</code></link>, which is just an element that can contain multiple other GStreamer elements. In "
17946"general, you can add as many elements as you like to the pipeline by adding more calls to <code>pipeline.add</"
17947"code>."
17948msgstr ""
17949"<link href=\"http://valadoc.org/gstreamer-0.10/Gst.Bin.add.html\"><code>pipeline.add</code></link>  파이프라인에 "
17950"source와 sink를 둡니다. 파이프라인은 다른 지스트리머 구성 요소를 여럿 넣을 수 있는 <link href=\"http://valadoc.org/"
17951"gstreamer-0.10/Gst.Bin.html\"><code>Gst.Bin</code></link> 입니다. 보통 <code>pipeline.add</code> 에 호출을 추가하"
17952"여 원하는 만큼 구성 요소를 넣을 수 있습니다."
17953
17954#. (itstool) path: item/p
17955#: C/guitar-tuner.vala.page:190
17956msgid ""
17957"Next, <link href=\"http://valadoc.org/gstreamer-0.10/Gst.Element.link.html\"><code>sink.link</code></link> is used "
17958"to connect the elements together, so the output of source (a tone) goes into the input of sink (which is then "
17959"output to the sound card). <link href=\"http://www.valadoc.org/gstreamer-0.10/Gst.Element.set_state.html"
17960"\"><code>pipeline.set_state</code></link> is then used to start playback, by setting the <link href=\"http://www."
17961"valadoc.org/gstreamer-0.10/Gst.State.html\">state of the pipeline</link> to playing (<code>Gst.State.PLAYING</"
17962"code>)."
17963msgstr ""
17964"다음, <link href=\"http://valadoc.org/gstreamer-0.10/Gst.Element.link.html\"><code>sink.link</code></link>는 구성 "
17965"요소를 서로 연결하여 source의 출력이 sink의 입력으로 들어가게 할 때(그리고 나중에 이 흐름은 사운드 카드로 출력함) "
17966"사용합니다. 그 다음 <link href=\"http://www.valadoc.org/gstreamer-0.10/Gst.Element.set_state.html\"><code>pipeline."
17967"set_state</code></link>로 <link href=\"http://www.valadoc.org/gstreamer-0.10/Gst.State.html\">파이프라인 상태</"
17968"link>를 재생(<code>Gst.State.PLAYING</code>) 상태로 설정하여 재생을 시작합니다."
17969
17970#. (itstool) path: item/p
17971#: C/guitar-tuner.vala.page:193
17972msgid ""
17973"We don't want to play an annoying tone forever, so the last thing <code>play_sound</code> does is to add a <link "
17974"href=\"http://www.valadoc.org/glib-2.0/GLib.TimeoutSource.html\"><code>TimeoutSource</code></link>. This sets a "
17975"timeout for stopping the sound; it waits for 200 milliseconds before calling a signal handler defined inline that "
17976"stops and destroys the pipeline. It returns <code>false</code> to remove itself from the timeout, otherwise it "
17977"would continue to be called every 200 ms."
17978msgstr ""
17979"음을 무한정 지겹게 재생하고 싶지는 않기 때문에 <code>play_sound</code> 함수에서 <link href=\"http://www.valadoc."
17980"org/glib-2.0/GLib.TimeoutSource.html\"><code>TimeoutSource</code></link>를 추가합니다. TimeoutSource로 음 재생을 멈"
17981"출 제한 시간을 설정합니다. 파이프라인을 멈추고 해체하는 코드를 정의한 시그널 핸들러를 호출하기 전 200 밀리초 동안 "
17982"기다립니다. 주어진 시간이 지나면 자체를 해체할 목적으로 <code>false</code>를 반환합니다. 그렇지 않으면 200 밀리초마"
17983"다 계속 실행합니다."
17984
17985#. (itstool) path: section/p
17986#: C/guitar-tuner.vala.page:204
17987msgid ""
17988"In the UI designer, you made it so that all of the buttons will call the same function, <gui>on_button_clicked</"
17989"gui>, when they are clicked. Actually we type <gui>main_on_button_clicked</gui> which tells the UI designer that "
17990"this method is part of our <code>Main</code>. We need to add that function in the source file."
17991msgstr ""
17992"UI 디자이너에서 모든 단추를 만들어서 이 단추에 동일한 함수 단추를 눌렀을 때 동일한 함수 <gui>on_button_clicked</"
17993"gui>를 호출하도록 연결할 차례입니다. 실제로 UI 디자이너에서 입력한 <gui>main_on_button_clicked</gui>는 Main의 메서"
17994"드를 말합니다. 소스 파일에 이 함수를 추가해야합니다."
17995
17996#. (itstool) path: section/p
17997#: C/guitar-tuner.vala.page:205
17998msgid ""
17999"To do this, in the user interface file (guitar_tuner.ui) select one of the buttons by clicking on it, then open "
18000"<file>guitar_tuner.vala</file> (by clicking on the tab in the center). Switch to the <gui>Signals</gui> tab on the "
18001"right, which you used to set the signal name. Now take the row where you set the <gui>clicked</gui> signal and "
18002"drag and drop it into to the source file at the beginning of the class. The following code will be added to your "
18003"source file:"
18004msgstr ""
18005"소스 파일에 함수를 추가하려면 사용자 인터페이스 파일(guitar_tuner.ui)에서 단추 하나를 눌러 선택하고, (가운데 탭을 "
18006"눌러) <file>guitar_tuner.vala</file> 파일을 여십시오. 시그널 이름을 설정하는 오른편의 <gui>시그널</gui> 탭으로 옮겨"
18007"가십시오. 이제 앞서 설정한 <gui>clicked</gui> 시그널 줄을 클래스 앞부분의 소스 파일에 끌어다 높으십시오. 이 동작을 "
18008"통해 소스 파일에 다음 코드를 추가합니다:"
18009
18010#. (itstool) path: section/code
18011#: C/guitar-tuner.vala.page:207
18012#, no-wrap
18013msgid ""
18014"\n"
18015"public void on_button_clicked (Gtk.Button sender) {\n"
18016"\n"
18017"}"
18018msgstr ""
18019"\n"
18020"public void on_button_clicked (Gtk.Button sender) {\n"
18021"\n"
18022"}"
18023
18024#. (itstool) path: note/p
18025#: C/guitar-tuner.vala.page:212
18026msgid "You can also just type the code at the beginning of the class instead of using the drag and drop."
18027msgstr "끌어다 놓는 방식 대신 클래스 앞 부분에 코드를 직접 입력할 수도 있습니다."
18028
18029#. (itstool) path: section/p
18030#: C/guitar-tuner.vala.page:213
18031msgid ""
18032"This signal handler has only one argument: the <link href=\"http://valadoc.org/gtk+-3.0/Gtk.Widget.html"
18033"\"><code>Gtk.Widget</code></link> that called the function (in our case, always a <link href=\"http://valadoc.org/"
18034"gtk+-3.0/Gtk.Button.html\"><code>Gtk.Button</code></link>)."
18035msgstr ""
18036"시그널 핸들러의 인자는 <link href=\"http://valadoc.org/gtk+-3.0/Gtk.Widget.html\"><code>Gtk.Widget</code></link>(우"
18037"리 같은 경우, 항상 <link href=\"http://valadoc.org/gtk+-3.0/Gtk.Button.html\"><code>Gtk.Button</code></link>) 하나"
18038"뿐입니다."
18039
18040#. (itstool) path: section/title
18041#: C/guitar-tuner.vala.page:219
18042msgid "Define the signal handler"
18043msgstr "시그널 핸들러 정의"
18044
18045#. (itstool) path: section/p
18046#: C/guitar-tuner.vala.page:220
18047msgid ""
18048"We want to play the correct sound when the user clicks a button. For this, we flesh out the signal handler which "
18049"we defined above, <code>on_button_clicked</code>. We could have connected every button to a different signal "
18050"handler, but that would lead to a lot of code duplication. Instead, we can use the label of the button to figure "
18051"out which button was clicked:"
18052msgstr ""
18053"사용자가 단추를 누르면 올바른 음이 나오게 하려고 합니다. 이렇게 하려면 위에서 정의한 시그널 핸들러에 코드를 덧붙여"
18054"야합니다. 모든 단추에 각자 다른 시그널 핸들러를 연결할 수 있지만, 같은 코드를 여러번 쓸 수 있습니다. 이 대신 어떤 "
18055"단추를 눌렀는지 판단할 때 단추 레이블을 활용할 수 있습니다:"
18056
18057#. (itstool) path: section/code
18058#: C/guitar-tuner.vala.page:221
18059#, no-wrap
18060msgid ""
18061"\n"
18062"public void on_button_clicked (Gtk.Button sender) {\n"
18063"\tvar label = sender.get_child () as Gtk.Label;\n"
18064"\tswitch (label.get_label()) {\n"
18065"\t\tcase \"E\":\n"
18066"\t\t\tplay_sound (329.63);\n"
18067"\t\t\tbreak;\n"
18068"\t\tcase \"A\":\n"
18069"\t\t\tplay_sound (440);\n"
18070"\t\t\tbreak;\n"
18071"\t\tcase \"D\":\n"
18072"\t\t\tplay_sound (587.33);\n"
18073"\t\t\tbreak;\n"
18074"\t\tcase \"G\":\n"
18075"\t\t\tplay_sound (783.99);\n"
18076"\t\t\tbreak;\n"
18077"\t\tcase \"B\":\n"
18078"\t\t\tplay_sound (987.77);\n"
18079"\t\t\tbreak;\n"
18080"\t\tcase \"e\":\n"
18081"\t\t\tplay_sound (1318);\n"
18082"\t\t\tbreak;\n"
18083"\t\tdefault:\n"
18084"\t\t\tbreak;\n"
18085"\t}\n"
18086"}\n"
18087msgstr ""
18088"\n"
18089"public void on_button_clicked (Gtk.Button sender) {\n"
18090"\tvar label = sender.get_child () as Gtk.Label;\n"
18091"\tswitch (label.get_label()) {\n"
18092"\t\tcase \"E\":\n"
18093"\t\t\tplay_sound (329.63);\n"
18094"\t\t\tbreak;\n"
18095"\t\tcase \"A\":\n"
18096"\t\t\tplay_sound (440);\n"
18097"\t\t\tbreak;\n"
18098"\t\tcase \"D\":\n"
18099"\t\t\tplay_sound (587.33);\n"
18100"\t\t\tbreak;\n"
18101"\t\tcase \"G\":\n"
18102"\t\t\tplay_sound (783.99);\n"
18103"\t\t\tbreak;\n"
18104"\t\tcase \"B\":\n"
18105"\t\t\tplay_sound (987.77);\n"
18106"\t\t\tbreak;\n"
18107"\t\tcase \"e\":\n"
18108"\t\t\tplay_sound (1318);\n"
18109"\t\t\tbreak;\n"
18110"\t\tdefault:\n"
18111"\t\t\tbreak;\n"
18112"\t}\n"
18113"}\n"
18114
18115#. (itstool) path: section/p
18116#: C/guitar-tuner.vala.page:248
18117msgid ""
18118"The <code>Gtk.Button</code> that was clicked is passed as an argument (<code>sender</code>) to "
18119"<code>on_button_clicked</code>. We can get the label of that button by using <code>get_child</code>, and then get "
18120"the text from that label using <code>get_label</code>."
18121msgstr ""
18122"누른 <code>Gtk.Button</code>는 <code>on_button_clicked</code>의 인자(<code>sender</code>)로 전달합니다. "
18123"<code>get_child</code>로 단추의 레이블을 가져올 수 있고, 해당 레이블에서 <code>get_label</code>로 텍스트를 가져올 "
18124"수 있습니다."
18125
18126#. (itstool) path: section/p
18127#: C/guitar-tuner.vala.page:249
18128msgid ""
18129"The switch statement compares the label text to the notes that we can play, and <code>play_sound</code> is called "
18130"with the frequency appropriate for that note. This plays the tone; we have a working guitar tuner!"
18131msgstr ""
18132"switch 구문은 우리가 연주할 수 있는 음의 레이블 텍스트를 비교하고, 표시 음에 적당한 주파수로 <code>play_sound</"
18133"code>를 호출합니다. 이 동작 과정을 통해 음을 재생합니다. 이렇게 하여 동작하는 기타 조율 프로그램을 만들었습니다!"
18134
18135#. (itstool) path: section/p
18136#: C/guitar-tuner.vala.page:260
18137msgid ""
18138"If you run into problems with the tutorial, compare your code with this <link href=\"guitar-tuner/guitar-tuner.vala"
18139"\">reference code</link>."
18140msgstr ""
18141"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"guitar-tuner/guitar-tuner.vala\">참조 코드</link>와 "
18142"여러분의 코드를 비교해보십시오."
18143
18144#. (itstool) path: section/title
18145#: C/guitar-tuner.vala.page:264 C/magic-mirror.vala.page:157
18146msgid "Further reading"
18147msgstr "더 읽을거리"
18148
18149#. (itstool) path: section/p
18150#: C/guitar-tuner.vala.page:265
18151msgid ""
18152"To find out more about the Vala programming language you might want to check out the <link href=\"http://live."
18153"gnome.org/Vala/Tutorial\">Vala Tutorial</link> and the <link href=\"http://valadoc.org/\">Vala API Documentation</"
18154"link>"
18155msgstr ""
18156"Vala 프로그래밍 언어에 대해 더 알아보려면 <link href=\"http://live.gnome.org/Vala/Tutorial\">Vala 따라하기 지침서</"
18157"link>와 <link href=\"http://valadoc.org/\">Vala API 문서</link>를 확인해보시면 좋습니다."
18158
18159#. (itstool) path: info/desc
18160#: C/hellognome.js.page:17
18161msgid "Your first GNOME application!"
18162msgstr "첫 그놈 프로그램!"
18163
18164#. (itstool) path: page/title
18165#: C/hellognome.js.page:20
18166msgid "1. Hello, GNOME!"
18167msgstr "1. 안녕, 그놈!"
18168
18169#. (itstool) path: synopsis/p
18170#: C/hellognome.js.page:22
18171msgid ""
18172"This tutorial will show you how to write your first GNOME application in JavaScript. You will use JavaScript to "
18173"write for GNOME the same way you would for the web. Afterwards, you will learn how to use \"native\" widgets, to "
18174"write applications that look and feel like other GNOME apps."
18175msgstr ""
18176"이 지침서에서는 자바스크립으로 첫 그놈 프로그램을 작성하는 방법을 알려드립니다. 웹 프로그램을 작성했던 것처럼 동일"
18177"한 방식으로 그놈 프로그램 작성시 자바스크립트언어를 활용합니다. 그 다음, 다른 그놈 앱 처럼 보이는 프로그램을 작성"
18178"할 목적으로 \"자체\" 위젯을 활용하는 방법을 알아보겠습니다."
18179
18180#. (itstool) path: note/p
18181#: C/hellognome.js.page:23
18182msgid ""
18183"Have you gotten GNOME installed on your computer, and <link xref=\"set-up-gedit.js\">gedit</link> set up to write "
18184"code with? You'll want to do these things first."
18185msgstr ""
18186"컴퓨터에 그놈을 설치하고 코드를 작성할 <link xref=\"set-up-gedit.js\">지에디트</link>를 설정하셨죠? 우선 이 과정을 "
18187"거쳐야합니다."
18188
18189#. (itstool) path: section/title
18190#: C/hellognome.js.page:29
18191msgid "Let's start with a web page"
18192msgstr "웹 페이지로 시작하죠"
18193
18194#. (itstool) path: section/p
18195#: C/hellognome.js.page:31
18196msgid "Here's some basic HTML, CSS, and JavaScript code. Does this look familiar?"
18197msgstr "HTML, CSS, JavaScript 기본 코드가 몇개 있습니다. 어디서 많이 본 것 같죠?"
18198
18199#. (itstool) path: section/code
18200#: C/hellognome.js.page:32
18201#, no-wrap
18202msgid ""
18203"\n"
18204"&lt;!DOCTYPE html&gt;\n"
18205"&lt;html&gt;\n"
18206"    &lt;head&gt;\n"
18207"        &lt;meta charset=\"utf-8\"&gt;\n"
18208"        &lt;title&gt;Hello, GNOME!&lt;/title&gt;\n"
18209"\n"
18210"        &lt;!-- Use JavaScript to show a greeting when someone clicks the button --&gt;\n"
18211"        &lt;script type=\"application/javascript\"&gt;\n"
18212"        function greeting () {\n"
18213"            document.getElementById (\"greeting\").innerHTML = (\"O hai!\");\n"
18214"        }\n"
18215"        &lt;/script&gt;\n"
18216"\n"
18217"        &lt;!-- Very basic CSS style using the GNOME font --&gt;\n"
18218"        &lt;style type=\"text/css\"&gt;\n"
18219"            body {\n"
18220"                font-face: Cantarell, sans-serif;\n"
18221"                text-align: center; }\n"
18222"        &lt;/style&gt;\n"
18223"\n"
18224"    &lt;/head&gt;\n"
18225"    &lt;body&gt;\n"
18226"        &lt;br /&gt; &lt;br /&gt;\n"
18227"        &lt;button type=\"button\" onclick=\"greeting()\"&gt;Hello, GNOME!&lt;/button&gt;\n"
18228"\n"
18229"        &lt;!-- Empty H1 element gets filled in when the button is clicked --&gt;\n"
18230"        &lt;h1 id=\"greeting\"&gt;&lt;/h1&gt;\n"
18231"    &lt;/body&gt;\n"
18232"&lt;/html&gt;\n"
18233msgstr ""
18234"\n"
18235"&lt;!DOCTYPE html&gt;\n"
18236"&lt;html&gt;\n"
18237"    &lt;head&gt;\n"
18238"        &lt;meta charset=\"utf-8\"&gt;\n"
18239"        &lt;title&gt;Hello, GNOME!&lt;/title&gt;\n"
18240"\n"
18241"        &lt;!-- Use JavaScript to show a greeting when someone clicks the button --&gt;\n"
18242"        &lt;script type=\"application/javascript\"&gt;\n"
18243"        function greeting () {\n"
18244"            document.getElementById (\"greeting\").innerHTML = (\"O hai!\");\n"
18245"        }\n"
18246"        &lt;/script&gt;\n"
18247"\n"
18248"        &lt;!-- Very basic CSS style using the GNOME font --&gt;\n"
18249"        &lt;style type=\"text/css\"&gt;\n"
18250"            body {\n"
18251"                font-face: Cantarell, sans-serif;\n"
18252"                text-align: center; }\n"
18253"        &lt;/style&gt;\n"
18254"\n"
18255"    &lt;/head&gt;\n"
18256"    &lt;body&gt;\n"
18257"        &lt;br /&gt; &lt;br /&gt;\n"
18258"        &lt;button type=\"button\" onclick=\"greeting()\"&gt;Hello, GNOME!&lt;/button&gt;\n"
18259"\n"
18260"        &lt;!-- Empty H1 element gets filled in when the button is clicked --&gt;\n"
18261"        &lt;h1 id=\"greeting\"&gt;&lt;/h1&gt;\n"
18262"    &lt;/body&gt;\n"
18263"&lt;/html&gt;\n"
18264
18265#. (itstool) path: section/p
18266#: C/hellognome.js.page:64
18267msgid "Let's save this as <file>hellognome.html</file>, and see what it looks like when we run it!"
18268msgstr "이걸 <file>hellognome.html</file> 파일로 저장하고 실행했을 때 어떻게 나오는지 살펴보도록 하죠!"
18269
18270#. (itstool) path: section/media
18271#. This is a reference to an external file such as an image or video. When
18272#. the file changes, the md5 hash will change to let you know you need to
18273#. update your localized copy. The msgstr is not used at all. Set it to
18274#. whatever you like once you have updated your copy of the file.
18275#: C/hellognome.js.page:66
18276msgctxt "_"
18277msgid "external ref='media/hellognomewebapp.png' md5='948efb6148ede3bc6b47b4b0bbe4a74f'"
18278msgstr ""
18279
18280#. (itstool) path: section/p
18281#: C/hellognome.js.page:68
18282msgid ""
18283"You <em>can</em> run the above code by opening <file>hellognome.html</file> in a web browser. But here, we're "
18284"going to create a GNOME application that runs our web app inside of it, just like you see in the screenshot. "
18285"You'll be able to resize and maximize the window, and click the X in the corner to close it, just like you'd "
18286"expect from any other GNOME app. The difference is that this one will run our web code inside of it."
18287msgstr ""
18288"웹 브라우저에서 <file>hellognome.html</file> 파일을 열면 위 코드를 실행<em>할 수 있습니다</em>. 하지만 스크린샷으"
18289"로 보시듯이 웹 앱을 실행할 그놈 프로그램을 만들려고 합니다. 창 크기를 조절하거나 최대로 확대할 수 있으며, 다른 그"
18290"놈 앱처럼 구석의 X를 눌러 닫을 수 있습니다. 차이점이 있다면 프로그램에서 왭 코드를 실행한다는 점입니다."
18291
18292#. (itstool) path: section/p
18293#: C/hellognome.js.page:69
18294msgid ""
18295"The best part? We're going to continue to use JavaScript, to write all the parts that make our app work with "
18296"GNOME. Let's look at the code, and see how it's done!"
18297msgstr ""
18298"대부분은요? 그놈에서 동작하는 앱의 모든 부분을 작성할 때 JavaScript를 사용하는 편으로 계속 진행하겠습니다. 코드를 "
18299"보고 어떻게 돌아가는지 보도록 하죠!"
18300
18301#. (itstool) path: section/title
18302#: C/hellognome.js.page:73
18303msgid "Creating a GNOME window to frame our web app"
18304msgstr "웹 앱에 맞출 그놈 창 만들기"
18305
18306#. (itstool) path: section/p
18307#: C/hellognome.js.page:75
18308msgid ""
18309"First, we need to tell GNOME that this is a JavaScript application, which uses gjs. Gjs is GNOME's way of turning "
18310"your JavaScript code into instructions it understands, so this line always has to go at the start of your "
18311"applications."
18312msgstr ""
18313"우선 그놈에게 gjs를 사용하는 JavaScript 프로그램임을 알려야 합니다. gjs는 JavaScript 코드를 이해할 수 있는 기계 명"
18314"령으로 바꾸는 그놈의 처리 수단입니다. 따라서 프로그램 시작 부분에 항상 이 줄을 넣어야합니다."
18315
18316#. (itstool) path: section/code
18317#: C/hellognome.js.page:76
18318#, no-wrap
18319msgid ""
18320"\n"
18321"#!/usr/bin/gjs\n"
18322msgstr ""
18323"\n"
18324"#!/usr/bin/gjs\n"
18325
18326#. (itstool) path: section/p
18327#: C/hellognome.js.page:79
18328msgid "Then we should set the versions of the libraries we'll be using."
18329msgstr "그 다음 우리가 사용할 라이브러리 버전을 설정해야합니다."
18330
18331#. (itstool) path: section/code
18332#: C/hellognome.js.page:80
18333#, no-wrap
18334msgid ""
18335"\n"
18336"imports.gi.versions.Gtk = '3.0';\n"
18337"imports.gi.versions.WebKit2 = '4.0';\n"
18338msgstr ""
18339"\n"
18340"imports.gi.versions.Gtk = '3.0';\n"
18341"imports.gi.versions.WebKit2 = '4.0';\n"
18342
18343#. (itstool) path: section/p
18344#: C/hellognome.js.page:84
18345msgid "After that, we need to tell GNOME which libraries we want to import."
18346msgstr "그 다음 우리가 가져올 라이브러리를 그놈에게 알려야겠죠."
18347
18348#. (itstool) path: section/code
18349#: C/hellognome.js.page:85
18350#, no-wrap
18351msgid ""
18352"\n"
18353"const GLib = imports.gi.GLib;\n"
18354"const Gtk = imports.gi.Gtk;\n"
18355"const Webkit = imports.gi.WebKit2;\n"
18356msgstr ""
18357"\n"
18358"const GLib = imports.gi.GLib;\n"
18359"const Gtk = imports.gi.Gtk;\n"
18360"const Webkit = imports.gi.WebKit2;\n"
18361
18362#. (itstool) path: section/p
18363#: C/hellognome.js.page:90
18364msgid ""
18365"Just like how add-on libraries like jQuery let us do extra things with JavaScript, each of these libraries gives "
18366"us new capabilities for our GNOME apps:"
18367msgstr ""
18368"jQuery가 JavaScript으로 할 수 있는 추가 행동을 우리에게 알려주도록 라이브러리를 추가하는 방식처럼, 이 라이브러리는 "
18369"그놈 앱에서 처리할 수 있는 새 기능을 제공해줍니다:"
18370
18371#. (itstool) path: item/p
18372#: C/hellognome.js.page:92
18373msgid ""
18374"<file>Gtk</file> is the basic part of any GNOME application, which lets you create windows and widgets and tie "
18375"them together."
18376msgstr "<file>Gtk</file>는 그놈 프로그램의 기본적인 부분이며, 창과 위젯을 만들어 한데 묶어둘 수 있습니다."
18377
18378#. (itstool) path: item/p
18379#: C/hellognome.js.page:93
18380msgid ""
18381"<file>GLib</file> is a helper library, which lets us do things like tell GNOME where the <file>hellognome.html</"
18382"file> file we created is."
18383msgstr ""
18384"<file>GLib</file>는 우리가 만든 <file>hellognome.html</file> 파일에서 그놈에서 처리할 수 있는 동작이 가능하게 하는 "
18385"보조 라이브러리입니다."
18386
18387#. (itstool) path: item/p
18388#: C/hellognome.js.page:94
18389msgid ""
18390"And <file>Webkit</file> is a web rendering engine, which we'll use to basically create a browser window to open "
18391"our HTML file with."
18392msgstr "그리고 <file>Webkit</file>은 HTML 파일을 여는 브라우저 창을 만들 때 사용하는 웹 렌더링 엔진입니다."
18393
18394#. (itstool) path: section/p
18395#: C/hellognome.js.page:97
18396msgid "Now we create the application itself:"
18397msgstr "이제 프로그램 그 자체를 만들어보죠:"
18398
18399#. (itstool) path: section/code
18400#: C/hellognome.js.page:98
18401#, no-wrap
18402msgid ""
18403"\n"
18404"class HelloGNOME {\n"
18405msgstr ""
18406"\n"
18407"class HelloGNOME {\n"
18408
18409#. (itstool) path: section/p
18410#: C/hellognome.js.page:101
18411msgid ""
18412"This will look familiar to you if you've worked with object-oriented JavaScript before. That's right; our whole "
18413"application is a class called HelloGNOME."
18414msgstr ""
18415"이 코드는 이전에 다루어 보았다면 객체 지향 자바스크립트와 비슷해보일겝니다. 맞습니다. 이 전체 프로그램은 "
18416"HelloGNOME 클래스입니다."
18417
18418#. (itstool) path: section/code
18419#: C/hellognome.js.page:103
18420#, no-wrap
18421msgid ""
18422"\n"
18423"    // Create the application itself\n"
18424"    constructor() {\n"
18425"        this.application = new Gtk.Application();\n"
18426"\n"
18427"        // Connect 'activate' and 'startup' signals to the callback functions\n"
18428"        this.application.connect('activate', this._onActivate.bind(this));\n"
18429"        this.application.connect('startup', this._onStartup.bind(this));\n"
18430"    }\n"
18431"\n"
18432"    // Callback function for 'activate' signal presents windows when active\n"
18433"    _onActivate() {\n"
18434"        this._window.present();\n"
18435"    }\n"
18436"\n"
18437"    // Callback function for 'startup' signal builds the UI\n"
18438"    _onStartup() {\n"
18439"        this._buildUI();\n"
18440"    }\n"
18441msgstr ""
18442"\n"
18443"    // Create the application itself\n"
18444"    constructor() {\n"
18445"        this.application = new Gtk.Application();\n"
18446"\n"
18447"        // Connect 'activate' and 'startup' signals to the callback functions\n"
18448"        this.application.connect('activate', this._onActivate.bind(this));\n"
18449"        this.application.connect('startup', this._onStartup.bind(this));\n"
18450"    }\n"
18451"\n"
18452"    // Callback function for 'activate' signal presents windows when active\n"
18453"    _onActivate() {\n"
18454"        this._window.present();\n"
18455"    }\n"
18456"\n"
18457"    // Callback function for 'startup' signal builds the UI\n"
18458"    _onStartup() {\n"
18459"        this._buildUI();\n"
18460"    }\n"
18461
18462#. (itstool) path: section/p
18463#: C/hellognome.js.page:123
18464msgid ""
18465"Here's some code you will more or less copy-and-paste for every JavaScript application you build. It creates a new "
18466"Application, and then binds its activate and startup signals to functions that make the window show itself and "
18467"build its user interface, respectively."
18468msgstr ""
18469"여러분이 빌드한 모든 JavaScript 프로그램을 덜 또는 덜 복사하야 붙여넣을 코드 일부입니다. 이 코드로 새 프로그램을 만"
18470"들고, activate 시그널과 startup 시그널을 함수에 바인딩하여 창을 나타내고 사용자 인터페이스를 구성합니다."
18471
18472#. (itstool) path: section/p
18473#: C/hellognome.js.page:124
18474msgid ""
18475"What does that mean? Well, everything in a GNOME application sends out a signal when something important happens. "
18476"A button might send out the clicked signal when you click on it, for instance. Our job is to connect the signals "
18477"to functions which handle them, and make the things that we want to have happen occur. We do this using each "
18478"object's connect method, which takes two arguments: The signal we want to handle, and the bound function, which we "
18479"have to use to tell connect which function we want to have handle the signal."
18480msgstr ""
18481"무슨 얘길까요? 그놈 프로그램의 모든 부분에서는 어떤 중요한 동작이 일어날 때 시그널을 내보냅니다. 예컨대, 단추를 누"
18482"르면 clicked 시그널을 내보냅니다. 우리는 시그널을 처리할 함수와 연결하고 어떤 동작을 취할 코드를 만들겠습니다. 각"
18483"각 두 인자를 가진 객체의 연결 메서드를 활용하겠습니다. 우리가 처리하고자 하는 시그널, 그리고 우리가 처리하고자 하"
18484"는 시그널을 어떤 함수와 연결할 지 지시할 때 사용하는 Lang.bind 함수를 인자로 전달합니다."
18485
18486#. (itstool) path: section/p
18487#: C/hellognome.js.page:125
18488msgid ""
18489"In this case, we want _onActivate to handle the activate signal, and _onStartup to handle the startup signal. "
18490"_onActivate just tells the window to present itself; so basically, whenever you <keyseq><key>Alt</key> <key>Tab</"
18491"key></keyseq> to the application it appears, like you would expect it to. _onStartup calls _buildUI, which is the "
18492"function that creates our user interface and is the next part that we will look at."
18493msgstr ""
18494"이 경우 activate 시그널을 처리할 때 _onActivate 함수를, startup 시그널을 처리할 때 _onStartup을 사용하겠습니다. "
18495"_onActivate는 창 자체를 나타내러고 지시합니다. 그래서 기본적으로는 <keyseq><key>Alt</key> <key>Tab</key></keyseq> "
18496"키를 누를 때마다 예상하던 대로 프로그램이 나타납니다. _onStartup 함수에서 사용자 인터페이스를 만들며 다음에  우리"
18497"가 살펴볼 _buildUI를 호출합니다."
18498
18499#. (itstool) path: note/p
18500#: C/hellognome.js.page:126
18501msgid ""
18502"When you copy and paste the above code for your own applications, be sure to change the class name to a unique one "
18503"each time."
18504msgstr "위 코드를 프로그램에 복사하여 붙여넣을 때마다, 바꿀 클래스 이름이 유일한 이름인지 확인하십시오."
18505
18506#. (itstool) path: section/title
18507#: C/hellognome.js.page:130
18508msgid "Designing our window's UI"
18509msgstr "창 UI 디자인"
18510
18511#. (itstool) path: section/p
18512#: C/hellognome.js.page:131
18513msgid ""
18514"In the _buildUI function, we're going to tell GNOME about our window and the things inside it, one at a time. "
18515"After that, we're going to connect everything together and put it all on display."
18516msgstr ""
18517"_buildUI 함수에서 그놈에게 창과 창에 있는 내용을 한번에 하나씩 언급하고 있습니다. 그 다음 개별 요소를 함께 연결하"
18518"고 화면에 한번에 넣습니다."
18519
18520#. (itstool) path: section/code
18521#: C/hellognome.js.page:133
18522#, no-wrap
18523msgid ""
18524"\n"
18525"    // Build the application's UI\n"
18526"    _buildUI() {\n"
18527"\n"
18528"        // Create the application window\n"
18529"        this._window = new Gtk.ApplicationWindow  ({\n"
18530"            application: this.application,\n"
18531"            title: \"Welcome to GNOME\",\n"
18532"            default_height: 200,\n"
18533"            default_width: 400,\n"
18534"            window_position: Gtk.WindowPosition.CENTER });\n"
18535msgstr ""
18536"\n"
18537"    // Build the application's UI\n"
18538"    _buildUI() {\n"
18539"\n"
18540"        // Create the application window\n"
18541"        this._window = new Gtk.ApplicationWindow  ({\n"
18542"            application: this.application,\n"
18543"            title: \"Welcome to GNOME\",\n"
18544"            default_height: 200,\n"
18545"            default_width: 400,\n"
18546"            window_position: Gtk.WindowPosition.CENTER });\n"
18547
18548#. (itstool) path: section/p
18549#: C/hellognome.js.page:146
18550msgid ""
18551"The first object we create is an ApplicationWindow. It needs a title to go in the title bar, and its application "
18552"property needs to be the application that we created, above. Beyond that, there are various ways of customizing "
18553"how it looks, which the <link xref=\"GtkApplicationWindow.js\">ApplicationWindow</link> reference page will go "
18554"into more detail about. As you can see here, we gave it a default height and width (measured in pixels), and told "
18555"GNOME we want our window to appear in the center of the screen."
18556msgstr ""
18557"우리가 만들 첫 객체는 ApplicationWindow입니다. 제목 표시줄에 들어갈 제목, 우리가 위에서 만든 프로그램에 필요한 "
18558"application 속성이 필요합니다. 모양새를 바꾸는 방법에는 여러가지가 있지만 <link xref=\"GtkApplicationWindow.js"
18559"\">ApplicationWindow</link> 참고 페이지의 내용에서 자세한 내막을 설명해줍니다. 여기서 보시듯, (픽셀 단위) 기본 너"
18560"비, 높이 값을 설정하고 그놈에게 화면 한가운데에 창을 나타내고 싶음을 지시합니다."
18561
18562#. (itstool) path: section/code
18563#: C/hellognome.js.page:147
18564#, no-wrap
18565msgid ""
18566"\n"
18567"        // Create a webview to show the web app\n"
18568"        this._webView = new Webkit.WebView ();\n"
18569"\n"
18570"        // Put the web app into the webview\n"
18571"        this._webView.load_uri (GLib.filename_to_uri (GLib.get_current_dir() +\n"
18572"            \"/hellognome.html\", null));\n"
18573msgstr ""
18574"\n"
18575"        // Create a webview to show the web app\n"
18576"        this._webView = new Webkit.WebView ();\n"
18577"\n"
18578"        // Put the web app into the webview\n"
18579"        this._webView.load_uri (GLib.filename_to_uri (GLib.get_current_dir() +\n"
18580"            \"/hellognome.html\", null));\n"
18581
18582#. (itstool) path: section/p
18583#: C/hellognome.js.page:155
18584msgid ""
18585"Remember how we imported Webkit right at the start? Here we're creating a new instance of a Webkit class called a "
18586"WebView, which is more or less a browser window you can put inside of your app. After that, we then give it the "
18587"URI that we want it to load when the application starts up."
18588msgstr ""
18589"시작 부분에서 Webkit을 어떻게 가져왔는지 기억하시죠? 여기서는 앱을 안에다 넣고 실행할 수 있는 더도 덜도 아닌 웹 브"
18590"라우저, WebView라고 하는 Webkit 클래스의 새 인스턴스를 만들겠습니다. 그 다음 프로그램을 시작할 때 우리가 불러올 URI"
18591"를 설정하겠습니다."
18592
18593#. (itstool) path: section/p
18594#: C/hellognome.js.page:156
18595msgid ""
18596"We <em>could</em> just give it a web URI, like <link href=\"http://gnome.org\">http://gnome.org</link>. Instead, "
18597"here we use a couple of GLib helper functions to tell the WebView where our <file>hellognome.html</file> file is. "
18598"GLib.get_current_dir returns the directory that our app's running in, and GLib.filename_to_uri turns our file's "
18599"path and filename into a URI that the WebView's load_uri function understands. (filename_to_uri's second parameter "
18600"should be null unless you know what it's used for and have a reason for changing it.)"
18601msgstr ""
18602"<link href=\"http://gnome.org\">http://gnome.org</link>와 같은 웹 URI를 그냥 설정 <em>할 수 있습니다</em>. 대신 우"
18603"리가 작성한 <file>hellognome.html</file> 파일이 어디에 있는지 WebView에 알려줄 GLib 보조 함수 몇가지를 활용하겠습니"
18604"다. GLib.get_current_dir에서는 앱을 실행할 디렉터리를 반환하고 GLib.filename_to_uri에서는 WebView의 load_uri 함수"
18605"가 이해할 수 있도록 파일의 경로와 파일 이름을 URI 형식으로 반환합니다(filename_to_uri의 두번째 매개변수는 용도와 값"
18606"을 바꿔야 할 이유를 정확하게 알기 전까지는 null 값이어야 합니다)."
18607
18608#. (itstool) path: section/code
18609#: C/hellognome.js.page:157
18610#, no-wrap
18611msgid ""
18612"\n"
18613"        // Put the webview into the window\n"
18614"        this._window.add (this._webView);\n"
18615"\n"
18616"        // Show the window and all child widgets\n"
18617"        this._window.show_all();\n"
18618"    },\n"
18619"\n"
18620"});\n"
18621msgstr ""
18622"\n"
18623"        // Put the webview into the window\n"
18624"        this._window.add (this._webView);\n"
18625"\n"
18626"        // Show the window and all child widgets\n"
18627"        this._window.show_all();\n"
18628"    },\n"
18629"\n"
18630"});\n"
18631
18632#. (itstool) path: section/p
18633#: C/hellognome.js.page:167
18634msgid ""
18635"Each window can hold one, and only one, widget. Normally, we'd use a container widget like a <link xref=\"grid.js"
18636"\">Grid</link> to put multiple widgets into, then use the window's add function to add the Grid to it. Here, we "
18637"just need the WebView, so that's all we add to the window. After that, as the last part of the _buildUI function "
18638"that creates our window, we tell the window to show itself and its contents."
18639msgstr ""
18640"각 창은 하나 그리고 오직 하나의 위젯만을 소유할 수 있습니다. 보통 여러 위젯을 넣을 때 <link xref=\"grid.js\">Grid</"
18641"link>와 같은 컨테이너 위젯을 활용하고 창의 추가 함수로 Grid 안에 넣습니다. 우리는 WebView만 필요하기 때문에, "
18642"WebView를 창에 넣기만 하면 됩니다. 그 다음 창을 만드는 _buildUI 함수의 마지막 부분으로 창에게 자신과 창의 내용을 보"
18643"여주도록 지시하겠습니다."
18644
18645#. (itstool) path: section/code
18646#: C/hellognome.js.page:168
18647#, no-wrap
18648msgid ""
18649"\n"
18650"// Run the application\n"
18651"let app = new HelloGNOME ();\n"
18652"app.application.run (ARGV);\n"
18653msgstr ""
18654"\n"
18655"// Run the application\n"
18656"let app = new HelloGNOME ();\n"
18657"app.application.run (ARGV);\n"
18658
18659#. (itstool) path: section/p
18660#: C/hellognome.js.page:173
18661msgid "Finally, we create a new instance of our HelloGNOME class, and tell GNOME to run it."
18662msgstr "마지막으로 HelloGNOME 클래스의 새 인스턴스를 만들고 그놈에게 이 코드를 실행하라고 지시하겠습니다."
18663
18664#. (itstool) path: section/title
18665#: C/hellognome.js.page:177
18666msgid "Running your GNOME application"
18667msgstr "그놈 프로그램 실행"
18668
18669#. (itstool) path: section/p
18670#: C/hellognome.js.page:179
18671msgid ""
18672"Now that we've created our first GNOME application, it's time to test it out! You don't need to compile your app "
18673"or install any special software for this; GNOME has gjs built in, to let it run GNOME Shell. Just save "
18674"<file>hellognome.html</file> and our actual application, <file>hellognome.js</file>, to a directory you can get to "
18675"with the terminal. (They usually open onto your home directory, the one that's called by your username.) After "
18676"that, open a terminal, go there, and type:"
18677msgstr ""
18678"이제 우리는 첫 그놈 프로그램을 만들었으니 시험해볼 떄가 왔습니다. 만드신 프로그램을 컴파일하거나 특별한 프로그램 마"
18679"냥 설치할 필요가 없습니다. 그놈에는 그놈 셸을 실행하게 하는 gjs를 자체적으로 보유하고 있습니다. 그냥 터미널 상에서 "
18680"접근할 수 있는 그 어떤 디렉터리에든 <file>hellognome.html</file> 파일과 실제 프로그램 <file>hellognome.js</file>파"
18681"일을 저장하십시오(보통 사용자 이름이 붙은 '내 폴더'를 엽니다). 그 후 터미널을 열고 다음 명령을 입력하십시오:"
18682
18683#. (itstool) path: section/screen
18684#: C/hellognome.js.page:180
18685#, no-wrap
18686msgid " <output style=\"prompt\">$ </output>gjs hellognome.js "
18687msgstr " <output style=\"prompt\">$ </output>gjs hellognome.js "
18688
18689#. (itstool) path: section/p
18690#: C/hellognome.js.page:181
18691msgid ""
18692"You should see more or less the same screenshot as before, with a button that you can click to make a short "
18693"message appear."
18694msgstr "앞서 보신바와 같이 간단한 메시지를 띄우는 단추가 나타나는, 더 혹은 덜 유사한 화면을 볼 수 있어야합니다."
18695
18696#. (itstool) path: note/p
18697#: C/hellognome.js.page:184
18698msgid "You can use the terminal command"
18699msgstr "터미널 명령을 사용핧 수 있습니다."
18700
18701#. (itstool) path: note/screen
18702#: C/hellognome.js.page:185
18703#, no-wrap
18704msgid " <output style=\"prompt\">$ </output>cd <var>(directory name)</var> "
18705msgstr " <output style=\"prompt\">$ </output>cd <var>(디렉터리 이름)</var> "
18706
18707#. (itstool) path: note/p
18708#: C/hellognome.js.page:186
18709msgid ""
18710"to navigate between directories inside the Terminal, in order to get to where you saved the files. There is also "
18711"an extension for Nautilus, GNOME's file manager, which lets you right-click anywhere inside it to open a terminal "
18712"window right there. Check the app you use to install new software (like Add/Remove Programs or the Software "
18713"Center) for it."
18714msgstr ""
18715"터미널에서 저장한 파일이 어디에있는지 찾을 때 여러 디렉터리를 탐색하는 명령입니다. 그놈 파일 관리자 노틸러스에는 파"
18716"일 탐색 창 어디에서든 마우스 오른쪽 단추를 누른 후 해당 위치에서 터미널을 여는 확장 기능도 있습니다. 새 프로그램을 "
18717"설치할 때 사용하는 앱(프로그램 추가/제거 또는 소프트웨어 센터)을 확인해보십시오."
18718
18719#. (itstool) path: section/p
18720#: C/hellognome.js.page:193
18721msgid ""
18722"<link xref=\"02_welcome_to_the_grid.js\">Continue on to the next tutorial</link> to learn how to build \"native\" "
18723"GNOME applications that look and feel like the others, instead of a webview with HTML code inside. Or take a look "
18724"at some <link xref=\"beginner.js#samples\">code samples</link>, if you'd like to see example code for each Gtk "
18725"widget."
18726msgstr ""
18727"HTML 코드와 웹 뷰 코드 대신, 다른 프로그램 같이 \"자체\" 그놈 프로그램을 빌드하는 방법을 알아보려면  <link xref="
18728"\"02_welcome_to_the_grid.js\">다음 따라하기 지침서로 계속 진행하십시오</link>. 아니면 Gtk 위젯 예제 코드를 보고 싶"
18729"으시면 일부 <link xref=\"beginner.js#samples\">코드 예제</link>를 살펴보십시오."
18730
18731#. (itstool) path: section/p
18732#: C/hellognome.js.page:194
18733msgid ""
18734"Finally, if you want to just build GNOME applications using JavaScript libraries designed for the web, you can "
18735"basically stop here and go do that! Check out <link xref=\"beginner.js#tutorials\">the later tutorials</link> if "
18736"you'd like to see how to create a .desktop file for your application, which will let it appear in your desktop's "
18737"Activities menu with all your other apps."
18738msgstr ""
18739"마지막으로 웹용으로 만든 JavaScript 라이브러리로 그놈 프로그램을 만들어보고 싶다면, 그냥 여기서 멈추고 계속 진행하"
18740"실 수 있습니다. 다른 앱처럼 데스크톱의 현재 활동 메뉴에 프로그램이 나타나도록 .desktop 파일을 만드는 방법을 알아보"
18741"려면 <link xref=\"beginner.js#tutorials\">다음 따라하기 지침서</link>를 확인해보십시오."
18742
18743#. (itstool) path: section/code
18744#: C/hellognome.js.page:199
18745#, no-wrap
18746msgid ""
18747"#!/usr/bin/gjs\n"
18748"\n"
18749"imports.gi.versions.Gtk = '3.0';\n"
18750"imports.gi.versions.WebKit2 = '4.0';\n"
18751"\n"
18752"const GLib = imports.gi.GLib;\n"
18753"const Gtk = imports.gi.Gtk;\n"
18754"const Webkit = imports.gi.WebKit2;\n"
18755"\n"
18756"class HelloGNOME {\n"
18757"\n"
18758"    // Create the application itself\n"
18759"    constructor() {\n"
18760"        this.application = new Gtk.Application ();\n"
18761"\n"
18762"        // Connect 'activate' and 'startup' signals to the callback functions\n"
18763"        this.application.connect('activate', this._onActivate.bind(this));\n"
18764"        this.application.connect('startup', this._onStartup.bind(this));\n"
18765"    }\n"
18766"\n"
18767"    // Callback function for 'activate' signal presents windows when active\n"
18768"    _onActivate() {\n"
18769"        this._window.present();\n"
18770"    }\n"
18771"\n"
18772"    // Callback function for 'startup' signal builds the UI\n"
18773"    _onStartup() {\n"
18774"        this._buildUI();\n"
18775"    }\n"
18776"\n"
18777"    // Build the application's UI\n"
18778"    _buildUI() {\n"
18779"\n"
18780"        // Create the application window\n"
18781"        this._window = new Gtk.ApplicationWindow  ({\n"
18782"            application: this.application,\n"
18783"            title: \"Welcome to GNOME\",\n"
18784"            default_height: 200,\n"
18785"            default_width: 400,\n"
18786"            window_position: Gtk.WindowPosition.CENTER });\n"
18787"\n"
18788"        // Create a webview to show the web app\n"
18789"        this._webView = new Webkit.WebView ();\n"
18790"\n"
18791"        // Put the web app into the webview\n"
18792"        this._webView.load_uri (GLib.filename_to_uri (GLib.get_current_dir() +\n"
18793"            \"/hellognome.html\", null));\n"
18794"\n"
18795"        // Put the webview into the window\n"
18796"        this._window.add (this._webView);\n"
18797"\n"
18798"        // Show the window and all child widgets\n"
18799"        this._window.show_all();\n"
18800"    }\n"
18801"\n"
18802"};\n"
18803"\n"
18804"// Run the application\n"
18805"let app = new HelloGNOME ();\n"
18806"app.application.run (ARGV);\n"
18807msgstr ""
18808"#!/usr/bin/gjs\n"
18809"\n"
18810"imports.gi.versions.Gtk = '3.0';\n"
18811"imports.gi.versions.WebKit2 = '4.0';\n"
18812"\n"
18813"const GLib = imports.gi.GLib;\n"
18814"const Gtk = imports.gi.Gtk;\n"
18815"const Webkit = imports.gi.WebKit2;\n"
18816"\n"
18817"class HelloGNOME {\n"
18818"\n"
18819"    // Create the application itself\n"
18820"    constructor() {\n"
18821"        this.application = new Gtk.Application ();\n"
18822"\n"
18823"        // Connect 'activate' and 'startup' signals to the callback functions\n"
18824"        this.application.connect('activate', this._onActivate.bind(this));\n"
18825"        this.application.connect('startup', this._onStartup.bind(this));\n"
18826"    }\n"
18827"\n"
18828"    // Callback function for 'activate' signal presents windows when active\n"
18829"    _onActivate() {\n"
18830"        this._window.present();\n"
18831"    }\n"
18832"\n"
18833"    // Callback function for 'startup' signal builds the UI\n"
18834"    _onStartup() {\n"
18835"        this._buildUI();\n"
18836"    }\n"
18837"\n"
18838"    // Build the application's UI\n"
18839"    _buildUI() {\n"
18840"\n"
18841"        // Create the application window\n"
18842"        this._window = new Gtk.ApplicationWindow  ({\n"
18843"            application: this.application,\n"
18844"            title: \"Welcome to GNOME\",\n"
18845"            default_height: 200,\n"
18846"            default_width: 400,\n"
18847"            window_position: Gtk.WindowPosition.CENTER });\n"
18848"\n"
18849"        // Create a webview to show the web app\n"
18850"        this._webView = new Webkit.WebView ();\n"
18851"\n"
18852"        // Put the web app into the webview\n"
18853"        this._webView.load_uri (GLib.filename_to_uri (GLib.get_current_dir() +\n"
18854"            \"/hellognome.html\", null));\n"
18855"\n"
18856"        // Put the webview into the window\n"
18857"        this._window.add (this._webView);\n"
18858"\n"
18859"        // Show the window and all child widgets\n"
18860"        this._window.show_all();\n"
18861"    }\n"
18862"\n"
18863"};\n"
18864"\n"
18865"// Run the application\n"
18866"let app = new HelloGNOME ();\n"
18867"app.application.run (ARGV);\n"
18868
18869#. (itstool) path: info/title
18870#: C/hello-world.c.page:10
18871msgctxt "link"
18872msgid "Hello World (C)"
18873msgstr "Hello World (C)"
18874
18875#. (itstool) path: credit/name
18876#: C/hello-world.c.page:24
18877msgid "Bastian Ilsø"
18878msgstr "Bastian Ilsø"
18879
18880#. (itstool) path: info/desc
18881#: C/hello-world.c.page:28
18882msgid "Creating a small \"Hello, World\" application using GTK+."
18883msgstr "GTK+로 작은 \"Hello, World\" 프로그램을 만듭니다."
18884
18885#. (itstool) path: page/title
18886#: C/hello-world.c.page:31
18887msgid "Hello world"
18888msgstr "Hello world"
18889
18890#. (itstool) path: note/p
18891#: C/hello-world.c.page:34
18892msgid ""
18893"For a detailed walk-through of creating a GTK+ dialog in C, see <link href=\"https://developer.gnome.org/gtk3/"
18894"stable/gtk-getting-started.html\">Getting Started with GTK+</link>"
18895msgstr ""
18896"C 언어로 GTK+ 대화상자를 만드는 자세한 설명은 <link href=\"https://developer.gnome.org/gtk3/stable/gtk-getting-"
18897"started.html\">GTK+ 시작하기</link>를 참고하십시오"
18898
18899#. (itstool) path: page/p
18900#: C/hello-world.c.page:38
18901msgid "Writing a hello world GTK+ dialog in C can be done as seen in the code sample below:"
18902msgstr "C 언어로의 hello world GTK+ 대화 상자 프로그램 작성은, 아래 보여드리는 예제 코드처럼 할 수 있습니다:"
18903
18904#. (itstool) path: page/code
18905#: C/hello-world.c.page:39
18906#, no-wrap
18907msgid ""
18908"\n"
18909"    #include &lt;gtk/gtk.h&gt;\n"
18910"\n"
18911"static void\n"
18912"activate (GtkApplication* app,\n"
18913"          gpointer        user_data)\n"
18914"{\n"
18915"  GtkWidget *window;\n"
18916"  GtkWidget *label;\n"
18917"\n"
18918"  window = gtk_application_window_new (app);\n"
18919"  label = gtk_label_new (\"Hello GNOME!\");\n"
18920"  gtk_container_add (GTK_CONTAINER (window), label);\n"
18921"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
18922"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 100);\n"
18923"  gtk_widget_show_all (window);\n"
18924"}\n"
18925"\n"
18926"int\n"
18927"main (int    argc,\n"
18928"      char **argv)\n"
18929"{\n"
18930"  GtkApplication *app;\n"
18931"  int status;\n"
18932"\n"
18933"  app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE);\n"
18934"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
18935"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
18936"  g_object_unref (app);\n"
18937"\n"
18938"  return status;\n"
18939"}\n"
18940"\n"
18941"  "
18942msgstr ""
18943"\n"
18944"    #include &lt;gtk/gtk.h&gt;\n"
18945"\n"
18946"static void\n"
18947"activate (GtkApplication* app,\n"
18948"          gpointer        user_data)\n"
18949"{\n"
18950"  GtkWidget *window;\n"
18951"  GtkWidget *label;\n"
18952"\n"
18953"  window = gtk_application_window_new (app);\n"
18954"  label = gtk_label_new (\"Hello GNOME!\");\n"
18955"  gtk_container_add (GTK_CONTAINER (window), label);\n"
18956"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
18957"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 100);\n"
18958"  gtk_widget_show_all (window);\n"
18959"}\n"
18960"\n"
18961"int\n"
18962"main (int    argc,\n"
18963"      char **argv)\n"
18964"{\n"
18965"  GtkApplication *app;\n"
18966"  int status;\n"
18967"\n"
18968"  app = gtk_application_new (NULL, G_APPLICATION_FLAGS_NONE);\n"
18969"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
18970"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
18971"  g_object_unref (app);\n"
18972"\n"
18973"  return status;\n"
18974"}\n"
18975"\n"
18976"  "
18977
18978#. (itstool) path: page/p
18979#: C/hello-world.c.page:43
18980msgid ""
18981"GtkApplication initializes GTK+. It also connects the <gui>x</gui> button that's automatically generated along "
18982"with the window to the \"destroy\" signal. We can start building our first window. We do this by creating a "
18983"variable called <var>window</var> and assigning it a gtk_application_window_new. The window title can be any "
18984"string you want it to be. To be on the safe side, it's best to stick to UTF-8 encoding. The code above will create "
18985"a dialog window similar to what can be seen below:"
18986msgstr ""
18987"GtkApplication은 GTK+를 초기화합니다. 또한 창을 만들 때 자동으로 붙인 <gui>x</gui> 단추를 \"destroy\" 시그널에 연결"
18988"합니다. 첫 창 만들기를 시작할 수 있습니다. <var>window</var> 변수를 만들고 gtk_application_window_new를 할당하겠습"
18989"니다. 제목은 원하는대로 지을 수 있습니다. 안전한 방편으로, UTF-8 인코딩으로 작성하시는게 좋습니다. 위 코드는 아래"
18990"와 같이 보이는 대화상자 창을 만듭니다:"
18991
18992#. (itstool) path: page/media
18993#. This is a reference to an external file such as an image or video. When
18994#. the file changes, the md5 hash will change to let you know you need to
18995#. update your localized copy. The msgstr is not used at all. Set it to
18996#. whatever you like once you have updated your copy of the file.
18997#: C/hello-world.c.page:51 C/hello-world.js.page:28 C/hello-world.py.page:28 C/hello-world.vala.page:28
18998msgctxt "_"
18999msgid "external ref='media/hello-world.png' md5='4c88a27211dfd1b33e504c9f78602f2d'"
19000msgstr ""
19001
19002#. (itstool) path: info/title
19003#: C/hello-world.js.page:9
19004msgctxt "text"
19005msgid "Hello World (JavaScript)"
19006msgstr "Hello World (JavaScript)"
19007
19008#. (itstool) path: info/desc
19009#: C/hello-world.js.page:24 C/hello-world.py.page:24 C/hello-world.vala.page:24
19010msgid "A basic \"hello, world\" application"
19011msgstr "기본 \"hello, world\" 프로그램"
19012
19013#. (itstool) path: page/title
19014#: C/hello-world.js.page:27 C/hello-world.py.page:27 C/hello-world.vala.page:27
19015msgid "How to build, install and create a <file>tar.xz</file> of a Hello World program"
19016msgstr "Hello World 프로그램의 <file>tar.xz</file> 파일을 빌드하고, 설치하고, 만들기"
19017
19018#. (itstool) path: synopsis/p
19019#: C/hello-world.js.page:30 C/hello-world.py.page:30 C/hello-world.vala.page:30
19020msgid "This tutorial will demonstrate how to:"
19021msgstr "이 지침서에서는 다음 방법을 보여줍니다:"
19022
19023#. (itstool) path: item/p
19024#: C/hello-world.js.page:32
19025msgid "create a small \"Hello, World\" application using JavaScript and GTK+"
19026msgstr "JavaScript와 GTK+로 간단한 \"Hello, World\" 프로그램 만들기"
19027
19028#. (itstool) path: item/p
19029#: C/hello-world.js.page:33 C/hello-world.py.page:33 C/hello-world.vala.page:33
19030msgid "make the <file>.desktop</file> file"
19031msgstr "<file>.desktop</file> 파일 만들기"
19032
19033#. (itstool) path: item/p
19034#: C/hello-world.js.page:34 C/hello-world.py.page:34 C/hello-world.vala.page:34
19035msgid "how to set up the build system"
19036msgstr "빌드 시스템 구성 방법"
19037
19038#. (itstool) path: section/title
19039#: C/hello-world.js.page:42 C/hello-world.py.page:42 C/hello-world.vala.page:40
19040msgid "Create the program"
19041msgstr "프로그램 만들기"
19042
19043#. (itstool) path: section/p
19044#: C/hello-world.js.page:47
19045msgid "This needs to be the first line of your script:"
19046msgstr "스크립트의 첫줄에 다음 줄이 들어가있어야합니다:"
19047
19048#. (itstool) path: section/code
19049#: C/hello-world.js.page:48
19050#, no-wrap
19051msgid "#!/usr/bin/gjs"
19052msgstr "#!/usr/bin/gjs"
19053
19054#. (itstool) path: section/p
19055#: C/hello-world.js.page:49
19056msgid ""
19057"It tells the script to use <link href=\"https://live.gnome.org/Gjs/\">Gjs</link>. Gjs is a JavaScript binding for "
19058"GNOME."
19059msgstr ""
19060"이 부분은 스크립트에서 <link href=\"https://live.gnome.org/Gjs/\">Gjs</link>를 활용하겠다고 알려줍니다. gjs는 그놈"
19061"용 자바스크립트 바인딩입니다."
19062
19063#. (itstool) path: section/code
19064#: C/hello-world.js.page:54
19065#, no-wrap
19066#| msgid ""
19067#| "\n"
19068#| "#!/usr/bin/gjs\n"
19069#| "\n"
19070#| "imports.gi.versions.Gtk = '3.0';\n"
19071#| "const Gtk = imports.gi.Gtk;\n"
19072msgid ""
19073"const Lang = imports.lang;\n"
19074"\n"
19075"imports.gi.versions.Gtk = '3.0'\n"
19076"const Gtk = imports.gi.Gtk;"
19077msgstr ""
19078"const Lang = imports.lang;\n"
19079"\n"
19080"imports.gi.versions.Gtk = '3.0'\n"
19081"const Gtk = imports.gi.Gtk;"
19082
19083#. (itstool) path: section/p
19084#: C/hello-world.js.page:58 C/hello-world.py.page:49
19085msgid ""
19086"In order for our script to work with GNOME, we need to import GNOME libraries via GObject Introspection. Here we "
19087"import the language bindings and GTK+, the library which contains the graphical widgets used to make GNOME "
19088"applications."
19089msgstr ""
19090"우리가 작성한 스크립트가 그놈에서 동작하게 하려면, 그놈 라이브러리를 GObject 인트로스펙션으로 가져와야합니다. 여기"
19091"서 우리는 언어 바인딩과 그놈 프로그램을 만들 때 그래픽 위젯이 들어있는 GTK+ 라이브러리를 임포팅합니다."
19092
19093#. (itstool) path: section/code
19094#: C/hello-world.js.page:62
19095#, no-wrap
19096msgid ""
19097"const Application = new Lang.Class({\n"
19098"    //A Class requires an explicit Name parameter. This is the Class Name.\n"
19099"    Name: 'Application',\n"
19100"\n"
19101"    //create the application\n"
19102"    _init: function() {\n"
19103"        this.application = new Gtk.Application();\n"
19104"\n"
19105"       //connect to 'activate' and 'startup' signals to handlers.\n"
19106"       this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
19107"       this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
19108"    },\n"
19109"\n"
19110"    //create the UI\n"
19111"    _buildUI: function() {\n"
19112"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
19113"                                                   title: \"Hello World!\" });\n"
19114"    },\n"
19115"\n"
19116"    //handler for 'activate' signal\n"
19117"    _onActivate: function() {\n"
19118"        //show the window and all child widgets\n"
19119"        this._window.show_all();\n"
19120"    },\n"
19121"\n"
19122"    //handler for 'startup' signal\n"
19123"    _onStartup: function() {\n"
19124"        this._buildUI();\n"
19125"    }\n"
19126"});\n"
19127msgstr ""
19128"const Application = new Lang.Class({\n"
19129"    //A Class requires an explicit Name parameter. This is the Class Name.\n"
19130"    Name: 'Application',\n"
19131"\n"
19132"    //create the application\n"
19133"    _init: function() {\n"
19134"        this.application = new Gtk.Application();\n"
19135"\n"
19136"       //connect to 'activate' and 'startup' signals to handlers.\n"
19137"       this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
19138"       this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
19139"    },\n"
19140"\n"
19141"    //create the UI\n"
19142"    _buildUI: function() {\n"
19143"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
19144"                                                   title: \"Hello World!\" });\n"
19145"    },\n"
19146"\n"
19147"    //handler for 'activate' signal\n"
19148"    _onActivate: function() {\n"
19149"        //show the window and all child widgets\n"
19150"        this._window.show_all();\n"
19151"    },\n"
19152"\n"
19153"    //handler for 'startup' signal\n"
19154"    _onStartup: function() {\n"
19155"        this._buildUI();\n"
19156"    }\n"
19157"});\n"
19158
19159#. (itstool) path: section/p
19160#: C/hello-world.js.page:94
19161msgid ""
19162"GtkApplication initializes GTK+. It also connects the <gui>x</gui> button that's automatically generated along "
19163"with the window to the \"destroy\" signal."
19164msgstr ""
19165"GtkApplication은 GTK+를 초기화합니다. 또한 창을 만들 때 자동으로 붙인 <gui>x</gui> 단추를 \"destroy\" 시그널에 연결"
19166"합니다."
19167
19168#. (itstool) path: section/p
19169#: C/hello-world.js.page:95
19170msgid ""
19171"We can start building our first window. We do this by creating a variable called <var>_window</var> and assigning "
19172"it a new Gtk.ApplicationWindow."
19173msgstr ""
19174"첫 창 만들기로 시작하겠습니다. <var>_window</var> 변수를 만들고 Gtk.ApplicationWindow 새 객체를 할당하겠습니다."
19175
19176#. (itstool) path: section/p
19177#: C/hello-world.js.page:96 C/hello-world.py.page:73
19178msgid ""
19179"We give the window a property called <var>title</var>. The title can be any string you want it to be. To be on the "
19180"safe side, it's best to stick to UTF-8 encoding."
19181msgstr ""
19182"창에 <var>title</var> 속성을 설정해야합니다. 제목은 원하는대로 지을 수 있습니다. 안전한 방편으로, UTF-8 인코딩으로 "
19183"작성하시는게 좋습니다."
19184
19185#. (itstool) path: section/p
19186#: C/hello-world.js.page:97 C/hello-world.py.page:74 C/hello-world.vala.page:57
19187msgid ""
19188"Now we have a window which has a title and a working \"close\" button. Let's add the actual \"Hello World\" text."
19189msgstr ""
19190"이제 제목과 동작하는 \"닫기\" 단추가 붙은 창을 만들었습니다. 이제 실제 \"Hello World\" 문구를 찍어보겠습니다."
19191
19192#. (itstool) path: section/title
19193#: C/hello-world.js.page:100 C/hello-world.py.page:77 C/hello-world.vala.page:60
19194msgid "Label for the window"
19195msgstr "창 레이블"
19196
19197#. (itstool) path: section/code
19198#: C/hello-world.js.page:101
19199#, no-wrap
19200msgid ""
19201"// Add a label widget to your window\n"
19202"this.label = new Gtk.Label({ label: \"Hello World\" });\n"
19203"this._window.add(this.label);\n"
19204"this._window.set_default_size(200, 200);"
19205msgstr ""
19206"// Add a label widget to your window\n"
19207"this.label = new Gtk.Label({ label: \"Hello World\" });\n"
19208"this._window.add(this.label);\n"
19209"this._window.set_default_size(200, 200);"
19210
19211#. (itstool) path: section/p
19212#: C/hello-world.js.page:106
19213msgid ""
19214"A text label is one of the GTK+ widgets we can use, on account of having imported the GTK+ library. To use it, we "
19215"create a new variable called label, and assign it a new Gtk.Label. Then we give it properties inside the curly "
19216"braces {}. In this case, we're setting the text that the label will hold. Finally, we create and run the "
19217"application:"
19218msgstr ""
19219"텍스트 레이블은 GTK+ 라이브러리에서 가져와서 사용할 수 있는 GTK+ 위젯 중 하나입니다. 텍스트 레이블을 사용하려면 레"
19220"이블이라는 새 변수를 만들고 새 Gtk.Label을 할당합니다. 그 다음 {} 중괄호에 속성 값을 넣습니다. 지금 같은 경우, 레이"
19221"블 값을 유지할 문장을 설정합니다. 마지막으로 프로그램을 만들고 실행하겠습니다:"
19222
19223#. (itstool) path: section/code
19224#: C/hello-world.js.page:108
19225#, no-wrap
19226msgid ""
19227"//run the application\n"
19228"let app = new Application();\n"
19229"app.application.run(ARGV);"
19230msgstr ""
19231"//run the application\n"
19232"let app = new Application();\n"
19233"app.application.run(ARGV);"
19234
19235#. (itstool) path: section/p
19236#: C/hello-world.js.page:112 C/hello-world.py.page:97 C/hello-world.vala.page:71
19237msgid ""
19238"Gtk.ApplicationWindow can only hold one widget at a time. To construct more elaborate programs you need to create "
19239"a holder widget like Gtk.Grid inside the window, and then add all the other widgets to it."
19240msgstr ""
19241"Gtk.ApplicationWindow는 한번에 위젯 하나만 가질 수 있습니다. 프로그램을 더 정교하게 만들려면 Gtk.Grid 같은 홀더 위"
19242"젯을 창 안에 만들어 넣고 그 안에 위젯을 추가해야합니다."
19243
19244#. (itstool) path: section/title
19245#: C/hello-world.js.page:116
19246msgid "hello-world.js"
19247msgstr "hello-world.js"
19248
19249#. (itstool) path: section/p
19250#: C/hello-world.js.page:117 C/hello-world.py.page:102 C/hello-world.vala.page:76
19251msgid "The complete file:"
19252msgstr "완전한 파일 내용:"
19253
19254#. (itstool) path: section/code
19255#: C/hello-world.js.page:118
19256#, no-wrap
19257#| msgid ""
19258#| "#!/usr/bin/gjs\n"
19259#| "\n"
19260#| "imports.gi.versions.Gtk = '3.0'\n"
19261#| "const Gtk = imports.gi.Gtk;\n"
19262#| "\n"
19263#| "class Application {\n"
19264#| "\n"
19265#| "    //create the application\n"
19266#| "    constructor() {\n"
19267#| "        this.application = new Gtk.Application();\n"
19268#| "\n"
19269#| "       //connect to 'activate' and 'startup' signals to handlers.\n"
19270#| "       this.application.connect('activate', this._onActivate.bind(this));\n"
19271#| "       this.application.connect('startup', this._onStartup.bind(this));\n"
19272#| "    }\n"
19273#| "\n"
19274#| "    //create the UI\n"
19275#| "    _buildUI() {\n"
19276#| "        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
19277#| "                                                   title: \"Hello World!\" });\n"
19278#| "        this._window.set_default_size(200, 200);\n"
19279#| "        this.label = new Gtk.Label({ label: \"Hello World\" });\n"
19280#| "        this._window.add(this.label);\n"
19281#| "    }\n"
19282#| "\n"
19283#| "    //handler for 'activate' signal\n"
19284#| "    _onActivate() {\n"
19285#| "        //show the window and all child widgets\n"
19286#| "        this._window.show_all();\n"
19287#| "    }\n"
19288#| "\n"
19289#| "    //handler for 'startup' signal\n"
19290#| "    _onStartup() {\n"
19291#| "        this._buildUI();\n"
19292#| "    }\n"
19293#| "};\n"
19294#| "\n"
19295#| "//run the application\n"
19296#| "let app = new Application();\n"
19297#| "app.application.run(ARGV);\n"
19298msgid ""
19299"#!/usr/bin/gjs\n"
19300"\n"
19301"const Lang = imports.lang;\n"
19302"\n"
19303"imports.gi.versions.Gtk = '3.0'\n"
19304"const Gtk = imports.gi.Gtk;\n"
19305"\n"
19306"class Application {\n"
19307"\n"
19308"    //create the application\n"
19309"    constructor() {\n"
19310"        this.application = new Gtk.Application();\n"
19311"\n"
19312"       //connect to 'activate' and 'startup' signals to handlers.\n"
19313"       this.application.connect('activate', this._onActivate.bind(this));\n"
19314"       this.application.connect('startup', this._onStartup.bind(this));\n"
19315"    }\n"
19316"\n"
19317"    //create the UI\n"
19318"    _buildUI() {\n"
19319"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
19320"                                                   title: \"Hello World!\" });\n"
19321"        this._window.set_default_size(200, 200);\n"
19322"        this.label = new Gtk.Label({ label: \"Hello World\" });\n"
19323"        this._window.add(this.label);\n"
19324"    }\n"
19325"\n"
19326"    //handler for 'activate' signal\n"
19327"    _onActivate() {\n"
19328"        //show the window and all child widgets\n"
19329"        this._window.show_all();\n"
19330"    }\n"
19331"\n"
19332"    //handler for 'startup' signal\n"
19333"    _onStartup() {\n"
19334"        this._buildUI();\n"
19335"    }\n"
19336"};\n"
19337"\n"
19338"//run the application\n"
19339"let app = new Application();\n"
19340"app.application.run(ARGV);\n"
19341msgstr ""
19342"#!/usr/bin/gjs\n"
19343"\n"
19344"const Lang = imports.lang;\n"
19345"\n"
19346"imports.gi.versions.Gtk = '3.0'\n"
19347"const Gtk = imports.gi.Gtk;\n"
19348"\n"
19349"class Application {\n"
19350"\n"
19351"    //create the application\n"
19352"    constructor() {\n"
19353"        this.application = new Gtk.Application();\n"
19354"\n"
19355"       //connect to 'activate' and 'startup' signals to handlers.\n"
19356"       this.application.connect('activate', this._onActivate.bind(this));\n"
19357"       this.application.connect('startup', this._onStartup.bind(this));\n"
19358"    }\n"
19359"\n"
19360"    //create the UI\n"
19361"    _buildUI() {\n"
19362"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
19363"                                                   title: \"Hello World!\" });\n"
19364"        this._window.set_default_size(200, 200);\n"
19365"        this.label = new Gtk.Label({ label: \"Hello World\" });\n"
19366"        this._window.add(this.label);\n"
19367"    }\n"
19368"\n"
19369"    //handler for 'activate' signal\n"
19370"    _onActivate() {\n"
19371"        //show the window and all child widgets\n"
19372"        this._window.show_all();\n"
19373"    }\n"
19374"\n"
19375"    //handler for 'startup' signal\n"
19376"    _onStartup() {\n"
19377"        this._buildUI();\n"
19378"    }\n"
19379"};\n"
19380"\n"
19381"//run the application\n"
19382"let app = new Application();\n"
19383"app.application.run(ARGV);\n"
19384
19385#. (itstool) path: section/title
19386#: C/hello-world.js.page:121 C/hello-world.py.page:106 C/hello-world.vala.page:80
19387msgid "Running the application from terminal"
19388msgstr "터미널에서 프로그램 실행"
19389
19390#. (itstool) path: section/p
19391#: C/hello-world.js.page:122
19392msgid ""
19393"To run this application, first save it as hello-world.js. Then open Terminal, go to the folder where your "
19394"application is stored and run:"
19395msgstr ""
19396"이 프로그램을 실행하려면 우선 hello-world.js 파일 이름으로 저장하십시오. 그 다음 터미널을 열고 프로그램을 저장한 폴"
19397"더로 이동한 다음 실행하십시오:"
19398
19399#. (itstool) path: section/screen
19400#: C/hello-world.js.page:123
19401#, no-wrap
19402msgid "<output style=\"prompt\">$ </output><input>gjs hello-world.js</input>"
19403msgstr "<output style=\"prompt\">$ </output><input>gjs hello-world.js</input>"
19404
19405#. (itstool) path: section/title
19406#: C/hello-world.js.page:129 C/hello-world.py.page:112 C/hello-world.vala.page:89
19407msgid "The <file>.desktop.in</file> file"
19408msgstr "<file>.desktop.in</file> 파일"
19409
19410#. (itstool) path: section/p
19411#: C/hello-world.js.page:130 C/hello-world.py.page:113 C/hello-world.vala.page:90
19412msgid ""
19413"Running applications from the Terminal is useful at the beginning of the application making process. To have fully "
19414"working <link href=\"https://developer.gnome.org/integration-guide/stable/mime.html.en\">application integration</"
19415"link> in GNOME 3 requires a desktop launcher. For this you need to create a <file>.desktop</file> file. The <file>."
19416"desktop</file> file describes the application name, the used icon and various integration bits. A deeper insight "
19417"into the <file>.desktop</file> file can be found <link href=\"http://developer.gnome.org/desktop-entry-spec/"
19418"\">here</link>. The <file>.desktop.in</file> file will create the <file>.desktop</file>."
19419msgstr ""
19420"터미널에서의 프로그램 실행은 프로그램을 처음 만드는 단계에서 상당히 유용합니다. 그놈 3에서 완벽하게 <link href="
19421"\"https://developer.gnome.org/integration-guide/stable/mime.html.en\">프로그램 통합</link>하여 동작할 수 있게 하려"
19422"면 데스크톱 실행 아이콘이 필요합니다. 이 아이콘을 만들려면 <file>.desktop</file> 파일을 만들어야합니다.  파일은 프"
19423"로그램 이름, 사용 아이콘, 다양한 통합 부분을 서술합니다. <file>.desktop</file> 파일에 대한 더 자세한 관점은 <link "
19424"href=\"http://developer.gnome.org/desktop-entry-spec/\">여기</link>에 있습니다. <file>.desktop.in</file> 파일로 "
19425"<file>.desktop</file> 파일을 만듭니다."
19426
19427#. (itstool) path: note/p
19428#: C/hello-world.js.page:133
19429msgid ""
19430"Before continuing, resave <file>hello-world.js</file> as <file>hello-world</file>. Then run this in the command "
19431"line:"
19432msgstr ""
19433"계속하기 전에 <file>hello-world.js</file> 파일을 <file>hello-world</file>로 다시 저장하십시오. 그 다음 명령줄에서 "
19434"다음 명령을 실행하십시오:"
19435
19436#. (itstool) path: note/screen
19437#: C/hello-world.js.page:134
19438#, no-wrap
19439msgid "<output style=\"prompt\">$ </output><input>chmod +x hello-world</input>"
19440msgstr "<output style=\"prompt\">$ </output><input>chmod +x hello-world</input>"
19441
19442#. (itstool) path: section/p
19443#: C/hello-world.js.page:137 C/hello-world.py.page:115 C/hello-world.vala.page:92
19444msgid "The example shows you the minimum requirements for a <code>.desktop.in</code> file."
19445msgstr "예제에서는 <code>.desktop.in</code> 파일에서 최소한 필요한 내용을 보여줍니다."
19446
19447#. (itstool) path: section/code
19448#: C/hello-world.js.page:138 C/hello-world.py.page:116 C/hello-world.vala.page:93
19449#, no-wrap
19450msgid ""
19451"[Desktop Entry]\n"
19452"Version=1.0\n"
19453"Encoding=UTF-8\n"
19454"Name=Hello World\n"
19455"Comment=Say Hello\n"
19456"Exec=@prefix@/bin/hello-world\n"
19457"Icon=application-default-icon\n"
19458"Terminal=false\n"
19459"Type=Application\n"
19460"StartupNotify=true\n"
19461"Categories=GNOME;GTK;Utility;\n"
19462msgstr ""
19463"[Desktop Entry]\n"
19464"Version=1.0\n"
19465"Encoding=UTF-8\n"
19466"Name=Hello World\n"
19467"Comment=Say Hello\n"
19468"Exec=@prefix@/bin/hello-world\n"
19469"Icon=application-default-icon\n"
19470"Terminal=false\n"
19471"Type=Application\n"
19472"StartupNotify=true\n"
19473"Categories=GNOME;GTK;Utility;\n"
19474
19475#. (itstool) path: section/p
19476#: C/hello-world.js.page:140
19477msgid ""
19478"Save this as <file>hello-world.desktop.in</file>. Now let's go through some parts of the <code>.desktop.in</code> "
19479"file."
19480msgstr ""
19481"이 내용을  <file>hello-world.desktop.in</file> 파일로 저장하십시오. 이제 <code>.desktop.in</code> 파일 부분으로 들"
19482"어가보겠습니다."
19483
19484#. (itstool) path: item/title
19485#. (itstool) path: td/p
19486#: C/hello-world.js.page:142 C/hello-world.py.page:120 C/hello-world.vala.page:97 C/toolbar_builder.py.page:95
19487#: C/toolbar_builder.vala.page:78
19488msgid "Name"
19489msgstr "Name"
19490
19491#. (itstool) path: item/p
19492#: C/hello-world.js.page:142 C/hello-world.py.page:120 C/hello-world.vala.page:97
19493msgid "The application name."
19494msgstr "프로그램 이름입니다."
19495
19496#. (itstool) path: item/title
19497#: C/hello-world.js.page:143 C/hello-world.py.page:121 C/hello-world.vala.page:98
19498msgid "Comment"
19499msgstr "Comment"
19500
19501#. (itstool) path: item/p
19502#: C/hello-world.js.page:143 C/hello-world.py.page:121 C/hello-world.vala.page:98
19503msgid "A short description of the application."
19504msgstr "프로그램의 간단한 설명입니다."
19505
19506#. (itstool) path: item/title
19507#: C/hello-world.js.page:144 C/hello-world.py.page:122 C/hello-world.vala.page:99
19508msgid "Exec"
19509msgstr "Exec"
19510
19511#. (itstool) path: item/p
19512#: C/hello-world.js.page:144 C/hello-world.py.page:122 C/hello-world.vala.page:99
19513msgid ""
19514"Specifies a command to execute when you choose the application from the menu. In this example exec just tells "
19515"where to find the <file>hello-world</file> file and the file takes care of the rest."
19516msgstr ""
19517"메뉴에서 프로그램을 선택했을 때 실행할 명령을 지정합니다. 이 예제에서는 <file>hello-world</file> 파일을 어디서 찾는"
19518"지 알려주며 파일을 다루는 방식은 나머지 부분에서 다룹니다."
19519
19520#. (itstool) path: item/title
19521#: C/hello-world.js.page:145 C/hello-world.py.page:123 C/hello-world.vala.page:100
19522msgid "Terminal"
19523msgstr "Terminal"
19524
19525#. (itstool) path: item/p
19526#: C/hello-world.js.page:145 C/hello-world.py.page:123 C/hello-world.vala.page:100
19527msgid "Specifies whether the command in the Exec key runs in a terminal window."
19528msgstr "Exec 키의 명령을 터미널 창에서 실행할 지 여부를 지정합니다."
19529
19530#. (itstool) path: section/p
19531#: C/hello-world.js.page:148 C/hello-world.py.page:126 C/hello-world.vala.page:103
19532msgid ""
19533"To put your application into the appropriate category, you need to add the necessary categories to the Categories "
19534"line. More information on the different categories can be found in the <link href=\"http://standards.freedesktop."
19535"org/menu-spec/latest/apa.html\">menu specification</link>."
19536msgstr ""
19537"프로그램을 적당한 분류에 넣으려면 Categories 줄에 필요한 분류 이름을 추가해야합니다. 다른 분류에 대한 자세한 정보"
19538"는 <link href=\"http://standards.freedesktop.org/menu-spec/latest/apa.html\">메뉴 명세</link>에 있습니다."
19539
19540#. (itstool) path: section/p
19541#: C/hello-world.js.page:149 C/hello-world.py.page:127 C/hello-world.vala.page:104
19542msgid ""
19543"In this example we use an existing icon. For a custom icon you need to have a .svg file of your icon, stored in "
19544"<file>/usr/share/icons/hicolor/scalable/apps</file>. Write the name of your icon file to the .desktop.in file, on "
19545"line 7. More information on icons in: <link href=\"https://live.gnome.org/GnomeGoals/AppIcon\">Installing Icons "
19546"for Themes</link> and <link href=\"http://freedesktop.org/wiki/Specifications/icon-theme-spec\">on freedesktop."
19547"org: Specifications/icon-theme-spec</link>."
19548msgstr ""
19549"이 예제에서는 이미 있는 아이콘을 사용하겠습니다. 개별 아이콘을 사용하려면 <file>/usr/share/icons/hicolor/scalable/"
19550"apps</file> 경로에 저장한 svg 아이콘 파일이 필요합니다. 아이콘 파일 이름을 .desktop.in file 파일 7번째 줄에 적어 넣"
19551"으십시오. 더 자세한 아이콘 정보는 <link href=\"https://live.gnome.org/GnomeGoals/AppIcon\">테마 아이콘 설치</link>"
19552"와 <link href=\"http://freedesktop.org/wiki/Specifications/icon-theme-spec\">on freedesktop.org: Specifications/"
19553"icon-theme-spec</link>에 있습니다."
19554
19555#. (itstool) path: section/title
19556#: C/hello-world.js.page:152 C/hello-world.py.page:130 C/hello-world.vala.page:107
19557msgid "The build system"
19558msgstr "빌드 시스템"
19559
19560#. (itstool) path: section/p
19561#: C/hello-world.js.page:153 C/hello-world.py.page:131 C/hello-world.vala.page:108
19562msgid ""
19563"To make your application truly a part of the GNOME 3 system you need to install it with the help of autotools. The "
19564"autotools build will install all the necessary files to all the right places."
19565msgstr ""
19566"그놈 3의 일부 프로그램을 만들려면 autotools의 도움을 받아 설치해야합니다. autotools 빌드는 필요한 모든 파일을 모든 "
19567"올바른 경로에 설치합니다."
19568
19569#. (itstool) path: section/p
19570#: C/hello-world.js.page:154 C/hello-world.py.page:132 C/hello-world.vala.page:109
19571msgid "For this you need to have the following files:"
19572msgstr "진행하려면 다음 파일이 필요합니다:"
19573
19574#. (itstool) path: section/title
19575#. (itstool) path: item/p
19576#. (itstool) path: section/p
19577#: C/hello-world.js.page:157 C/hello-world.py.page:135 C/hello-world.vala.page:112 C/weatherAutotools.js.page:40
19578#: C/weatherAutotools.js.page:138
19579msgid "autogen.sh"
19580msgstr "autogen.sh"
19581
19582#. (itstool) path: section/code
19583#: C/hello-world.js.page:158 C/hello-world.py.page:136 C/hello-world.vala.page:113
19584#, no-wrap
19585msgid ""
19586"#!/bin/sh\n"
19587"\n"
19588"set -e\n"
19589"\n"
19590"test -n \"$srcdir\" || srcdir=`dirname \"$0\"`\n"
19591"test -n \"$srcdir\" || srcdir=.\n"
19592"\n"
19593"olddir=`pwd`\n"
19594"cd \"$srcdir\"\n"
19595"\n"
19596"# This will run autoconf, automake, etc. for us\n"
19597"autoreconf --force --install\n"
19598"\n"
19599"cd \"$olddir\"\n"
19600"\n"
19601"if test -z \"$NOCONFIGURE\"; then\n"
19602"  \"$srcdir\"/configure \"$@\"\n"
19603"fi\n"
19604msgstr ""
19605"#!/bin/sh\n"
19606"\n"
19607"set -e\n"
19608"\n"
19609"test -n \"$srcdir\" || srcdir=`dirname \"$0\"`\n"
19610"test -n \"$srcdir\" || srcdir=.\n"
19611"\n"
19612"olddir=`pwd`\n"
19613"cd \"$srcdir\"\n"
19614"\n"
19615"# This will run autoconf, automake, etc. for us\n"
19616"autoreconf --force --install\n"
19617"\n"
19618"cd \"$olddir\"\n"
19619"\n"
19620"if test -z \"$NOCONFIGURE\"; then\n"
19621"  \"$srcdir\"/configure \"$@\"\n"
19622"fi\n"
19623
19624#. (itstool) path: section/p
19625#: C/hello-world.js.page:160 C/hello-world.py.page:138 C/hello-world.vala.page:115
19626msgid "After the <file>autogen.sh</file> file is ready and saved, run:"
19627msgstr "<file>autogen.sh</file> 파일을 준비했고 저장하고 나면, 다음을 실행하십시오:"
19628
19629#. (itstool) path: section/screen
19630#: C/hello-world.js.page:161 C/hello-world.py.page:139 C/hello-world.vala.page:116
19631#, no-wrap
19632msgid "<output style=\"prompt\">$ </output><input>chmod +x autogen.sh</input>"
19633msgstr "<output style=\"prompt\">$ </output><input>chmod +x autogen.sh</input>"
19634
19635#. (itstool) path: section/title
19636#. (itstool) path: item/p
19637#. (itstool) path: section/p
19638#: C/hello-world.js.page:165 C/hello-world.py.page:143 C/hello-world.vala.page:120 C/weatherAutotools.js.page:38
19639#: C/weatherAutotools.js.page:64
19640msgid "Makefile.am"
19641msgstr "Makefile.am"
19642
19643#. (itstool) path: section/code
19644#: C/hello-world.js.page:166
19645#, no-wrap
19646msgid ""
19647"# The actual runnable program is set to the SCRIPTS primitive.\n"
19648"# # Prefix bin_ tells where to copy this\n"
19649"bin_SCRIPTS = hello-world\n"
19650"# # List of files to be distributed\n"
19651"EXTRA_DIST =  \\\n"
19652"\t$(bin_SCRIPTS)\n"
19653"#\n"
19654"#     # The desktop files\n"
19655"desktopdir = $(datadir)/applications\n"
19656"desktop_DATA = \\\n"
19657"\thello-world.desktop\n"
19658msgstr ""
19659"# The actual runnable program is set to the SCRIPTS primitive.\n"
19660"# # Prefix bin_ tells where to copy this\n"
19661"bin_SCRIPTS = hello-world\n"
19662"# # List of files to be distributed\n"
19663"EXTRA_DIST =  \\\n"
19664"\t$(bin_SCRIPTS)\n"
19665"#\n"
19666"#     # The desktop files\n"
19667"desktopdir = $(datadir)/applications\n"
19668"desktop_DATA = \\\n"
19669"\thello-world.desktop\n"
19670
19671#. (itstool) path: section/title
19672#. (itstool) path: item/p
19673#. (itstool) path: section/p
19674#: C/hello-world.js.page:170 C/hello-world.py.page:148 C/hello-world.vala.page:125 C/weatherAutotools.js.page:39
19675#: C/weatherAutotools.js.page:131
19676msgid "configure.ac"
19677msgstr "configure.ac"
19678
19679#. (itstool) path: section/code
19680#: C/hello-world.js.page:171 C/hello-world.py.page:149
19681#, no-wrap
19682msgid ""
19683"# This file is processed by autoconf to create a configure script\n"
19684"AC_INIT([Hello World], 1.0)\n"
19685"AM_INIT_AUTOMAKE([1.10 no-define foreign dist-xz no-dist-gzip])\n"
19686"AC_CONFIG_FILES([Makefile hello-world.desktop])\n"
19687"AC_OUTPUT\n"
19688msgstr ""
19689"# This file is processed by autoconf to create a configure script\n"
19690"AC_INIT([Hello World], 1.0)\n"
19691"AM_INIT_AUTOMAKE([1.10 no-define foreign dist-xz no-dist-gzip])\n"
19692"AC_CONFIG_FILES([Makefile hello-world.desktop])\n"
19693"AC_OUTPUT\n"
19694
19695#. (itstool) path: section/title
19696#: C/hello-world.js.page:175 C/hello-world.py.page:153 C/hello-world.vala.page:130
19697msgid "README"
19698msgstr "README"
19699
19700#. (itstool) path: section/p
19701#: C/hello-world.js.page:176 C/hello-world.py.page:154 C/hello-world.vala.page:131
19702msgid "Information users should read first. This file can be blank."
19703msgstr "사용자가 우선 읽어야 할 내용입니다. 이 파일은 비워둘 수 있습니다."
19704
19705#. (itstool) path: section/p
19706#: C/hello-world.js.page:178
19707msgid ""
19708"When you have the <file>hello-world</file>, <file>hello-world.desktop.in</file>, <file>Makefile.am</file>, "
19709"<file>configure.ac</file> and <file>autogen.sh</file> files with correct information and permissions, create a "
19710"<file>README</file> file with installation instructions. Below is a sample of what suitable README instructions "
19711"may look like:"
19712msgstr ""
19713"올바른 정보와 권한을 설정한 <file>hello-world</file>, <file>hello-world.desktop.in</file>, <file>Makefile.am</"
19714"file>, <file>configure.ac</file>, <file>autogen.sh</file> 파일을 갖추고 나면, <file>README</file> 파일을 만들어 설"
19715"치 방법을 적어 넣으십시오. README에 적당한 절차 내용을 넣은 예제를 아래에 보여드리겠습니다:"
19716
19717# 전 세계 사람이 볼 README 파일이므로 굳이 번역하지 않아도 된다. 역자 주.
19718#. (itstool) path: section/code
19719#: C/hello-world.js.page:179
19720#, no-wrap
19721msgid ""
19722"To build and install this program, run these commands from a terminal:\n"
19723"\n"
19724"./autogen.sh --prefix=/home/$USER/.local\n"
19725"make install\n"
19726"\n"
19727"-------------\n"
19728"When running the first command $USER will be replaced by your username.\n"
19729"\n"
19730"Running the first command above creates the following files:\n"
19731"\n"
19732"aclocal.m4\n"
19733"autom4te.cache\n"
19734"config.log\n"
19735"config.status\n"
19736"configure\n"
19737"hello-world.desktop\n"
19738"install-sh\n"
19739"missing\n"
19740"Makefile.in\n"
19741"Makefile\n"
19742"\n"
19743"Running \"make install\", installs the application in /home/your_username/.local/bin\n"
19744"and installs the hello-world.desktop file in /home/your_username/.local/share/applications\n"
19745"\n"
19746"You can now run the application by typing \"Hello World\" in the Overview.\n"
19747"\n"
19748"----------------\n"
19749"To uninstall, type:\n"
19750"\n"
19751"make uninstall\n"
19752"\n"
19753"----------------\n"
19754"To create a tarball type:\n"
19755"\n"
19756"make distcheck\n"
19757"\n"
19758"This will create hello-world-1.0.tar.xz\n"
19759msgstr ""
19760"이 프로그램을 빌드하고 설치하려면, 아래 명령을 터미널에서 실행하십시오:\n"
19761"\n"
19762"./autogen.sh --prefix=/home/$USER/.local\n"
19763"make install\n"
19764"\n"
19765"-------------\n"
19766"처음 명령을 실행할 때 $USER 는 사용자 이름으로 바뀝니다.\n"
19767"\n"
19768"위 처음 명령을 실행하면 아래 파일을 만듭니다:\n"
19769"\n"
19770"aclocal.m4\n"
19771"autom4te.cache\n"
19772"config.log\n"
19773"config.status\n"
19774"configure\n"
19775"hello-world.desktop\n"
19776"install-sh\n"
19777"missing\n"
19778"Makefile.in\n"
19779"Makefile\n"
19780"\n"
19781"\"make install\"을 실행하면, /home/your_username/.local/bin 경로에 프로그램을 설치하며\n"
19782"/home/your_username/.local/share/applications 경로에 hello-world.desktop 파일을 설치합니다\n"
19783"\n"
19784"이제 개요에서 \"Hello World\"를 입력하면 프로그램을 실행할 수 있습니다.\n"
19785"\n"
19786"----------------\n"
19787"설치한 프로그램을 제거하려면:\n"
19788"\n"
19789"make uninstall\n"
19790"\n"
19791"----------------\n"
19792"타르볼 파일을 만들려면:\n"
19793"\n"
19794"make distcheck\n"
19795"\n"
19796"위 명령은 hello-world-1.0.tar.xz 파일을 만듭니다\n"
19797
19798#. (itstool) path: info/title
19799#: C/hello-world.py.page:9
19800msgctxt "text"
19801msgid "Hello World (Python)"
19802msgstr "Hello World(Python)"
19803
19804#. (itstool) path: item/p
19805#: C/hello-world.py.page:32
19806msgid "create a small \"Hello, World\" application using Python and GTK+"
19807msgstr "파이썬과 GTK+를 사용한 작은 \"Hello, World\" 프로그램을 만듭니다"
19808
19809#. (itstool) path: section/code
19810#: C/hello-world.py.page:47
19811#, no-wrap
19812msgid ""
19813"from gi.repository import Gtk\n"
19814"import sys"
19815msgstr ""
19816"from gi.repository import Gtk\n"
19817"import sys"
19818
19819#. (itstool) path: section/code
19820#: C/hello-world.py.page:53
19821#, no-wrap
19822msgid ""
19823"class MyWindow(Gtk.ApplicationWindow):\n"
19824"\n"
19825"    # constructor for a Gtk.ApplicationWindow\n"
19826"    def __init__(self, app):\n"
19827"        Gtk.Window.__init__(self, title=\"Hello World!\", application=app)\n"
19828"        self.set_default_size(200, 100)\n"
19829"\n"
19830"class MyApplication(Gtk.Application):\n"
19831"    def __init__(self):\n"
19832"        Gtk.Application.__init__(self)\n"
19833"\n"
19834"    def do_activate(self):\n"
19835"        win = MyWindow(self)\n"
19836"        win.show_all()\n"
19837"\n"
19838"    def do_startup(self):\n"
19839"        Gtk.Application.do_startup(self)"
19840msgstr ""
19841"class MyWindow(Gtk.ApplicationWindow):\n"
19842"\n"
19843"    # constructor for a Gtk.ApplicationWindow\n"
19844"    def __init__(self, app):\n"
19845"        Gtk.Window.__init__(self, title=\"Hello World!\", application=app)\n"
19846"        self.set_default_size(200, 100)\n"
19847"\n"
19848"class MyApplication(Gtk.Application):\n"
19849"    def __init__(self):\n"
19850"        Gtk.Application.__init__(self)\n"
19851"\n"
19852"    def do_activate(self):\n"
19853"        win = MyWindow(self)\n"
19854"        win.show_all()\n"
19855"\n"
19856"    def do_startup(self):\n"
19857"        Gtk.Application.do_startup(self)"
19858
19859#. (itstool) path: section/p
19860#: C/hello-world.py.page:71 C/hello-world.vala.page:54
19861msgid ""
19862"Gtk.Application initializes GTK+. It also connects the <gui>x</gui> button that's automatically generated along "
19863"with the window to the \"destroy\" signal."
19864msgstr ""
19865"Gtk.Application은 GTK+를 초기화합니다. 또한 창을 만들 때 자동으로 붙인 <gui>x</gui> 단추를 \"destroy\" 시그널에 연"
19866"결합니다."
19867
19868#. (itstool) path: section/p
19869#: C/hello-world.py.page:72
19870msgid ""
19871"We can start building our first window. We do this by creating a class called <var>MyWindow</var> and assigning it "
19872"a Gtk.ApplicationWindow."
19873msgstr ""
19874"첫 창 만들기를 시작할 수 있습니다. <var>MyWindow</var> 클래스를 만들고 Gtk.ApplicationWindow를 할당하겠습니다."
19875
19876#. (itstool) path: section/code
19877#: C/hello-world.py.page:78
19878#, no-wrap
19879msgid ""
19880"# Add a label widget to your window\n"
19881"\n"
19882"        # create a label\n"
19883"        label = Gtk.Label()\n"
19884"\n"
19885"        # set the text of the label\n"
19886"        label.set_text(\"Hello GNOME!\")\n"
19887"\n"
19888"        # add the label to the window\n"
19889"        self.add(label)"
19890msgstr ""
19891"# Add a label widget to your window\n"
19892"\n"
19893"        # create a label\n"
19894"        label = Gtk.Label()\n"
19895"\n"
19896"        # set the text of the label\n"
19897"        label.set_text(\"Hello GNOME!\")\n"
19898"\n"
19899"        # add the label to the window\n"
19900"        self.add(label)"
19901
19902#. (itstool) path: section/p
19903#: C/hello-world.py.page:89
19904msgid ""
19905"A text label is one of the GTK+ widgets we can use, on account of having imported the GTK+ library. To use it, we "
19906"create a variable called <var>label</var> and set the text that the label will hold. Finally, we create and run "
19907"the application:"
19908msgstr ""
19909"텍스트 레이블은 가져온 GTK+ 라이브러리에 들어있어 우리가 활용할 수 있는 GTK+ 위젯 중 하나입니다. 이 위젯을 사용하"
19910"려, <var>label</var> 변수를 만들고, 계속 표시해 둘 텍스트를 설정하겠습니다. 최종적으로, 프로그램을 만들고 실행합니"
19911"다:"
19912
19913#. (itstool) path: section/code
19914#: C/hello-world.py.page:91
19915#, no-wrap
19916msgid ""
19917"#run the application\n"
19918"\n"
19919"app = MyApplication()\n"
19920"exit_status = app.run(sys.argv)\n"
19921"sys.exit(exit_status)"
19922msgstr ""
19923"#run the application\n"
19924"\n"
19925"app = MyApplication()\n"
19926"exit_status = app.run(sys.argv)\n"
19927"sys.exit(exit_status)"
19928
19929#. (itstool) path: section/title
19930#: C/hello-world.py.page:101
19931msgid "hello-world.py"
19932msgstr "hello-world.py"
19933
19934#. (itstool) path: section/code
19935#: C/hello-world.py.page:103 C/label.py.page:39
19936#, no-wrap
19937msgid ""
19938"from gi.repository import Gtk\n"
19939"import sys\n"
19940"\n"
19941"\n"
19942"class MyWindow(Gtk.ApplicationWindow):\n"
19943"    # constructor for a Gtk.ApplicationWindow\n"
19944"\n"
19945"    def __init__(self, app):\n"
19946"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
19947"        self.set_default_size(200, 100)\n"
19948"\n"
19949"        # create a label\n"
19950"        label = Gtk.Label()\n"
19951"        # set the text of the label\n"
19952"        label.set_text(\"Hello GNOME!\")\n"
19953"        # add the label to the window\n"
19954"        self.add(label)\n"
19955"\n"
19956"\n"
19957"class MyApplication(Gtk.Application):\n"
19958"\n"
19959"    def __init__(self):\n"
19960"        Gtk.Application.__init__(self)\n"
19961"\n"
19962"    def do_activate(self):\n"
19963"        win = MyWindow(self)\n"
19964"        win.show_all()\n"
19965"\n"
19966"    def do_startup(self):\n"
19967"        Gtk.Application.do_startup(self)\n"
19968"\n"
19969"app = MyApplication()\n"
19970"exit_status = app.run(sys.argv)\n"
19971"sys.exit(exit_status)\n"
19972msgstr ""
19973"from gi.repository import Gtk\n"
19974"import sys\n"
19975"\n"
19976"\n"
19977"class MyWindow(Gtk.ApplicationWindow):\n"
19978"    # constructor for a Gtk.ApplicationWindow\n"
19979"\n"
19980"    def __init__(self, app):\n"
19981"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
19982"        self.set_default_size(200, 100)\n"
19983"\n"
19984"        # create a label\n"
19985"        label = Gtk.Label()\n"
19986"        # set the text of the label\n"
19987"        label.set_text(\"Hello GNOME!\")\n"
19988"        # add the label to the window\n"
19989"        self.add(label)\n"
19990"\n"
19991"\n"
19992"class MyApplication(Gtk.Application):\n"
19993"\n"
19994"    def __init__(self):\n"
19995"        Gtk.Application.__init__(self)\n"
19996"\n"
19997"    def do_activate(self):\n"
19998"        win = MyWindow(self)\n"
19999"        win.show_all()\n"
20000"\n"
20001"    def do_startup(self):\n"
20002"        Gtk.Application.do_startup(self)\n"
20003"\n"
20004"app = MyApplication()\n"
20005"exit_status = app.run(sys.argv)\n"
20006"sys.exit(exit_status)\n"
20007
20008#. (itstool) path: section/p
20009#: C/hello-world.py.page:107
20010msgid ""
20011"To run this application, first save it as hello-world.py. Then open Terminal, go to the folder where your "
20012"application is stored and run:"
20013msgstr ""
20014"이 프로그램을 실행하려면 우선 hello-world.py로 저장하십시오. 그 다음 터미널을 여시고 프로그램을 저장한 폴더로 이동"
20015"하신 다음 실행하십시오:"
20016
20017#. (itstool) path: section/screen
20018#: C/hello-world.py.page:108
20019#, no-wrap
20020msgid "<output style=\"prompt\">$ </output><input>python hello-world.py</input>"
20021msgstr "<output style=\"prompt\">$ </output><input>python hello-world.py</input>"
20022
20023#. (itstool) path: section/p
20024#: C/hello-world.py.page:118 C/hello-world.vala.page:95
20025msgid "Now let's go through some parts of the <code>.desktop.in</code> file."
20026msgstr "이제 <code>.desktop.in</code> 파일 부분으로 들어가보겠습니다."
20027
20028#. (itstool) path: section/code
20029#: C/hello-world.py.page:144
20030#, no-wrap
20031msgid ""
20032"# The actual runnable program is set to the SCRIPTS primitive.\n"
20033"# # Prefix bin_ tells where to copy this\n"
20034"bin_SCRIPTS = hello-world.py\n"
20035"# # List of files to be distributed\n"
20036"EXTRA_DIST=  \\\n"
20037"\t$(bin_SCRIPTS)\n"
20038"#\n"
20039"#     # The desktop files\n"
20040"desktopdir = $(datadir)/applications\n"
20041"desktop_DATA = \\\n"
20042"\thello-world.desktop\n"
20043msgstr ""
20044"# The actual runnable program is set to the SCRIPTS primitive.\n"
20045"# # Prefix bin_ tells where to copy this\n"
20046"bin_SCRIPTS = hello-world.py\n"
20047"# # List of files to be distributed\n"
20048"EXTRA_DIST=  \\\n"
20049"\t$(bin_SCRIPTS)\n"
20050"#\n"
20051"#     # The desktop files\n"
20052"desktopdir = $(datadir)/applications\n"
20053"desktop_DATA = \\\n"
20054"\thello-world.desktop\n"
20055
20056#. (itstool) path: section/p
20057#: C/hello-world.py.page:156
20058msgid ""
20059"When you have the <file>hello-world</file>, <file>hello-world.desktop.in</file>, <file>Makefile.am</file>, "
20060"<file>configure.ac</file> and <file>autogen.sh</file> files with correct information and rights, the <file>README</"
20061"file> file can include the following instructions:"
20062msgstr ""
20063"올바른 내용을 넣고 권한을 설정한 <file>hello-world</file>, <file>hello-world.desktop.in</file>, <file>Makefile.am</"
20064"file>, <file>configure.ac</file>, <file>autogen.sh</file> 파일을 갖췄다면, <file>README</file> 파일에 다음 내용을 "
20065"넣을 수 있습니다:"
20066
20067# 전 세계 사람이 볼 README 파일이므로 굳이 번역하지 않아도 된다. 역자 주.
20068#. (itstool) path: section/code
20069#: C/hello-world.py.page:157
20070#, no-wrap
20071msgid ""
20072"To build and install this program:\n"
20073"\n"
20074"./autogen.sh --prefix=/home/your_username/.local\n"
20075"make install\n"
20076"\n"
20077"-------------\n"
20078"Running the first line above creates the following files:\n"
20079"\n"
20080"aclocal.m4\n"
20081"autom4te.cache\n"
20082"config.log\n"
20083"config.status\n"
20084"configure\n"
20085"hello-world.desktop\n"
20086"install-sh\n"
20087"missing\n"
20088"Makefile.in\n"
20089"Makefile\n"
20090"\n"
20091"Running \"make install\", installs the application in /home/your_username/.local/bin\n"
20092"and installs the hello-world.desktop file in /home/your_username/.local/share/applications\n"
20093"\n"
20094"You can now run the application by typing \"Hello World\" in the Overview.\n"
20095"\n"
20096"----------------\n"
20097"To uninstall, type:\n"
20098"\n"
20099"make uninstall\n"
20100"\n"
20101"----------------\n"
20102"To create a tarball type:\n"
20103"\n"
20104"make distcheck\n"
20105"\n"
20106"This will create hello-world-1.0.tar.xz\n"
20107msgstr ""
20108"To build and install this program:\n"
20109"\n"
20110"./autogen.sh --prefix=/home/your_username/.local\n"
20111"make install\n"
20112"\n"
20113"-------------\n"
20114"Running the first line above creates the following files:\n"
20115"\n"
20116"aclocal.m4\n"
20117"autom4te.cache\n"
20118"config.log\n"
20119"config.status\n"
20120"configure\n"
20121"hello-world.desktop\n"
20122"install-sh\n"
20123"missing\n"
20124"Makefile.in\n"
20125"Makefile\n"
20126"\n"
20127"Running \"make install\", installs the application in /home/your_username/.local/bin\n"
20128"and installs the hello-world.desktop file in /home/your_username/.local/share/applications\n"
20129"\n"
20130"You can now run the application by typing \"Hello World\" in the Overview.\n"
20131"\n"
20132"----------------\n"
20133"To uninstall, type:\n"
20134"\n"
20135"make uninstall\n"
20136"\n"
20137"----------------\n"
20138"To create a tarball type:\n"
20139"\n"
20140"make distcheck\n"
20141"\n"
20142"This will create hello-world-1.0.tar.xz\n"
20143
20144#. (itstool) path: info/title
20145#: C/hello-world.vala.page:9
20146msgctxt "text"
20147msgid "Hello World (Vala)"
20148msgstr "Hello World (Vala)"
20149
20150#. (itstool) path: item/p
20151#: C/hello-world.vala.page:32
20152msgid "create a small \"Hello, World\" application using GTK+"
20153msgstr "GTK+로 간단한 \"Hello, World\" 프로그램을 만듭니다"
20154
20155#. (itstool) path: section/code
20156#: C/hello-world.vala.page:45
20157#, no-wrap
20158msgid ""
20159"class MyApplication : Gtk.Application {\n"
20160"        protected override void activate () {\n"
20161"                var window = new Gtk.ApplicationWindow (this);\n"
20162"                window.set_title (\"Welcome to GNOME\");\n"
20163"                window.set_default_size (200, 100);\n"
20164"                window.show_all ();\n"
20165"        }\n"
20166"}"
20167msgstr ""
20168"class MyApplication : Gtk.Application {\n"
20169"        protected override void activate () {\n"
20170"                var window = new Gtk.ApplicationWindow (this);\n"
20171"                window.set_title (\"Welcome to GNOME\");\n"
20172"                window.set_default_size (200, 100);\n"
20173"                window.show_all ();\n"
20174"        }\n"
20175"}"
20176
20177#. (itstool) path: section/p
20178#: C/hello-world.vala.page:55
20179msgid ""
20180"We can start building our first window. We do this by creating a variable called <var>window</var> and assigning "
20181"it a new Gtk.ApplicationWindow."
20182msgstr "첫 창 만들기를 시작할 수 있습니다. <var>window</var> 변수를 만들어 Gtk.ApplicationWindow를 할당하겠습니다."
20183
20184#. (itstool) path: section/p
20185#: C/hello-world.vala.page:56
20186msgid ""
20187"We give the window a title using <code>set_title</code>. The title can be any string you want it to be. To be on "
20188"the safe side, it's best to stick to UTF-8 encoding."
20189msgstr ""
20190"<code>set_title</code>로 창 제목을 설정하겠습니다. 여러분이 원하는대로 제목을 지을 수 있습니다. 안전한 방편으로 "
20191"UTF-8 인코딩 방식으로 제목을 넣으시는게 좋습니다."
20192
20193#. (itstool) path: section/code
20194#: C/hello-world.vala.page:61
20195#, no-wrap
20196msgid ""
20197"var label = new Gtk.Label (\"Hello GNOME!\");\n"
20198"                window.add (label);\n"
20199msgstr ""
20200"var label = new Gtk.Label (\"Hello GNOME!\");\n"
20201"                window.add (label);\n"
20202
20203#. (itstool) path: section/p
20204#: C/hello-world.vala.page:65
20205msgid "Finally, we create and run the application:"
20206msgstr "마지막으로 프로그램을 만들고 실행하겠습니다:"
20207
20208#. (itstool) path: section/code
20209#: C/hello-world.vala.page:67
20210#, no-wrap
20211msgid ""
20212"int main (string[] args) {\n"
20213"        return new MyApplication ().run (args);\n"
20214"}"
20215msgstr ""
20216"int main (string[] args) {\n"
20217"        return new MyApplication ().run (args);\n"
20218"}"
20219
20220#. (itstool) path: section/title
20221#: C/hello-world.vala.page:75
20222msgid "hello-world.vala"
20223msgstr "hello-world.vala"
20224
20225#. (itstool) path: section/code
20226#: C/hello-world.vala.page:77
20227#, no-wrap
20228msgid ""
20229"public class MyApplication : Gtk.Application {\n"
20230"\tprotected override void activate () {\n"
20231"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
20232"\t\tvar label = new Gtk.Label (\"Hello GNOME!\");\n"
20233"\t\twindow.add (label);\n"
20234"\t\twindow.set_title (\"Welcome to GNOME\");\n"
20235"\t\twindow.set_default_size (200, 100);\n"
20236"\t\twindow.show_all ();\n"
20237"\t}\n"
20238"}\n"
20239"\n"
20240"public int main (string[] args) {\n"
20241"\treturn new MyApplication ().run (args);\n"
20242"}\n"
20243msgstr ""
20244"public class MyApplication : Gtk.Application {\n"
20245"\tprotected override void activate () {\n"
20246"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
20247"\t\tvar label = new Gtk.Label (\"Hello GNOME!\");\n"
20248"\t\twindow.add (label);\n"
20249"\t\twindow.set_title (\"Welcome to GNOME\");\n"
20250"\t\twindow.set_default_size (200, 100);\n"
20251"\t\twindow.show_all ();\n"
20252"\t}\n"
20253"}\n"
20254"\n"
20255"public int main (string[] args) {\n"
20256"\treturn new MyApplication ().run (args);\n"
20257"}\n"
20258
20259#. (itstool) path: section/p
20260#: C/hello-world.vala.page:81
20261msgid ""
20262"To run this application, first save it as hello-world.vala. Then open Terminal, go to the folder where your "
20263"application is stored."
20264msgstr ""
20265"이 프로그램을 실행하려면 우선 hello-world.vala로 저장하십시오. 터미널을 연 다음 프로그램을 저장한 폴더로 이동하십시"
20266"오."
20267
20268#. (itstool) path: section/p
20269#: C/hello-world.vala.page:82
20270msgid "Compile the program:"
20271msgstr "프로그램을 컴파일하시고요:"
20272
20273#. (itstool) path: section/screen
20274#: C/hello-world.vala.page:83
20275#, no-wrap
20276msgid "valac --pkg gtk+-3.0 <file>hello-world.vala</file>"
20277msgstr "valac --pkg gtk+-3.0 <file>hello-world.vala</file>"
20278
20279#. (itstool) path: section/p
20280#: C/hello-world.vala.page:84
20281msgid "Run the program:"
20282msgstr "프로그램을 실행하시죠:"
20283
20284#. (itstool) path: section/screen
20285#: C/hello-world.vala.page:85
20286#, no-wrap
20287msgid "./<var>hello-world</var>"
20288msgstr "./<var>hello-world</var>"
20289
20290#. (itstool) path: section/code
20291#: C/hello-world.vala.page:121
20292#, no-wrap
20293msgid ""
20294"# The actual runnable program is set to the SCRIPTS primitive.\n"
20295"# # Prefix bin_ tells where to copy this\n"
20296"bin_PROGRAMS = hello-world\n"
20297"hello_world_CFLAGS = $(gtk_CFLAGS)\n"
20298"hello_world_LDADD = $(gtk_LIBS)\n"
20299"hello_world_VALAFLAGS = --pkg gtk+-3.0\n"
20300"hello_world_SOURCES = hello-world.vala\n"
20301"\n"
20302"desktopdir = $(datadir)/applications\n"
20303"desktop_DATA = \\\n"
20304"\thello-world.desktop\n"
20305msgstr ""
20306"# The actual runnable program is set to the SCRIPTS primitive.\n"
20307"# # Prefix bin_ tells where to copy this\n"
20308"bin_PROGRAMS = hello-world\n"
20309"hello_world_CFLAGS = $(gtk_CFLAGS)\n"
20310"hello_world_LDADD = $(gtk_LIBS)\n"
20311"hello_world_VALAFLAGS = --pkg gtk+-3.0\n"
20312"hello_world_SOURCES = hello-world.vala\n"
20313"\n"
20314"desktopdir = $(datadir)/applications\n"
20315"desktop_DATA = \\\n"
20316"\thello-world.desktop\n"
20317
20318#. (itstool) path: section/code
20319#: C/hello-world.vala.page:126
20320#, no-wrap
20321msgid ""
20322"# This file is processed by autoconf to create a configure script\n"
20323"AC_INIT([Hello World], 1.0)\n"
20324"AM_INIT_AUTOMAKE([1.10 no-define foreign dist-xz no-dist-gzip])\n"
20325"AC_PROG_CC\n"
20326"AM_PROG_VALAC([0.16])\n"
20327"PKG_CHECK_MODULES(gtk, gtk+-3.0)\n"
20328"AC_CONFIG_FILES([Makefile hello-world.desktop])\n"
20329"\n"
20330"AC_OUTPUT\n"
20331msgstr ""
20332"# This file is processed by autoconf to create a configure script\n"
20333"AC_INIT([Hello World], 1.0)\n"
20334"AM_INIT_AUTOMAKE([1.10 no-define foreign dist-xz no-dist-gzip])\n"
20335"AC_PROG_CC\n"
20336"AM_PROG_VALAC([0.16])\n"
20337"PKG_CHECK_MODULES(gtk, gtk+-3.0)\n"
20338"AC_CONFIG_FILES([Makefile hello-world.desktop])\n"
20339"\n"
20340"AC_OUTPUT\n"
20341
20342#. (itstool) path: section/p
20343#: C/hello-world.vala.page:133
20344msgid ""
20345"When you have the <file>hello-world.c</file>, <file>hello-world.desktop.in</file>, <file>Makefile.am</file>, "
20346"<file>configure.ac</file> and <file>autogen.sh</file> files with correct information and rights, the <file>README</"
20347"file> file can include the following instructions:"
20348msgstr ""
20349"제대로 된 정보를 올바르게 갖춘 <file>hello-world.c</file>, <file>hello-world.desktop.in</file>, <file>Makefile.am</"
20350"file>, <file>configure.ac</file>, <file>autogen.sh</file> 파일을 두었다면, <file>README</file> 파일에 다음 내용을 "
20351"넣을 수 있습니다:"
20352
20353# NOTE: README에 들어가는 내용 그 자체이므로 번역할 필요가 없습니다.
20354#. (itstool) path: section/code
20355#: C/hello-world.vala.page:134
20356#, no-wrap
20357msgid ""
20358"To build and install this program:\n"
20359"\n"
20360"./autogen.sh --prefix=/home/your_username/.local\n"
20361"make\n"
20362"make install\n"
20363"\n"
20364"-------------\n"
20365"Running the first line above creates the following files:\n"
20366"\n"
20367"aclocal.m4\n"
20368"autom4te.cache\n"
20369"config.log\n"
20370"config.status\n"
20371"configure\n"
20372"depcomp\n"
20373"hello-world\n"
20374"hello-world.c\n"
20375"hello-world.desktop\n"
20376"hello_world-hello-world.o\n"
20377"hello_world_vala.stamp\n"
20378"install-sh\n"
20379"missing\n"
20380"Makefile.in\n"
20381"Makefile\n"
20382"\n"
20383"Running \"make\" links all the appropriate libraries.\n"
20384"\n"
20385"Running \"make install\", installs the application in /home/your_username/.local/bin\n"
20386"and installs the hello-world.desktop file in /home/your_username/.local/share/applications\n"
20387"\n"
20388"You can now run the application by typing \"Hello World\" in the Overview.\n"
20389"\n"
20390"----------------\n"
20391"To uninstall, type:\n"
20392"\n"
20393"make uninstall\n"
20394"\n"
20395"----------------\n"
20396"To create a tarball type:\n"
20397"\n"
20398"make distcheck\n"
20399"\n"
20400"This will create hello-world-1.0.tar.xz\n"
20401msgstr ""
20402"To build and install this program:\n"
20403"\n"
20404"./autogen.sh --prefix=/home/your_username/.local\n"
20405"make\n"
20406"make install\n"
20407"\n"
20408"-------------\n"
20409"Running the first line above creates the following files:\n"
20410"\n"
20411"aclocal.m4\n"
20412"autom4te.cache\n"
20413"config.log\n"
20414"config.status\n"
20415"configure\n"
20416"depcomp\n"
20417"hello-world\n"
20418"hello-world.c\n"
20419"hello-world.desktop\n"
20420"hello_world-hello-world.o\n"
20421"hello_world_vala.stamp\n"
20422"install-sh\n"
20423"missing\n"
20424"Makefile.in\n"
20425"Makefile\n"
20426"\n"
20427"Running \"make\" links all the appropriate libraries.\n"
20428"\n"
20429"Running \"make install\", installs the application in /home/your_username/.local/bin\n"
20430"and installs the hello-world.desktop file in /home/your_username/.local/share/applications\n"
20431"\n"
20432"You can now run the application by typing \"Hello World\" in the Overview.\n"
20433"\n"
20434"----------------\n"
20435"To uninstall, type:\n"
20436"\n"
20437"make uninstall\n"
20438"\n"
20439"----------------\n"
20440"To create a tarball type:\n"
20441"\n"
20442"make distcheck\n"
20443"\n"
20444"This will create hello-world-1.0.tar.xz\n"
20445
20446#. (itstool) path: info/title
20447#: C/image.c.page:8
20448msgctxt "text"
20449msgid "Image (C)"
20450msgstr "Image(C)"
20451
20452#. (itstool) path: info/desc
20453#: C/image.c.page:18 C/image.js.page:17 C/image.py.page:25 C/image.vala.page:18
20454msgid "A widget displaying an image"
20455msgstr "그림을 표시하는 위젯"
20456
20457#. (itstool) path: page/title
20458#: C/image.c.page:21 C/image.js.page:20 C/image.py.page:28 C/image.vala.page:21
20459msgid "Image"
20460msgstr "Image"
20461
20462#. (itstool) path: page/media
20463#. This is a reference to an external file such as an image or video. When
20464#. the file changes, the md5 hash will change to let you know you need to
20465#. update your localized copy. The msgstr is not used at all. Set it to
20466#. whatever you like once you have updated your copy of the file.
20467#: C/image.c.page:22 C/image.js.page:21 C/image.py.page:29 C/image.vala.page:22
20468msgctxt "_"
20469msgid "external ref='media/image.png' md5='9416aa74d9d6a857783f7a36338e7a02'"
20470msgstr ""
20471
20472#. (itstool) path: page/p
20473#: C/image.c.page:23 C/image.js.page:22 C/image.py.page:30 C/image.vala.page:23
20474msgid "This GtkApplication displays an image file from the current directory."
20475msgstr "이 GtkApplication에서는 현재 디렉터리의 그림파일을 보여줍니다."
20476
20477#. (itstool) path: note/p
20478#: C/image.c.page:24 C/image.js.page:23 C/image.vala.page:24
20479msgid ""
20480"If the image file isn't loaded successfully, the image will contain a \"broken image\" icon. The <file>filename."
20481"png</file> needs to be in the current directory for this code to work. Use your favorite picture!"
20482msgstr ""
20483"그림 파일을 제대로 불러오지 않았다면, 그림에 \"깨진 그림\" 아이콘이 들어갑니다. 이 코드가 동작하려면 현재 디렉터리"
20484"에 <file>filename.png</file> 파일이 있어야합니다. 원하는 그림을 사용하세요!"
20485
20486#. (itstool) path: page/code
20487#: C/image.c.page:28
20488#, no-wrap
20489msgid ""
20490"#include &lt;gtk/gtk.h&gt;\n"
20491"\n"
20492"\n"
20493"\n"
20494"static void\n"
20495"activate (GtkApplication *app,\n"
20496"          gpointer        user_data)\n"
20497"{\n"
20498"  GtkWidget *window;\n"
20499"  GtkWidget *image;\n"
20500"\n"
20501"  /*Create a window with a title and a default size*/\n"
20502"  window = gtk_application_window_new (app);\n"
20503"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
20504"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);\n"
20505"\n"
20506"  image = gtk_image_new_from_file (\"gnome-image.png\");\n"
20507"\n"
20508"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (image));\n"
20509"\n"
20510"  gtk_widget_show_all (GTK_WIDGET (window));\n"
20511"}\n"
20512"\n"
20513"\n"
20514"\n"
20515"int\n"
20516"main (int argc, char **argv)\n"
20517"{\n"
20518"  GtkApplication *app;\n"
20519"  int status;\n"
20520"\n"
20521"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
20522"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
20523"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
20524"  g_object_unref (app);\n"
20525"  return status;\n"
20526"}\n"
20527msgstr ""
20528"#include &lt;gtk/gtk.h&gt;\n"
20529"\n"
20530"\n"
20531"\n"
20532"static void\n"
20533"activate (GtkApplication *app,\n"
20534"          gpointer        user_data)\n"
20535"{\n"
20536"  GtkWidget *window;\n"
20537"  GtkWidget *image;\n"
20538"\n"
20539"  /*Create a window with a title and a default size*/\n"
20540"  window = gtk_application_window_new (app);\n"
20541"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
20542"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);\n"
20543"\n"
20544"  image = gtk_image_new_from_file (\"gnome-image.png\");\n"
20545"\n"
20546"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (image));\n"
20547"\n"
20548"  gtk_widget_show_all (GTK_WIDGET (window));\n"
20549"}\n"
20550"\n"
20551"\n"
20552"\n"
20553"int\n"
20554"main (int argc, char **argv)\n"
20555"{\n"
20556"  GtkApplication *app;\n"
20557"  int status;\n"
20558"\n"
20559"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
20560"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
20561"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
20562"  g_object_unref (app);\n"
20563"  return status;\n"
20564"}\n"
20565
20566#. (itstool) path: item/p
20567#: C/image.c.page:35
20568msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkImage.html\">GtkImage</link>"
20569msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkImage.html\">GtkImage</link>"
20570
20571#. (itstool) path: info/title
20572#: C/image.js.page:7
20573msgctxt "text"
20574msgid "Image (JavaScript)"
20575msgstr "Image (JavaScript)"
20576
20577#. (itstool) path: page/code
20578#: C/image.js.page:27
20579#, no-wrap
20580msgid ""
20581"#!/usr/bin/gjs\n"
20582"\n"
20583"imports.gi.versions.Gtk = '3.0';\n"
20584"\n"
20585"const Gio = imports.gi.Gio;\n"
20586"const GLib = imports.gi.GLib;\n"
20587"const Gtk = imports.gi.Gtk;\n"
20588"\n"
20589"class ImageExample {\n"
20590"\n"
20591"    /* Create the application itself\n"
20592"       This boilerplate code is needed to build any GTK+ application. */\n"
20593"    constructor() {\n"
20594"        this.application = new Gtk.Application ({\n"
20595"            application_id: 'org.example.jsimage',\n"
20596"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
20597"        });\n"
20598"\n"
20599"        // Connect 'activate' and 'startup' signals to the callback functions\n"
20600"        this.application.connect('activate', this._onActivate.bind(this));\n"
20601"        this.application.connect('startup', this._onStartup.bind(this));\n"
20602"    }\n"
20603"\n"
20604"    // Callback function for 'activate' signal presents windows when active\n"
20605"    _onActivate() {\n"
20606"        this._window.present();\n"
20607"    }\n"
20608"\n"
20609"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
20610"    _onStartup() {\n"
20611"        this._buildUI();\n"
20612"    }\n"
20613"\n"
20614"    // Build the application's UI\n"
20615"    _buildUI() {\n"
20616"\n"
20617"        // Create the application window\n"
20618"        this._window = new Gtk.ApplicationWindow({\n"
20619"            application: this.application,\n"
20620"            window_position: Gtk.WindowPosition.CENTER,\n"
20621"            title: \"Welcome to GNOME\",\n"
20622"            default_height: 300,\n"
20623"            default_width: 300\n"
20624"        });\n"
20625"\n"
20626"        // Create the label\n"
20627"        this.jsimage = new Gtk.Image ({file: \"gnome-image.png\"});\n"
20628"        this._window.add (this.jsimage);\n"
20629"\n"
20630"        // Show the window and all child widgets\n"
20631"        this._window.show_all();\n"
20632"    }\n"
20633"};\n"
20634"\n"
20635"// Run the application\n"
20636"let app = new ImageExample ();\n"
20637"app.application.run (ARGV);\n"
20638msgstr ""
20639"#!/usr/bin/gjs\n"
20640"\n"
20641"imports.gi.versions.Gtk = '3.0';\n"
20642"\n"
20643"const Gio = imports.gi.Gio;\n"
20644"const GLib = imports.gi.GLib;\n"
20645"const Gtk = imports.gi.Gtk;\n"
20646"\n"
20647"class ImageExample {\n"
20648"\n"
20649"    /* Create the application itself\n"
20650"       This boilerplate code is needed to build any GTK+ application. */\n"
20651"    constructor() {\n"
20652"        this.application = new Gtk.Application ({\n"
20653"            application_id: 'org.example.jsimage',\n"
20654"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
20655"        });\n"
20656"\n"
20657"        // Connect 'activate' and 'startup' signals to the callback functions\n"
20658"        this.application.connect('activate', this._onActivate.bind(this));\n"
20659"        this.application.connect('startup', this._onStartup.bind(this));\n"
20660"    }\n"
20661"\n"
20662"    // Callback function for 'activate' signal presents windows when active\n"
20663"    _onActivate() {\n"
20664"        this._window.present();\n"
20665"    }\n"
20666"\n"
20667"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
20668"    _onStartup() {\n"
20669"        this._buildUI();\n"
20670"    }\n"
20671"\n"
20672"    // Build the application's UI\n"
20673"    _buildUI() {\n"
20674"\n"
20675"        // Create the application window\n"
20676"        this._window = new Gtk.ApplicationWindow({\n"
20677"            application: this.application,\n"
20678"            window_position: Gtk.WindowPosition.CENTER,\n"
20679"            title: \"Welcome to GNOME\",\n"
20680"            default_height: 300,\n"
20681"            default_width: 300\n"
20682"        });\n"
20683"\n"
20684"        // Create the label\n"
20685"        this.jsimage = new Gtk.Image ({file: \"gnome-image.png\"});\n"
20686"        this._window.add (this.jsimage);\n"
20687"\n"
20688"        // Show the window and all child widgets\n"
20689"        this._window.show_all();\n"
20690"    }\n"
20691"};\n"
20692"\n"
20693"// Run the application\n"
20694"let app = new ImageExample ();\n"
20695"app.application.run (ARGV);\n"
20696
20697#. (itstool) path: item/p
20698#: C/image.js.page:34
20699msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Image.html\">Gtk.Image</link>"
20700msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Image.html\">Gtk.Image</link>"
20701
20702#. (itstool) path: info/title
20703#: C/image.py.page:8
20704msgctxt "text"
20705msgid "Image (Python)"
20706msgstr "Image(Python)"
20707
20708#. (itstool) path: credit/name
20709#: C/image.py.page:20
20710msgid "Sindhu S"
20711msgstr "Sindhu S"
20712
20713#. (itstool) path: credit/years
20714#: C/image.py.page:22
20715msgid "2014"
20716msgstr "2014"
20717
20718#. (itstool) path: note/p
20719#: C/image.py.page:32
20720msgid ""
20721"If the image file is not loaded successfully, the image will contain a \"broken image\" icon. <file>filename.png</"
20722"file> needs to be in the current directory for this code to work."
20723msgstr ""
20724"그림 파일을 제대로 불러오지 않았다면, 그림에 \"깨진 그림\" 아이콘이 들어갑니다. 이 코드가 동작하려면 현재 디렉터리"
20725"에 <file>filename.png</file> 파일이 있어야합니다."
20726
20727#. (itstool) path: section/code
20728#: C/image.py.page:43
20729#, no-wrap
20730msgid ""
20731"\n"
20732"  from gi.repository import Gtk\n"
20733"import sys\n"
20734"\n"
20735"\n"
20736"class MyWindow(Gtk.ApplicationWindow):\n"
20737"    # create a window\n"
20738"\n"
20739"    def __init__(self, app):\n"
20740"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
20741"        self.set_default_size(300, 300)\n"
20742"\n"
20743"        # create an image\n"
20744"        image = Gtk.Image()\n"
20745"        # set the content of the image as the file filename.png\n"
20746"        image.set_from_file(\"gnome-image.png\")\n"
20747"        # add the image to the window\n"
20748"        self.add(image)\n"
20749"\n"
20750"\n"
20751"class MyApplication(Gtk.Application):\n"
20752"\n"
20753"    def __init__(self):\n"
20754"        Gtk.Application.__init__(self)\n"
20755"\n"
20756"    def do_activate(self):\n"
20757"        win = MyWindow(self)\n"
20758"        win.show_all()\n"
20759"\n"
20760"    def do_startup(self):\n"
20761"        Gtk.Application.do_startup(self)\n"
20762"\n"
20763"app = MyApplication()\n"
20764"exit_status = app.run(sys.argv)\n"
20765"sys.exit(exit_status)\n"
20766"\n"
20767"  "
20768msgstr ""
20769"\n"
20770"  from gi.repository import Gtk\n"
20771"import sys\n"
20772"\n"
20773"\n"
20774"class MyWindow(Gtk.ApplicationWindow):\n"
20775"    # create a window\n"
20776"\n"
20777"    def __init__(self, app):\n"
20778"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
20779"        self.set_default_size(300, 300)\n"
20780"\n"
20781"        # create an image\n"
20782"        image = Gtk.Image()\n"
20783"        # set the content of the image as the file filename.png\n"
20784"        image.set_from_file(\"gnome-image.png\")\n"
20785"        # add the image to the window\n"
20786"        self.add(image)\n"
20787"\n"
20788"\n"
20789"class MyApplication(Gtk.Application):\n"
20790"\n"
20791"    def __init__(self):\n"
20792"        Gtk.Application.__init__(self)\n"
20793"\n"
20794"    def do_activate(self):\n"
20795"        win = MyWindow(self)\n"
20796"        win.show_all()\n"
20797"\n"
20798"    def do_startup(self):\n"
20799"        Gtk.Application.do_startup(self)\n"
20800"\n"
20801"app = MyApplication()\n"
20802"exit_status = app.run(sys.argv)\n"
20803"sys.exit(exit_status)\n"
20804"\n"
20805"  "
20806
20807#. (itstool) path: section/p
20808#: C/image.py.page:47
20809msgid ""
20810"Another way to obtain what we have in the example is to create the image as an instance of another class and add "
20811"it to the instance of <code>MyWindow</code> in the <code>do_activate(self)</code> method:"
20812msgstr ""
20813"우리 예제에서 그림을 다른 클래스의 인스턴스로 만들고 <code>do_activate(self)</code> 메서드에서 <code>MyWindow</"
20814"code>의 인스턴스로 초기화 하는 다른 방법이 있습니다:"
20815
20816#. (itstool) path: section/code
20817#: C/image.py.page:51
20818#, no-wrap
20819msgid ""
20820"\n"
20821"    # a class to create a window\n"
20822"    class MyWindow(Gtk.ApplicationWindow):\n"
20823"    def __init__(self, app):\n"
20824"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
20825"        self.set_default_size(300, 300)\n"
20826"\n"
20827"    # a class to create an image\n"
20828"    class MyImage(Gtk.Image):\n"
20829"    def __init__(self):\n"
20830"        Gtk.Image.__init__(self)\n"
20831"        self.set_from_file(\"gnome-image.png\")\n"
20832"\n"
20833"    class MyApplication(Gtk.Application):\n"
20834"    def __init__(self):\n"
20835"        Gtk.Application.__init__(self)\n"
20836"\n"
20837"    def do_activate(self):\n"
20838"        # create an instance of MyWindow\n"
20839"        win = MyWindow(self)\n"
20840"        # create an instance of MyImage and add it to the window\n"
20841"        win.add(MyImage())\n"
20842"        # show the window and everything on it\n"
20843"        win.show_all()\n"
20844"  "
20845msgstr ""
20846"\n"
20847"    # a class to create a window\n"
20848"    class MyWindow(Gtk.ApplicationWindow):\n"
20849"    def __init__(self, app):\n"
20850"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
20851"        self.set_default_size(300, 300)\n"
20852"\n"
20853"    # a class to create an image\n"
20854"    class MyImage(Gtk.Image):\n"
20855"    def __init__(self):\n"
20856"        Gtk.Image.__init__(self)\n"
20857"        self.set_from_file(\"gnome-image.png\")\n"
20858"\n"
20859"    class MyApplication(Gtk.Application):\n"
20860"    def __init__(self):\n"
20861"        Gtk.Application.__init__(self)\n"
20862"\n"
20863"    def do_activate(self):\n"
20864"        # create an instance of MyWindow\n"
20865"        win = MyWindow(self)\n"
20866"        # create an instance of MyImage and add it to the window\n"
20867"        win.add(MyImage())\n"
20868"        # show the window and everything on it\n"
20869"        win.show_all()\n"
20870"  "
20871
20872#. (itstool) path: note/p
20873#: C/image.py.page:78
20874msgid ""
20875"To use this code snippet, you will need to add the code that imports <code>Gtk</code> and <code>GdkPixbuf</code> "
20876"from <code>gi.repository</code> and lines that instantiate the <code>MyApplication</code> window."
20877msgstr ""
20878"이 코드 부분을 사용하려면, <code>gi.repository</code>에서 <code>Gtk</code>와 <code>GdkPixbuf</code>를 임포팅하는 코"
20879"드와 <code>MyApplication</code> 창을 초기화하는 여러 줄의 코드를 추가해야 합니다."
20880
20881#. (itstool) path: section/title
20882#: C/image.py.page:85
20883msgid "Useful methods for an Image widget"
20884msgstr "Image 위젯에 쓸만한 메서드"
20885
20886#. (itstool) path: item/p
20887#: C/image.py.page:89
20888msgid ""
20889"To load an image over a network use <code>set_from_pixbuf(pixbuf)</code>, where <code>pixbuf</code> is a <link "
20890"href=\"https://developer.gnome.org/gdk-pixbuf/unstable/index.html\"> GdkPixbuf</link>."
20891msgstr ""
20892"네트워크에서 그림을 불러오려면 <code>set_from_pixbuf(pixbuf)</code> 함수를 사용하십시오. 여기서 <code>pixbuf</code>"
20893"는 <link href=\"https://developer.gnome.org/gdk-pixbuf/unstable/index.html\"> GdkPixbuf</link>입니다."
20894
20895#. (itstool) path: item/code
20896#: C/image.py.page:93
20897#, no-wrap
20898msgid ""
20899"\n"
20900"        from gi.repository import Gtk\n"
20901"        from gi.repository import GdkPixbuf\n"
20902"        import sys\n"
20903"\n"
20904"        class MyWindow(Gtk.ApplicationWindow):\n"
20905"            # create a window\n"
20906"            def __init__(self, app):\n"
20907"                Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
20908"                self.set_default_size(300, 300)\n"
20909"\n"
20910"                # create a pixbuf from file filename=\"gnome-image.png\", with width=32\n"
20911"                # and height=64 amd boolean preserve_aspect_ratio=False.\n"
20912"                pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(\"gnome-image.png\", 64, 128, False)\n"
20913"\n"
20914"                # create an image\n"
20915"                image = Gtk.Image()\n"
20916"                # set the content of the image as the pixbuf\n"
20917"                image.set_from_pixbuf(pixbuf)\n"
20918"                # add the image to the window\n"
20919"                self.add(image)\n"
20920"        "
20921msgstr ""
20922"\n"
20923"        from gi.repository import Gtk\n"
20924"        from gi.repository import GdkPixbuf\n"
20925"        import sys\n"
20926"\n"
20927"        class MyWindow(Gtk.ApplicationWindow):\n"
20928"            # create a window\n"
20929"            def __init__(self, app):\n"
20930"                Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
20931"                self.set_default_size(300, 300)\n"
20932"\n"
20933"                # create a pixbuf from file filename=\"gnome-image.png\", with width=32\n"
20934"                # and height=64 amd boolean preserve_aspect_ratio=False.\n"
20935"                pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(\"gnome-image.png\", 64, 128, False)\n"
20936"\n"
20937"                # create an image\n"
20938"                image = Gtk.Image()\n"
20939"                # set the content of the image as the pixbuf\n"
20940"                image.set_from_pixbuf(pixbuf)\n"
20941"                # add the image to the window\n"
20942"                self.add(image)\n"
20943"        "
20944
20945#. (itstool) path: item/p
20946#: C/image.py.page:115
20947msgid ""
20948"If <code>preserve_aspect_ratio=True</code> we can use <code>new_from_file_at_size(filename, width, height)</code>. "
20949"If <code>width</code> or <code>height</code> is <code>-1</code>, it is not constrained."
20950msgstr ""
20951"<code>preserve_aspect_ratio=True</code>이면, <code>new_from_file_at_size(filename, width, height)</code> 함수를 사"
20952"용할 수 있습니다. <code>width</code> 또는 <code>height</code> 값이 <code>-1</code>이면 제약을 받지 않습니다."
20953
20954#. (itstool) path: item/p
20955#: C/image.py.page:119
20956msgid ""
20957"For loading from an input stream, see <code>new_from_stream()</code> and <code>new_from_stream_at_scale()</code> "
20958"in the documentation."
20959msgstr ""
20960"입력 스트림에서 불러오는 방법을 알아보려면, 문서에서 <code>new_from_stream()</code>함수와 "
20961"<code>new_from_stream_at_scale()</code>함수 내용을 참고하십시오."
20962
20963#. (itstool) path: item/p
20964#: C/image.py.page:131
20965msgid "<link href=\"https://developer.gnome.org/gtk3/unstable/GtkImage.html\"> GtkImage</link>"
20966msgstr "<link href=\"https://developer.gnome.org/gtk3/unstable/GtkImage.html\"> GtkImage</link>"
20967
20968#. (itstool) path: item/p
20969#: C/image.py.page:135
20970msgid "<link href=\"https://developer.gnome.org/gtk3/unstable/GtkWindow.html\"> GtkWindow</link>"
20971msgstr "<link href=\"https://developer.gnome.org/gtk3/unstable/GtkWindow.html\"> GtkWindow</link>"
20972
20973#. (itstool) path: info/title
20974#: C/image.vala.page:8
20975msgctxt "text"
20976msgid "Image (Vala)"
20977msgstr "Image(Vala)"
20978
20979#. (itstool) path: page/code
20980#: C/image.vala.page:27
20981#, no-wrap
20982msgid ""
20983"public class MyWindow : Gtk.ApplicationWindow {\n"
20984"\tinternal MyWindow (MyApplication app) {\n"
20985"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
20986"\n"
20987"\t\tvar image = new Gtk.Image ();\n"
20988"\t\timage.set_from_file (\"gnome-image.png\");\n"
20989"\t\tthis.add (image);\n"
20990"\t\tthis.set_default_size (300, 300);\n"
20991"\t}\n"
20992"}\n"
20993"\n"
20994"public class MyApplication : Gtk.Application {\n"
20995"\tprotected override void activate () {\n"
20996"\t\tnew MyWindow (this).show_all ();\n"
20997"\t}\n"
20998"\n"
20999"\tinternal MyApplication () {\n"
21000"\t\tObject (application_id: \"org.example.MyApplication\");\n"
21001"\t}\n"
21002"}\n"
21003"\n"
21004"public int main (string[] args) {\n"
21005"\treturn new MyApplication ().run (args);\n"
21006"}\n"
21007msgstr ""
21008"public class MyWindow : Gtk.ApplicationWindow {\n"
21009"\tinternal MyWindow (MyApplication app) {\n"
21010"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
21011"\n"
21012"\t\tvar image = new Gtk.Image ();\n"
21013"\t\timage.set_from_file (\"gnome-image.png\");\n"
21014"\t\tthis.add (image);\n"
21015"\t\tthis.set_default_size (300, 300);\n"
21016"\t}\n"
21017"}\n"
21018"\n"
21019"public class MyApplication : Gtk.Application {\n"
21020"\tprotected override void activate () {\n"
21021"\t\tnew MyWindow (this).show_all ();\n"
21022"\t}\n"
21023"\n"
21024"\tinternal MyApplication () {\n"
21025"\t\tObject (application_id: \"org.example.MyApplication\");\n"
21026"\t}\n"
21027"}\n"
21028"\n"
21029"public int main (string[] args) {\n"
21030"\treturn new MyApplication ().run (args);\n"
21031"}\n"
21032
21033#. (itstool) path: item/p
21034#: C/image.vala.page:32 C/separator.vala.page:40
21035msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Application.html\">GtkApplication</link>"
21036msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Application.html\">GtkApplication</link>"
21037
21038#. (itstool) path: item/p
21039#: C/image.vala.page:33
21040msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ApplicationWindow.html\">GtkApplicationWindow</link>"
21041msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ApplicationWindow.html\">GtkApplicationWindow</link>"
21042
21043#. (itstool) path: item/p
21044#: C/image.vala.page:34 C/paned.vala.page:38
21045msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Image.html\">GtkImage</link>"
21046msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Image.html\">GtkImage</link>"
21047
21048#. (itstool) path: info/title
21049#: C/image-viewer.c.page:8
21050msgctxt "text"
21051msgid "Image viewer (C)"
21052msgstr "그림 보기(C)"
21053
21054#. (itstool) path: info/desc
21055#: C/image-viewer.c.page:11
21056msgid "A little bit more than a simple \"Hello world\" Gtk application."
21057msgstr "간단한 \"Hello world\" Gtk 프로그램에 약간의 무언가가 더 들어갑니다."
21058
21059#. (itstool) path: page/title
21060#: C/image-viewer.c.page:29 C/image-viewer.cpp.page:27 C/image-viewer.js.page:29 C/image-viewer.py.page:29
21061#: C/image-viewer.vala.page:37
21062msgid "Image viewer"
21063msgstr "그림 보기"
21064
21065#. (itstool) path: synopsis/p
21066#: C/image-viewer.c.page:32 C/image-viewer.cpp.page:30 C/message-board.c.page:29 C/record-collection.js.page:32
21067msgid "In this tutorial, you will learn:"
21068msgstr "이 지침서를 통해 다음을 배웁니다:"
21069
21070#. (itstool) path: item/p
21071#: C/image-viewer.c.page:34
21072msgid "Some basic concepts of C/GObject programming"
21073msgstr "C/GObject 프로그래밍 일부 기본 개념"
21074
21075#. (itstool) path: item/p
21076#: C/image-viewer.c.page:35
21077msgid "How to write a Gtk application in C"
21078msgstr "C 언어로 Gtk 프로그램을 작성하는 방법"
21079
21080#. (itstool) path: page/media
21081#. This is a reference to an external file such as an image or video. When
21082#. the file changes, the md5 hash will change to let you know you need to
21083#. update your localized copy. The msgstr is not used at all. Set it to
21084#. whatever you like once you have updated your copy of the file.
21085#: C/image-viewer.c.page:39 C/image-viewer.cpp.page:37 C/image-viewer.js.page:47 C/image-viewer.py.page:46
21086#: C/image-viewer.vala.page:54
21087msgctxt "_"
21088msgid "external ref='media/image-viewer.png' md5='7720360611243b14283b83527be968c2'"
21089msgstr ""
21090
21091#. (itstool) path: item/p
21092#: C/image-viewer.c.page:49
21093msgid ""
21094"Choose <gui>GTK+ (Simple)</gui> from the <gui>C</gui> tab, click <gui>Continue</gui>, and fill out your details on "
21095"the next few pages. Use <file>image-viewer</file> as project name and directory."
21096msgstr ""
21097"<gui>C</gui> 탭에서 <gui>GTK+ (단순)</gui>를 선택하고, <gui>계속</gui>을 누른 다음, 나타난 페이지에서 몇가지 자세"
21098"한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>image-viewer</file>를 입력하십시오."
21099
21100#. (itstool) path: item/p
21101#: C/image-viewer.c.page:52
21102msgid ""
21103"Make sure that <gui>Use GtkBuilder for user interface</gui> is disabled as we will create the UI manually in this "
21104"tutorial. Check the <link xref=\"guitar-tuner.c\">Guitar-Tuner</link> tutorial if you want to learn how to use the "
21105"interface builder."
21106msgstr ""
21107"앞서 따라하기 지침을 통해 사용자 인터페이스를 직접 만들 예정이므로 <gui>사용자 인터페이스에 GtkBuilder 사용</gui> "
21108"설정을 껐는지 확인하십시오. 인터페이스 빌더 사용법을 알아보려면 <link xref=\"guitar-tuner.c\">기타 조율 프로그램</"
21109"link> 따라하기 지침서를 확인하십시오."
21110
21111#. (itstool) path: section/p
21112#: C/image-viewer.c.page:67
21113msgid ""
21114"C is a rather verbose language, so don't be surprised that the file contains quite a lot of code. Most of it is "
21115"template code. It loads an (empty) window and shows it. More details are given below; skip this list if you "
21116"understand the basics:"
21117msgstr ""
21118"C는 장황하게 하나하나 다 따지고 들어가야 하는 언어니, 좀 많은 코드가 들어가 있는 파일에 놀라지 않으셔도 됩니다. 대"
21119"부분은 서식 코드입니다. 이 코드에서는 (빈) 창을 불러와 열고 화면에 나타냅니다. 자세한 내용은 아래에 있습니다. 기본"
21120"을 이미 알고 있다면 이 부분은 건너뛰십시오:"
21121
21122#. (itstool) path: item/p
21123#: C/image-viewer.c.page:74
21124msgid ""
21125"The <code>create_window</code> function creates a new (empty) window and connects a signal to exit the application "
21126"when that window is closed."
21127msgstr ""
21128"<code>create_window</code> 함수는 (비어있는) 새 창을 만들고 창을 닫을 때 프로그램을 빠져나갈 시그널을 연결합니다."
21129
21130#. (itstool) path: section/title
21131#: C/image-viewer.c.page:90 C/image-viewer.cpp.page:87 C/image-viewer.vala.page:139
21132msgid "Creating the user interface"
21133msgstr "사용자 인터페이스 만들기"
21134
21135#. (itstool) path: section/p
21136#: C/image-viewer.c.page:91
21137msgid ""
21138"Now we will bring life into the empty window. GTK organizes the user interface with <code>GtkContainer</code>s "
21139"that can contain other widgets and even other containers. Here we will use the simplest available container, a "
21140"<code>GtkBox</code>:"
21141msgstr ""
21142"이제 비어있는 창에 숨결을 불어넣겠습니다. GTK는 다른 위젯을 넣을 수 있고 다른 컨테이너도 넣을 수 있는 "
21143"<code>GtkContainer</code>로  사용자 인터페이스를 모아둡니다. 여기서는 여러가지 컨테이너 중 가장 간단한 "
21144"<code>GtkBox</code>를 사용하겠습니다:"
21145
21146#. (itstool) path: section/code
21147#: C/image-viewer.c.page:94
21148#, no-wrap
21149msgid ""
21150"\n"
21151"static GtkWidget*\n"
21152"create_window (void)\n"
21153"{\n"
21154"\tGtkWidget *window;\n"
21155"\tGtkWidget *button;\n"
21156"\tGtkWidget *image;\n"
21157"\tGtkWidget *box;\n"
21158"\n"
21159"\t/* Set up the UI */\n"
21160"\twindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);\n"
21161"\tgtk_window_set_title (GTK_WINDOW (window), \"image-viewer-c\");\n"
21162"\n"
21163"\tbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);\n"
21164"\tbutton = gtk_button_new_with_label (_(\"Open image\"));\n"
21165"\timage = gtk_image_new ();\n"
21166"\n"
21167"\tgtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0);\n"
21168"\tgtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);\n"
21169"\n"
21170"\tgtk_container_add (GTK_CONTAINER (window), box);\n"
21171"\n"
21172"\t/* Connect signals */\n"
21173"\n"
21174"\t/* Show open dialog when opening a file */\n"
21175"\tg_signal_connect (button, \"clicked\", G_CALLBACK (on_open_image), image);\n"
21176"\n"
21177"\t/* Exit when the window is closed */\n"
21178"\tg_signal_connect (window, \"destroy\", G_CALLBACK (gtk_main_quit), NULL);\n"
21179"\n"
21180"\treturn window;\n"
21181"}\n"
21182msgstr ""
21183"\n"
21184"static GtkWidget*\n"
21185"create_window (void)\n"
21186"{\n"
21187"\tGtkWidget *window;\n"
21188"\tGtkWidget *button;\n"
21189"\tGtkWidget *image;\n"
21190"\tGtkWidget *box;\n"
21191"\n"
21192"\t/* Set up the UI */\n"
21193"\twindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);\n"
21194"\tgtk_window_set_title (GTK_WINDOW (window), \"image-viewer-c\");\n"
21195"\n"
21196"\tbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);\n"
21197"\tbutton = gtk_button_new_with_label (_(\"Open image\"));\n"
21198"\timage = gtk_image_new ();\n"
21199"\n"
21200"\tgtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0);\n"
21201"\tgtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);\n"
21202"\n"
21203"\tgtk_container_add (GTK_CONTAINER (window), box);\n"
21204"\n"
21205"\t/* Connect signals */\n"
21206"\n"
21207"\t/* Show open dialog when opening a file */\n"
21208"\tg_signal_connect (button, \"clicked\", G_CALLBACK (on_open_image), image);\n"
21209"\n"
21210"\t/* Exit when the window is closed */\n"
21211"\tg_signal_connect (window, \"destroy\", G_CALLBACK (gtk_main_quit), NULL);\n"
21212"\n"
21213"\treturn window;\n"
21214"}\n"
21215
21216#. (itstool) path: item/p
21217#: C/image-viewer.c.page:129
21218msgid ""
21219"The first lines create the widgets we want to use: a button for opening up an image, the image view widget itself "
21220"and the box we will use as a container. The macros like <code>GTK_BOX</code> are used for dynamic type checking "
21221"and casting which is needed as C doesn't support object-orientation out-of-the-box."
21222msgstr ""
21223"첫 줄은 우리가 쓰려는 그림을 여는 단추, 그림 보기 위젯 그 자체, 컨테이너로 쓸 박스 위젯을 만듭니다. <code>GTK_BOX</"
21224"code> 같은 매크로는 동적 자료형 검사와 객체지향을 지원하지 않는 C 언어에서 특별하게 캐스팅할 목적으로 사용합니다."
21225
21226#. (itstool) path: item/p
21227#: C/image-viewer.c.page:134
21228msgid ""
21229"The calls to <code>gtk_box_pack_start</code> add the two widgets to the box and define their behaviour. The image "
21230"will expand into any available space while the button will just be as big as needed. You will notice that we don't "
21231"set explicit sizes on the widgets. In GTK this is usually not needed as it makes it much easier to have a layout "
21232"that looks good in different window sizes. Next, the box is added to the window."
21233msgstr ""
21234"<code>gtk_box_pack_start</code> 호출로 박스에 두 위젯을 추가하고 동작을 정의합니다. 그림은 활용 가능한 공간만큼 충"
21235"분히 확장하고, 단추는 필요한 만큼만 커집니다. 위젯의 크기를 분명하게 설정하지 않음을 알아채셨을 겁니다. GTK에서는 "
21236"창 크기가 달라져도 보기 좋은 배치를 쉽게하기에 직접 설정할 필요가 없습니다. 이 과정이 끝나면 박스를 창에 추가합니"
21237"다."
21238
21239#. (itstool) path: item/p
21240#: C/image-viewer.c.page:140
21241msgid ""
21242"We need to define what happens when the user clicks on the button. GTK uses the concept of <em>signals</em>. When "
21243"the button is clicked, it fires the <em>clicked</em> signal, which we can connect to some action. This is done "
21244"using the <code>g_signal_connect</code> function which tells GTK to call the <code>on_image_open</code> function "
21245"when the button is clicked and to pass the image as an additional argument to that function. We will define the "
21246"<em>callback</em> in the next section."
21247msgstr ""
21248"단추를 사용자가 눌렀을 때 어떤 일이 일어날 지 정해야합니다. GTK는 <em>시그널</em> 개념을 활용합니다. 단추를 누르"
21249"면, 어떤 동작과 연결할 수 있는 <em>clicked</em> 시그널을 방출합니다. 사용자가 단추를 누르면  <code>on_image_open</"
21250"code> 함수를 호출하여 그림을 이 함수의 인자로 전달하라고 GTK에 지시할 때 <code>g_signal_connect</code> 함수를 사용"
21251"하면 됩니다. 다음 섹션에서 <em>콜백</em>을 정의하겠습니디."
21252
21253#. (itstool) path: item/p
21254#: C/image-viewer.c.page:145
21255msgid "The last <code>g_signal_connect()</code> makes sure that the application exits when the window is closed."
21256msgstr "마지막 <code>g_signal_connect()</code> 함수에서는 창을 닫을 때 프로그램을 빠져나갈지를 확인합니다."
21257
21258#. (itstool) path: item/p
21259#: C/image-viewer.c.page:148
21260msgid ""
21261"As a last step, make sure to replace the <code>gtk_widget_show</code> call in the <code>main()</code> function by "
21262"<code>gtk_widget_show_all()</code> to show the window and all the widgets it contains."
21263msgstr ""
21264"마지막 단계에서는 창과 창이 담고 있는 모든 위젯을 보여줄 <code>main()</code> 함수의 <code>gtk_widget_show</code> 호"
21265"출을<code>gtk_widget_show_all()</code> 함수로 바꾸었는지 확인하십시오."
21266
21267#. (itstool) path: section/title
21268#: C/image-viewer.c.page:155 C/image-viewer.cpp.page:142 C/image-viewer.vala.page:210
21269msgid "Showing the image"
21270msgstr "그림 표시"
21271
21272#. (itstool) path: section/p
21273#: C/image-viewer.c.page:156
21274msgid ""
21275"We will now define the signal handler for the <em>clicked</em> signal or the button we mentioned before. Add this "
21276"code before the <code>create_window()</code> method."
21277msgstr ""
21278"<em>clicked</em> 시그널이나 위에서 전에 언급한 단추의 시그널 핸들러를 정의하겠습니다. <code>create_window()</code> "
21279"메서드 전에 이 코드를 추가하십시오."
21280
21281#. (itstool) path: section/code
21282#: C/image-viewer.c.page:159
21283#, no-wrap
21284msgid ""
21285"\n"
21286"static void\n"
21287"on_open_image (GtkButton* button, gpointer user_data)\n"
21288"{\n"
21289"\tGtkWidget *image = GTK_WIDGET (user_data);\n"
21290"\tGtkWidget *toplevel = gtk_widget_get_toplevel (image);\n"
21291"\tGtkFileFilter *filter = gtk_file_filter_new ();\n"
21292"\tGtkWidget *dialog = gtk_file_chooser_dialog_new (_(\"Open image\"),\n"
21293"\t                                                 GTK_WINDOW (toplevel),\n"
21294"\t                                                 GTK_FILE_CHOOSER_ACTION_OPEN,\n"
21295"\t                                                 GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,\n"
21296"\t                                                 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,\n"
21297"\t                                                 NULL);\n"
21298"\n"
21299"\tgtk_file_filter_add_pixbuf_formats (filter);\n"
21300"\tgtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog),\n"
21301"\t                             filter);\n"
21302"\n"
21303"\tswitch (gtk_dialog_run (GTK_DIALOG (dialog)))\n"
21304"\t{\n"
21305"\t\tcase GTK_RESPONSE_ACCEPT:\n"
21306"\t\t{\n"
21307"\t\t\tgchar *filename =\n"
21308"\t\t\t\tgtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));\n"
21309"\t\t\tgtk_image_set_from_file (GTK_IMAGE (image), filename);\n"
21310"\t\t\tbreak;\n"
21311"\t\t}\n"
21312"\t\tdefault:\n"
21313"\t\t\tbreak;\n"
21314"\t}\n"
21315"\tgtk_widget_destroy (dialog);\n"
21316"}\n"
21317msgstr ""
21318"\n"
21319"static void\n"
21320"on_open_image (GtkButton* button, gpointer user_data)\n"
21321"{\n"
21322"\tGtkWidget *image = GTK_WIDGET (user_data);\n"
21323"\tGtkWidget *toplevel = gtk_widget_get_toplevel (image);\n"
21324"\tGtkFileFilter *filter = gtk_file_filter_new ();\n"
21325"\tGtkWidget *dialog = gtk_file_chooser_dialog_new (_(\"Open image\"),\n"
21326"\t                                                 GTK_WINDOW (toplevel),\n"
21327"\t                                                 GTK_FILE_CHOOSER_ACTION_OPEN,\n"
21328"\t                                                 GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,\n"
21329"\t                                                 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,\n"
21330"\t                                                 NULL);\n"
21331"\n"
21332"\tgtk_file_filter_add_pixbuf_formats (filter);\n"
21333"\tgtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog),\n"
21334"\t                             filter);\n"
21335"\n"
21336"\tswitch (gtk_dialog_run (GTK_DIALOG (dialog)))\n"
21337"\t{\n"
21338"\t\tcase GTK_RESPONSE_ACCEPT:\n"
21339"\t\t{\n"
21340"\t\t\tgchar *filename =\n"
21341"\t\t\t\tgtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));\n"
21342"\t\t\tgtk_image_set_from_file (GTK_IMAGE (image), filename);\n"
21343"\t\t\tbreak;\n"
21344"\t\t}\n"
21345"\t\tdefault:\n"
21346"\t\t\tbreak;\n"
21347"\t}\n"
21348"\tgtk_widget_destroy (dialog);\n"
21349"}\n"
21350
21351#. (itstool) path: section/p
21352#: C/image-viewer.c.page:192 C/image-viewer.cpp.page:178 C/image-viewer.js.page:283 C/image-viewer.py.page:197
21353msgid "This is a bit more complicated than anything we've attempted so far, so let's break it down:"
21354msgstr "지금까지 우리가 다루어왔던 어떤 코드보다 조금 복잡하니 하나씩 뜯어보도록 하겠습니다:"
21355
21356#. (itstool) path: item/p
21357#: C/image-viewer.c.page:194
21358msgid ""
21359"The first argument of the signal is always the widget that sent the signal. Sometimes other arguments related to "
21360"the signal come after that, but <em>clicked</em> doesn't have any. Next is the <code>user_data</code> argument "
21361"which is a pointer to the data we passed when connecting the signal. In this case it is our <code>GtkImage</code> "
21362"object."
21363msgstr ""
21364"시그널의 첫 인자는 언제나 시그널로 보낼 위젯입니다. 때로는 시그널과 관련된 다른 인자가 오기도 하지만, <em>clicked</"
21365"em> 시그널은 그렇지 않습니다. 그 다음은 시그널을 연결할 때 우리가 넘길 데이터를 가리키는 <code>user_data</code> 포"
21366"인터 인자입니다. 이 경우 <code>GtkImage</code> 객체입니다."
21367
21368#. (itstool) path: item/p
21369#: C/image-viewer.c.page:200
21370msgid ""
21371"The next interesting line is where the dialog for choosing the file is created using "
21372"<code>gtk_file_chooser_dialog_new</code>. The function takes the title of the dialog, the parent window of the "
21373"dialog and several options like the number of buttons and their corresponding values."
21374msgstr ""
21375"다음 관심을 가질 부분에서는 <code>gtk_file_chooser_dialog_new</code>를 사용하여 선택한 파일을 만드는 대화상자입니"
21376"다. 함수에서는 대화상자 제목, 대화상자의 상위 창, 여러 단추에 관련된 값 같은 다양한 옵션을 취합니다."
21377
21378#. (itstool) path: item/p
21379#: C/image-viewer.c.page:204 C/image-viewer.cpp.page:186 C/image-viewer.js.page:290 C/image-viewer.py.page:204
21380msgid ""
21381"Notice that we are using <em>stock</em> button names from Gtk, instead of manually typing \"Cancel\" or \"Open\". "
21382"The advantage of using stock names is that the button labels will already be translated into the user's language."
21383msgstr ""
21384"참고로 \"취소\", \"열기\"를 직접 입력하는 대신, Gtk에서 <em>stock</em> 단추 이름을 활용합니다  스톡 이름은 사용자"
21385"가 쓰는 언어로 미리 번역해둔 단추 레이블을 활용한다는 점입니다."
21386
21387#. (itstool) path: item/p
21388#: C/image-viewer.c.page:207
21389msgid ""
21390"The next two lines restrict the <gui>Open</gui> dialog to only display files which can be opened by GtkImage. A "
21391"filter object is created first; we then add all kinds of files supported by <code>GdkPixbuf</code> (which includes "
21392"most image formats like PNG and JPEG) to the filter. Finally, we set this filter to be the <gui>Open</gui> "
21393"dialog's filter."
21394msgstr ""
21395"다음 두 줄은 <gui>열기</gui> 대화 상자에서 GtkImage로만 열 수 있는 파일을 표시하도록 제한합니다. 필터 객체를 우선 "
21396"만듭니다. 그 다음 <code>GdkPixbuf</code>에서 지원하는 파일 종류(PNG와 JPEG 같은 대부분의 그림 형식)를 필터에 추가합"
21397"니다. 마지막으로 이 필터를 <gui>열기</gui> 대화 상자의 필터로 설정합니다."
21398
21399#. (itstool) path: item/p
21400#: C/image-viewer.c.page:210
21401msgid ""
21402"<code>gtk_dialog_run</code> displays the <gui>Open</gui> dialog. The dialog will wait for the user to choose an "
21403"image; when they do, <code>gtk_dialog_run</code> will return the value <code>GTK_RESPONSE_ACCEPT</code> (it would "
21404"return <code>GTK_RESPONSE_CANCEL</code> if the user clicked <gui>Cancel</gui>). The <code>switch</code> statement "
21405"tests for this."
21406msgstr ""
21407"<code>gtk_dialog_run</code>는 <gui>Open</gui> 대화상자를 보여줍니다. 대화상자는 사용자의 그림 선택을 기다립니다. 사"
21408"용자가 그림을 선택하면 <code>gtk_dialog_run</code> 함수에서 <code>GTK_RESPONSE_ACCEPT</code> 값을 반환합니다(사용자"
21409"가 <gui>취소</gui>를 누르면 <code>GTK_RESPONSE_CANCEL</code> 값을 반환합니다). <code>switch</code> 구문은 이 값을 "
21410"확인합니다."
21411
21412#. (itstool) path: item/p
21413#: C/image-viewer.c.page:212
21414msgid ""
21415"Assuming that the user did click <gui>Open</gui>, the next line sets the <code>file</code> property of the "
21416"GtkImage to the filename of the image selected by the user. The GtkImage will then load and display the chosen "
21417"image."
21418msgstr ""
21419"사용자가 <gui>열기</gui>를 눌렀다고 한 상황에서, 다음 줄에서 GtkImage의 <code>file</code> 속성 값을 사용자가 선택"
21420"한 그림 파일 이름으로 설정합니다. GtkImage는 선택한 그림을 불러오고 화면에 표시합니다."
21421
21422#. (itstool) path: item/p
21423#: C/image-viewer.c.page:215
21424msgid ""
21425"In the final line of this method, we destroy the <gui>Open</gui> dialog because we don't need it any more. "
21426"Destroying automatically hides the dialog."
21427msgstr ""
21428"이 메서드의 마지막 줄에서는 <gui>열기</gui> 대화상자는 더 이상 필요 없으니 해체합니다. 해체할 때 대화 상자를 자동으"
21429"로 숩깁니다."
21430
21431#. (itstool) path: section/p
21432#: C/image-viewer.c.page:224 C/image-viewer.cpp.page:212
21433msgid ""
21434"If you haven't already done so, choose the <file>Debug/src/image-viewer</file> application in the dialog that "
21435"appears. Finally, hit <gui>Run</gui> and enjoy!"
21436msgstr ""
21437"아직 끝나지 않았다면, 화면에 나타나는 대화상자에서 <file>Debug/src/image-viewer</file> 프로그램을 선택하십시오. 마"
21438"지막으로 <gui>실행</gui>을 누르고 즐기세요!"
21439
21440#. (itstool) path: section/p
21441#: C/image-viewer.c.page:229
21442msgid ""
21443"If you run into problems with the tutorial, compare your code with this <link href=\"image-viewer/image-viewer.c"
21444"\">reference code</link>."
21445msgstr ""
21446"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"image-viewer/image-viewer.c\">참조 코드</link>와 여러"
21447"분의 코드를 비교해보십시오."
21448
21449#. (itstool) path: item/p
21450#: C/image-viewer.c.page:237 C/image-viewer.cpp.page:225 C/image-viewer.js.page:325 C/image-viewer.py.page:239
21451#: C/image-viewer.vala.page:298
21452msgid ""
21453"Have the user select a directory rather than a file, and provide controls to cycle through all of the images in a "
21454"directory."
21455msgstr ""
21456"파일을 선택하기 보단 디렉터리를 선택하게 하고, 디렉터리의 모든 그림을 보여줄 수 있는 컨트롤을 제어 기능을 제공합니"
21457"다."
21458
21459#. (itstool) path: item/p
21460#: C/image-viewer.c.page:240 C/image-viewer.cpp.page:228 C/image-viewer.js.page:328 C/image-viewer.py.page:242
21461#: C/image-viewer.vala.page:301
21462msgid ""
21463"Apply random filters and effects to the image when it is loaded and allow the user to save the modified image."
21464msgstr "사용자가 그림을 불러오고 수정한 그림을 저장할 때 임의 필터와 효과를 그림에 적용하십시오."
21465
21466#. (itstool) path: item/p
21467#: C/image-viewer.c.page:241 C/image-viewer.cpp.page:229 C/image-viewer.js.page:329 C/image-viewer.py.page:243
21468#: C/image-viewer.vala.page:302
21469msgid "<link href=\"http://www.gegl.org/api.html\">GEGL</link> provides powerful image manipulation capabilities."
21470msgstr "<link href=\"http://www.gegl.org/api.html\">GEGL</link>에서는 강력한 그림 편집 기능을 제공합니다."
21471
21472#. (itstool) path: item/p
21473#: C/image-viewer.c.page:244 C/image-viewer.cpp.page:232 C/image-viewer.js.page:332 C/image-viewer.py.page:246
21474#: C/image-viewer.vala.page:305
21475msgid "Allow the user to load images from network shares, scanners, and other more complicated sources."
21476msgstr "네트워크 공유, 스캐너, 다른 복잡한 공급원에서 그림을 불러올 수 있습니다."
21477
21478#. (itstool) path: item/p
21479#: C/image-viewer.c.page:245 C/image-viewer.cpp.page:233 C/image-viewer.js.page:333 C/image-viewer.py.page:247
21480#: C/image-viewer.vala.page:306
21481msgid ""
21482"You can use <link href=\"http://library.gnome.org/devel/gio/unstable/\">GIO</link> to handle network file "
21483"transfers and the like, and <link href=\"http://library.gnome.org/devel/gnome-scan/unstable/\">GNOME Scan</link> "
21484"to handle scanning."
21485msgstr ""
21486"네트워크 파일 전송 같은 동작을 처리할 때 <link href=\"http://library.gnome.org/devel/gio/unstable/\">GIO</link>를 "
21487"사용할 수 있습니다. 그리고 스캐너를 다룰 때는 <link href=\"http://library.gnome.org/devel/gnome-scan/unstable/\">그"
21488"놈 스캔</link>을 활용하시면 됩니다."
21489
21490#. (itstool) path: info/desc
21491#: C/image-viewer.cpp.page:9
21492msgid "A little bit more than a simple \"Hello world\" GTKmm application."
21493msgstr "간단한 \"Hello world\" Gtkmm 프로그램에 약간의 무언가가 더 들어갑니다."
21494
21495#. (itstool) path: item/p
21496#: C/image-viewer.cpp.page:32
21497msgid "Some basic concepts of C++/GObject programming"
21498msgstr "C++/GObject 프로그래밍 일부 기본 개념"
21499
21500#. (itstool) path: item/p
21501#: C/image-viewer.cpp.page:33
21502msgid "How to write a Gtk application in C++"
21503msgstr "C++ 프로그래밍 언어로 Gtk 프로그램을 작성하는 방법"
21504
21505#. (itstool) path: item/p
21506#: C/image-viewer.cpp.page:47
21507msgid ""
21508"Choose <gui>GTKmm (Simple)</gui> from the <gui>C++</gui> tab, click <gui>Forward</gui>, and fill out your details "
21509"on the next few pages. Use <file>image-viewer</file> as project name and directory."
21510msgstr ""
21511"<gui>C++</gui> 탭에서 <gui>GTKmm (단순)</gui>을 선택하고, <gui>계속</gui>을 누른 다음, 나타난 페이지에서 몇가지 자"
21512"세한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>image-viewer</file>를 입력하십시오."
21513
21514#. (itstool) path: item/p
21515#: C/image-viewer.cpp.page:50
21516msgid ""
21517"Make sure that <gui>Use GtkBuilder for user interface</gui> is disabled as we will create the UI manually in this "
21518"tutorial. Check the <link xref=\"guitar-tuner.cpp\">Guitar-Tuner</link> tutorial if you want to learn how to use "
21519"the interface builder."
21520msgstr ""
21521"앞서 따라하기 지침을 통해 사용자 인터페이스를 직접 만들 예정이므로 <gui>사용자 인터페이스에 GtkBuilder 사용</gui> "
21522"설정을 껐는지 확인하십시오. 인터페이스 빌더 사용법을 알아보려면 <link xref=\"guitar-tuner.cpp\">기타 조율 프로그램"
21523"</link> 따라하기 지침서를 확인하십시오."
21524
21525#. (itstool) path: item/p
21526#: C/image-viewer.cpp.page:55
21527msgid ""
21528"Click <gui>Apply</gui> and the project will be created for you. Open <file>src/main.cc</file> from the "
21529"<gui>Project</gui> or <gui>File</gui> tabs. You should see some code which starts with the lines:"
21530msgstr ""
21531"<gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/main.cc</"
21532"file> 파일을 여십시오. 다음 줄로 시작하는 일부 코드를 볼 수 있습니다:"
21533
21534#. (itstool) path: item/code
21535#: C/image-viewer.cpp.page:56
21536#, no-wrap
21537msgid ""
21538"\n"
21539"#include &lt;gtkmm.h&gt;\n"
21540"#include &lt;iostream&gt;\n"
21541"\n"
21542"#include \"config.h\"&gt;"
21543msgstr ""
21544"\n"
21545"#include &lt;gtkmm.h&gt;\n"
21546"#include &lt;iostream&gt;\n"
21547"\n"
21548"#include \"config.h\"&gt;"
21549
21550#. (itstool) path: item/p
21551#: C/image-viewer.cpp.page:70
21552msgid ""
21553"The three <code>#include</code> lines at the top include the <code>config</code> (useful autoconf build defines), "
21554"<code>gtkmm</code> (user interface) and <code>iostream</code> (C++-STL) libraries. Functions from these libraries "
21555"are used in the rest of the code."
21556msgstr ""
21557"상단의 <code>#include</code> 세 줄은 <code>config</code> (쓸만한 autoconf 빌드 정의), <code>gtkmm</code> (사용자 인"
21558"터페이스), <code>iostream</code> (C++-STL) 라이브러리입니다. 이 라이브러리로부터 온 함수는 코드 나머지 부분에서 활"
21559"용합니다."
21560
21561#. (itstool) path: item/p
21562#: C/image-viewer.cpp.page:73
21563msgid "The <code>main</code> function creates a new (empty) window and sets the window title."
21564msgstr "<code>main</code> 함수는 (비어있는) 새 창을 만들고 창 제목을 설정합니다."
21565
21566#. (itstool) path: item/p
21567#: C/image-viewer.cpp.page:76
21568msgid ""
21569"The <code>kit::run()</code> call starts the GTKmm main loop, which runs the user interface and starts listening "
21570"for events (like clicks and key presses). As we give the window as an argument to that function, the application "
21571"will automatically exit when that window is closed."
21572msgstr ""
21573"<code>kit::run()</code> 호출은 GTKmm 메인 루프를 시작하며, 메인 루프에서는 사용자 인터페이스를 실행하고 이벤트(마우"
21574"스 단추 누름 키보드 키 누름) 대기를 시작합니다. 창을 해당 함수에 인자로 전달하여, 창을 닫을 때 프로그램에서 자동으"
21575"로 빠져나갑니다."
21576
21577#. (itstool) path: section/p
21578#: C/image-viewer.cpp.page:88
21579msgid ""
21580"Now we will bring life into the empty window. GTKmm organizes the user interface with <code>Gtk::Container</code>s "
21581"that can contain other widgets and even other containers. Here we will use the simplest available container, a "
21582"<code>Gtk::Box</code>:"
21583msgstr ""
21584"이제 비어있는 창에 숨결을 불어넣겠습니다. GTKmm에는 다른 위젯을 넣을 수 있고 다른 컨테이너도 넣을 수 있는 "
21585"<code>Gtk::Container</code>로  사용자 인터페이스를 모아둡니다. 여기서는 여러가지 컨테이너 중 가장 간단한 "
21586"<code>Gtk::Box</code>를 사용하겠습니다:"
21587
21588#. (itstool) path: section/code
21589#: C/image-viewer.cpp.page:91
21590#, no-wrap
21591msgid ""
21592"\n"
21593"int\n"
21594"main (int argc, char *argv[])\n"
21595"{\n"
21596"\tGtk::Main kit(argc, argv);\n"
21597"\n"
21598"\tGtk::Window main_win;\n"
21599"\tmain_win.set_title (\"image-viewer-cpp\");\n"
21600"\n"
21601"\tGtk::Box* box = Gtk::manage(new Gtk::Box());\n"
21602"\tbox-&gt;set_orientation (Gtk::ORIENTATION_VERTICAL);\n"
21603"\tbox-&gt;set_spacing(6);\n"
21604"\tmain_win.add(*box);\n"
21605"\n"
21606"\timage = Gtk::manage(new Gtk::Image());\n"
21607"\tbox-&gt;pack_start (*image, true, true);\n"
21608"\n"
21609"\tGtk::Button* button = Gtk::manage(new Gtk::Button(\"Open Image…\"));\n"
21610"\tbutton-&gt;signal_clicked().connect (\n"
21611"\t\tsigc::ptr_fun(&amp;on_open_image));\n"
21612"\tbox-&gt;pack_start (*button, false, false);\n"
21613"\n"
21614"\tmain_win.show_all_children();\n"
21615"\tkit.run(main_win);\n"
21616"\n"
21617"\treturn 0;\n"
21618"}\n"
21619msgstr ""
21620"\n"
21621"int\n"
21622"main (int argc, char *argv[])\n"
21623"{\n"
21624"\tGtk::Main kit(argc, argv);\n"
21625"\n"
21626"\tGtk::Window main_win;\n"
21627"\tmain_win.set_title (\"image-viewer-cpp\");\n"
21628"\n"
21629"\tGtk::Box* box = Gtk::manage(new Gtk::Box());\n"
21630"\tbox-&gt;set_orientation (Gtk::ORIENTATION_VERTICAL);\n"
21631"\tbox-&gt;set_spacing(6);\n"
21632"\tmain_win.add(*box);\n"
21633"\n"
21634"\timage = Gtk::manage(new Gtk::Image());\n"
21635"\tbox-&gt;pack_start (*image, true, true);\n"
21636"\n"
21637"\tGtk::Button* button = Gtk::manage(new Gtk::Button(\"Open Image…\"));\n"
21638"\tbutton-&gt;signal_clicked().connect (\n"
21639"\t\tsigc::ptr_fun(&amp;on_open_image));\n"
21640"\tbox-&gt;pack_start (*button, false, false);\n"
21641"\n"
21642"\tmain_win.show_all_children();\n"
21643"\tkit.run(main_win);\n"
21644"\n"
21645"\treturn 0;\n"
21646"}\n"
21647
21648#. (itstool) path: item/p
21649#: C/image-viewer.cpp.page:121
21650msgid ""
21651"The first lines create the widgets we want to use: a button for opening up an image, the image view widget itself "
21652"and the box we will use as a container."
21653msgstr ""
21654"첫번째 줄에서는 우리가 쓰려는 위젯을 만듭니다. 그림을 여는 단추, 그림 보기 위젯 자체, 컨테이너로 쓸 상자 위젯이 있"
21655"습니다."
21656
21657#. (itstool) path: item/p
21658#: C/image-viewer.cpp.page:124
21659msgid ""
21660"The calls to <code>pack_start</code> add the two widgets to the box and define their behaviour. The image will "
21661"expand into any available space while the button will just be as big as needed. You will notice that we don't set "
21662"explicit sizes on the widgets. In GTKmm this is usually not needed as it makes it much easier to have a layout "
21663"that looks good in different window sizes. Next, the box is added to the window."
21664msgstr ""
21665"<code>pack_start</code> 호출로 박스에 두 위젯을 추가하고 동작을 정의합니다. 그림은 활용 가능한 공간만큼 충분히 확장"
21666"하고, 단추는 필요한 만큼만 커집니다. 위젯의 크기를 분명하게 설정하지 않음을 알아채셨을 겁니다. GTKmm에서는 창 크기"
21667"가 달라져도 보기 좋은 배치를 쉽게하기에 직접 설정할 필요가 없습니다. 이 과정이 끝나면 박스를 창에 추가합니다."
21668
21669#. (itstool) path: item/p
21670#: C/image-viewer.cpp.page:130
21671msgid ""
21672"We need to define what happens when the user clicks on the button. GTKmm uses the concept of <em>signals</em>. "
21673"When the button is clicked, it fires the <em>clicked</em> signal, which we can connect to some action. This is "
21674"done using the <code>signal_clicked().connect</code> method which tells GTKmm to call the <code>on_open_image</"
21675"code> function when the button is clicked. We will define the <em>callback</em> in the next section."
21676msgstr ""
21677"단추를 사용자가 눌렀을 때 어떤 일이 일어날 지 정해야합니다. GTKmm에서는 <em>시그널</em> 개념을 활용합니다. 단추를 "
21678"누르면, 어떤 동작과 연결할 수 있는 <em>clicked</em> 시그널을 방출합니다. 사용자가 단추를 누르면 "
21679"<code>on_image_open</code> 함수를 호출하여 그림을 이 함수의 인자로 전달하라고 GTK에 지시할 때 "
21680"<code>signal_clicked().connect</code> 메서드를 사용하면 됩니다. 다음 섹션에서 <em>콜백</em>을 정의하겠습니디."
21681
21682#. (itstool) path: item/p
21683#: C/image-viewer.cpp.page:134
21684msgid ""
21685"The last step is to show all widgets in the window using <code>show_all_children()</code>. This is equivalent to "
21686"using the <code>show()</code> method on all our child widgets."
21687msgstr ""
21688"마지막 단계에서는 <code>show_all_children()</code> 함수로 창의 모든 위젯을 나타냅니다. 이는 모든 하우 위젯을 나타내"
21689"는 <code>show()</code> 메서드의 활용법과 같습니다."
21690
21691#. (itstool) path: section/p
21692#: C/image-viewer.cpp.page:143
21693msgid ""
21694"We will now define the signal handler for the <em>clicked</em> signal or the button we mentioned before. Add this "
21695"code before the <code>main</code> method."
21696msgstr ""
21697"이제 <em>clicked</em> 시그널이나 위에서 언급한 단추에 대한 시그널 핸들러를 정했습니다. 이 코드는 <code>main</code> "
21698"메서드 전에 추가하십시오."
21699
21700#. (itstool) path: section/code
21701#: C/image-viewer.cpp.page:146
21702#, no-wrap
21703msgid ""
21704"\n"
21705"Gtk::Image* image = 0;\n"
21706"\n"
21707"static void\n"
21708"on_open_image ()\n"
21709"{\n"
21710"\tGtk::FileChooserDialog dialog(\"Open image\",\n"
21711"\t                              Gtk::FILE_CHOOSER_ACTION_OPEN);\n"
21712"\tdialog.add_button (Gtk::Stock::OPEN,\n"
21713"\t                   Gtk::RESPONSE_ACCEPT);\n"
21714"\tdialog.add_button (Gtk::Stock::CANCEL,\n"
21715"\t                   Gtk::RESPONSE_CANCEL);\n"
21716"\n"
21717"\tGlib::RefPtr&lt;Gtk::FileFilter&gt; filter =\n"
21718"\t\tGtk::FileFilter::create();\n"
21719"\tfilter-&gt;add_pixbuf_formats();\n"
21720"\tfilter-&gt;set_name(\"Images\");\n"
21721"\tdialog.add_filter (filter);\n"
21722"\n"
21723"\tconst int response = dialog.run();\n"
21724"\tdialog.hide();\n"
21725"\n"
21726"\tswitch (response)\n"
21727"\t{\n"
21728"\t\tcase Gtk::RESPONSE_ACCEPT:\n"
21729"\t\t\timage-&gt;set(dialog.get_filename());\n"
21730"\t\t\tbreak;\n"
21731"\t\tdefault:\n"
21732"\t\t\tbreak;\n"
21733"\t}\n"
21734"}\n"
21735msgstr ""
21736"\n"
21737"Gtk::Image* image = 0;\n"
21738"\n"
21739"static void\n"
21740"on_open_image ()\n"
21741"{\n"
21742"\tGtk::FileChooserDialog dialog(\"Open image\",\n"
21743"\t                              Gtk::FILE_CHOOSER_ACTION_OPEN);\n"
21744"\tdialog.add_button (Gtk::Stock::OPEN,\n"
21745"\t                   Gtk::RESPONSE_ACCEPT);\n"
21746"\tdialog.add_button (Gtk::Stock::CANCEL,\n"
21747"\t                   Gtk::RESPONSE_CANCEL);\n"
21748"\n"
21749"\tGlib::RefPtr&lt;Gtk::FileFilter&gt; filter =\n"
21750"\t\tGtk::FileFilter::create();\n"
21751"\tfilter-&gt;add_pixbuf_formats();\n"
21752"\tfilter-&gt;set_name(\"Images\");\n"
21753"\tdialog.add_filter (filter);\n"
21754"\n"
21755"\tconst int response = dialog.run();\n"
21756"\tdialog.hide();\n"
21757"\n"
21758"\tswitch (response)\n"
21759"\t{\n"
21760"\t\tcase Gtk::RESPONSE_ACCEPT:\n"
21761"\t\t\timage-&gt;set(dialog.get_filename());\n"
21762"\t\t\tbreak;\n"
21763"\t\tdefault:\n"
21764"\t\t\tbreak;\n"
21765"\t}\n"
21766"}\n"
21767
21768#. (itstool) path: item/p
21769#: C/image-viewer.cpp.page:181
21770msgid ""
21771"The dialog for choosing the file is created using the <code>Gtk::FileChooserDialog</code> constructor. This takes "
21772"the title and type of the dialog. In our case, it is an <em>Open</em> dialog."
21773msgstr ""
21774"파일을 선택하는 대화상자를 <code>Gtk::FileChooserDialog</code> 생성자로 만들었습니다. 이 생성자는 제목과 대화상자 "
21775"형식을 취합니다. 지금 같은 경우는 <em>열기</em> 대화상자입니다."
21776
21777#. (itstool) path: item/p
21778#: C/image-viewer.cpp.page:185
21779msgid "The next two lines add an <em>Open</em> and a <em>Close</em> button to the dialog."
21780msgstr "다음 두 줄은 대화상자의 <em>열기</em>, <em>닫기</em> 단추를 추가합니다."
21781
21782#. (itstool) path: item/p
21783#: C/image-viewer.cpp.page:187
21784msgid ""
21785"The second argument to the <code>add_button()</code> method is a value to identify the clicked button. We use "
21786"predefined values provided by GTKmm here, too."
21787msgstr ""
21788"<code>add_button()</code> 메서드의 두번째 인자는 누른 단추를 식별하는 값입니다. GTKmm에서 주는 기 정의값을 사용했습"
21789"니다."
21790
21791#. (itstool) path: item/p
21792#: C/image-viewer.cpp.page:192
21793msgid ""
21794"The next two lines restrict the <gui>Open</gui> dialog to only display files which can be opened by <code>Gtk::"
21795"Image</code>. A filter object is created first; we then add all kinds of files supported by <code>Gdk::Pixbuf</"
21796"code> (which includes most image formats like PNG and JPEG) to the filter. Finally, we set this filter to be the "
21797"<gui>Open</gui> dialog's filter."
21798msgstr ""
21799"다음 두 줄은 <gui>열기</gui> 대화 상자에서 <code>Gtk::Image</code>로만 열 수 있는 파일을 표시하도록 제한합니다. 필"
21800"터 객체를 우선 만듭니다. 그 다음 <code>Gdk::Pixbuf</code>에서 지원하는 파일 종류(PNG와 JPEG 같은 대부분의 그림 형"
21801"식)를 필터에 추가합니다. 마지막으로 이 필터를 <gui>열기</gui> 대화 상자의 필터로 설정합니다."
21802
21803#. (itstool) path: item/p
21804#: C/image-viewer.cpp.page:193
21805msgid ""
21806"<code>Glib::RefPtr</code> is a smart pointer used here, that makes sure that the filter is destroyed when there is "
21807"no reference to it anymore."
21808msgstr ""
21809"<code>Glib::RefPtr</code>는 여기서 사용한 지능형 포인터로, 더 이상 참조할 코드가 없을 때, 필터를 해체했는지 확인합"
21810"니다."
21811
21812#. (itstool) path: item/p
21813#: C/image-viewer.cpp.page:197
21814msgid ""
21815"<code>dialog.run</code> displays the <gui>Open</gui> dialog. The dialog will wait for the user to choose an image; "
21816"when they do, <code>dialog.run</code> will return the value <code>Gtk::RESPONSE_ACCEPT</code> (it would return "
21817"<code>Gtk::RESPONSE_CANCEL</code> if the user clicked <gui>Cancel</gui>). The <code>switch</code> statement tests "
21818"for this."
21819msgstr ""
21820"<code>dialog.run</code>은 <gui>열기</gui> 대화 상자를 표시합니다. 대화 상자는 사용자의 그림 선택을 기다립니다. 사용"
21821"자가 그림을 선택하면 <code>dialog.run</code> 에서 <code>Gtk::RESPONSE_ACCEPT</code> 값을 반환합니다(<gui>취소</gui>"
21822"를 누르면 <code>Gtk::RESPONSE_CANCEL</code> 값을 반환합니다). <code>switch</code> 구문에서는 어떤 값을 반환했는지 "
21823"확인합니다."
21824
21825#. (itstool) path: item/p
21826#: C/image-viewer.cpp.page:200
21827msgid ""
21828"We hide the <gui>Open</gui> dialog because we don't need it any more. The dialog would be hidden later anyway, as "
21829"it is only a local variable and is destroyed (and therefore hidden) when the scope ends."
21830msgstr ""
21831"이 메서드의 마지막 줄에서는 <gui>열기</gui> 대화상자는 더 이상 필요 없으니 해체합니다.  지역 변수로서 실행 범위가 "
21832"끝나면 나중에 해체하므로(숨김) 대화 상자는 여하튼 나중에 숨길 수도 있습니다."
21833
21834#. (itstool) path: item/p
21835#: C/image-viewer.cpp.page:203
21836msgid ""
21837"Assuming that the user did click <gui>Open</gui>, the next line loads the file into the <code>Gtk::Image</code> so "
21838"that it is displayed."
21839msgstr ""
21840"사용자가 <gui>열기</gui>를 눌렀다고 한 상황에서, 다음 줄에서 파일을 <code>Gtk::Image</code>에 불러와서 화면에 표시"
21841"합니다."
21842
21843#. (itstool) path: section/p
21844#: C/image-viewer.cpp.page:217
21845msgid ""
21846"If you run into problems with the tutorial, compare your code with this <link href=\"image-viewer/image-viewer.cc"
21847"\">reference code</link>."
21848msgstr ""
21849"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"image-viewer/image-viewer.cc\">참조 코드</link>와 여"
21850"러분의 코드를 비교해보십시오."
21851
21852#. (itstool) path: info/title
21853#: C/image-viewer.js.page:8
21854msgctxt "text"
21855msgid "Image viewer (JavaScript)"
21856msgstr "그림 보기(JavaScript)"
21857
21858#. (itstool) path: info/desc
21859#: C/image-viewer.js.page:11
21860msgid ""
21861"A little bit more than a simple \"Hello world\" application - write an image viewer in GTK+. Includes an "
21862"introduction to the JavaScript language."
21863msgstr ""
21864"간단한 \"Hello world\" 프로그램에 약간의 무언가가 더 들어갑니다 - GTK+의 그림 보기를 작성합니다. JavaScript 언어 소"
21865"개 내용도 들어있습니다."
21866
21867#. (itstool) path: credit/name
21868#: C/image-viewer.js.page:15 C/image-viewer.py.page:15
21869msgid "Jonh Wendell"
21870msgstr "Jonh Wendell"
21871
21872#. (itstool) path: synopsis/p
21873#: C/image-viewer.js.page:32 C/image-viewer.py.page:32
21874msgid ""
21875"In this tutorial, we're going to write a very simple GTK application that loads and displays an image file. You "
21876"will learn how to:"
21877msgstr ""
21878"아 따라하기 안내서에서는 그림 파일을 불러와서 나타내는 매우 간단한 GTK 프로그램을 작성해보겠습니다. 다음 내용을 배"
21879"웁니다:"
21880
21881#. (itstool) path: item/p
21882#: C/image-viewer.js.page:34
21883msgid "Write a basic GTK user interface in JavaScript"
21884msgstr "JavaScript로 기본 GTK 사용자 인터페이스 작성하기"
21885
21886#. (itstool) path: item/p
21887#: C/image-viewer.js.page:35 C/image-viewer.py.page:35
21888msgid "Deal with events by connecting signals to signal handlers"
21889msgstr "시그널 핸들러에 시그널을 연결하여 이벤트 처리하기"
21890
21891#. (itstool) path: item/p
21892#: C/image-viewer.js.page:36 C/image-viewer.py.page:36
21893msgid "Lay out GTK user interfaces using containers"
21894msgstr "컨테이너로 GTK 사용자 인터페이스 배치하기"
21895
21896#. (itstool) path: item/p
21897#: C/image-viewer.js.page:37 C/image-viewer.py.page:37
21898msgid "Load and display image files"
21899msgstr "그림 파일 불러오고 표시하기"
21900
21901#. (itstool) path: item/p
21902#: C/image-viewer.js.page:42
21903msgid "An installed copy of the <em>gjs</em> interpreter"
21904msgstr "<em>gjs</em> 인터프리터 설치 사본"
21905
21906#. (itstool) path: item/p
21907#: C/image-viewer.js.page:43
21908msgid "Basic knowledge of any object-orientated programming language"
21909msgstr "객체지향 프로그래밍 언어 기본 지식"
21910
21911#. (itstool) path: item/p
21912#: C/image-viewer.js.page:57
21913msgid ""
21914"Choose <gui>Generic Javascript</gui> from the <gui>JS</gui> tab, click <gui>Forward</gui>, and fill out your "
21915"details on the next few pages. Use <file>image-viewer</file> as project name and directory."
21916msgstr ""
21917"<gui>JS</gui> 탭에서 <gui>일반 Javascript</gui>을 선택하고 <gui>다음</gui>을 누른 후 일부 페이지에 세부 내용을 채워"
21918"나가십시오 프로젝트 이름과 디렉터리 이름을 <file>image-viewer</file>로 설정하십시오."
21919
21920#. (itstool) path: item/p
21921#: C/image-viewer.js.page:60
21922msgid ""
21923"Click <gui>Apply</gui> and the project will be created for you. Open <file>src/main.js</file> from the "
21924"<gui>Project</gui> or <gui>File</gui> tabs. It contains very basic example code."
21925msgstr ""
21926"<gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/main.js</"
21927"file> 파일을 여십시오. 매우 기본적인 예제 코드가 들어있습니다."
21928
21929#. (itstool) path: section/title
21930#: C/image-viewer.js.page:67
21931msgid "JavaScript basics: Hello World"
21932msgstr "JavaScript 기본: Hello World"
21933
21934#. (itstool) path: section/p
21935#: C/image-viewer.js.page:68
21936msgid ""
21937"Before we start writing the image viewer, let's find out more about the way JavaScript is used in GNOME. Of "
21938"course, your very first contact with any programming language should be the Hello World program which can already "
21939"be found in <file>main.js</file>:"
21940msgstr ""
21941"그림 보기 프로그램 작성을 시작하기 전에 그놈에서 JavaScript를 활용하는 방법을 더 알아보기로 하겠습니다. 아, 물론 어"
21942"떤 프로그래밍 언어를 처음 접하는 코드는 <file>main.js</file> 파일로도 찾을 수 있는 Hello world 프로그램입니다:"
21943
21944#. (itstool) path: section/code
21945#: C/image-viewer.js.page:69
21946#, no-wrap
21947msgid "print (\"Hello world!\");"
21948msgstr "print (\"Hello world!\");"
21949
21950#. (itstool) path: section/p
21951#: C/image-viewer.js.page:70
21952msgid ""
21953"This should look quite natural if you're familiar with almost any other programming language. The function "
21954"<code>print</code> is called with the argument <code>\"Hello world!\"</code>, which will be printed on the screen. "
21955"Note that each line of code ends with a semicolon."
21956msgstr ""
21957"다른 대부분의 프로그래밍 언어에 익숙하다면 이 부분이 자연스러워 보일지도 모르겠습니다. <code>print</code> 함수는 화"
21958"면에 출력할 <code>\"Hello world!\"</code> 인자 값으로 호출합니다. 참고로 각 코드의 줄은 세미콜론으로 끝납니다."
21959
21960#. (itstool) path: section/title
21961#: C/image-viewer.js.page:74
21962msgid "Classes in JavaScript"
21963msgstr "JavaScript 클래스"
21964
21965#. (itstool) path: section/p
21966#: C/image-viewer.js.page:75
21967msgid "This is the standard way to define a class in JavaScript:"
21968msgstr "이 방법이 JavaScript에서 클래스를 정의하는 표준 방식입니다:"
21969
21970#. (itstool) path: section/code
21971#: C/image-viewer.js.page:76
21972#, no-wrap
21973msgid ""
21974"\n"
21975"function MyClass () {\n"
21976"  this._init ();\n"
21977"}\n"
21978"\n"
21979"MyClass.prototype = {\n"
21980"\n"
21981"  _init: function () {\n"
21982"    this.propertyA = \"This is an object's field\";\n"
21983"    this.propertyB = 10;\n"
21984"  },\n"
21985"\n"
21986"  aMethod: function (arg1, arg2) {\n"
21987"    print (\"inside aMethod: \" + arg1 + \" \" + arg2);\n"
21988"  },\n"
21989"\n"
21990"  dumpProperties: function () {\n"
21991"    print (this.propertyA);\n"
21992"    print (this.propertyB);\n"
21993"  }\n"
21994"\n"
21995"}"
21996msgstr ""
21997"\n"
21998"function MyClass () {\n"
21999"  this._init ();\n"
22000"}\n"
22001"\n"
22002"MyClass.prototype = {\n"
22003"\n"
22004"  _init: function () {\n"
22005"    this.propertyA = \"This is an object's field\";\n"
22006"    this.propertyB = 10;\n"
22007"  },\n"
22008"\n"
22009"  aMethod: function (arg1, arg2) {\n"
22010"    print (\"inside aMethod: \" + arg1 + \" \" + arg2);\n"
22011"  },\n"
22012"\n"
22013"  dumpProperties: function () {\n"
22014"    print (this.propertyA);\n"
22015"    print (this.propertyB);\n"
22016"  }\n"
22017"\n"
22018"}"
22019
22020#. (itstool) path: section/p
22021#: C/image-viewer.js.page:98
22022msgid "This defines a class called <code>MyClass</code>. Let's go through each part of the class definition:"
22023msgstr "<code>MyClass</code> 클래스를 정의합니다. 클래스 정의 각 부분을 살펴보겠습니다:"
22024
22025#. (itstool) path: item/p
22026#: C/image-viewer.js.page:101
22027msgid ""
22028"<code>function MyClass</code> is the constructor of the class — its name must match the class's name. You can "
22029"access any member of the class by using the <code>this</code> object; here, the constructor calls the class's "
22030"<code>_init</code> method."
22031msgstr ""
22032"<code>function MyClass</code> 는 클래스 생성자입니다. 이름은 클래스 이름과 같아야합니다. <code>this</code> 객체를 "
22033"활용하여 클래서의 어떤 구성원이든 접근할 수 있습니다. 여기서, 생성자는 클래스의 <code>_init</code> 메서드를 호출합"
22034"니다."
22035
22036#. (itstool) path: item/p
22037#: C/image-viewer.js.page:104
22038msgid ""
22039"The <code>MyClass.prototype</code> block is where you define the <em>structure</em> of the class. Each class is "
22040"made up of methods (functions) and fields (variables); there are three methods and two fields in this example."
22041msgstr ""
22042"<code>MyClass.prototype</code> 블록은 클래스의 <em>structure</em>를 정의합니다. 각 클래스는 메서드(함수)와 필드(변"
22043"수)로 만듭니다. 예제에서는 메서드 3개와 필드 2개로 이루어졌습니다."
22044
22045#. (itstool) path: item/p
22046#: C/image-viewer.js.page:107
22047msgid ""
22048"The first method defined here is called <code>_init</code>, and we specify that it is a function with no arguments:"
22049msgstr "여기서 정의한 첫 메서드는 <code>_init</code>이며, 인자 값을 주지 않는 함수로 지정합니다:"
22050
22051#. (itstool) path: item/code
22052#: C/image-viewer.js.page:108
22053#, no-wrap
22054msgid "_init: function ()"
22055msgstr "_init: function ()"
22056
22057#. (itstool) path: item/p
22058#: C/image-viewer.js.page:109
22059msgid ""
22060"We write the function inside some curly braces. Two fields are defined here, <code>propertyA</code> and "
22061"<code>propertyB</code>. The first is set to a string and the second is set to an integer (10). The function "
22062"doesn't return any value."
22063msgstr ""
22064"중괄호 안에 함수를 작성하겠습니다. <code>propertyA</code>와 <code>propertyB</code> 필드 두개를 여기에서 정했습니"
22065"다. 처음은 문자열로 설정하고 두번째는 정수(10진수) 값으로 설정합니다. 이 함수는 어떤 값도 반환하지 않습니다."
22066
22067#. (itstool) path: item/p
22068#: C/image-viewer.js.page:112
22069msgid ""
22070"The next method is called <code>aMethod</code> and has two arguments, which it prints out when you call it. The "
22071"final method is <code>dumpProperties</code>, and prints the fields <code>propertyA</code> and <code>propertyB</"
22072"code>."
22073msgstr ""
22074"다음 메서드는 <code>aMethod</code>이며, 이 함수를 호출할 때 화면에 출력할 인자 두 개가 있습니다. 마지막은 "
22075"<code>propertyA</code>, <code>propertyB</code> 필드를 출력하는 <code>dumpProperties</code>메서드입니다."
22076
22077#. (itstool) path: item/p
22078#: C/image-viewer.js.page:115
22079msgid "Note how the class definition (prototype) is arranged; each function definition is separated by a comma."
22080msgstr "클래스 정의(프로토타입) 정돈 법을 정리해두십시오. 각 함수 정의는 쉼표로 구분합니다."
22081
22082#. (itstool) path: section/p
22083#: C/image-viewer.js.page:119
22084msgid "Now that MyClass has been defined, we can play with it:"
22085msgstr "이제 MyClass 클래스를 정의했으니 가지고 놀 수 있습니다:"
22086
22087#. (itstool) path: section/code
22088#: C/image-viewer.js.page:120
22089#, no-wrap
22090msgid ""
22091"\n"
22092"var o = new MyClass ();\n"
22093"o.aMethod (\"Hello\", \"world\");\n"
22094"o.propertyA = \"Just changed its value!\";\n"
22095"o.dumpProperties ();"
22096msgstr ""
22097"\n"
22098"var o = new MyClass ();\n"
22099"o.aMethod (\"Hello\", \"world\");\n"
22100"o.propertyA = \"Just changed its value!\";\n"
22101"o.dumpProperties ();"
22102
22103#. (itstool) path: section/p
22104#: C/image-viewer.js.page:125
22105msgid ""
22106"This code creates a new instance of the class called <code>o</code>, runs <code>aMethod</code>, changes "
22107"<code>propertyA</code> to a different string, and then calls <code>dumpProperties</code> (which outputs the "
22108"fields)."
22109msgstr ""
22110"이 코드는 클래스의 새 인스턴스 <code>o</code>를 만들고, <code>aMethod</code>를 실행하며 <code>propertyA</code> 값"
22111"을 다른 문자열 값으로 바꾼 후, (필드 내용을 출력하는) <code>dumpProperties</code> 메서드를 호출합니다."
22112
22113#. (itstool) path: section/p
22114#: C/image-viewer.js.page:126
22115msgid ""
22116"Save the code in the <file>main.js</file> and then run it by using <guiseq><gui>Run</gui><gui>Execute</gui></"
22117"guiseq> from the menu or using the toolbar."
22118msgstr ""
22119"<file>main.js</file> 코드를 저장하고 메뉴에서 <guiseq><gui>실행</gui><gui>실행</gui></guiseq>을 누르거나 도구 모음"
22120"의 단추를 눌러 실행하십시오."
22121
22122#. (itstool) path: section/title
22123#: C/image-viewer.js.page:131 C/image-viewer.py.page:70
22124msgid "A first Gtk application"
22125msgstr "첫 gtk 프로그램"
22126
22127#. (itstool) path: section/p
22128#: C/image-viewer.js.page:132
22129msgid "Let's see what a very basic Gtk application looks like in JavaScript:"
22130msgstr "JavaScript로 작성한 Gtk 프로그램의 가장 기본적인 부분이 어떻게 생겼는지 보도록 하겠습니다:"
22131
22132#. (itstool) path: section/code
22133#: C/image-viewer.js.page:133
22134#, no-wrap
22135msgid ""
22136"\n"
22137"const Gtk = imports.gi.Gtk;\n"
22138"\n"
22139"Gtk.init (null, null);\n"
22140"\n"
22141"var w = new Gtk.Window ({title: \"Image Viewer Demo\"});\n"
22142"w.show ();\n"
22143"\n"
22144"Gtk.main ();"
22145msgstr ""
22146"\n"
22147"const Gtk = imports.gi.Gtk;\n"
22148"\n"
22149"Gtk.init (null, null);\n"
22150"\n"
22151"var w = new Gtk.Window ({title: \"Image Viewer Demo\"});\n"
22152"w.show ();\n"
22153"\n"
22154"Gtk.main ();"
22155
22156#. (itstool) path: section/p
22157#: C/image-viewer.js.page:142 C/image-viewer.py.page:95
22158msgid "Let's take a look at what's happening:"
22159msgstr "어떤 동작이 일어나는지 살펴보죠:"
22160
22161#. (itstool) path: item/p
22162#: C/image-viewer.js.page:145 C/image-viewer.py.page:98
22163msgid ""
22164"The first line imports the Gtk namespace (that is, it includes the Gtk library). The libraries are provided by "
22165"GObject Introspection (gi), which provides language bindings for many GNOME libraries."
22166msgstr ""
22167"첫 줄은 (Gtk 라이브러리가 있는) Gtk 이름 영역을 임포팅합니다. 라이브러리에는 많은 그놈 라이브러리의 언어 바인딩이 "
22168"들어있는 GObject 인트로스펙션(gi)이 있습니다."
22169
22170#. (itstool) path: item/p
22171#: C/image-viewer.js.page:148
22172msgid "<code>Gtk.init</code> initializes the Gtk library; this statement is mandatory for all Gtk programs."
22173msgstr "<code>Gtk.init</code>은 Gtk 라이브러리를 초기화합니다. 모든 Gtk 프로그램의 필수 구문입니다."
22174
22175#. (itstool) path: item/p
22176#: C/image-viewer.js.page:151
22177msgid ""
22178"The next line creates the main window by creating a new <code>Gtk.Window</code> object. You can pass several "
22179"properties to the window's constructor by using the syntax <code>{property: value, property: value, ...}</code>. "
22180"In this case we are setting the title of the window."
22181msgstr ""
22182"다음 줄에서는 새 <code>Gtk.Window</code> 객체로 메인 창을 만듭니다. <code>{property: value, property: value, ...}</"
22183"code> 문법으로 창 생성자에 몇가지 속성 값을 전달할 수 있습니다. 지금 같은 경우는 창 제목을 설정합니다."
22184
22185#. (itstool) path: item/p
22186#: C/image-viewer.js.page:152
22187msgid "The next line explicitly shows the window. In Gtk, every widget is hidden by default."
22188msgstr "다음 줄에서는 분명하게 창을 보여줍니다. Gtk에서는 모든 창을 기본으로 숨겨둡니다."
22189
22190#. (itstool) path: item/p
22191#: C/image-viewer.js.page:153
22192msgid ""
22193"Finally, <code>Gtk.main</code> runs the main loop — in other words, it executes the program. The main loop listens "
22194"for events (signals) from the user interface and then calls a signal handler which will do something useful. We'll "
22195"learn more about signals shortly."
22196msgstr ""
22197"마지막으로 <code>Gtk.main</code>에서 메인 루프를 실행합니다. 다시 말해, 프로그램을 실행합니다. 메인 루프에서는 사용"
22198"자 인터페이스의 이벤트(시그널)를 기다리며, 어디선가 내보낸 시그널을 찾으면 쓸만한 시그널 핸들러를 호출합니다. 시그"
22199"널에 대해 간단하게 앞으로 더 알아볼 예정입니다."
22200
22201#. (itstool) path: section/p
22202#: C/image-viewer.js.page:156
22203msgid ""
22204"Save the code in <file>main.js</file> and run it. You will notice that the application does not quit when you "
22205"close the window. This is because we haven't set up a signal handler to deal with the window's <code>destroy</"
22206"code> (close) signal yet. We'll do this shortly, but for now you can just hit <keyseq><key>Ctrl</key><key>C</key></"
22207"keyseq> in the terminal window to quit the program."
22208msgstr ""
22209"<file>main.js</file> 파일에 코드를 저장하고 실행해보십시오. 창을 닫아도 프로그램이 안 끝나는 모습이 나타납니다. 아"
22210"직 창의 <code>destroy</code>(닫기) 시그널을 시그널 핸들러에서 처리하도록 설정하지 않았기 때문입니다. 곧 이 부분을 "
22211"진행하겠지만, 지금은 터미널 창에서 <keyseq><key>Ctrl</key><key>C</key></keyseq> 키를 눌러 프로그램을 끝낼 수 있습니"
22212"다."
22213
22214#. (itstool) path: section/title
22215#: C/image-viewer.js.page:161
22216msgid "Adding classes"
22217msgstr "클래스 추가"
22218
22219#. (itstool) path: section/p
22220#: C/image-viewer.js.page:162
22221msgid ""
22222"The proper way of doing Gtk programming is by using classes. Let's rewrite the simple code you just wrote using "
22223"classes:"
22224msgstr ""
22225"적당한 Gtk 프로그래밍 방식은 클래스 사용 방식입니다. 간단한 코드를 클래스 코드로 다시 작성해보도록 하겠습니다:"
22226
22227#. (itstool) path: section/code
22228#: C/image-viewer.js.page:163
22229#, no-wrap
22230msgid ""
22231"\n"
22232"const Gtk = imports.gi.Gtk;\n"
22233"\n"
22234"function ImageViewer () {\n"
22235"  this._init ();\n"
22236"}\n"
22237"\n"
22238"ImageViewer.prototype = {\n"
22239"  _init: function () {\n"
22240"    this.window = new Gtk.Window ({title: \"Image Viewer Demo\"});\n"
22241"    this.window.show ();\n"
22242"  }\n"
22243"}\n"
22244"\n"
22245"Gtk.init (null, null);\n"
22246"var iv = new ImageViewer ();\n"
22247"Gtk.main ();"
22248msgstr ""
22249"\n"
22250"const Gtk = imports.gi.Gtk;\n"
22251"\n"
22252"function ImageViewer () {\n"
22253"  this._init ();\n"
22254"}\n"
22255"\n"
22256"ImageViewer.prototype = {\n"
22257"  _init: function () {\n"
22258"    this.window = new Gtk.Window ({title: \"Image Viewer Demo\"});\n"
22259"    this.window.show ();\n"
22260"  }\n"
22261"}\n"
22262"\n"
22263"Gtk.init (null, null);\n"
22264"var iv = new ImageViewer ();\n"
22265"Gtk.main ();"
22266
22267#. (itstool) path: section/p
22268#: C/image-viewer.js.page:181
22269msgid ""
22270"Notice that the program is the same; we just moved the window creation code to our own <code>ImageViewer</code> "
22271"class. The class's constructor calls the <code>_init</code> method, which creates and shows the window. We then "
22272"create an instance of the class before running the main loop (<code>Gtk.main</code>)."
22273msgstr ""
22274"프로그램이 같다는 사실을 알아채실겁니다. 창을 만드는 코드를 <code>ImageViewer</code>클래스로 옮겼을 뿐입니다. 이 클"
22275"래스 생성자에서는 창을 만들고 보여주는 <code>_init</code> 메서드를 호출합니다. 그 다음 메인 루프(<code>Gtk.main</"
22276"code>)를 실행하기 전 클래스의 인스턴스를 만듭니다."
22277
22278#. (itstool) path: section/p
22279#: C/image-viewer.js.page:182
22280msgid "This code is modular and can be split into multiple files easily. This makes it cleaner and easier to read."
22281msgstr "이 코드는 모듈식이며 여러 파일로 쉽게 나눌 수 있습니다. 이렇게 하면 코드가 간명해지고 알아보기 쉬워집니다."
22282
22283#. (itstool) path: section/title
22284#: C/image-viewer.js.page:186 C/image-viewer.py.page:119
22285msgid "Signals"
22286msgstr "시그널"
22287
22288#. (itstool) path: section/p
22289#: C/image-viewer.js.page:187 C/image-viewer.py.page:120
22290msgid ""
22291"Signals are one of the key concepts in Gtk programming. Whenever something happens to an object, it emits a "
22292"signal; for example, when a button is clicked it gives off the <code>clicked</code> signal. If you want your "
22293"program to do something when that event occurs, you must connect a function (a \"signal handler\") to that signal. "
22294"Here's an example:"
22295msgstr ""
22296"시그널은 Gtk 프로그래밍의 핵심 개념입니다. 객체에 언제 어떤 일이 일어나든지 시그널을 내보냅니다. 예를 들어 단추를 "
22297"누르면 <code>clicked</code> 시그널을 내줍니다. 동작이 일어났을때 프로그램에서 무언가를 하게 하려면 시그널에 함수(시"
22298"그널 핸들러)를 연결해야합니다. 예제는 다음과 같습니다:"
22299
22300#. (itstool) path: section/code
22301#: C/image-viewer.js.page:188
22302#, no-wrap
22303msgid ""
22304"\n"
22305"function button_clicked () {\n"
22306"  print (\"you clicked me!\");\n"
22307"}\n"
22308"var b = new Gtk.Button ({label:\"Click me\"});\n"
22309"b.connect (\"clicked\", button_clicked);"
22310msgstr ""
22311"\n"
22312"function button_clicked () {\n"
22313"  print (\"you clicked me!\");\n"
22314"}\n"
22315"var b = new Gtk.Button ({label:\"Click me\"});\n"
22316"b.connect (\"clicked\", button_clicked);"
22317
22318#. (itstool) path: section/p
22319#: C/image-viewer.js.page:194 C/image-viewer.py.page:127
22320msgid ""
22321"The last two lines create a <code>Gtk.Button</code> called <code>b</code> and connect its <code>clicked</code> "
22322"signal to the <code>button_clicked</code> function, which is defined above. Every time the button is clicked, the "
22323"code in the <code>button_clicked</code> function will be executed. It just prints a message here."
22324msgstr ""
22325"마지막 두 줄은 <code>Gtk.Button</code>의 인스턴스 <code>b</code>를 만들고 <code>clicked</code> 시그널을 위에서 정의"
22326"한 <code>button_clicked</code> 함수에 연결합니다. 항상 단추를 누를 때마다 <code>button_clicked</code> 함수를 실행합"
22327"니다. 이 함수는 여기에 적어둔 메시지를 출력하는 동작만 합니다."
22328
22329#. (itstool) path: section/p
22330#: C/image-viewer.js.page:195
22331msgid "The syntax for connecting any signal to a function is:"
22332msgstr "시그널을 함수에 연결하는 문법은 다음과 같습니다:"
22333
22334#. (itstool) path: section/code
22335#: C/image-viewer.js.page:196
22336#, no-wrap
22337msgid ""
22338"\n"
22339"object.connect (&lt;signal_name&gt;, &lt;function_to_be_called&gt;);"
22340msgstr ""
22341"\n"
22342"object.connect (&lt;signal_name&gt;, &lt;function_to_be_called&gt;);"
22343
22344#. (itstool) path: section/p
22345#: C/image-viewer.js.page:198
22346msgid ""
22347"You can find signal definitions for any object in the <link href=\"https://developer.gnome.org/gtk3/stable/"
22348"gtkobjects.html\">GTK class reference</link>."
22349msgstr ""
22350"<link href=\"https://developer.gnome.org/gtk3/stable/gtkobjects.html\">GTK 클래스 참고서</link>에서 임의의 객체에 "
22351"대한 시그널 정의를 찾아볼 수 있습니다."
22352
22353#. (itstool) path: note/p
22354#: C/image-viewer.js.page:201
22355msgid "You can simplify the code by making use of an inline function definition:"
22356msgstr "인라인 함수 정의 활용으로 코드를 단순하게 작성할 수 있습니다:"
22357
22358#. (itstool) path: note/code
22359#: C/image-viewer.js.page:202
22360#, no-wrap
22361msgid ""
22362"\n"
22363"b.connect (\"clicked\", function () { print (\"you clicked me!\"); });"
22364msgstr ""
22365"\n"
22366"b.connect (\"clicked\", function () { print (\"you clicked me!\"); });"
22367
22368#. (itstool) path: section/title
22369#: C/image-viewer.js.page:209
22370msgid "Closing the window"
22371msgstr "창 닫기"
22372
22373#. (itstool) path: section/p
22374#: C/image-viewer.js.page:210
22375msgid ""
22376"When you close a Gtk window it's not really closed, it's hidden. This allows you to keep the window around (which "
22377"is useful if you want to ask the user if they really want to close the window, for example)."
22378msgstr ""
22379"Gtk 창을 닫을 때 실제로는 창이 닫히지 않고 숨겨져 있습니다. 이렇게 하여 창을 유지할 수 있습니다(예를 들자면 사용자"
22380"에게 정말 창을 닫을지 물어볼 때 이런 방식이 쓸만합니다)."
22381
22382#. (itstool) path: section/p
22383#: C/image-viewer.js.page:211
22384msgid ""
22385"In our case, we really do just want to close the window. The simplest way of doing this is by connecting the "
22386"<code>hide</code> signal of the GtkWindow object to a function that closes the application. Go back to the "
22387"<file>image-viewer.js</file> file and add the following code to the <code>_init</code> method, on the line above "
22388"<code>this.window.show</code>:"
22389msgstr ""
22390"지금과 같은 경우는 창을 실제로 닫으려고 합니다. 가장 간단하게 처리하는 방법은 프로그램을 닫는 함수에 GtkWindow 객체"
22391"의 <code>hide</code> 시그널을 연결하는 방법입니다. <file>image-viewer.js</file> 파일로 돌아가서 다음 코드를 "
22392"<code>_init</code> 메서드의 <code>this.window.show</code> 코드 위에 추가하십시오:"
22393
22394#. (itstool) path: section/code
22395#: C/image-viewer.js.page:212
22396#, no-wrap
22397msgid "this.window.connect (\"hide\", Gtk.main_quit);"
22398msgstr "this.window.connect (\"hide\", Gtk.main_quit);"
22399
22400#. (itstool) path: section/p
22401#: C/image-viewer.js.page:213
22402msgid ""
22403"This connects the <code>hide</code> signal of the window to Gtk's <code>main_quit</code> function, which ends the "
22404"execution of the Gtk main loop. Once the main loop finishes, the function <code>Gtk.main</code> returns. Our "
22405"program would continue to run any code written after the <code>Gtk.main ();</code> line, but since we don't have "
22406"any code after that point, the program just ends."
22407msgstr ""
22408"이 코드는<code>hide</code> 시그널을 Gtk 메인 루프 실행을 끝내는 Gtk의 <code>main_quit</code> 함수에 연결합니다. 메"
22409"인 루프를 끝내고 나면 <code>Gtk.main</code> 함수에서 반환 값을 내보냅니다. 이 프로그램에서는 <code>Gtk.main ();</"
22410"code> 코드 줄 다음에 작성한 어떤 코드든 계속 실행하려 하겠지만 이후에 어떤 코드도 없기 때문에 프로그램을 그냥 끝냅"
22411"니다."
22412
22413#. (itstool) path: section/title
22414#: C/image-viewer.js.page:217 C/image-viewer.py.page:131
22415msgid "Containers: Laying-out the user interface"
22416msgstr "컨테이너: 사용자 인터페이스를 두는 공간"
22417
22418#. (itstool) path: section/p
22419#: C/image-viewer.js.page:218 C/image-viewer.py.page:132
22420msgid ""
22421"Widgets (controls, such as buttons and labels) can be arranged in the window by making use of <em>containers</em>. "
22422"You can organize the layout by mixing different types of containers, like boxes and grids."
22423msgstr ""
22424"(단추 레이블 같은 컨트롤) 위젯은 <em>컨테이너</em>를 사용하여 창에서 배치를 정돈할 수 있습니다. 박스, 그리드 등 여"
22425"러가지 형태의 컨테이너를 섞어 사용하여 배치를 이룰 수 있습니다."
22426
22427#. (itstool) path: section/p
22428#: C/image-viewer.js.page:219 C/image-viewer.py.page:133
22429msgid ""
22430"A <code>Gtk.Window</code> is itself a type of container, but you can only put one widget directly into it. We "
22431"would like to have two widgets, an image and a button, so we must put a \"higher-capacity\" container inside the "
22432"window to hold the other widgets. A number of <link href=\"http://library.gnome.org/devel/gtk/stable/GtkContainer."
22433"html\">container types</link> are available, but we will use a <code>Gtk.Box</code> here. A <code>Gtk.Box</code> "
22434"can hold several widgets, organized horizontally or vertically. You can do more complicated layouts by putting "
22435"several boxes inside another box and so on."
22436msgstr ""
22437"<code>Gtk.Window</code>는 그 자체로 컨테이너의 한 종류지만 이 컨테이너에는 위젯을 한번에 하나씩만 넣을 수 있습니"
22438"다. 여기에 우리는 그림과 단추, 두가지 위젯을 넣으려고 하기 때문에, 창 하나에 다른 위젯을 붙여둘 \"공간이 더 많은\" "
22439"컨테이너를 넣어야합니다. 쓸 수 있는 <link href=\"http://library.gnome.org/devel/gtk/stable/GtkContainer.html\">컨테"
22440"이너 형식</link>은 여러가지가 있지만, 여기서는 <code>Gtk.Box</code>를 사용합니다. <code>Gtk.Box</code> 는 가로 세"
22441"로 방향으로 여러 위젯을 붙일 수 있습니다. 다른 여러가지 박스를 붙여서 보다 더 복잡한 배치를 만들 수 있습니다."
22442
22443#. (itstool) path: note/p
22444#: C/image-viewer.js.page:221 C/image-viewer.py.page:135
22445msgid ""
22446"There is a graphical user interface designer called <app>Glade</app> integrated in <app>Anjuta</app> which makes "
22447"UI design really easy. For this simple example, however, we will code everything manually."
22448msgstr ""
22449"<app>안주타</app>에 통합한 <app>글레이드</app> 사용자 인터페이스 디자인 프로그램이 있습니다. 이 프로그램은 사용자 "
22450"인터페이스를 쉽게 만들 수 있게 해줍니다. 그러나 이 간단한 예제로 모든 코드를 직접 작성해보겠습니다."
22451
22452#. (itstool) path: section/p
22453#: C/image-viewer.js.page:223
22454msgid ""
22455"Let's add the box and widgets to the window. Insert the following code into the <code>_init</code> method, "
22456"immediately above the <code>this.window.show</code> line:"
22457msgstr ""
22458"박스와 위젯을 창에 추가해보겠습니다. 다음 코드를 <code>_init</code> 메서드의 <code>this.window.show</code>줄 바로 "
22459"위에 넣으십시오:"
22460
22461#. (itstool) path: section/code
22462#: C/image-viewer.js.page:224
22463#, no-wrap
22464msgid ""
22465"\n"
22466"var main_box = new Gtk.Box ({orientation: Gtk.Orientation.VERTICAL, spacing: 0});\n"
22467"this.window.add (main_box);"
22468msgstr ""
22469"\n"
22470"var main_box = new Gtk.Box ({orientation: Gtk.Orientation.VERTICAL, spacing: 0});\n"
22471"this.window.add (main_box);"
22472
22473#. (itstool) path: section/p
22474#: C/image-viewer.js.page:227
22475msgid ""
22476"The first line creates a <code>Gtk.Box</code> called <code>main_box</code> and sets two of its properties: the "
22477"<code>orientation</code> is set to vertical (so widgets are arranged in a column), and the <code>spacing</code> "
22478"between the widgets is set to 0 pixels. The next line then adds the newly-created <code>Gtk.Box</code> to the "
22479"window."
22480msgstr ""
22481"첫 줄은 <code>Gtk.Box</code>의 인스턴스 <code>main_box</code>를 만들고 인스턴스의 속성 두개를 설정합니다. "
22482"<code>orientation</code>은 수직 방향으로 설정(따라서 위젯을 수직 방향으로 배치합니다)하고, 위젯 사이의 공간 "
22483"<code>spacing</code> 값은 0 픽셀로 설정합니다. 다음 줄은 창에 새로 만든 <code>Gtk.Box</code>를 추가합니다."
22484
22485#. (itstool) path: section/p
22486#: C/image-viewer.js.page:228 C/image-viewer.py.page:146
22487msgid ""
22488"So far the window only contains an empty <code>Gtk.Box</code>, and if you run the program now you will see no "
22489"changes at all (the <code>Gtk.Box</code> is a transparent container, so you can't see that it's there)."
22490msgstr ""
22491"지금까지 창에는 빈 <code>Gtk.Box</code>만 넣었기에 지금 프로그램을 실행하면 어떤 변화도 없음을 볼 수 있습니다"
22492"(<code>Gtk.Box</code>는 투명 컨테이너라서 그 무엇도 볼 수 없습니다)."
22493
22494#. (itstool) path: section/title
22495#: C/image-viewer.js.page:232 C/image-viewer.py.page:150
22496msgid "Packing: Adding widgets to the container"
22497msgstr "패킹: 컨테이너에 위젯 추가"
22498
22499#. (itstool) path: section/p
22500#: C/image-viewer.js.page:233
22501msgid ""
22502"To add some widgets to the <code>Gtk.Box</code>, insert the following code directly below the <code>this.window."
22503"add (main_box)</code> line:"
22504msgstr ""
22505"일부 위젯을 <code>Gtk.Box</code>에 추가하려면 다음 코드를 직접 <code>this.window.add (main_box)</code> 코드 줄 아래"
22506"에 넣으십시오:"
22507
22508#. (itstool) path: section/code
22509#: C/image-viewer.js.page:234
22510#, no-wrap
22511msgid ""
22512"\n"
22513"this.image = new Gtk.Image ();\n"
22514"main_box.pack_start (this.image, true, true, 0);"
22515msgstr ""
22516"\n"
22517"this.image = new Gtk.Image ();\n"
22518"main_box.pack_start (this.image, true, true, 0);"
22519
22520#. (itstool) path: section/p
22521#: C/image-viewer.js.page:237
22522msgid ""
22523"The first line creates a new <code>Gtk.Image</code> called <code>image</code>, which will be used to display an "
22524"image file. Then, the image widget is added (<em>packed</em>) into the <code>main_box</code> container using "
22525"<code>Gtk.Box</code>'s <link href=\"http://library.gnome.org/devel/gtk/stable/GtkBox.html#gtk-box-pack-start"
22526"\"><code>pack_start</code></link> method."
22527msgstr ""
22528"첫 줄에서는 그림 파일을 나타낼 때 쓸 새 <code>Gtk.Image</code> 인스턴스 <code>image</code>를 만듭니다. 그 다음 그"
22529"림 위젯을 <code>Gtk.Box</code>의 <link href=\"http://library.gnome.org/devel/gtk/stable/GtkBox.html#gtk-box-pack-"
22530"start\"><code>pack_start</code></link> 메서드로 <code>main_box</code>에 추가(<em>패킹</em>)합니다."
22531
22532#. (itstool) path: section/p
22533#: C/image-viewer.js.page:238
22534msgid ""
22535"<code>pack_start</code> takes 4 arguments: the widget that is to be added to the <code>Gtk.Box</code> "
22536"(<code>child</code>); whether the <code>Gtk.Box</code> should grow larger when the new widget is added "
22537"(<code>expand</code>); whether the new widget should take up all of the extra space created if the <code>Gtk.Box</"
22538"code> gets bigger (<code>fill</code>); and how much space there should be, in pixels, between the widget and its "
22539"neighbors inside the <code>Gtk.Box</code> (<code>padding</code>)."
22540msgstr ""
22541"<code>pack_start</code> 메서드에는 <code>Gtk.Box</code>에 추가할 위젯(<code>child</code>) 인자, 새 위젯을 추가했을 "
22542"때 <code>Gtk.Box</code>를 더 크게 할지 여부(<code>expand</code>) 인자, <code>Gtk.Box</code>가 커졌을 때 모든 여분 "
22543"공간을 차지할 지 여부(<code>fill</code>) 인자, <code>Gtk.Box</code>에서 위젯 간 설정할 간격(<code>padding</code>) "
22544"인자가 있습니다."
22545
22546#. (itstool) path: section/p
22547#: C/image-viewer.js.page:239 C/image-viewer.py.page:158
22548msgid ""
22549"Gtk containers (and widgets) dynamically expand to fill the available space, if you let them. You don't position "
22550"widgets by giving them a precise x,y-coordinate location in the window; rather, they are positioned relative to "
22551"one another. This makes handling window resizing much easier, and widgets should automatically take a sensible "
22552"size in most situations."
22553msgstr ""
22554"Gtk 컨테이너(와 위젯)은 여분 공간을 동적으로 채우도록 설정하면 그렇게 보여줍니다. 창에서 정확한 x,y 좌표 값을 주어 "
22555"위젯 위치를 설정할 수 없습니다. 다만 서로 상대적 위치에 둘 수 있습니다. 이렇게 하면 창 크기 조절을 더 쉽게할 수 있"
22556"고, 위젯든 대부분의 경우 타당한 크기를 가집니다."
22557
22558#. (itstool) path: section/p
22559#: C/image-viewer.js.page:240 C/image-viewer.py.page:159
22560msgid ""
22561"Also note how the widgets are organized in a hierarchy. Once packed in the <code>Gtk.Box</code>, the <code>Gtk."
22562"Image</code> is considered a <em>child</em> of the <code>Gtk.Box</code>. This allows you to treat all of the "
22563"children of a widget as a group; for example, you could hide the <code>Gtk.Box</code>, which would also hide all "
22564"of its children at the same time."
22565msgstr ""
22566"또한 위젯은 서로 계층적 관계를 가짐을 참고하십시오. <code>Gtk.Box</code>에 패킹하면, <code>Gtk.Image</code>는 "
22567"<code>Gtk.Box</code>의 <em>하위 요소</em>로 간주합니다. 이렇게 하여 모든 하위 위젯을 그룹 단위로 다룰 수 있습니다. "
22568"예를 들면, <code>Gtk.Box</code>와 이 컨테이너에 들어있는 모든 하위 컨테이나와 위젯을 동시에 숨길 수 있습니다."
22569
22570#. (itstool) path: section/p
22571#: C/image-viewer.js.page:241 C/image-viewer.py.page:160
22572msgid "Now insert these two lines, below the two you just added:"
22573msgstr "이제 다음 두 줄을 방금 추가한 두 줄 아래에 추가하십시오:"
22574
22575#. (itstool) path: section/code
22576#: C/image-viewer.js.page:242
22577#, no-wrap
22578msgid ""
22579"\n"
22580"var open_button = new Gtk.Button ({label: \"Open a picture...\"});\n"
22581"main_box.pack_start (open_button, false, false, 0);"
22582msgstr ""
22583"\n"
22584"var open_button = new Gtk.Button ({label: \"Open a picture...\"});\n"
22585"main_box.pack_start (open_button, false, false, 0);"
22586
22587#. (itstool) path: section/p
22588#: C/image-viewer.js.page:245
22589msgid ""
22590"These lines are similar to the first two, but this time they create a <code>Gtk.Button</code> and add it to "
22591"<code>main_box</code>. Notice that we are setting the <code>expand</code> argument (the second one) to "
22592"<code>false</code> here, whereas it was set to <code>true</code> for the <code>Gtk.Image</code>. This will cause "
22593"the image to take up all available space and the button to take only the space it needs. When you maximize the "
22594"window, the button size will remain the same, but the image size will increase, taking up all of the rest of the "
22595"window."
22596msgstr ""
22597"이 줄은 처음 두 줄과 비슷하지만 <code>Gtk.Button</code>을 만들어 <code>main_box</code>에 추가합니다. 여기서 (두번"
22598"째) <code>expand</code> 인자 값을 <code>Gtk.Image</code>에 대해서는 <code>true</code> 로 설정했음에 반해 "
22599"<code>false</code>로 설정했음에 유의하십시오. 이 함수로 그림을 활용 가능한 공간을 차지하게 하며 단추는 필요한 공간"
22600"만 차지하게 합니다. 창을 죄대로 확장하면 단추 크기는 그대로지만, 그림은 창 나머지 공간을 차지하면서 커집니다."
22601
22602#. (itstool) path: section/p
22603#: C/image-viewer.js.page:246
22604msgid "Finally, we must change the <code>this.window.show ();</code> line to read:"
22605msgstr "마지막으로 <code>this.window.show ();</code> 함수를 다음으로 바꿔야합니다:"
22606
22607#. (itstool) path: section/code
22608#: C/image-viewer.js.page:247
22609#, no-wrap
22610msgid "this.window.show_all ();"
22611msgstr "this.window.show_all ();"
22612
22613#. (itstool) path: section/p
22614#: C/image-viewer.js.page:248
22615msgid ""
22616"This will show the child of the Gtk window, and all of its children, and its children's children, and so on. "
22617"(Remember that Gtk widgets are all hidden by default.)"
22618msgstr ""
22619"이 코드는 Gtk 창의 하위 구성 요소와 해당 요소의 모든 하위 구성 요소를 보여줍니다(기본적으로 Gtk 위젯은 숨겨둔 상태"
22620"임을 기억하십시오)."
22621
22622#. (itstool) path: section/title
22623#: C/image-viewer.js.page:252 C/image-viewer.py.page:169
22624msgid "Loading the image: Connecting to the button's <code>clicked</code> signal"
22625msgstr "그림을 불러옵니다: 단추의 <code>clicked</code> 시그널에 연결"
22626
22627#. (itstool) path: section/p
22628#: C/image-viewer.js.page:253
22629msgid ""
22630"When the user clicks on the <gui>Open</gui> button, a dialog should appear so that the user can choose a picture. "
22631"Once chosen, the picture should be loaded and shown in the image widget."
22632msgstr ""
22633"사용자가 <gui>열기</gui> 단추를 누르면, 대화 상자가 나타나 그림을 선택할 수 있습니다. 그림을 선택하고 나면 그림을 "
22634"불러오고 그림 위젯에 표시합니다."
22635
22636#. (itstool) path: section/p
22637#: C/image-viewer.js.page:254
22638msgid ""
22639"The first step is to connect the <code>clicked</code> signal of the button to a signal handler function, which we "
22640"call <code>_openClicked</code>. Put this code immediately after the <code>var open_button = new Gtk.Button</code> "
22641"line where the button was created:"
22642msgstr ""
22643"첫 단계에서는 단추의 <code>clicked</code> 시그널을, 우리가 호출할 시그널 핸들러 함수 <code>_openClicked</code>에 연"
22644"결합니다. 이 코드를 단추를 만드는 <code>var open_button = new Gtk.Button</code> 줄 바로 다음에 넣으십시오:"
22645
22646#. (itstool) path: section/code
22647#: C/image-viewer.js.page:255
22648#, no-wrap
22649msgid ""
22650"\n"
22651"open_button.connect (\"clicked\", Lang.bind (this, this._openClicked));"
22652msgstr ""
22653"\n"
22654"open_button.connect (\"clicked\", Lang.bind (this, this._openClicked));"
22655
22656#. (itstool) path: section/p
22657#: C/image-viewer.js.page:257
22658msgid ""
22659"We are using the <em>Lang</em> JavaScript helper here. It allows us to connect a <em>class method</em> to the "
22660"signal, rather than a plain function (without a class) which we had used before for the window's <code>hide</code> "
22661"signal. Don't worry about this for now, it's just a technical detail. For it to work, you also need to put the "
22662"following line at the top of the file:"
22663msgstr ""
22664"<em>Lang</em> JavaScript 보조 라이브러리를 사용하고 있습니다. 창의 <code>hide</code> 시그널에 대한 (클래스 없는) 생"
22665"짜 함수를 쓰기보다는, 시그널에 <em>클래스 메서드</em> 를 연결할 수 있습니다. 지금은 걱정하실 필요가 없습니다. 그냥 "
22666"기술적으로 자세한 이야기일 뿐이죠. 동작하게 하려면 파일의 상단에 다음 줄을 넣어야합니다:"
22667
22668#. (itstool) path: section/code
22669#: C/image-viewer.js.page:258
22670#, no-wrap
22671msgid "const Lang = imports.lang;"
22672msgstr "const Lang = imports.lang;"
22673
22674#. (itstool) path: section/title
22675#: C/image-viewer.js.page:262 C/image-viewer.py.page:180
22676msgid "Loading the image: Writing the signal's callback"
22677msgstr "그림 불러오기: 시그널 콜백 작성"
22678
22679#. (itstool) path: section/p
22680#: C/image-viewer.js.page:263
22681msgid ""
22682"Now we can create the <code>_openClicked()</code> method. Insert the following into the <code>ImageViewer."
22683"prototype</code> code block, after the <code>_init</code> method (and not forgetting the comma):"
22684msgstr ""
22685"이제 <code>_openClicked()</code> 메서드를 만들었습니다. 다음 코드를 <code>_init</code> 메서드 다음의 "
22686"<code>ImageViewer.prototype</code> 코드 블럭에 넣으십시오(그리고 콤마 표시를 빼먹지 마십시오):"
22687
22688#. (itstool) path: section/code
22689#: C/image-viewer.js.page:264
22690#, no-wrap
22691msgid ""
22692"\n"
22693"  _openClicked: function () {\n"
22694"    var chooser = new Gtk.FileChooserDialog ({title: \"Select an image\",\n"
22695"                                              action: Gtk.FileChooserAction.OPEN,\n"
22696"                                              transient_for: this.window,\n"
22697"                                              modal: true});\n"
22698"    chooser.add_button (Gtk.STOCK_CANCEL, 0);\n"
22699"    chooser.add_button (Gtk.STOCK_OPEN, 1);\n"
22700"    chooser.set_default_response (1);\n"
22701"\n"
22702"    var filter = new Gtk.FileFilter ();\n"
22703"    filter.add_pixbuf_formats ();\n"
22704"    chooser.filter = filter;\n"
22705"\n"
22706"    if (chooser.run () == 1)\n"
22707"      this.image.file = chooser.get_filename ();\n"
22708"\n"
22709"    chooser.destroy ();\n"
22710"  }"
22711msgstr ""
22712"\n"
22713"  _openClicked: function () {\n"
22714"    var chooser = new Gtk.FileChooserDialog ({title: \"Select an image\",\n"
22715"                                              action: Gtk.FileChooserAction.OPEN,\n"
22716"                                              transient_for: this.window,\n"
22717"                                              modal: true});\n"
22718"    chooser.add_button (Gtk.STOCK_CANCEL, 0);\n"
22719"    chooser.add_button (Gtk.STOCK_OPEN, 1);\n"
22720"    chooser.set_default_response (1);\n"
22721"\n"
22722"    var filter = new Gtk.FileFilter ();\n"
22723"    filter.add_pixbuf_formats ();\n"
22724"    chooser.filter = filter;\n"
22725"\n"
22726"    if (chooser.run () == 1)\n"
22727"      this.image.file = chooser.get_filename ();\n"
22728"\n"
22729"    chooser.destroy ();\n"
22730"  }"
22731
22732#. (itstool) path: item/p
22733#: C/image-viewer.js.page:286
22734msgid ""
22735"The line beginning with <code>var chooser</code> creates an <gui>Open</gui> dialog, which the user can use to "
22736"choose files. We set four properties: the title of the dialog; the action (type) of the dialog (it's an \"open\" "
22737"dialog, but we could have used <code>SAVE</code> if the intention was to save a file; <code>transient_for</code>, "
22738"which sets the parent window of the dialog; and <code>modal</code> which, if set to <code>true</code>, prevents "
22739"the user from clicking on another area of the application until the dialog is closed."
22740msgstr ""
22741"<code>var chooser</code>로 시작하는 줄에서는 사용자가 파일을 선택할 수 있는 <gui>열기</gui> 대화 상자를 만듭니다. "
22742"대화 상자 제목, 대화 상자 동작(형식) (\"열기\" 대화 상자지만, 파일을 저장하려고 할 때는 <code>SAVE</code>를 쓸 수 "
22743"있습니다), 대화 상자의 상위 창을 설정하는 <code>transient_for</code>,  <code>true</code>로 설정하면 대화상자를 닫"
22744"기 전까지 그 어떤 것도 누를 수 없게 하는 <code>modal</code> 속성을 지정합니다."
22745
22746#. (itstool) path: item/p
22747#: C/image-viewer.js.page:289 C/image-viewer.py.page:203
22748msgid ""
22749"The next two lines add <gui>Cancel</gui> and <gui>Open</gui> buttons to the dialog. The second argument of the "
22750"<code>add_button</code> method is the (integer) value that is returned when the button is pressed: 0 for "
22751"<gui>Cancel</gui> and 1 for <gui>Open</gui>."
22752msgstr ""
22753"다음 두 줄은 대화상자에 <gui>취소</gui> 단추와 <gui>열기</gui> 단추를 만듭니다. <code>add_button</code> 메서드의 두"
22754"번째  인자는 단추를 눌렀을 때 반환하는 (정수) 값입니다. <gui>취소</gui>는 0, <gui>열기</gui>는 1입니다."
22755
22756#. (itstool) path: item/p
22757#: C/image-viewer.js.page:293 C/image-viewer.py.page:207
22758msgid ""
22759"<code>set_default_response</code> determines the button that will be activated if the user double-clicks a file or "
22760"presses <key>Enter</key>. In our case, we are using the <gui>Open</gui> button as default (which has the value 1)."
22761msgstr ""
22762"<code>set_default_response</code>에서는 파일을 두번 누르거나 <key>Enter</key> 키를 눌렀을 때 활성화 할 단추를 결정"
22763"합니다. 지금의 경우는 <gui>열기</gui> 단추(단추 값은 1)를 기본으로 사용합니다."
22764
22765#. (itstool) path: item/p
22766#: C/image-viewer.js.page:296 C/image-viewer.py.page:210
22767msgid ""
22768"The next three lines restrict the <gui>Open</gui> dialog to only display files which can be opened by <code>Gtk."
22769"Image</code>. A filter object is created first; we then add all kinds of files supported by <code>Gdk.Pixbuf</"
22770"code> (which includes most image formats like PNG and JPEG) to the filter. Finally, we set this filter to be the "
22771"<gui>Open</gui> dialog's filter."
22772msgstr ""
22773"다음 두 줄은 <gui>열기</gui> 대화 상자에서 <code>Gtk.Image</code>로만 열 수 있는 파일을 표시하도록 제한합니다. 필"
22774"터 객체를 우선 만듭니다. 그 다음 <code>Gdk.Pixbuf</code>에서 지원하는 파일 종류(PNG와 JPEG 같은 대부분의 그림 형식)"
22775"를 필터에 추가합니다. 마지막으로 이 필터를 <gui>열기</gui> 대화 상자의 필터로 설정합니다."
22776
22777#. (itstool) path: item/p
22778#: C/image-viewer.js.page:299
22779msgid ""
22780"<code>chooser.run</code> displays the <gui>Open</gui> dialog. The dialog will wait for the user to choose an "
22781"image; when they do, <code>chooser.run</code> will return the value <output>1</output> (it would return <output>0</"
22782"output> if the user clicked <gui>Cancel</gui>). The <code>if</code> statement tests for this."
22783msgstr ""
22784"<code>dialog.run</code>은 <gui>열기</gui> 대화 상자를 표시합니다. 대화 상자는 사용자의 그림 선택을 기다립니다. 사용"
22785"자가 그림을 선택하면 <code>dialog.run</code> 에서 <output>1</output> 값을 반환합니다(<gui>취소</gui>를 누르면 "
22786"<output>0</output> 값을 반환합니다). <code>if</code> 구문에서는 어떤 값을 반환했는지 확인합니다."
22787
22788#. (itstool) path: item/p
22789#: C/image-viewer.js.page:301 C/image-viewer.py.page:215
22790msgid ""
22791"Assuming that the user did click <gui>Open</gui>, the next line sets the <code>file</code> property of the "
22792"<code>Gtk.Image</code> to the filename of the image selected by the user. The <code>Gtk.Image</code> will then "
22793"load and display the chosen image."
22794msgstr ""
22795"사용자가 <gui>열기</gui>를 눌렀다고 한 상황에서, 다음 줄에서 <code>Gtk.Image</code>의 <code>file</code> 속성 값을 "
22796"사용자가 선택한 그림 파일 이름으로 설정합니다. <code>Gtk.Image</code>는 선택한 그림을 불러오고 화면에 표시합니다."
22797
22798#. (itstool) path: item/p
22799#: C/image-viewer.js.page:304 C/image-viewer.py.page:218 C/image-viewer.vala.page:273
22800msgid "In the final line of this method, we destroy the <gui>Open</gui> dialog because we don't need it any more."
22801msgstr "이 메서드의 마지막 줄에서는 <gui>열기</gui> 대화상자는 더 이상 필요 없으니 해체합니다."
22802
22803#. (itstool) path: section/p
22804#: C/image-viewer.js.page:312
22805msgid ""
22806"All of the code you need should now be in place, so try running the code. That should be it; a fully-functioning "
22807"image viewer (and a whistlestop tour of JavaScript and Gtk) in not much time at all!"
22808msgstr ""
22809"필요한 모든 코드를 제자리에 넣었으니 코드를 실행해보겠습니다. 제대로 동작할겝니다. 이렇게 하여 기능이 완전하게 동작"
22810"하는 그림 보기 프로그램(JavaScript와 Gtk를 활용한 간단한 맛보기)을 그리 길지 않은 시간 동안에 만들었습니다!"
22811
22812#. (itstool) path: section/p
22813#: C/image-viewer.js.page:317
22814msgid ""
22815"If you run into problems with the tutorial, compare your code with this <link href=\"image-viewer/image-viewer.js"
22816"\">reference code</link>."
22817msgstr ""
22818"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"image-viewer/image-viewer.js\">참조 코드</link>와 여"
22819"러분의 코드를 비교해보십시오."
22820
22821#. (itstool) path: info/title
22822#: C/image-viewer.py.page:8
22823msgctxt "text"
22824msgid "Image viewer (Python)"
22825msgstr "그림 보기(Python)"
22826
22827#. (itstool) path: info/desc
22828#: C/image-viewer.py.page:11
22829msgid "A little bit more than a simple \"Hello world\" application - write an image viewer in GTK."
22830msgstr "간단한 \"Hello world\" 프로그램에 약간의 무언가가 더 들어갑니다 - GTK로 그림 보기 프로그램을 작성합니다."
22831
22832#. (itstool) path: item/p
22833#: C/image-viewer.py.page:34
22834msgid "Write a basic GTK user interface in Python"
22835msgstr "파이썬 언어로 기본 GTK 사용자 인터페이스 작성하기"
22836
22837#. (itstool) path: item/p
22838#: C/image-viewer.py.page:42
22839msgid "Basic knowledge of the python programming language"
22840msgstr "파이썬 프로그래밍 언어 기본 지식"
22841
22842#. (itstool) path: item/p
22843#: C/image-viewer.py.page:56
22844msgid ""
22845"Choose <gui>PyGTK (automake)</gui> from the <gui>Python</gui> tab, click <gui>Continue</gui>, and fill out your "
22846"details on the next few pages. Use <file>image-viewer</file> as project name and directory."
22847msgstr ""
22848"<gui>Python</gui> 탭에서 <gui>PyGTK (automake)</gui>를 선택하고, <gui>계속</gui>을 누른 다음, 나타난 페이지에서 몇"
22849"가지 자세한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>image-viewer</file>를 입력하십시오."
22850
22851#. (itstool) path: item/p
22852#: C/image-viewer.py.page:59
22853msgid ""
22854"Be sure to disable <gui>Use GtkBuilder for user interface</gui> as we will build the user interface manually in "
22855"this example. For an example of using the interface designer, check the <link xref=\"guitar-tuner.py\">Guitar-"
22856"Tuner demo</link>."
22857msgstr ""
22858"이 예제의 사용자 인터페이스를 직접 만들 예정이므로 <gui>사용자 인터페이스에 GtkBuilder 사용</gui> 설정을 껐는지 확"
22859"인하십시오. 인터페이스 빌더 사용법을 알아보려면 <link xref=\"guitar-tuner.py\">기타 조율 프로그램 데모</link>를 확"
22860"인하십시오."
22861
22862#. (itstool) path: item/p
22863#: C/image-viewer.py.page:64
22864msgid ""
22865"Click <gui>Apply</gui> and the project will be created for you. Open <file>src/image_viewer.py</file> from the "
22866"<gui>Project</gui> or <gui>File</gui> tabs. It contains very basic example code."
22867msgstr ""
22868"<gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/"
22869"image_viewer.py</file>를 여십시오.여기엔 매우 기본적인 예제 코드가 들어있습니다."
22870
22871#. (itstool) path: section/p
22872#: C/image-viewer.py.page:71
22873msgid "Let's see what a very basic Gtk application looks like in Python:"
22874msgstr "아주 기본적인 파이썬 Gtk 프로그램이 어떻게 생겼는지 살펴보겠습니다:"
22875
22876#. (itstool) path: section/code
22877#: C/image-viewer.py.page:72
22878#, no-wrap
22879msgid ""
22880"\n"
22881"from gi.repository import Gtk, GdkPixbuf, Gdk\n"
22882"import os, sys\n"
22883"\n"
22884"class GUI:\n"
22885"\tdef __init__(self):\n"
22886"\t\twindow = Gtk.Window()\n"
22887"\t\twindow.set_title (\"Hello World\")\n"
22888"\t\twindow.connect_after('destroy', self.destroy)\n"
22889"\n"
22890"\t\twindow.show_all()\n"
22891"\n"
22892"\tdef destroy(window, self):\n"
22893"\t\tGtk.main_quit()\n"
22894"\n"
22895"def main():\n"
22896"\tapp = GUI()\n"
22897"\tGtk.main()\n"
22898"\n"
22899"if __name__ == \"__main__\":\n"
22900"    sys.exit(main())\n"
22901"\n"
22902"  "
22903msgstr ""
22904"\n"
22905"from gi.repository import Gtk, GdkPixbuf, Gdk\n"
22906"import os, sys\n"
22907"\n"
22908"class GUI:\n"
22909"\tdef __init__(self):\n"
22910"\t\twindow = Gtk.Window()\n"
22911"\t\twindow.set_title (\"Hello World\")\n"
22912"\t\twindow.connect_after('destroy', self.destroy)\n"
22913"\n"
22914"\t\twindow.show_all()\n"
22915"\n"
22916"\tdef destroy(window, self):\n"
22917"\t\tGtk.main_quit()\n"
22918"\n"
22919"def main():\n"
22920"\tapp = GUI()\n"
22921"\tGtk.main()\n"
22922"\n"
22923"if __name__ == \"__main__\":\n"
22924"    sys.exit(main())\n"
22925"\n"
22926"  "
22927
22928#. (itstool) path: item/p
22929#: C/image-viewer.py.page:101
22930msgid ""
22931"In the <code>__init__</code> method of the <code>GUI</code> class creates an (empty) <code>Gtk.Window</code>, sets "
22932"its title and then connects a signal to quit the application once the window is closed. That's pretty simple "
22933"overall, more on signals later."
22934msgstr ""
22935"<code>GUI</code> 클래스의 <code>__init__</code> 메서드에서 (비어 있는) <code>Gtk.Window</code>를 만들고, 제목을 설"
22936"정하며, 창을 닫을 떄 프로그램을 끝내는 시그널을 연결합니다. 전체적으로 좀 간단한데 시그널에 대한 더 많은 내용은 나"
22937"중에 다루겠습니다."
22938
22939#. (itstool) path: item/p
22940#: C/image-viewer.py.page:106
22941msgid ""
22942"Next, <code>destroy</code> is defined which just quits the application. It is called by the <code>destroy</code> "
22943"signal connected above."
22944msgstr ""
22945"다음, <code>destroy</code>는 프로그램 끝내기를 정의합니다. 위에서 연결한 <code>destroy</code> 시그널에서 호출합니"
22946"다."
22947
22948#. (itstool) path: item/p
22949#: C/image-viewer.py.page:110
22950msgid "The rest of the file does initialisation for Gtk and displays the GUI."
22951msgstr "파일의 나머지 부분에서는 Gtk를 초기화하고 GUI를 보여줍니다."
22952
22953#. (itstool) path: section/p
22954#: C/image-viewer.py.page:114
22955msgid ""
22956"This code is ready to run, so try it using <guiseq><gui>Run</gui><gui>Execute</gui></guiseq>. It should show you "
22957"an empty window."
22958msgstr ""
22959"코드를 실행할 준비가 끝났으니 <guiseq><gui>실행</gui><gui>실행</gui></guiseq>을 눌러보겠습니다. 빈 창이 나타나야합"
22960"니다."
22961
22962#. (itstool) path: section/code
22963#: C/image-viewer.py.page:121
22964#, no-wrap
22965msgid ""
22966"\n"
22967"def button_clicked () :\n"
22968"  print \"you clicked me!\"\n"
22969"\n"
22970"b = new Gtk.Button (\"Click me\")\n"
22971"b.connect_after ('clicked', button_clicked)"
22972msgstr ""
22973"\n"
22974"def button_clicked () :\n"
22975"  print \"you clicked me!\"\n"
22976"\n"
22977"b = new Gtk.Button (\"Click me\")\n"
22978"b.connect_after ('clicked', button_clicked)"
22979
22980#. (itstool) path: section/p
22981#: C/image-viewer.py.page:137
22982msgid ""
22983"Let's add the box and widgets to the window. Insert the following code into the <code>__init__</code> method, "
22984"immediately after the <code>window.connect_after</code> line:"
22985msgstr ""
22986"창에 박스와 위젯을 추가해보겠습니다. 다음 코드를 <code>window.connect_after</code><code>__init__</code> 메서드의 "
22987"<code>window.connect_after</code> 줄 바로 다음에 넣으십시오:"
22988
22989#. (itstool) path: section/code
22990#: C/image-viewer.py.page:138
22991#, no-wrap
22992msgid ""
22993"\n"
22994"box = Gtk.Box()\n"
22995"box.set_spacing (5)\n"
22996"box.set_orientation (Gtk.Orientation.VERTICAL)\n"
22997"window.add (box)\n"
22998"\n"
22999msgstr ""
23000"\n"
23001"box = Gtk.Box()\n"
23002"box.set_spacing (5)\n"
23003"box.set_orientation (Gtk.Orientation.VERTICAL)\n"
23004"window.add (box)\n"
23005"\n"
23006
23007#. (itstool) path: section/p
23008#: C/image-viewer.py.page:145
23009msgid ""
23010"The first line creates a <code>Gtk.Box</code> called <code>box</code> and the following lines set two of its "
23011"properties: the <code>orientation</code> is set to vertical (so the widgets are arranged in a column), and the "
23012"<code>spacing</code> between the widgets is set to 5 pixels. The next line then adds the newly-created <code>Gtk."
23013"Box</code> to the window."
23014msgstr ""
23015"첫 줄은 <code>Gtk.Box</code>의 인스턴스 <code>main_box</code>를 만들고 인스턴스의 속성 두개를 설정합니다. "
23016"<code>orientation</code>은 수직 방향으로 설정(따라서 위젯을 수직 방향으로 배치합니다)하고, 위젯 사이의 공간 "
23017"<code>spacing</code> 값은 5 픽셀로 설정합니다. 다음 줄은 창에 새로 만든 <code>Gtk.Box</code>를 추가합니다."
23018
23019#. (itstool) path: section/p
23020#: C/image-viewer.py.page:151
23021msgid ""
23022"To add some widgets to the <code>Gtk.Box</code>, insert the following code directly below the <code>window.add "
23023"(box)</code> line:"
23024msgstr ""
23025"<code>Gtk.Box</code>에 어떤 위젯을 추가하려면 다음 코드를 직접 <code>window.add (box)</code> 줄 다음에 추가하십시"
23026"오:"
23027
23028#. (itstool) path: section/code
23029#: C/image-viewer.py.page:152
23030#, no-wrap
23031msgid ""
23032"\n"
23033"self.image = Gtk.Image()\n"
23034"box.pack_start (self.image, False, False, 0)"
23035msgstr ""
23036"\n"
23037"self.image = Gtk.Image()\n"
23038"box.pack_start (self.image, False, False, 0)"
23039
23040#. (itstool) path: section/p
23041#: C/image-viewer.py.page:155
23042msgid ""
23043"The first line creates a new <code>Gtk.Image</code> called <code>image</code>, which will be used to display an "
23044"image file. As we need that later on in the signal handler, we will define it as a class-wide variable. You need "
23045"to add <code>image = 0</code> to the beginning of the <code>GUI</code> class. Then, the image widget is added "
23046"(<em>packed</em>) into the <code>box</code> container using GtkBox's <link href=\"http://library.gnome.org/devel/"
23047"gtk/stable/GtkBox.html#gtk-box-pack-start\"><code>pack_start</code></link> method."
23048msgstr ""
23049"첫 줄에서는 그림 파일을 나타낼 때 쓸 새 <code>Gtk.Image</code> 인스턴스 <code>image</code>를 만듭니다. 다음에 시그"
23050"널 핸들러가 필요하므로 클래스 범위 변수를 정의하겠습니다. <code>GUI</code> 클래스 시작 부분에 <code>image = 0</"
23051"code>를 추가하십시오. 그 다음 GtkBox의 <link href=\"http://library.gnome.org/devel/gtk/stable/GtkBox.html#gtk-box-"
23052"pack-start\"><code>pack_start</code></link> 메서드로  <code>box</code> 컨테이너에 그림 위젯을 추가(<em>패킹</em>)합"
23053"니다."
23054
23055#. (itstool) path: section/p
23056#: C/image-viewer.py.page:157
23057msgid ""
23058"<code>pack_start</code> takes 4 arguments: the widget that is to be added to the GtkBox (<code>child</code>); "
23059"whether the <code>Gtk.Box</code> should grow larger when the new widget is added (<code>expand</code>); whether "
23060"the new widget should take up all of the extra space created if the <code>Gtk.Box</code> gets bigger (<code>fill</"
23061"code>); and how much space there should be, in pixels, between the widget and its neighbors inside the <code>Gtk."
23062"Box</code> (<code>padding</code>)."
23063msgstr ""
23064"<code>pack_start</code> 메서드에는 <code>Gtk.Box</code>에 추가할 위젯(<code>child</code>) 인자, 새 위젯을 추가했을 "
23065"때 <code>Gtk.Box</code>를 더 크게 할지 여부(<code>expand</code>) 인자, <code>Gtk.Box</code>가 커졌을 때 모든 여분 "
23066"공간을 차지할 지 여부(<code>fill</code>) 인자, <code>Gtk.Box</code>에서 위젯 간 설정할 간격(<code>padding</code>) "
23067"인자가 있습니다."
23068
23069#. (itstool) path: section/code
23070#: C/image-viewer.py.page:161
23071#, no-wrap
23072msgid ""
23073"\n"
23074"button = Gtk.Button (\"Open a picture...\")\n"
23075"box.pack_start (button, False, False, 0)\n"
23076msgstr ""
23077"\n"
23078"button = Gtk.Button (\"Open a picture...\")\n"
23079"box.pack_start (button, False, False, 0)\n"
23080
23081#. (itstool) path: section/p
23082#: C/image-viewer.py.page:165
23083msgid ""
23084"These lines are similar to the first two, but this time they create a <code>Gtk.Button</code> and add it to "
23085"<code>box</code>. Notice that we are setting the <code>expand</code> argument (the second one) to <code>False</"
23086"code> here, whereas it was set to <code>True</code> for the <code>Gtk.Image</code>. This will cause the image to "
23087"take up all available space and the button to take only the space it needs. When you maximize the window, the "
23088"button size will remain the same, but the image size will increase, taking up all of the rest of the window."
23089msgstr ""
23090"이 줄은 처음 두 줄과 비슷하지만 <code>Gtk.Button</code>을 만들어 <code>main_box</code>에 추가합니다. 여기서 (두번"
23091"째) <code>expand</code> 인자 값을 <code>Gtk.Image</code>에 대해서는 <code>True</code> 로 설정했음에 반해 "
23092"<code>False</code>로 설정했음에 유의하십시오. 이 함수로 그림을 활용 가능한 공간을 차지하게 하며 단추는 필요한 공간"
23093"만 차지하게 합니다. 창을 죄대로 확장하면 단추 크기는 그대로지만, 그림은 창 나머지 공간을 차지하면서 커집니다."
23094
23095#. (itstool) path: section/p
23096#: C/image-viewer.py.page:170
23097msgid ""
23098"When the user clicks on the <gui>Open Image...</gui> button, a dialog should appear so that the user can choose a "
23099"picture. Once chosen, the picture should be loaded and shown in the image widget."
23100msgstr ""
23101"사용자가 <gui>그림 열기...</gui> 단추를 누르면, 대화 상자가 나타나 그림을 선택할 수 있습니다. 그림을 선택하고 나면 "
23102"그림을 불러오고 그림 위젯에 표시합니다."
23103
23104#. (itstool) path: section/p
23105#: C/image-viewer.py.page:171
23106msgid ""
23107"The first step is to connect the <code>clicked</code> signal of the button to a signal handler function, which we "
23108"call <code>on_open_clicked</code>. Put this code immediately after the <code>button = Gtk.Button()</code> line "
23109"where the button was created:"
23110msgstr ""
23111"첫 단계에서는 단추의 <code>clicked</code> 시그널을, 우리가 호출할 시그널 핸들러 함수 <code>on_open_clicked</code>"
23112"에 연결합니다. 이 코드를 단추를 만드는 <code>button = Gtk.Button()</code> 줄 바로 다음에 넣으십시오:"
23113
23114#. (itstool) path: section/code
23115#: C/image-viewer.py.page:172
23116#, no-wrap
23117msgid ""
23118"\n"
23119"button.connect_after('clicked', self.on_open_clicked)\n"
23120msgstr ""
23121"\n"
23122"button.connect_after('clicked', self.on_open_clicked)\n"
23123
23124#. (itstool) path: section/p
23125#: C/image-viewer.py.page:175
23126msgid ""
23127"This will connect the <code>clicked</code> signal to <code>on_open_clicked</code> method that we will define below."
23128msgstr "이 코드는 아래에 정의할 <code>on_open_clicked</code> 메서드에 <code>clicked</code>시그널을 연결합니다."
23129
23130#. (itstool) path: section/p
23131#: C/image-viewer.py.page:181
23132msgid ""
23133"Now we can create the <code>on_open_clicked</code> method. Insert the following into the <code>GUI</code> class "
23134"code block, after the <code>__init__</code> method:"
23135msgstr ""
23136"이제 <code>on_open_clicked</code> 메서드를 만들겠습니다. <code>GUI</code> 클래스 코드 블록의 <code>__init__</code> "
23137"메서드 다음에 다음 코드를 넣으십시오:"
23138
23139#. (itstool) path: section/code
23140#: C/image-viewer.py.page:182
23141#, no-wrap
23142msgid ""
23143"\n"
23144"def on_open_clicked (self, button):\n"
23145"\tdialog = Gtk.FileChooserDialog (\"Open Image\", button.get_toplevel(), Gtk.FileChooserAction.OPEN);\n"
23146"\tdialog.add_button (Gtk.STOCK_CANCEL, 0)\n"
23147"\tdialog.add_button (Gtk.STOCK_OK, 1)\n"
23148"\tdialog.set_default_response(1)\n"
23149"\n"
23150"\tfilefilter = Gtk.FileFilter ()\n"
23151"\tfilefilter.add_pixbuf_formats ()\n"
23152"\tdialog.set_filter(filefilter)\n"
23153"\n"
23154"\tif dialog.run() == 1:\n"
23155"\t\tself.image.set_from_file(dialog.get_filename())\n"
23156"\n"
23157"\tdialog.destroy()"
23158msgstr ""
23159"\n"
23160"def on_open_clicked (self, button):\n"
23161"\tdialog = Gtk.FileChooserDialog (\"Open Image\", button.get_toplevel(), Gtk.FileChooserAction.OPEN);\n"
23162"\tdialog.add_button (Gtk.STOCK_CANCEL, 0)\n"
23163"\tdialog.add_button (Gtk.STOCK_OK, 1)\n"
23164"\tdialog.set_default_response(1)\n"
23165"\n"
23166"\tfilefilter = Gtk.FileFilter ()\n"
23167"\tfilefilter.add_pixbuf_formats ()\n"
23168"\tdialog.set_filter(filefilter)\n"
23169"\n"
23170"\tif dialog.run() == 1:\n"
23171"\t\tself.image.set_from_file(dialog.get_filename())\n"
23172"\n"
23173"\tdialog.destroy()"
23174
23175#. (itstool) path: item/p
23176#: C/image-viewer.py.page:200
23177msgid ""
23178"The line beginning with <code>dialog</code> creates an <gui>Open</gui> dialog, which the user can use to choose "
23179"files. We set three properties: the title of the dialog; the action (type) of the dialog (it's an \"open\" dialog, "
23180"but we could have used <code>SAVE</code> if the intention was to save a file; and <code>transient_for</code>, "
23181"which sets the parent window of the dialog."
23182msgstr ""
23183"<code>dialog</code>로 시작하는 줄에서는 사용자가 파일을 선택할 수 있는 <gui>열기</gui> 대화 상자를 만듭니다. 대화 "
23184"상자 제목, 대화 상자 동작(형식) (\"열기\" 대화 상자지만, 파일을 저장하려고 할 때는 <code>SAVE</code>를 쓸 수 있습니"
23185"다), 대화 상자의 상위 창을 설정하는 <code>transient_for</code> 속성을 설정합니다."
23186
23187#. (itstool) path: item/p
23188#: C/image-viewer.py.page:213
23189msgid ""
23190"<code>dialog.run</code> displays the <gui>Open</gui> dialog. The dialog will wait for the user to choose an image; "
23191"when they do, <code>dialog.run</code> will return the value <output>1</output> (it would return <output>0</output> "
23192"if the user clicked <gui>Cancel</gui>). The <code>if</code> statement tests for this."
23193msgstr ""
23194"<code>dialog.run</code>은 <gui>열기</gui> 대화 상자를 표시합니다. 대화 상자는 사용자의 그림 선택을 기다립니다. 사용"
23195"자가 그림을 선택하면 <code>dialog.run</code> 에서 <output>1</output> 값을 반환합니다(<gui>취소</gui>를 누르면 "
23196"<output>0</output> 값을 반환합니다). <code>if</code> 구문에서는 어떤 값을 반환했는지 확인합니다."
23197
23198#. (itstool) path: section/p
23199#: C/image-viewer.py.page:226
23200msgid ""
23201"All of the code you need should now be in place, so try running the code. That should be it; a fully-functioning "
23202"image viewer (and a whistlestop tour of Python and Gtk) in not much time at all!"
23203msgstr ""
23204"필요한 모든 코드를 제자리에 넣었으니 코드를 실행해보겠습니다. 제대로 동작할겝니다. 이렇게 하여 기능이 완전하게 동작"
23205"하는 그림 보기 프로그램(JavaScript와 Gtk를 활용한 간단한 맛보기)을 그리 길지 않은 시간 동안에 만들었습니다!"
23206
23207#. (itstool) path: section/p
23208#: C/image-viewer.py.page:231
23209msgid ""
23210"If you run into problems with the tutorial, compare your code with this <link href=\"image-viewer/image-viewer.py"
23211"\">reference code</link>."
23212msgstr ""
23213"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"image-viewer/image-viewer.py\">참조 코드</link>와 여"
23214"러분의 코드를 비교해보십시오."
23215
23216#. (itstool) path: info/title
23217#: C/image-viewer.vala.page:8
23218msgctxt "text"
23219msgid "Image viewer (Vala)"
23220msgstr "그림 보기(Vala)"
23221
23222#. (itstool) path: info/desc
23223#: C/image-viewer.vala.page:11
23224msgid "A little bit more than a simple \"Hello world\" GTK+ application."
23225msgstr "간단한 \"Hello world\" GTK+ 프로그램에 약간의 무언가가 더 들어갑니다."
23226
23227#. (itstool) path: credit/name
23228#: C/image-viewer.vala.page:23
23229msgid "Philip Chimento"
23230msgstr "Philip Chimento"
23231
23232#. (itstool) path: synopsis/p
23233#: C/image-viewer.vala.page:39
23234msgid "In this tutorial you will create an application which opens and displays an image file. You will learn:"
23235msgstr "이 따라하기 지침서에서는 그림 파일을 열고 보여주는 프로그램을 만듭니다. 다음을 배워나갑니다:"
23236
23237#. (itstool) path: item/p
23238#: C/image-viewer.vala.page:41
23239msgid "How to set up a basic project using the <link xref=\"getting-ready\">Anjuta IDE</link>."
23240msgstr "<link xref=\"getting-ready\">안주타 IDE</link>로 기본 프로젝트를 설정하는 방법."
23241
23242#. (itstool) path: item/p
23243#: C/image-viewer.vala.page:42
23244msgid ""
23245"How to write a <link href=\"http://developer.gnome.org/platform-overview/stable/gtk\">Gtk application</link> in "
23246"Vala"
23247msgstr ""
23248"Vala 프로그래밍 언어로 <link href=\"http://developer.gnome.org/platform-overview/stable/gtk\">Gtk 프로그램</link>"
23249"을 작성하는 방법"
23250
23251#. (itstool) path: item/p
23252#: C/image-viewer.vala.page:43
23253msgid "Some basic concepts of <link href=\"http://developer.gnome.org/gobject/stable/\">GObject</link> programming"
23254msgstr "<link href=\"http://developer.gnome.org/gobject/stable/\">GObject</link> 프로그래밍 일부 기본 개념"
23255
23256#. (itstool) path: item/p
23257#: C/image-viewer.vala.page:50
23258msgid ""
23259"You may find the <link href=\"http://valadoc.org/gtk+-3.0/\">gtk+-3.0</link> API Reference useful, although it is "
23260"not necessary to follow the tutorial."
23261msgstr ""
23262"이 따라하기 지침서에선 별로 필요하지 않지만 쓸만한 <link href=\"http://valadoc.org/gtk+-3.0/\">gtk+-3.0</link> API "
23263"참고서를 찾아보시는 것도 좋습니다."
23264
23265#. (itstool) path: item/p
23266#: C/image-viewer.vala.page:66
23267msgid ""
23268"From the <gui>Vala</gui> tab choose <gui>GTK+ (Simple)</gui>, click <gui>Continue</gui>, and fill out your details "
23269"on the next page. Use <file>image-viewer</file> as project name and directory."
23270msgstr ""
23271"<gui>Vala</gui> 탭에서 <gui>GTK+ (단순)</gui>을 선택하고 <gui>계속</gui>을 누른 다음, 나타난 페이지에서 몇가지 자세"
23272"한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>image-viewer</file>를 입력하십시오."
23273
23274#. (itstool) path: item/p
23275#: C/image-viewer.vala.page:70
23276msgid ""
23277"Make sure that <gui>Use GtkBuilder for user interface</gui> is unchecked as we will create the UI manually in this "
23278"tutorial."
23279msgstr ""
23280"따라하기 지침을 통해 사용자 인터페이스를 직접 만들 예정이므로 <gui>사용자 인터페이스에 GtkBuilder 사용</gui> 설정"
23281"을 껐는지 확인하십시오."
23282
23283#. (itstool) path: note/p
23284#: C/image-viewer.vala.page:71
23285msgid ""
23286"You will learn how to use the interface builder in the <link xref=\"guitar-tuner.vala\">Guitar-Tuner</link> "
23287"tutorial."
23288msgstr ""
23289"<link xref=\"guitar-tuner.vala\">기타 조율 프로그램</link> 따라하기 지침서에서 인터페이스 빌더 사용법을 배웁니다."
23290
23291#. (itstool) path: item/p
23292#: C/image-viewer.vala.page:75
23293msgid ""
23294"Click <gui>Continue</gui> then <gui>Apply</gui> and the project will be created for you. Open <file>src/"
23295"image_viewer.vala</file> from the <gui>Project</gui> or <gui>File</gui> tabs. You will see this code:"
23296msgstr ""
23297"<gui>계속</gui>을 누르고 <gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭"
23298"에서 <file>src/image_viewer.vala</file> 파일을 여십시오. 다음 코드가 나타납니다:"
23299
23300#. (itstool) path: item/code
23301#: C/image-viewer.vala.page:78
23302#, no-wrap
23303msgid ""
23304"\n"
23305"using GLib;\n"
23306"using Gtk;\n"
23307"\n"
23308"public class Main : Object\n"
23309"{\n"
23310"\n"
23311"\tpublic Main ()\n"
23312"\t{\n"
23313"\t\tWindow window = new Window();\n"
23314"\t\twindow.set_title (\"Hello World\");\n"
23315"\t\twindow.show_all();\n"
23316"\t\twindow.destroy.connect(on_destroy);\n"
23317"\t}\n"
23318"\n"
23319"\tpublic void on_destroy (Widget window)\n"
23320"\t{\n"
23321"\t\tGtk.main_quit();\n"
23322"\t}\n"
23323"\n"
23324"\tstatic int main (string[] args)\n"
23325"\t{\n"
23326"\t\tGtk.init (ref args);\n"
23327"\t\tvar app = new Main ();\n"
23328"\n"
23329"\t\tGtk.main ();\n"
23330"\n"
23331"\t\treturn 0;\n"
23332"\t}\n"
23333"}"
23334msgstr ""
23335"\n"
23336"using GLib;\n"
23337"using Gtk;\n"
23338"\n"
23339"public class Main : Object\n"
23340"{\n"
23341"\n"
23342"\tpublic Main ()\n"
23343"\t{\n"
23344"\t\tWindow window = new Window();\n"
23345"\t\twindow.set_title (\"Hello World\");\n"
23346"\t\twindow.show_all();\n"
23347"\t\twindow.destroy.connect(on_destroy);\n"
23348"\t}\n"
23349"\n"
23350"\tpublic void on_destroy (Widget window)\n"
23351"\t{\n"
23352"\t\tGtk.main_quit();\n"
23353"\t}\n"
23354"\n"
23355"\tstatic int main (string[] args)\n"
23356"\t{\n"
23357"\t\tGtk.init (ref args);\n"
23358"\t\tvar app = new Main ();\n"
23359"\n"
23360"\t\tGtk.main ();\n"
23361"\n"
23362"\t\treturn 0;\n"
23363"\t}\n"
23364"}"
23365
23366#. (itstool) path: section/p
23367#: C/image-viewer.vala.page:114
23368msgid ""
23369"The code loads an (empty) window from the user interface description file and shows it. More details are given "
23370"below; skip this list if you understand the basics:"
23371msgstr ""
23372"이 코드는 (빈) 창을 사용자 인터페이스 설명 파일에서 불러오고 화면에 나타냅니다. 자세한 내용은 아래에 있습니다. 기본"
23373"을 이해하셨다면 이 부분은 넘어가셔도 됩니다:"
23374
23375#. (itstool) path: item/p
23376#: C/image-viewer.vala.page:119
23377msgid "The two <code>using</code> lines at the top import namespaces so we don't have to name them explicitly."
23378msgstr ""
23379"상단의 <code>using</code> 줄 두 줄에서는 이름 영역을 임포팅하여 해당 이름을 코드상에서 굳이 언급할 필요가 없게 해줍"
23380"니다."
23381
23382#. (itstool) path: item/p
23383#: C/image-viewer.vala.page:122
23384msgid ""
23385"The constructor of the <code>Main</code> class creates a new (empty) window and connects a <link href=\"https://"
23386"live.gnome.org/Vala/SignalsAndCallbacks\">signal</link> to exit the application when that window is closed."
23387msgstr ""
23388"<code>Main</code> 클래스의 생성자는 (비어 있는) 새 창을 만들고 창을 닫을 때 프로그램을 빠져나갈 <link href="
23389"\"https://live.gnome.org/Vala/SignalsAndCallbacks\">시그널</link>을 연결합니다."
23390
23391#. (itstool) path: item/p
23392#: C/image-viewer.vala.page:127
23393msgid ""
23394"The <code>static main</code> function is run by default when you start a Vala application. It calls a few "
23395"functions which create the <code>Main</code> class, set up and then run the application. The <link href=\"http://"
23396"valadoc.org/gtk+-3.0/Gtk.main.html\"><code>Gtk.main</code></link> function starts the GTK <link href=\"http://en."
23397"wikipedia.org/wiki/Event_loop\">main loop</link>, which runs the user interface and starts listening for events "
23398"(like clicks and key presses)."
23399msgstr ""
23400"<code>static main</code> 함수는 Vala 프로그램을 시작할 때 기본으로 실행하는 함수입니다. <code>Main</code> 클래스를 "
23401"만들고 설정한 다음 프로그램을 실행하는 몇가지 함수를 호출합니다. <link href=\"http://valadoc.org/gtk+-3.0/Gtk.main."
23402"html\"><code>Gtk.main</code></link> 함수는 사용자 인터페이스를 실행하고 이벤트(마우스 단추 누름과 키 누름) 대기를 "
23403"시작하는 GTK <link href=\"http://en.wikipedia.org/wiki/Event_loop\">메인 루프</link>를 시작합니다."
23404
23405#. (itstool) path: section/p
23406#: C/image-viewer.vala.page:134 C/magic-mirror.vala.page:94
23407msgid ""
23408"Change the <gui>Configuration</gui> to <gui>Default</gui> and then press <gui>Execute</gui> to configure the build "
23409"directory. You only need to do this once, for the first build."
23410msgstr ""
23411"<gui>설정</gui>을 <gui>기본</gui>으로 바꾸고 <gui>실행</gui>을 눌러 빌드 디렉터리를 설정하십시오. 처음 빌드 때 한 "
23412"번만 실행하면 됩니다."
23413
23414#. (itstool) path: section/p
23415#: C/image-viewer.vala.page:140
23416msgid ""
23417"Now we will bring life into the empty window. GTK organizes the user interface with <link href=\"http://www."
23418"valadoc.org/gtk+-2.0/Gtk.Container.html\"><code>Gtk.Container</code></link>s that can contain other widgets and "
23419"even other containers. Here we will use the simplest available container, a <link href=\"http://unstable.valadoc."
23420"org/gtk+-2.0/Gtk.Box.html\"><code>Gtk.Box</code></link>."
23421msgstr ""
23422"이제 비어있는 창에 숨결을 불어넣겠습니다. GTK는 다른 위젯을 넣을 수 있고 다른 컨테이너도 넣을 수 있는 <link href="
23423"\"http://www.valadoc.org/gtk+-2.0/Gtk.Container.html\"><code>Gtk.Container</code></link>로  사용자 인터페이스를 모"
23424"아둡니다. 여기서는 여러가지 컨테이너 중 가장 간단한 <link href=\"http://unstable.valadoc.org/gtk+-2.0/Gtk.Box.html"
23425"\"><code>Gtk.Box</code></link>를 사용하겠습니다."
23426
23427#. (itstool) path: section/p
23428#: C/image-viewer.vala.page:144
23429msgid "Add the following lines to the top of the <code>Main</code> class:"
23430msgstr "<code>Main</code> 클래스 상단에 다음 줄을 추가하십시오:"
23431
23432#. (itstool) path: section/code
23433#: C/image-viewer.vala.page:145
23434#, no-wrap
23435msgid ""
23436"\n"
23437"private Window window;\n"
23438"private Image image;\n"
23439msgstr ""
23440"\n"
23441"private Window window;\n"
23442"private Image image;\n"
23443
23444#. (itstool) path: section/p
23445#: C/image-viewer.vala.page:150
23446msgid "Now replace the current constructor with the one below:"
23447msgstr "이제 현재 생성자를 아래 내용으로 바꾸겠습니다:"
23448
23449#. (itstool) path: section/code
23450#: C/image-viewer.vala.page:151
23451#, no-wrap
23452msgid ""
23453"\n"
23454"\n"
23455"public Main () {\n"
23456"\n"
23457"\twindow = new Window ();\n"
23458"\twindow.set_title (\"Image Viewer in Vala\");\n"
23459"\n"
23460"\t// Set up the UI\n"
23461"\tvar box = new Box (Orientation.VERTICAL, 5);\n"
23462"\tvar button = new Button.with_label (\"Open image\");\n"
23463"\timage = new Image ();\n"
23464"\n"
23465"\tbox.pack_start (image, true, true, 0);\n"
23466"\tbox.pack_start (button, false, false, 0);\n"
23467"\twindow.add (box);\n"
23468"\n"
23469"\t// Show open dialog when opening a file\n"
23470"\tbutton.clicked.connect (on_open_image);\n"
23471"\n"
23472"\twindow.show_all ();\n"
23473"\twindow.destroy.connect (main_quit);\n"
23474"}\n"
23475msgstr ""
23476"\n"
23477"\n"
23478"public Main () {\n"
23479"\n"
23480"\twindow = new Window ();\n"
23481"\twindow.set_title (\"Image Viewer in Vala\");\n"
23482"\n"
23483"\t// Set up the UI\n"
23484"\tvar box = new Box (Orientation.VERTICAL, 5);\n"
23485"\tvar button = new Button.with_label (\"Open image\");\n"
23486"\timage = new Image ();\n"
23487"\n"
23488"\tbox.pack_start (image, true, true, 0);\n"
23489"\tbox.pack_start (button, false, false, 0);\n"
23490"\twindow.add (box);\n"
23491"\n"
23492"\t// Show open dialog when opening a file\n"
23493"\tbutton.clicked.connect (on_open_image);\n"
23494"\n"
23495"\twindow.show_all ();\n"
23496"\twindow.destroy.connect (main_quit);\n"
23497"}\n"
23498
23499#. (itstool) path: item/p
23500#: C/image-viewer.vala.page:176
23501msgid ""
23502"The first two lines are the parts of the GUI that we will need to access from more than one method. We declare "
23503"them up here so that they are accessible throughout the class instead of only in the method where they are created."
23504msgstr ""
23505"처음 두 줄은 하나 이상의 메서드에서 접근할 GUI 부분입니다. 이 부분을 여기에 선언하여 메서드를 만든 부분에서만 쓰는"
23506"게 아니라 전 클래스에 걸쳐 쓸 수 있게 합니다."
23507
23508#. (itstool) path: item/p
23509#: C/image-viewer.vala.page:180
23510msgid ""
23511"The first lines of the constructor create the empty window. The next lines create the widgets we want to use: a "
23512"button for opening up an image, the image view widget itself and the box we will use as a container."
23513msgstr ""
23514"생성자 처음 줄에서는 빈 창을 만듭니다. 다음 줄에서는 우리가 쓰려는 위젯을 만듭니다. 그림을 여는 단추, 그림 보기 위"
23515"젯 자체, 컨테이너로 쓸 상자 위젯이 있습니다."
23516
23517#. (itstool) path: item/p
23518#: C/image-viewer.vala.page:184
23519msgid ""
23520"The calls to <link href=\"http://unstable.valadoc.org/gtk+-2.0/Gtk.Box.pack_start.html\"><code>pack_start</code></"
23521"link> add the two widgets to the box and define their behaviour. The image will expand into any available space "
23522"whereas the button will just be as big as needed. You will notice that we don't set explicit sizes on the widgets. "
23523"In GTK this is usually not needed as it makes it much easier to have a layout that looks good in different window "
23524"sizes. Next, the box is added to the window."
23525msgstr ""
23526"<link href=\"http://unstable.valadoc.org/gtk+-2.0/Gtk.Box.pack_start.html\"><code>pack_start</code></link> 호출로 "
23527"박스에 두 위젯을 추가하고 동작을 정의합니다. 그림은 활용 가능한 공간만큼 충분히 확장하고, 단추는 필요한 만큼만 커집"
23528"니다. 위젯의 크기를 분명하게 설정하지 않음을 알아채셨을 겁니다. GTK에서는 창 크기가 달라져도 보기 좋은 배치를 쉽게"
23529"하기에 직접 설정할 필요가 없습니다. 이 과정이 끝나면 박스를 창에 추가합니다."
23530
23531#. (itstool) path: item/p
23532#: C/image-viewer.vala.page:191
23533msgid "We need to define what happens when the user clicks on the button. GTK uses the concept of <em>signals</em>."
23534msgstr "단추를 사용자가 눌렀을 때 어떤 일이 일어날 지 정해야합니다. GTK는 <em>시그널</em> 개념을 활용합니다."
23535
23536#. (itstool) path: item/p
23537#: C/image-viewer.vala.page:192
23538msgid ""
23539"When the <link href=\"http://valadoc.org/gtk+-3.0/Gtk.Button.html\">button</link> is clicked, it fires the <link "
23540"href=\"http://valadoc.org/gtk+-3.0/Gtk.Button.clicked.html\"><code>clicked</code></link> signal, which we can "
23541"connect to some action (defined in a <link href=\"https://live.gnome.org/Vala/SignalsAndCallbacks\">callback</"
23542"link> method)."
23543msgstr ""
23544"<link href=\"http://valadoc.org/gtk+-3.0/Gtk.Button.html\">Button</link>을 누르면, 어떤 동작(<link href=\"https://"
23545"live.gnome.org/Vala/SignalsAndCallbacks\">콜백</link> 메서드에 정의)을 연결할 수 있는 <link href=\"http://valadoc."
23546"org/gtk+-3.0/Gtk.Button.clicked.html\"><code>clicked</code></link> 시그널을 내보냅니다."
23547
23548#. (itstool) path: item/p
23549#: C/image-viewer.vala.page:195
23550msgid ""
23551"This is done using the <code>connect</code> method of the button's <code>clicked</code> signal, which in this case "
23552"tells GTK to call the (yet undefined) <code>on_image_open</code> callback method when the button is clicked. We "
23553"will define the <em>callback</em> in the next section."
23554msgstr ""
23555"사용자가 단추를 누르면 (아직 정하지 않은) <code>on_image_open</code> 콜백 메서드를 호출하여 그림을 이 함수의 인자"
23556"로 전달하라고 GTK에 지시할 때 <code>connect</code> 메서드를 사용하면 됩니다. 다음 섹션에서 <em>콜백</em>을 정의하겠"
23557"습니디."
23558
23559#. (itstool) path: item/p
23560#: C/image-viewer.vala.page:199
23561msgid ""
23562"In the callback, we need to access the <code>window</code> and <code>image</code> widgets, which is why we defined "
23563"them as private members at the top of our class."
23564msgstr ""
23565"콜백 함수에서 <code>window</code>위젯과 <code>image</code> 위젯에 접근해야합니다. 이게 바로 클래스 상단에서 전용 멤"
23566"버 인스턴스로 설정한 이유입니다."
23567
23568#. (itstool) path: item/p
23569#: C/image-viewer.vala.page:203
23570msgid ""
23571"The last <code>connect</code> call makes sure that the application exits when the window is closed. The code "
23572"generated by Anjuta called an <code>on_destroy</code> callback method which called <link href=\"http://www.valadoc."
23573"org/gtk+-2.0/Gtk.main_quit.html\"><code>Gtk.main_quit</code></link>, but just connecting our signal to "
23574"<code>main_quit</code> directly is easier. You can delete the <code>on_destroy</code> method."
23575msgstr ""
23576"마지막으로 <code>connect</code> 호출에서는 창을 닫았을 때 프로그램을 끝낼지 확인합니다. 안주타에서 만든 코드는 "
23577"<link href=\"http://www.valadoc.org/gtk+-2.0/Gtk.main_quit.html\"><code>Gtk.main_quit</code></link>를 호출하는 "
23578"<code>on_destroy</code>  콜백 메서드를 호출하지만, 시그널을 <code>main_quit</code>에 바로 연결하는게 더 쉽습니다. "
23579"<code>on_destroy</code> 메서드를 지울 수 있습니다."
23580
23581#. (itstool) path: section/p
23582#: C/image-viewer.vala.page:211
23583msgid ""
23584"We will now define the signal handler for the <code>clicked</code> signal for the button we mentioned before. Add "
23585"this code after the constructor:"
23586msgstr ""
23587"앞서 언급한 단추의 <code>clicked</code> 시그널을 처리할 시그널 핸들러를 정의하겠습니다. 이 코드를 생성자 다음에 추"
23588"가하십시오:"
23589
23590#. (itstool) path: section/code
23591#: C/image-viewer.vala.page:214
23592#, no-wrap
23593msgid ""
23594"\n"
23595"public void on_open_image (Button self) {\n"
23596"\tvar filter = new FileFilter ();\n"
23597"\tvar dialog = new FileChooserDialog (\"Open image\",\n"
23598"\t                                    window,\n"
23599"\t                                    FileChooserAction.OPEN,\n"
23600"\t                                    Stock.OK,     ResponseType.ACCEPT,\n"
23601"\t                                    Stock.CANCEL, ResponseType.CANCEL);\n"
23602"\tfilter.add_pixbuf_formats ();\n"
23603"\tdialog.add_filter (filter);\n"
23604"\n"
23605"\tswitch (dialog.run ())\n"
23606"\t{\n"
23607"\t\tcase ResponseType.ACCEPT:\n"
23608"\t\t\tvar filename = dialog.get_filename ();\n"
23609"\t\t\timage.set_from_file (filename);\n"
23610"\t\t\tbreak;\n"
23611"\t\tdefault:\n"
23612"\t\t\tbreak;\n"
23613"\t}\n"
23614"\tdialog.destroy ();\n"
23615"}\n"
23616msgstr ""
23617"\n"
23618"public void on_open_image (Button self) {\n"
23619"\tvar filter = new FileFilter ();\n"
23620"\tvar dialog = new FileChooserDialog (\"Open image\",\n"
23621"\t                                    window,\n"
23622"\t                                    FileChooserAction.OPEN,\n"
23623"\t                                    Stock.OK,     ResponseType.ACCEPT,\n"
23624"\t                                    Stock.CANCEL, ResponseType.CANCEL);\n"
23625"\tfilter.add_pixbuf_formats ();\n"
23626"\tdialog.add_filter (filter);\n"
23627"\n"
23628"\tswitch (dialog.run ())\n"
23629"\t{\n"
23630"\t\tcase ResponseType.ACCEPT:\n"
23631"\t\t\tvar filename = dialog.get_filename ();\n"
23632"\t\t\timage.set_from_file (filename);\n"
23633"\t\t\tbreak;\n"
23634"\t\tdefault:\n"
23635"\t\t\tbreak;\n"
23636"\t}\n"
23637"\tdialog.destroy ();\n"
23638"}\n"
23639
23640#. (itstool) path: section/p
23641#: C/image-viewer.vala.page:237
23642msgid "This is a bit complicated, so let's break it down:"
23643msgstr "좀 복잡하니 하나씩 살펴보도록 하죠:"
23644
23645#. (itstool) path: note/p
23646#: C/image-viewer.vala.page:238
23647msgid ""
23648"A signal handler is a type of callback method that is called when a signal is emitted. Here the terms are used "
23649"interchangeably."
23650msgstr ""
23651"시그널 핸들러는 시그널을 어딘가에서 내보냈을 때 콜백 함수를 호출하게 하는 방식입니다. 이 용어는 서로 바꿔서 사용합"
23652"니다."
23653
23654#. (itstool) path: item/p
23655#: C/image-viewer.vala.page:241
23656msgid ""
23657"The first argument of the callback method is always the widget that sent the signal. Sometimes other arguments "
23658"related to the signal come after that, but <em>clicked</em> doesn't have any."
23659msgstr ""
23660"콜백 메서드의 첫번째 인자는 항상 시그널을 보낸 위젯입니다. 때로는 뒤 따라오는 다른 인자가 시그널에 관련이 있지만, "
23661"<em>clicked</em>는 그렇지 않습니다."
23662
23663#. (itstool) path: item/p
23664#: C/image-viewer.vala.page:243
23665msgid ""
23666"In this case the <code>button</code> sent the <code>clicked</code> signal, which is connected to the "
23667"<code>on_open_image</code> callback method:"
23668msgstr ""
23669"이 경우 <code>button</code>에서 <code>on_open_image</code> 콜백 함수에 연결한 <code>clicked</code>  시그널을 내보냅"
23670"니다:"
23671
23672#. (itstool) path: item/code
23673#: C/image-viewer.vala.page:244
23674#, no-wrap
23675msgid ""
23676"\n"
23677"        button.clicked.connect (on_open_image);\n"
23678msgstr ""
23679"\n"
23680"        button.clicked.connect (on_open_image);\n"
23681
23682#. (itstool) path: item/p
23683#: C/image-viewer.vala.page:248
23684msgid "The <code>on_open_image</code> method takes the button that emitted the signal as an argument:"
23685msgstr "<code>on_open_image</code> 메서드는 시그널을 방출한 단추를 인저로 취합니다:"
23686
23687#. (itstool) path: item/code
23688#: C/image-viewer.vala.page:249
23689#, no-wrap
23690msgid ""
23691"\n"
23692"        public void on_open_image (Button self)\n"
23693msgstr ""
23694"\n"
23695"        public void on_open_image (Button self)\n"
23696
23697#. (itstool) path: item/p
23698#: C/image-viewer.vala.page:254
23699msgid ""
23700"The next interesting line is where the dialog for choosing the file is created. <link href=\"http://www.valadoc."
23701"org/gtk+-3.0/Gtk.FileChooserDialog.html\"><code>FileChooserDialog</code></link>'s constructor takes the title of "
23702"the dialog, the parent window of the dialog and several options like the number of buttons and their corresponding "
23703"values."
23704msgstr ""
23705"다음 흥미로운 부분은 파일을 선택하는 대화상자를 만드는 부분입니다. <link href=\"http://www.valadoc.org/gtk+-3.0/"
23706"Gtk.FileChooserDialog.html\"><code>FileChooserDialog</code></link>의 생성자는 대화 상자 제목, 대화 상자의 상위 창, "
23707"단추 갯수와 각각의 값 같은 몇가지 옵션을 취합니다."
23708
23709#. (itstool) path: item/p
23710#: C/image-viewer.vala.page:256
23711msgid ""
23712"Notice that we are using <link href=\"http://unstable.valadoc.org/gtk+-3.0/Gtk.Stock.html\"><em>stock</em></link> "
23713"button names from Gtk, instead of manually typing \"Cancel\" or \"Open\". The advantage of using stock names is "
23714"that the button labels will already be translated into the user's language."
23715msgstr ""
23716"직접 \"취소\" 또는 \"열기\"라고 입력하는 대신, Gtk에서 가져온 <link href=\"http://unstable.valadoc.org/gtk+-3.0/"
23717"Gtk.Stock.html\"><em>stock</em></link> 단추 이름을 사용하고 있음을 참고하십시오. 스톡 이름을 사용하면 사용자의 언어"
23718"로 이미 번역한 단추 레이블을 사용합니다."
23719
23720#. (itstool) path: item/p
23721#: C/image-viewer.vala.page:260
23722msgid ""
23723"The next two lines restrict the <gui>Open</gui> dialog to only display files which can be opened by <em>GtkImage</"
23724"em>. GtkImage is a widget which displays an image. A filter object is created first; we then add all kinds of "
23725"files supported by <link href=\"http://www.valadoc.org/gdk-pixbuf-2.0/Gdk.Pixbuf.html\"><code>Gdk.Pixbuf</code></"
23726"link> (which includes most image formats like PNG and JPEG) to the filter. Finally, we set this filter to be the "
23727"<gui>Open</gui> dialog's filter."
23728msgstr ""
23729"다음 두 줄은 <gui>열기</gui> 대화 상자에서 <em>GtkImage</em>로만 열 수 있는 파일을 표시하도록 제한합니다. 필터 객체"
23730"를 우선 만듭니다. 그 다음 <link href=\"http://www.valadoc.org/gdk-pixbuf-2.0/Gdk.Pixbuf.html\"><code>Gdk.Pixbuf</"
23731"code></link>에서 지원하는 파일 종류(PNG와 JPEG 같은 대부분의 그림 형식)를 필터에 추가합니다. 마지막으로 이 필터를 "
23732"<gui>열기</gui> 대화 상자의 필터로 설정합니다."
23733
23734#. (itstool) path: item/p
23735#: C/image-viewer.vala.page:265
23736msgid ""
23737"<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.run.html\"><code>dialog.run</code></link> displays the "
23738"<gui>Open</gui> dialog. The dialog will wait for the user to choose an image; when they do, <code>dialog.run</"
23739"code> will return the <link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ResponseType.html\">ResponseType</link> "
23740"value <code>ResponseType.ACCEPT</code> (it would return <code>ResponseType.CANCEL</code> if the user clicked "
23741"<gui>Cancel</gui>). The <code>switch</code> statement tests for this."
23742msgstr ""
23743"<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Dialog.run.html\"><code>dialog.run</code></link>은 <gui>열기</"
23744"gui> 대화 상자를 표시합니다. 대화 상자는 사용자의 그림 선택을 기다립니다. 사용자가 그림을 선택하면 <code>dialog."
23745"run</code> 에서 <code>ResponseType.ACCEPT</code> 값을 반환합니다(<gui>취소</gui>를 누르면 <code>ResponseType."
23746"CANCEL</code> 값을 반환합니다). <code>switch</code> 구문에서는 어떤 값을 반환했는지 확인합니다."
23747
23748#. (itstool) path: item/p
23749#: C/image-viewer.vala.page:270
23750msgid ""
23751"Assuming that the user did click <gui>Open</gui>, the next lines get the filename of the image selected by the "
23752"user, and tell the <code>GtkImage</code> widget to load and display the selected image."
23753msgstr ""
23754"사용자가 <gui>열기</gui>를 눌렀다고 한 상황에서, 다음 줄에서 사용자가 선택한 그림의 파일 이름을 가져오고,  "
23755"<code>GtkImage</code> 위젯으로 선택한 그림을 불러오고 화면에 표시합니다."
23756
23757#. (itstool) path: item/p
23758#: C/image-viewer.vala.page:274
23759msgid "Destroying automatically hides the dialog."
23760msgstr "해체할 때는 대화상자를 자동으로 숨깁니다."
23761
23762#. (itstool) path: section/p
23763#: C/image-viewer.vala.page:283
23764msgid ""
23765"If you haven't already done so, choose the <file>src/image-viewer</file> application in the dialog that appears. "
23766"Finally, hit <gui>Run</gui> and enjoy!"
23767msgstr ""
23768"아직 끝나지 않았다면, 대화상자에 나타난 <file>src/image-viewer</file> 프로그램을 선택하십시오. 마지막으로 <gui>실행"
23769"</gui>을 선택하고 즐기시지요!"
23770
23771#. (itstool) path: section/p
23772#: C/image-viewer.vala.page:289
23773msgid ""
23774"If you run into problems with the tutorial, compare your code with this <link href=\"image-viewer/image-viewer.vala"
23775"\">reference code</link>."
23776msgstr ""
23777"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"image-viewer/image-viewer.vala\">참조 코드</link>와 "
23778"여러분의 코드를 비교해보십시오."
23779
23780#. (itstool) path: item/p
23781#: C/image-viewer.vala.page:296
23782msgid ""
23783"Set it up so that when the window opens it is of a specific size to start off with. For example, 200 X 200 pixels."
23784msgstr "창을 열었을 때 지정 크기로 시작하도록 설정하십시오. 예를 들면 200 X 200 픽셀 크기입니다."
23785
23786#. (itstool) path: credit/name
23787#: C/index.page:8
23788msgid "GNOME Documentation Team"
23789msgstr "그놈 문서 팀"
23790
23791#. (itstool) path: credit/years
23792#: C/index.page:10
23793msgid "2010, 2011"
23794msgstr "2010, 2011"
23795
23796#. (itstool) path: credit/name
23797#: C/index.page:13 C/message-board.c.page:15
23798msgid "Shaun McCance"
23799msgstr "Shaun McCance"
23800
23801#. (itstool) path: credit/years
23802#: C/index.page:15 C/message-board.c.page:17
23803msgid "2010"
23804msgstr "2010"
23805
23806#. (itstool) path: page/title
23807#: C/index.page:28
23808msgid "GNOME Developer Platform Demos"
23809msgstr "그놈 개발자 플랫폼 데모"
23810
23811#. (itstool) path: page/p
23812#: C/index.page:30
23813msgid ""
23814"This guide includes a variety of coding examples, such writing an image viewer or weather application. Each demo "
23815"comes with code that you can try, and explains how each example works. They are a great way to get started with "
23816"the GNOME developer platform."
23817msgstr ""
23818"이 안내서는 그림 보기, 날씨 프로그램 과 같은 다양한 코드 예제를 담고 있습니다. 다양한 맛보기 프로그램에 여러분이 따"
23819"라해볼 수 있는 코드, 예제 동작 설명을 함께 넣었습니다. 그놈 개발자 플랫폼을 시작해볼 수 있는 멋진 수단입니다."
23820
23821#. (itstool) path: section/title
23822#: C/index.page:36
23823msgid "Pick a Language"
23824msgstr "언어 선택"
23825
23826#. (itstool) path: section/p
23827#: C/index.page:37
23828msgid "These developer demos are available in a range of programming languages. Pick one to get started:"
23829msgstr "이 개발자 데모는 다양한 프로그래밍 언어 버전으로 있습니다. 시작할 내용을 고르세요:"
23830
23831#. (itstool) path: info/title
23832#: C/js.page:8
23833msgctxt "link"
23834msgid "JavaScript"
23835msgstr "JavaScript"
23836
23837#. (itstool) path: credit/name
23838#: C/js.page:21
23839msgid "Ekaterina Gerasimova"
23840msgstr "Ekaterina Gerasimova"
23841
23842#. (itstool) path: page/title
23843#: C/js.page:26
23844msgid "Tutorials, code samples and platform demos in JavaScript"
23845msgstr "JavaScript 지침서, 예제 코드, 플랫폼 데모"
23846
23847#. (itstool) path: section/title
23848#: C/js.page:31
23849msgid "Code samples and tutorials"
23850msgstr "예제 코드 및 지침서"
23851
23852#. (itstool) path: info/title
23853#: C/label.c.page:8
23854msgctxt "text"
23855msgid "Label (C)"
23856msgstr "Label (C)"
23857
23858#. (itstool) path: info/desc
23859#: C/label.c.page:19 C/label.vala.page:18
23860msgid "A widget which displays text"
23861msgstr "텍스트를 표시하는 위젯"
23862
23863#. (itstool) path: page/title
23864#. (itstool) path: td/p
23865#: C/label.c.page:22 C/label.js.page:21 C/label.py.page:30 C/label.vala.page:21 C/toolbar_builder.py.page:98
23866#: C/toolbar_builder.vala.page:81
23867msgid "Label"
23868msgstr "Label"
23869
23870#. (itstool) path: td/media
23871#. (itstool) path: page/media
23872#. This is a reference to an external file such as an image or video. When
23873#. the file changes, the md5 hash will change to let you know you need to
23874#. update your localized copy. The msgstr is not used at all. Set it to
23875#. whatever you like once you have updated your copy of the file.
23876#: C/label.c.page:26 C/label.js.page:22 C/label.py.page:31 C/label.vala.page:22
23877msgctxt "_"
23878msgid "external ref='media/label.png' md5='734975c18653d88379f983e4501c3fc0'"
23879msgstr ""
23880
23881#. (itstool) path: td/p
23882#. (itstool) path: page/p
23883#: C/label.c.page:27 C/label.py.page:32 C/label.vala.page:23
23884msgid "A simple label"
23885msgstr "간단한 레이블"
23886
23887#. (itstool) path: page/code
23888#: C/label.c.page:32
23889#, no-wrap
23890msgid ""
23891"#include &lt;gtk/gtk.h&gt;\n"
23892"\n"
23893"\n"
23894"\n"
23895"static void\n"
23896"activate (GtkApplication *app,\n"
23897"          gpointer        user_data)\n"
23898"{\n"
23899"  GtkWidget *window;\n"
23900"  GtkWidget *label;\n"
23901"\n"
23902"  /*Create a window with a title and a default size*/\n"
23903"  window = gtk_application_window_new (app);\n"
23904"  gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (app));\n"
23905"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
23906"  gtk_window_set_default_size (GTK_WINDOW (window), 200,100);\n"
23907"   \n"
23908"  /*Create a label and set its alignment. Setting the line wrap to TRUE makes \n"
23909"  the label break lines if the text exceeds the widget's size. When set to \n"
23910"  FALSE the text gets cut off by the edge of the widget*/\n"
23911"  label = gtk_label_new (\"Hello GNOME!\");\n"
23912"  gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);\n"
23913"  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);\n"
23914"\n"
23915"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (label));\n"
23916"\n"
23917"  gtk_widget_show_all (GTK_WIDGET (window));\n"
23918"}\n"
23919"\n"
23920"\n"
23921"\n"
23922"int\n"
23923"main (int argc, char **argv)\n"
23924"{\n"
23925"  GtkApplication *app;\n"
23926"  int status;\n"
23927"\n"
23928"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
23929"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
23930"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
23931"  g_object_unref (app);\n"
23932"  return status;\n"
23933"}\n"
23934msgstr ""
23935"#include &lt;gtk/gtk.h&gt;\n"
23936"\n"
23937"\n"
23938"\n"
23939"static void\n"
23940"activate (GtkApplication *app,\n"
23941"          gpointer        user_data)\n"
23942"{\n"
23943"  GtkWidget *window;\n"
23944"  GtkWidget *label;\n"
23945"\n"
23946"  /*Create a window with a title and a default size*/\n"
23947"  window = gtk_application_window_new (app);\n"
23948"  gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (app));\n"
23949"  gtk_window_set_title (GTK_WINDOW (window), \"Welcome to GNOME\");\n"
23950"  gtk_window_set_default_size (GTK_WINDOW (window), 200,100);\n"
23951"   \n"
23952"  /*Create a label and set its alignment. Setting the line wrap to TRUE makes \n"
23953"  the label break lines if the text exceeds the widget's size. When set to \n"
23954"  FALSE the text gets cut off by the edge of the widget*/\n"
23955"  label = gtk_label_new (\"Hello GNOME!\");\n"
23956"  gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);\n"
23957"  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);\n"
23958"\n"
23959"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (label));\n"
23960"\n"
23961"  gtk_widget_show_all (GTK_WIDGET (window));\n"
23962"}\n"
23963"\n"
23964"\n"
23965"\n"
23966"int\n"
23967"main (int argc, char **argv)\n"
23968"{\n"
23969"  GtkApplication *app;\n"
23970"  int status;\n"
23971"\n"
23972"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
23973"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
23974"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
23975"  g_object_unref (app);\n"
23976"  return status;\n"
23977"}\n"
23978
23979#. (itstool) path: item/p
23980#: C/label.c.page:39
23981msgid "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkLabel.html\">GtkLabel</link>"
23982msgstr "<link href=\"http://developer.gnome.org/gtk3/3.4/GtkLabel.html\">GtkLabel</link>"
23983
23984#. (itstool) path: info/title
23985#: C/label.js.page:8
23986msgctxt "text"
23987msgid "Label (JavaScript)"
23988msgstr "Label (JavaScript)"
23989
23990#. (itstool) path: info/desc
23991#: C/label.js.page:18
23992msgid "A label which can contain text"
23993msgstr "텍스트를 넣을 수 있는 레이블"
23994
23995#. (itstool) path: page/p
23996#: C/label.js.page:23
23997msgid "A label displaying a friendly message."
23998msgstr "친근한 메시지를 나타내는 레이블입니다."
23999
24000#. (itstool) path: page/code
24001#: C/label.js.page:25
24002#, no-wrap
24003msgid ""
24004"#!/usr/bin/gjs\n"
24005"\n"
24006"imports.gi.versions.Gtk = '3.0';\n"
24007"\n"
24008"const Gio = imports.gi.Gio;\n"
24009"const GLib = imports.gi.GLib;\n"
24010"const Gtk = imports.gi.Gtk;\n"
24011"\n"
24012"class LabelExample {\n"
24013"\n"
24014"    /* Create the application itself\n"
24015"       This boilerplate code is needed to build any GTK+ application. */\n"
24016"    constructor() {\n"
24017"        this.application = new Gtk.Application ({\n"
24018"            application_id: 'org.example.jslabel',\n"
24019"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
24020"        });\n"
24021"\n"
24022"        // Connect 'activate' and 'startup' signals to the callback functions\n"
24023"        this.application.connect('activate', this._onActivate.bind(this));\n"
24024"        this.application.connect('startup', this._onStartup.bind(this));\n"
24025"    }\n"
24026"\n"
24027"    // Callback function for 'activate' signal presents windows when active\n"
24028"    _onActivate() {\n"
24029"        this._window.present();\n"
24030"    }\n"
24031"\n"
24032"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
24033"    _onStartup() {\n"
24034"        this._buildUI();\n"
24035"    }\n"
24036"\n"
24037"    // Build the application's UI\n"
24038"    _buildUI() {\n"
24039"\n"
24040"        // Create the application window\n"
24041"        this._window = new Gtk.ApplicationWindow({\n"
24042"            application: this.application,\n"
24043"            window_position: Gtk.WindowPosition.CENTER,\n"
24044"            title: \"Welcome to GNOME\",\n"
24045"            default_height: 100,\n"
24046"            default_width: 200\n"
24047"        });\n"
24048"\n"
24049"        // Create the label\n"
24050"        this.label = new Gtk.Label({ label: \"Hello GNOME!\" });\n"
24051"        this._window.add(this.label);\n"
24052"\n"
24053"        // Show the window and all child widgets\n"
24054"        this._window.show_all();\n"
24055"    }\n"
24056"\n"
24057"\n"
24058"};\n"
24059"\n"
24060"// Run the application\n"
24061"let app = new LabelExample ();\n"
24062"app.application.run (ARGV);\n"
24063msgstr ""
24064"#!/usr/bin/gjs\n"
24065"\n"
24066"imports.gi.versions.Gtk = '3.0';\n"
24067"\n"
24068"const Gio = imports.gi.Gio;\n"
24069"const GLib = imports.gi.GLib;\n"
24070"const Gtk = imports.gi.Gtk;\n"
24071"\n"
24072"class LabelExample {\n"
24073"\n"
24074"    /* Create the application itself\n"
24075"       This boilerplate code is needed to build any GTK+ application. */\n"
24076"    constructor() {\n"
24077"        this.application = new Gtk.Application ({\n"
24078"            application_id: 'org.example.jslabel',\n"
24079"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
24080"        });\n"
24081"\n"
24082"        // Connect 'activate' and 'startup' signals to the callback functions\n"
24083"        this.application.connect('activate', this._onActivate.bind(this));\n"
24084"        this.application.connect('startup', this._onStartup.bind(this));\n"
24085"    }\n"
24086"\n"
24087"    // Callback function for 'activate' signal presents windows when active\n"
24088"    _onActivate() {\n"
24089"        this._window.present();\n"
24090"    }\n"
24091"\n"
24092"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
24093"    _onStartup() {\n"
24094"        this._buildUI();\n"
24095"    }\n"
24096"\n"
24097"    // Build the application's UI\n"
24098"    _buildUI() {\n"
24099"\n"
24100"        // Create the application window\n"
24101"        this._window = new Gtk.ApplicationWindow({\n"
24102"            application: this.application,\n"
24103"            window_position: Gtk.WindowPosition.CENTER,\n"
24104"            title: \"Welcome to GNOME\",\n"
24105"            default_height: 100,\n"
24106"            default_width: 200\n"
24107"        });\n"
24108"\n"
24109"        // Create the label\n"
24110"        this.label = new Gtk.Label({ label: \"Hello GNOME!\" });\n"
24111"        this._window.add(this.label);\n"
24112"\n"
24113"        // Show the window and all child widgets\n"
24114"        this._window.show_all();\n"
24115"    }\n"
24116"\n"
24117"\n"
24118"};\n"
24119"\n"
24120"// Run the application\n"
24121"let app = new LabelExample ();\n"
24122"app.application.run (ARGV);\n"
24123
24124#. (itstool) path: item/p
24125#: C/label.js.page:32
24126msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Label.html\">Gtk.Label</link>"
24127msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Label.html\">Gtk.Label</link>"
24128
24129#. (itstool) path: info/title
24130#: C/label.py.page:9
24131msgctxt "text"
24132msgid "Label (Python)"
24133msgstr "Label (Python)"
24134
24135#. (itstool) path: info/desc
24136#: C/label.py.page:27
24137msgid "A widget that displays a small to medium amount of text"
24138msgstr "적은 양 또는 중간 분량의 글 내용을 나타내는 위젯입니다"
24139
24140#. (itstool) path: section/p
24141#: C/label.py.page:41
24142msgid ""
24143"Another way to obtain what we have in the example is to create the label as an instance of another class and add "
24144"it to the instance of <code>MyWindow</code> in the <code>do_activate(self)</code> method:"
24145msgstr ""
24146"예제 내용을 가져오는 다른 방법은 다른 클래스의 인스턴스로 레이블을 만들고 <code>do_activate(self)</code> 메서드의 "
24147"<code>MyWindow</code> 인스턴스에 추가하는 식입니다:"
24148
24149#. (itstool) path: note/p
24150#: C/label.py.page:43
24151msgid "The highlighted lines indicate code that is different from the previous snippet."
24152msgstr "강조한 줄은 앞 부분과 다른 코드를 나타냅니다."
24153
24154#. (itstool) path: section/code
24155#: C/label.py.page:45
24156#, no-wrap
24157msgid ""
24158"\n"
24159"# a class to define a window\n"
24160"class MyWindow(Gtk.ApplicationWindow):\n"
24161"    def __init__(self, app):\n"
24162"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
24163"        self.set_default_size(200, 100)\n"
24164"\n"
24165"# a class to define a label\n"
24166"<e:hi>\n"
24167"class MyLabel(Gtk.Label):\n"
24168"    def __init__(self):\n"
24169"        Gtk.Label.__init__(self)\n"
24170"        self.set_text(\"Hello GNOME!\")\n"
24171"</e:hi>\n"
24172"\n"
24173"class MyApplication(Gtk.Application):\n"
24174"    def __init__(self):\n"
24175"        Gtk.Application.__init__(self)\n"
24176"\n"
24177"    def do_activate(self):\n"
24178"        # create an instance of MyWindow\n"
24179"        win = MyWindow(self)\n"
24180"\n"
24181"        # create an instance of MyLabel\n"
24182"<e:hi>\n"
24183"        label = MyLabel()\n"
24184"</e:hi>\n"
24185"        # and add it to the window\n"
24186"<e:hi>\n"
24187"        win.add(label)\n"
24188"</e:hi>\n"
24189"        # show the window and everything on it\n"
24190"        win.show_all()"
24191msgstr ""
24192"\n"
24193"# a class to define a window\n"
24194"class MyWindow(Gtk.ApplicationWindow):\n"
24195"    def __init__(self, app):\n"
24196"        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
24197"        self.set_default_size(200, 100)\n"
24198"\n"
24199"# a class to define a label\n"
24200"<e:hi>\n"
24201"class MyLabel(Gtk.Label):\n"
24202"    def __init__(self):\n"
24203"        Gtk.Label.__init__(self)\n"
24204"        self.set_text(\"Hello GNOME!\")\n"
24205"</e:hi>\n"
24206"\n"
24207"class MyApplication(Gtk.Application):\n"
24208"    def __init__(self):\n"
24209"        Gtk.Application.__init__(self)\n"
24210"\n"
24211"    def do_activate(self):\n"
24212"        # create an instance of MyWindow\n"
24213"        win = MyWindow(self)\n"
24214"\n"
24215"        # create an instance of MyLabel\n"
24216"<e:hi>\n"
24217"        label = MyLabel()\n"
24218"</e:hi>\n"
24219"        # and add it to the window\n"
24220"<e:hi>\n"
24221"        win.add(label)\n"
24222"</e:hi>\n"
24223"        # show the window and everything on it\n"
24224"        win.show_all()"
24225
24226#. (itstool) path: section/title
24227#: C/label.py.page:82
24228msgid "Useful methods for a Label widget"
24229msgstr "Label 위젯에 쓸만한 메서드"
24230
24231#. (itstool) path: note/p
24232#: C/label.py.page:85
24233msgid "An explanation of how to work with strings in GTK+ can be found in <link xref=\"strings.py\"/>."
24234msgstr "GTK+에서 문자열을 다루는 방법을 설명하는 내용은 <link xref=\"strings.py\"/>에 있습니다."
24235
24236#. (itstool) path: item/p
24237#: C/label.py.page:89
24238msgid "<code>set_line_wrap(True)</code> breaks lines if the text of the label exceeds the size of the widget."
24239msgstr "<code>set_line_wrap(True)</code> 함수는 레이블의 텍스트가 위젯의 크기 범위를 넘어가는 경우 줄을 바꿉니다."
24240
24241#. (itstool) path: item/p
24242#: C/label.py.page:90
24243msgid ""
24244"<code>set_justify(Gtk.Justification.LEFT)</code> (or <code>Gtk.Justification.RIGHT, Gtk.Justification.CENTER, Gtk."
24245"Justification.FILL</code>) sets the alignment of the lines in the text of the label relative to each other. The "
24246"method has no effect on a single-line label."
24247msgstr ""
24248"<code>set_justify(Gtk.Justification.LEFT)</code>(또는 <code>Gtk.Justification.RIGHT, Gtk.Justification.CENTER, Gtk."
24249"Justification.FILL</code>) 함수는 레이블의 텍스트 줄 정렬 방법을 상대적으로 설정합니다. 한 줄 레이블인 경우 이 메서"
24250"드의 결과는 눈에 띄지 않습니다."
24251
24252#. (itstool) path: item/p
24253#: C/label.py.page:91
24254msgid ""
24255"For decorated text we can use <code>set_markup(\"text\")</code>, where <code>\"text\"</code> is a text in the "
24256"<link href=\"http://developer.gnome.org/pango/stable/PangoMarkupFormat.html\">Pango Markup Language</link>. An "
24257"example:"
24258msgstr ""
24259"텍스트를 꾸밀 때는 <code>set_markup(\"text\")</code> 함수를 사용할 수 있는데, \"text\"는 <link href=\"http://"
24260"developer.gnome.org/pango/stable/PangoMarkupFormat.html\">팡고 마크업 언어</link>로 구성한 텍스트입니다:"
24261
24262#. (itstool) path: item/code
24263#: C/label.py.page:92
24264#, no-wrap
24265msgid ""
24266"\n"
24267"label.set_markup(\"Text can be &lt;small&gt;small&lt;/small&gt;, &lt;big&gt;big&lt;/big&gt;, \"\n"
24268"                 \"&lt;b&gt;bold&lt;/b&gt;, &lt;i&gt;italic&lt;/i&gt; and even point to somewhere \"\n"
24269"                 \"on the &lt;a href=\\\"http://www.gtk.org\\\" \"\n"
24270"                 \"title=\\\"Click to find out more\\\"&gt;internet&lt;/a&gt;.\")"
24271msgstr ""
24272"\n"
24273"label.set_markup(\"Text can be &lt;small&gt;small&lt;/small&gt;, &lt;big&gt;big&lt;/big&gt;, \"\n"
24274"                 \"&lt;b&gt;bold&lt;/b&gt;, &lt;i&gt;italic&lt;/i&gt; and even point to somewhere \"\n"
24275"                 \"on the &lt;a href=\\\"http://www.gtk.org\\\" \"\n"
24276"                 \"title=\\\"Click to find out more\\\"&gt;internet&lt;/a&gt;.\")"
24277
24278#. (itstool) path: info/title
24279#: C/label.vala.page:8
24280msgctxt "text"
24281msgid "Label (Vala)"
24282msgstr "Label (Vala)"
24283
24284#. (itstool) path: page/code
24285#: C/label.vala.page:25
24286#, no-wrap
24287msgid ""
24288"\n"
24289"public class MyWindow : Gtk.ApplicationWindow {\n"
24290"\tinternal MyWindow (MyApplication app) {\n"
24291"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
24292"\n"
24293"\t\tvar label = new Gtk.Label (\"Hello GNOME!\");\n"
24294"\n"
24295"\t\tthis.add (label);\n"
24296"\t\tthis.set_default_size (200, 100);\n"
24297"\t\tthis.show_all ();\n"
24298"\t}\n"
24299"}\n"
24300"\n"
24301"public class MyApplication : Gtk.Application {\n"
24302"\tprotected override void activate () {\n"
24303"\t\tnew MyWindow (this).show ();\n"
24304"\t}\n"
24305"\n"
24306"\tinternal MyApplication () {\n"
24307"\t\tObject (application_id: \"org.example.MyApplication\");\n"
24308"\t}\n"
24309"}\n"
24310"\n"
24311"public int main (string[] args) {\n"
24312"\treturn new MyApplication ().run (args);\n"
24313"}\n"
24314msgstr ""
24315"\n"
24316"public class MyWindow : Gtk.ApplicationWindow {\n"
24317"\tinternal MyWindow (MyApplication app) {\n"
24318"\t\tObject (application: app, title: \"Welcome to GNOME\");\n"
24319"\n"
24320"\t\tvar label = new Gtk.Label (\"Hello GNOME!\");\n"
24321"\n"
24322"\t\tthis.add (label);\n"
24323"\t\tthis.set_default_size (200, 100);\n"
24324"\t\tthis.show_all ();\n"
24325"\t}\n"
24326"}\n"
24327"\n"
24328"public class MyApplication : Gtk.Application {\n"
24329"\tprotected override void activate () {\n"
24330"\t\tnew MyWindow (this).show ();\n"
24331"\t}\n"
24332"\n"
24333"\tinternal MyApplication () {\n"
24334"\t\tObject (application_id: \"org.example.MyApplication\");\n"
24335"\t}\n"
24336"}\n"
24337"\n"
24338"public int main (string[] args) {\n"
24339"\treturn new MyApplication ().run (args);\n"
24340"}\n"
24341
24342#. (itstool) path: p/link
24343#: C/legal.xml:3
24344msgid "Creative Commons Attribution-ShareAlike 3.0 Unported License"
24345msgstr "크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0 Unported 라이선스"
24346
24347#. (itstool) path: license/p
24348#: C/legal.xml:3
24349msgid ""
24350"This work is licensed under a <_:link-1/>. As a special exception, the copyright holders give you permission to "
24351"copy, modify, and distribute the example code contained in this documentation under the terms of your choosing, "
24352"without restriction."
24353msgstr ""
24354"이 문서는 <_:link-1/>를 적용합니다. 특별한 예외로, 저작자는 여러분에게 여러분이 원하는 조항에 따라 이 문서 내 예제 "
24355"코드에 대한 제한 없는 복제, 수정, 배포 권한을 부여합니다."
24356
24357#. (itstool) path: info/desc
24358#: C/license.page:8
24359msgid "Legal information."
24360msgstr "법적 정보."
24361
24362#. (itstool) path: page/title
24363#: C/license.page:11
24364msgid "License"
24365msgstr "라이선스"
24366
24367#. (itstool) path: page/p
24368#: C/license.page:12
24369msgid "This work is distributed under a CreativeCommons Attribution-Share Alike 3.0 Unported license."
24370msgstr "이 문서는 크리에이티브 커먼즈 저작자표시-동일조건변경허락 3.0 Unported 라이선스로 배포됩니다."
24371
24372#. (itstool) path: page/p
24373#: C/license.page:20
24374msgid "You are free:"
24375msgstr "다음을 자유롭게 행할 수 있습니다:"
24376
24377#. (itstool) path: item/title
24378#: C/license.page:25
24379msgid "<em>To share</em>"
24380msgstr "<em>공유</em>"
24381
24382#. (itstool) path: item/p
24383#: C/license.page:26
24384msgid "To copy, distribute and transmit the work."
24385msgstr "저작물을 복제, 배포, 전송합니다."
24386
24387#. (itstool) path: item/title
24388#: C/license.page:29
24389msgid "<em>To remix</em>"
24390msgstr "<em>변경</em>"
24391
24392#. (itstool) path: item/p
24393#: C/license.page:30
24394msgid "To adapt the work."
24395msgstr "저작물에 적용합니다."
24396
24397#. (itstool) path: page/p
24398#: C/license.page:33
24399msgid "Under the following conditions:"
24400msgstr "다음 조항을 따라야합니다:"
24401
24402#. (itstool) path: item/title
24403#: C/license.page:38
24404msgid "<em>Attribution</em>"
24405msgstr "<em>저작자 표시</em>"
24406
24407#. (itstool) path: item/p
24408#: C/license.page:39
24409msgid ""
24410"You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests "
24411"that they endorse you or your use of the work)."
24412msgstr ""
24413"저작자 또는 저작권자가 지정한 방식으로 저작물의 저작자를 언급해야합니다(저작 행위나 저작물의 사용 방식은 해당하지 "
24414"않음)."
24415
24416#. (itstool) path: item/title
24417#: C/license.page:46
24418msgid "<em>Share Alike</em>"
24419msgstr "<em>동일 조건</em>"
24420
24421#. (itstool) path: item/p
24422#: C/license.page:47
24423msgid ""
24424"If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, "
24425"similar or a compatible license."
24426msgstr ""
24427"작업물을 바꾸거나, 전송하거나, 작업물을 기반으로 무언가를 만든다면, 동일, 유사 또는 호환 라이선스를 기반으로 결과 "
24428"작업물을 배포해야합니다."
24429
24430#. (itstool) path: page/p
24431#: C/license.page:53
24432msgid ""
24433"For the full text of the license, see the <link href=\"http://creativecommons.org/licenses/by-sa/3.0/legalcode"
24434"\">CreativeCommons website</link>, or read the full <link href=\"http://creativecommons.org/licenses/by-sa/3.0/"
24435"\">Commons Deed</link>."
24436msgstr ""
24437"라이선스 전문은 <link href=\"http://creativecommons.org/licenses/by-sa/3.0/legalcode\">크리에이티브 커먼즈 웹사이트"
24438"</link>를 방문하시거나, <link href=\"http://creativecommons.org/licenses/by-sa/3.0/\">커먼즈 라이선스</link> 전문"
24439"을 읽으십시오."
24440
24441#. (itstool) path: note/p
24442#: C/license.page:60
24443msgid ""
24444"As a special exception, the copyright holders give you permission to copy, modify, and distribute the example code "
24445"contained in this documentation under the terms of your choosing, without restriction."
24446msgstr ""
24447"특별한 예외로, 저작자는 여러분에게 여러분이 원하는 조항에 따라 이 문서 내 예제 코드에 대한 제한 없는 복제, 수정, 배"
24448"포 권한을 부여합니다."
24449
24450#. (itstool) path: info/title
24451#: C/linkbutton.c.page:8
24452msgctxt "text"
24453msgid "LinkButton (C)"
24454msgstr "LinkButton (C)"
24455
24456#. (itstool) path: info/desc
24457#: C/linkbutton.c.page:18 C/linkbutton.vala.page:18
24458msgid "Create buttons bound to a URL"
24459msgstr "URL로 넘어가는 단추를 만듭니다"
24460
24461#. (itstool) path: page/title
24462#: C/linkbutton.c.page:21 C/linkbutton.js.page:21 C/linkbutton.py.page:22 C/linkbutton.vala.page:21
24463msgid "LinkButton"
24464msgstr "LinkButton"
24465
24466#. (itstool) path: page/media
24467#. This is a reference to an external file such as an image or video. When
24468#. the file changes, the md5 hash will change to let you know you need to
24469#. update your localized copy. The msgstr is not used at all. Set it to
24470#. whatever you like once you have updated your copy of the file.
24471#: C/linkbutton.c.page:23 C/linkbutton.js.page:22 C/linkbutton.py.page:24 C/linkbutton.vala.page:22
24472msgctxt "_"
24473msgid "external ref='media/linkbutton.png' md5='3712eae8953e87c65a6aa74503b8e32b'"
24474msgstr ""
24475
24476#. (itstool) path: page/p
24477#: C/linkbutton.c.page:24
24478msgid "This button links to the GNOME live webpage."
24479msgstr "그놈 라이브 웹 페이지 링크 단추입니다."
24480
24481#. (itstool) path: page/code
24482#: C/linkbutton.c.page:26
24483#, no-wrap
24484msgid ""
24485"\n"
24486"#include &lt;gtk/gtk.h&gt;\n"
24487"\n"
24488"static void\n"
24489"activate (GtkApplication *app,\n"
24490"          gpointer        user_data)\n"
24491"{\n"
24492"  GtkWidget *window;\n"
24493"  GtkWidget *linkbutton;\n"
24494"\n"
24495"  window = gtk_application_window_new (app);\n"
24496"\n"
24497"  gtk_window_set_title (GTK_WINDOW (window), \"GNOME LinkButton\");\n"
24498"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 50);\n"
24499"\n"
24500"  linkbutton = gtk_link_button_new (\"Link to GNOME live!\");\n"
24501"  gtk_link_button_set_uri (GTK_LINK_BUTTON(linkbutton), \"http://live.gnome.org\");\n"
24502"\n"
24503"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (linkbutton));\n"
24504"\n"
24505"  gtk_widget_show_all (window);\n"
24506"}\n"
24507"\n"
24508"int\n"
24509"main (int argc, char **argv)\n"
24510"{\n"
24511"  GtkApplication *app;\n"
24512"  int status;\n"
24513"\n"
24514"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
24515"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
24516"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
24517"  g_object_unref (app);\n"
24518"\n"
24519"  return status;\n"
24520"}\n"
24521msgstr ""
24522"\n"
24523"#include &lt;gtk/gtk.h&gt;\n"
24524"\n"
24525"static void\n"
24526"activate (GtkApplication *app,\n"
24527"          gpointer        user_data)\n"
24528"{\n"
24529"  GtkWidget *window;\n"
24530"  GtkWidget *linkbutton;\n"
24531"\n"
24532"  window = gtk_application_window_new (app);\n"
24533"\n"
24534"  gtk_window_set_title (GTK_WINDOW (window), \"GNOME LinkButton\");\n"
24535"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 50);\n"
24536"\n"
24537"  linkbutton = gtk_link_button_new (\"Link to GNOME live!\");\n"
24538"  gtk_link_button_set_uri (GTK_LINK_BUTTON(linkbutton), \"http://live.gnome.org\");\n"
24539"\n"
24540"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (linkbutton));\n"
24541"\n"
24542"  gtk_widget_show_all (window);\n"
24543"}\n"
24544"\n"
24545"int\n"
24546"main (int argc, char **argv)\n"
24547"{\n"
24548"  GtkApplication *app;\n"
24549"  int status;\n"
24550"\n"
24551"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
24552"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
24553"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
24554"  g_object_unref (app);\n"
24555"\n"
24556"  return status;\n"
24557"}\n"
24558
24559#. (itstool) path: item/p
24560#: C/linkbutton.c.page:34
24561msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkLinkButton.html\">GtkLinkButton</link>"
24562msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkLinkButton.html\">GtkLinkButton</link>"
24563
24564#. (itstool) path: info/title
24565#: C/linkbutton.js.page:8
24566msgctxt "text"
24567msgid "LinkButton (JavaScript)"
24568msgstr "LinkButton (JavaScript)"
24569
24570#. (itstool) path: info/desc
24571#: C/linkbutton.js.page:18
24572msgid "A button that links to a web page"
24573msgstr "웹 페이지를 연결하는 단추"
24574
24575#. (itstool) path: page/p
24576#: C/linkbutton.js.page:23
24577msgid "A button that links to live.gnome.org."
24578msgstr "live.gnome.org에 연결한 단추입니다."
24579
24580#. (itstool) path: page/code
24581#: C/linkbutton.js.page:25
24582#, no-wrap
24583msgid ""
24584"#!/usr/bin/gjs\n"
24585"\n"
24586"imports.gi.versions.Gtk = '3.0';\n"
24587"\n"
24588"const Gio = imports.gi.Gio;\n"
24589"const GLib = imports.gi.GLib;\n"
24590"const Gtk = imports.gi.Gtk;\n"
24591"\n"
24592"class LinkButtonExample {\n"
24593"\n"
24594"    // Create the application itself\n"
24595"    constructor() {\n"
24596"        this.application = new Gtk.Application({\n"
24597"            application_id: 'org.example.jslinkbutton',\n"
24598"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
24599"         });\n"
24600"\n"
24601"        // Connect 'activate' and 'startup' signals to the callback functions\n"
24602"        this.application.connect('activate', this._onActivate.bind(this));\n"
24603"        this.application.connect('startup', this._onStartup.bind(this));\n"
24604"    }\n"
24605"\n"
24606"    // Callback function for 'activate' signal presents window when active\n"
24607"    _onActivate() {\n"
24608"        this._window.present();\n"
24609"    }\n"
24610"\n"
24611"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
24612"    _onStartup() {\n"
24613"        this._buildUI();\n"
24614"    }\n"
24615"\n"
24616"    // Build the application's UI\n"
24617"    _buildUI() {\n"
24618"\n"
24619"        // Create the application window\n"
24620"    this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
24621"                                                 window_position: Gtk.WindowPosition.CENTER,\n"
24622"                                                 title: \"GNOME LinkButton\",\n"
24623"                                                 default_height: 50,\n"
24624"                                                 default_width: 250 });\n"
24625"\n"
24626"        // Create the LinkButton and have it link to live.gnome.org\n"
24627"        this.LinkButton = new Gtk.LinkButton ({label: \"Link to GNOME live!\",\n"
24628"                               uri: \"http://live.gnome.org\"});\n"
24629"        this._window.add (this.LinkButton);\n"
24630"\n"
24631"    // Show the window and all child widgets\n"
24632"    this._window.show_all();\n"
24633"    }\n"
24634"};\n"
24635"\n"
24636"// Run the application\n"
24637"let app = new LinkButtonExample ();\n"
24638"app.application.run (ARGV);\n"
24639msgstr ""
24640"#!/usr/bin/gjs\n"
24641"\n"
24642"imports.gi.versions.Gtk = '3.0';\n"
24643"\n"
24644"const Gio = imports.gi.Gio;\n"
24645"const GLib = imports.gi.GLib;\n"
24646"const Gtk = imports.gi.Gtk;\n"
24647"\n"
24648"class LinkButtonExample {\n"
24649"\n"
24650"    // Create the application itself\n"
24651"    constructor() {\n"
24652"        this.application = new Gtk.Application({\n"
24653"            application_id: 'org.example.jslinkbutton',\n"
24654"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
24655"         });\n"
24656"\n"
24657"        // Connect 'activate' and 'startup' signals to the callback functions\n"
24658"        this.application.connect('activate', this._onActivate.bind(this));\n"
24659"        this.application.connect('startup', this._onStartup.bind(this));\n"
24660"    }\n"
24661"\n"
24662"    // Callback function for 'activate' signal presents window when active\n"
24663"    _onActivate() {\n"
24664"        this._window.present();\n"
24665"    }\n"
24666"\n"
24667"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
24668"    _onStartup() {\n"
24669"        this._buildUI();\n"
24670"    }\n"
24671"\n"
24672"    // Build the application's UI\n"
24673"    _buildUI() {\n"
24674"\n"
24675"        // Create the application window\n"
24676"    this._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
24677"                                                 window_position: Gtk.WindowPosition.CENTER,\n"
24678"                                                 title: \"GNOME LinkButton\",\n"
24679"                                                 default_height: 50,\n"
24680"                                                 default_width: 250 });\n"
24681"\n"
24682"        // Create the LinkButton and have it link to live.gnome.org\n"
24683"        this.LinkButton = new Gtk.LinkButton ({label: \"Link to GNOME live!\",\n"
24684"                               uri: \"http://live.gnome.org\"});\n"
24685"        this._window.add (this.LinkButton);\n"
24686"\n"
24687"    // Show the window and all child widgets\n"
24688"    this._window.show_all();\n"
24689"    }\n"
24690"};\n"
24691"\n"
24692"// Run the application\n"
24693"let app = new LinkButtonExample ();\n"
24694"app.application.run (ARGV);\n"
24695
24696#. (itstool) path: item/p
24697#: C/linkbutton.js.page:32
24698msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.LinkButton.html\">Gtk.LinkButton</link>"
24699msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.LinkButton.html\">Gtk.LinkButton</link>"
24700
24701#. (itstool) path: info/title
24702#: C/linkbutton.py.page:8
24703msgctxt "text"
24704msgid "LinkButton (Python)"
24705msgstr "LinkButton (Python)"
24706
24707#. (itstool) path: info/desc
24708#: C/linkbutton.py.page:19
24709msgid "A button bound to an URL"
24710msgstr "URL에 연결하는 단추"
24711
24712#. (itstool) path: page/p
24713#: C/linkbutton.py.page:25
24714msgid "A button that links to a web page."
24715msgstr "웹페이지로 연결한 단추입니다."
24716
24717#. (itstool) path: section/code
24718#: C/linkbutton.py.page:32
24719#, no-wrap
24720msgid ""
24721"from gi.repository import Gtk\n"
24722"import sys\n"
24723"\n"
24724"\n"
24725"class MyWindow(Gtk.ApplicationWindow):\n"
24726"    # a window\n"
24727"\n"
24728"    def __init__(self, app):\n"
24729"        Gtk.Window.__init__(self, title=\"GNOME LinkButton\", application=app)\n"
24730"        self.set_default_size(250, 50)\n"
24731"\n"
24732"        # a linkbutton pointing to the given URI\n"
24733"        button = Gtk.LinkButton(uri=\"http://live.gnome.org\")\n"
24734"        # with given text\n"
24735"        button.set_label(\"Link to GNOME live!\")\n"
24736"\n"
24737"        # add the button to the window\n"
24738"        self.add(button)\n"
24739"\n"
24740"\n"
24741"class MyApplication(Gtk.Application):\n"
24742"\n"
24743"    def __init__(self):\n"
24744"        Gtk.Application.__init__(self)\n"
24745"\n"
24746"    def do_activate(self):\n"
24747"        win = MyWindow(self)\n"
24748"        win.show_all()\n"
24749"\n"
24750"    def do_startup(self):\n"
24751"        Gtk.Application.do_startup(self)\n"
24752"\n"
24753"app = MyApplication()\n"
24754"exit_status = app.run(sys.argv)\n"
24755"sys.exit(exit_status)\n"
24756msgstr ""
24757"from gi.repository import Gtk\n"
24758"import sys\n"
24759"\n"
24760"\n"
24761"class MyWindow(Gtk.ApplicationWindow):\n"
24762"    # a window\n"
24763"\n"
24764"    def __init__(self, app):\n"
24765"        Gtk.Window.__init__(self, title=\"GNOME LinkButton\", application=app)\n"
24766"        self.set_default_size(250, 50)\n"
24767"\n"
24768"        # a linkbutton pointing to the given URI\n"
24769"        button = Gtk.LinkButton(uri=\"http://live.gnome.org\")\n"
24770"        # with given text\n"
24771"        button.set_label(\"Link to GNOME live!\")\n"
24772"\n"
24773"        # add the button to the window\n"
24774"        self.add(button)\n"
24775"\n"
24776"\n"
24777"class MyApplication(Gtk.Application):\n"
24778"\n"
24779"    def __init__(self):\n"
24780"        Gtk.Application.__init__(self)\n"
24781"\n"
24782"    def do_activate(self):\n"
24783"        win = MyWindow(self)\n"
24784"        win.show_all()\n"
24785"\n"
24786"    def do_startup(self):\n"
24787"        Gtk.Application.do_startup(self)\n"
24788"\n"
24789"app = MyApplication()\n"
24790"exit_status = app.run(sys.argv)\n"
24791"sys.exit(exit_status)\n"
24792
24793#. (itstool) path: section/title
24794#: C/linkbutton.py.page:36
24795msgid "Useful methods for a LinkButton widget"
24796msgstr "LinkButton 위젯에 쓸만한 메서드"
24797
24798#. (itstool) path: item/p
24799#: C/linkbutton.py.page:38
24800msgid ""
24801"<code>get_visited()</code> returns the 'visited' state (<code>True</code> or <code>False</code>) of the URI where "
24802"the LinkButton points. The button becomes visited when it is clicked."
24803msgstr ""
24804"<code>get_visited()</code> 함수는 LinkButton이 가리키는 URI의 'visited' 상태(<code>True</code> 또는 <code>False</"
24805"code>)를 반환합니다. 단추를 누르면 visited 상태가 됩니다."
24806
24807#. (itstool) path: item/p
24808#: C/linkbutton.py.page:39
24809msgid ""
24810"<code>set_visited(True)</code> sets the 'visited' state of the URI where the LinkButton points as <code>True</"
24811"code> (analogously for <code>False</code>)."
24812msgstr ""
24813"<code>set_visited(True)</code> 함수는 LinkButton을 <code>True</code>(<code>False</code> 도 비슷하게).로 설정했을 경"
24814"우 URI의 'visited' 상태를 설정합니다"
24815
24816#. (itstool) path: item/p
24817#: C/linkbutton.py.page:40
24818msgid ""
24819"Each time the button is clicked, the signal <code>\"activate-link\"</code> is emitted. For an explanation of "
24820"signals and callback functions, see <link xref=\"signals-callbacks.py\"/>."
24821msgstr ""
24822"단추를 누를 때마다 <code>\"activate-link\"</code> 시그널을 내보냅니다. 시그널과 콜백 함수를 설명하는 내용을 보려면 "
24823"<link xref=\"signals-callbacks.py\"/>를 참고하십시오."
24824
24825#. (itstool) path: item/p
24826#: C/linkbutton.py.page:48
24827msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkLinkButton.html\">GtkLinkButton</link>"
24828msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkLinkButton.html\">GtkLinkButton</link>"
24829
24830#. (itstool) path: info/title
24831#: C/linkbutton.vala.page:8
24832msgctxt "text"
24833msgid "LinkButton (Vala)"
24834msgstr "LinkButton (Vala)"
24835
24836#. (itstool) path: page/p
24837#: C/linkbutton.vala.page:23
24838msgid "This button links to GNOME live."
24839msgstr "이 단추에 그놈 라이브를 연결했습니다."
24840
24841#. (itstool) path: page/code
24842#: C/linkbutton.vala.page:25
24843#, no-wrap
24844msgid ""
24845"/* This is the application. */\n"
24846"public class MyApplication : Gtk.Application {\n"
24847"\t/* Override the 'activate' signal of GLib.Application. */\n"
24848"\tprotected override void activate () {\n"
24849"\n"
24850"\t\t/* Create the window of this application and child widget and show all the things. */\n"
24851"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
24852"\t\twindow.set_default_size (250, 50);\n"
24853"\t\twindow.title = \"GNOME LinkButton\";\n"
24854"\n"
24855"\t\tvar linkbutton = new Gtk.LinkButton.with_label (\"http://live.gnome.org\", \"Link to GNOME live!\");\n"
24856"\n"
24857"\t\twindow.add (linkbutton);\n"
24858"\t\twindow.show_all ();\n"
24859"\t}\n"
24860"}\n"
24861"\n"
24862"/* main creates and runs the application. */\n"
24863"public int main (string[] args) {\n"
24864"\treturn new MyApplication ().run (args);\n"
24865"}\n"
24866msgstr ""
24867"/* This is the application. */\n"
24868"public class MyApplication : Gtk.Application {\n"
24869"\t/* Override the 'activate' signal of GLib.Application. */\n"
24870"\tprotected override void activate () {\n"
24871"\n"
24872"\t\t/* Create the window of this application and child widget and show all the things. */\n"
24873"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
24874"\t\twindow.set_default_size (250, 50);\n"
24875"\t\twindow.title = \"GNOME LinkButton\";\n"
24876"\n"
24877"\t\tvar linkbutton = new Gtk.LinkButton.with_label (\"http://live.gnome.org\", \"Link to GNOME live!\");\n"
24878"\n"
24879"\t\twindow.add (linkbutton);\n"
24880"\t\twindow.show_all ();\n"
24881"\t}\n"
24882"}\n"
24883"\n"
24884"/* main creates and runs the application. */\n"
24885"public int main (string[] args) {\n"
24886"\treturn new MyApplication ().run (args);\n"
24887"}\n"
24888
24889#. (itstool) path: item/p
24890#: C/linkbutton.vala.page:30
24891msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.LinkButton.html\">Gtk.LinkButton</link>"
24892msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.LinkButton.html\">Gtk.LinkButton</link>"
24893
24894#. (itstool) path: info/title
24895#: C/magic-mirror.vala.page:8
24896msgctxt "text"
24897msgid "Magic mirror (Vala)"
24898msgstr "마법의 거울(Vala)"
24899
24900#. (itstool) path: info/desc
24901#: C/magic-mirror.vala.page:11
24902msgid "Use your webcam as a mirror using the GStreamer framework and GTK+"
24903msgstr "지스트리머와 GTK+로 웹캠을 거울처럼 사용합니다"
24904
24905#. (itstool) path: credit/name
24906#: C/magic-mirror.vala.page:15
24907msgid "Daniel G. Siegel"
24908msgstr "Daniel G. Siegel"
24909
24910#. (itstool) path: page/title
24911#: C/magic-mirror.vala.page:29
24912msgid "Magic mirror"
24913msgstr "마법의 거울"
24914
24915#. (itstool) path: synopsis/p
24916#: C/magic-mirror.vala.page:32
24917msgid ""
24918"<em>Your mirror just fell off the wall and broke into a thousand pieces — but you need a mirror to shave your "
24919"beard off or add some makeup! You only have 15 minutes left before catching the bus to work. So what can you do?</"
24920"em>"
24921msgstr ""
24922"<em>거울이 벽에서 떨어져 나가 수많은 조각으로 깨졌습니다. 그러나 턱수염을 면도하거나 화장을 하려면 거울이 필요합니"
24923"다! 통근 버스를 잡기까지 15분 밖에 안남았습니다. 뭘 할 수 있을까요?</em>"
24924
24925#. (itstool) path: synopsis/p
24926#: C/magic-mirror.vala.page:33
24927msgid ""
24928"In this tutorial, we're going to make a program which lets you use your webcam as a mirror. You will learn how to:"
24929msgstr "이 따라하기 지침을 통해 웹 캠을 거울로 사용하는 프로그램을 만들겠습니다. 다음 방법을 배워나갑니다:"
24930
24931#. (itstool) path: item/p
24932#: C/magic-mirror.vala.page:35
24933msgid "Create a GTK+ application"
24934msgstr "GTK+ 프로그램 만들기"
24935
24936#. (itstool) path: item/p
24937#: C/magic-mirror.vala.page:36
24938msgid "Access your webcam using GStreamer and embed the result into a window"
24939msgstr "지스트리머로 웹캠에 접근해서 결과 동영상을 창에 넣기"
24940
24941#. (itstool) path: item/p
24942#: C/magic-mirror.vala.page:37
24943msgid "Grab photos off your webcam"
24944msgstr "웹 캠으로 사진 찍기"
24945
24946#. (itstool) path: item/p
24947#: C/magic-mirror.vala.page:42
24948msgid "Installed copies of GTK, GStreamer, and a Vala compiler"
24949msgstr "GTK, 지스트리머, Vala 컴파일러 설치"
24950
24951#. (itstool) path: item/p
24952#: C/magic-mirror.vala.page:43
24953msgid "Basic knowledge of an object-oriented programming language"
24954msgstr "객체 지향 프로그래밍 언어 기본 지식"
24955
24956#. (itstool) path: page/media
24957#. This is a reference to an external file such as an image or video. When
24958#. the file changes, the md5 hash will change to let you know you need to
24959#. update your localized copy. The msgstr is not used at all. Set it to
24960#. whatever you like once you have updated your copy of the file.
24961#: C/magic-mirror.vala.page:47
24962msgctxt "_"
24963msgid "external ref='media/magic-mirror.png' md5='8171faea6ed3b6ddac0da084c29e4e22'"
24964msgstr ""
24965
24966#. (itstool) path: item/p
24967#: C/magic-mirror.vala.page:57
24968msgid ""
24969"Choose <gui>GTK+ (simple)</gui> from the <gui>Vala</gui> tab, click <gui>Forward</gui>, and fill out your details "
24970"on the next few pages. Use <file>magic-mirror</file> as project name and directory."
24971msgstr ""
24972"<gui>Vala</gui> 탭에서 <gui>GTK+ (단순)</gui>를 선택하고, <gui>계속</gui>을 누른 다음, 나타난 페이지에서 몇가지 자"
24973"세한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>magic-mirror</file>를 입력하십시오."
24974
24975#. (itstool) path: item/p
24976#: C/magic-mirror.vala.page:60
24977msgid ""
24978"Disable <gui>Use GtkBuilder for user interface</gui> as we will create the UI manually in this tutorial. Check the "
24979"<link xref=\"guitar-tuner.vala\">Guitar-Tuner</link> tutorial using the interface builder."
24980msgstr ""
24981"따라하기 지침을 통해 사용자 인터페이스를 직접 만들 예정이므로 <gui>사용자 인터페이스에 GtkBuilder 사용</gui> 설정"
24982"을 끄십시오. 인터페이스 빌더 사용법을 알아보려면 <link xref=\"guitar-tuner.vala\">기타 조율 프로그램</link> 따라하"
24983"기 지침서를 확인하십시오."
24984
24985#. (itstool) path: item/p
24986#: C/magic-mirror.vala.page:65
24987msgid ""
24988"Make sure that <gui>Configure external packages</gui> is selected. On the next page, select <em>gstreamer-0.10</"
24989"em> from the list to include the <app>GStreamer</app> library into your project."
24990msgstr ""
24991"<gui>외부 패키지 설정</gui>을 <gui>켬</gui>으로 설정했는지 확인하십시오. 다음 페이지의 목록에서 "
24992"<em>gstreamer-0.10</em>를 선택하여 프로젝트에 <app>지스트리머</app> 라이브러리를 넣으십시오."
24993
24994#. (itstool) path: item/p
24995#: C/magic-mirror.vala.page:69
24996msgid ""
24997"Click <gui>Apply</gui> and the project will be created for you. Open <file>src/magic_mirror.vala</file> from the "
24998"<gui>Project</gui> or <gui>File</gui> tabs. You should see some code which starts with the lines:"
24999msgstr ""
25000"<gui>적용</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/"
25001"magic_mirror.vala</file> 파일을 여십시오. 다음 줄로 시작하는 일부 코드를 볼 수 있습니다:"
25002
25003#. (itstool) path: section/p
25004#: C/magic-mirror.vala.page:79
25005msgid ""
25006"The code loads an (empty) window and shows it. More details are given below; skip this list if you understand the "
25007"basics:"
25008msgstr ""
25009"코드에서 (비어 있는) 창을 불러와서 보여줍니다. 자세한 내용은 아래에 있습니다. 기본을 이해하셨다면 건너뛰십시오:"
25010
25011#. (itstool) path: item/p
25012#: C/magic-mirror.vala.page:85
25013msgid ""
25014"The constructor of the <code>Main</code> class creates a new window and sets its title. Afterwards the window is "
25015"shown and a signal is connected which quits the application if the window is closed. More on signals later on."
25016msgstr ""
25017"<code>Main</code> 클래스 생성자에서는 새 창을 만들고 제목을 설정합니다. 그 다음 창을 보여주고, 창을 닫았을 때 어떤 "
25018"프로그램을 끝낼지 시그널을 연결합니다. 다른 시그널은 나중에 살펴보겠습니다."
25019
25020#. (itstool) path: item/p
25021#: C/magic-mirror.vala.page:89
25022msgid ""
25023"The static <code>main</code> function is run by default when you start a Vala application. It calls a few "
25024"functions which create the Main class, set up and then run the application. The <code>Gtk.Main</code> function "
25025"starts the GTK main loop, which runs the user interface and starts listening for events (like clicks and key "
25026"presses)."
25027msgstr ""
25028"정적 <code>main</code> 함수는 Vala 프로그램을 실행할 때 기본으로 동작합니다. Main 클래스를 만들고, 섲렁하며, 프로그"
25029"램을 실행할 몇가지 함수를 호출합니다. <code>Gtk.Main</code> 함수는 사용자 인터페이스를 실행하고 이벤트(마우스 단추 "
25030"누름과 키보드 키 누름) 기다림을 시작하는 GTK 메인 루프를 시작합니다."
25031
25032#. (itstool) path: section/title
25033#: C/magic-mirror.vala.page:98
25034msgid "Access the webcam video stream with GStreamer"
25035msgstr "지스트리머로 웹캠 동영상 스트림 접근하기"
25036
25037#. (itstool) path: section/p
25038#: C/magic-mirror.vala.page:99
25039msgid ""
25040"The GStreamer multimedia framework is able to handle video from webcams. Let's add GStreamer to our application "
25041"and so we can access the video stream."
25042msgstr ""
25043"지스트리머 멀티미디어 프레임워크는 웹캠 동영상을 처리할 수 있습니다. 동영상 스트림에 접근할 수 있도록 지스트리머를 "
25044"프로그램에 추가해보겠습니다."
25045
25046#. (itstool) path: section/code
25047#: C/magic-mirror.vala.page:101
25048#, no-wrap
25049msgid ""
25050"\n"
25051"using GLib;\n"
25052"using Gtk;\n"
25053"\n"
25054"public class Main : Object\n"
25055"{\n"
25056"\tprivate Gst.Element camerabin;\n"
25057"\n"
25058"\tpublic Main () {\n"
25059"\t\tthis.camerabin = Gst.ElementFactory.make (\"camerabin\", \"camera\");\n"
25060"\t\tthis.camerabin.set_state (Gst.State.PLAYING);\n"
25061"\t}\n"
25062"\n"
25063"\tstatic int main (string[] args) {\n"
25064"\t\tGtk.init (ref args);\n"
25065"\t\tGst.init (ref args);\n"
25066"\t\tvar app = new Main ();\n"
25067"\n"
25068"\t\tGtk.main ();\n"
25069"\n"
25070"\t\treturn 0;\n"
25071"\t}\n"
25072"}\n"
25073msgstr ""
25074"\n"
25075"using GLib;\n"
25076"using Gtk;\n"
25077"\n"
25078"public class Main : Object\n"
25079"{\n"
25080"\tprivate Gst.Element camerabin;\n"
25081"\n"
25082"\tpublic Main () {\n"
25083"\t\tthis.camerabin = Gst.ElementFactory.make (\"camerabin\", \"camera\");\n"
25084"\t\tthis.camerabin.set_state (Gst.State.PLAYING);\n"
25085"\t}\n"
25086"\n"
25087"\tstatic int main (string[] args) {\n"
25088"\t\tGtk.init (ref args);\n"
25089"\t\tGst.init (ref args);\n"
25090"\t\tvar app = new Main ();\n"
25091"\n"
25092"\t\tGtk.main ();\n"
25093"\n"
25094"\t\treturn 0;\n"
25095"\t}\n"
25096"}\n"
25097
25098#. (itstool) path: item/p
25099#: C/magic-mirror.vala.page:126
25100msgid ""
25101"First we remove the window we created before because GStreamer will take care of showing the picture on screen."
25102msgstr "지스트리머에서는 화면에 그림을 띄우는 방법을 다루기 때문에 우선 앞서 만든 창을 제거하겠습니다."
25103
25104#. (itstool) path: item/p
25105#: C/magic-mirror.vala.page:130
25106msgid ""
25107"Now we are creating a GStreamer element which accesses our webcam. We are using the Camerabin element, which is an "
25108"all-in-one camera element and is capable of taking photos, videos, applying effects and much more. Perfect for our "
25109"use case! With <code>this.camerabin.set_state (Gst.State.PLAYING)</code> we tell the GStreamer pipeline we just "
25110"created to start playing. Easy, no?"
25111msgstr ""
25112"이제 웹 캠에 접근할 지스트리머 이벤트를 만들겠습니다. 일체형 카메라 구성요소이며 사진, 동영상, 효과적용 기능 등이 "
25113"있는 Camerabin 구성 요소를 활용하겠습니다. 우리가 활용하기에 완벽하죠! 지스트리머 파이프라인에 <code>this."
25114"camerabin.set_state (Gst.State.PLAYING)</code>로 지스트리머 파이프라인에 재생을 시작할 거리를 만들었다고 알리겠습니"
25115"다."
25116
25117#. (itstool) path: item/p
25118#: C/magic-mirror.vala.page:137
25119msgid ""
25120"Of course it is also possible to integrate the video more tightly into other windows but that is an advanced topic "
25121"that includes some details of the X Window System we will omit here."
25122msgstr ""
25123"물론 동영상을 다른 창에 꽉 붙여둘 수도 있지만, X 윈도우 시스템의 일부 구체적 내용이 들어가는 고급 주제이므로 여기서"
25124"는 생략하겠습니다."
25125
25126#. (itstool) path: item/p
25127#: C/magic-mirror.vala.page:141
25128msgid ""
25129"Compile and run it again. You will end up with two windows. In the next step we will integrate the video into the "
25130"GTK+ window."
25131msgstr "다시 컴파일하고 실행하십시오. 창 두개가 뜹니다. 다음 단계에서는 GTK+ 창으로 동영상을 통합하겠습니다."
25132
25133#. (itstool) path: section/p
25134#: C/magic-mirror.vala.page:151
25135msgid ""
25136"If you run into problems with the tutorial, compare your code with this <link href=\"magic-mirror/magic-mirror.vala"
25137"\">reference code</link>. There is also a more <link href=\"magic-mirror/magic-mirror-advanced.vala\">extensive "
25138"implementation</link> that embeds the window into a regular Gtk.Window which involves some advanced techniques, "
25139"and adds buttons to start/stop the picture."
25140msgstr ""
25141"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"magic-mirror/magic-mirror.vala\">참조 코드</link>와 "
25142"여러분의 코드를 비교해보십시오. 일부 고급기술을 넣어 보통 Gtk.Window에 창을 넣고, 사진 표시 시작/정지 단추를 추가"
25143"한 <link href=\"magic-mirror/magic-mirror-advanced.vala\">추가 구현체</link>가 있습니다."
25144
25145#. (itstool) path: section/p
25146#: C/magic-mirror.vala.page:158
25147msgid ""
25148"To find out more about the Vala programming language you might want to check out the <link href=\"http://live."
25149"gnome.org/Vala/Tutorial\">Vala Tutorial</link>."
25150msgstr ""
25151"Vala 프로그래밍 언어에 대해 더 알아보려면 <link href=\"http://live.gnome.org/Vala/Tutorial\">Vala 따라하기 지침서</"
25152"link>를 확인해보시는게 좋습니다."
25153
25154#. (itstool) path: section/title
25155#: C/magic-mirror.vala.page:163
25156msgid "Conclusion"
25157msgstr "마무리"
25158
25159#. (itstool) path: section/p
25160#: C/magic-mirror.vala.page:164
25161msgid ""
25162"That's it, you have managed to create a full-featured webcam photo application in 15 minutes. Now you can shave "
25163"your beard off or add some makeup to your beautiful face, right before having a beautiful day at your workplace, "
25164"where you can impress your friends and colleagues with an awesome application you just made in 15 minutes."
25165msgstr ""
25166"다 됐습니다. 15분동안 완전한 기능을 수행하는 웹캠 사진 프로그램을 열심히 만들었습니다. 이제 15분동안 열심히 만든 대"
25167"단한 프로그램으로 친구나 동료에게 인상을 심어줄 수 있는 일터에서 아름다운 나날을 보내기 전 수염을 깎거나 여러분의 "
25168"이쁘장한 얼굴을 화장할 수 있습니다."
25169
25170#. (itstool) path: info/title
25171#: C/menubar.c.page:8
25172msgctxt "text"
25173msgid "MenuBar (C)"
25174msgstr "MenuBar (C)"
25175
25176#. (itstool) path: info/desc
25177#: C/menubar.c.page:20 C/menubar.py.page:25 C/menubar.vala.page:20
25178msgid "A widget which holds GtkMenuItem widgets"
25179msgstr "GtkMenuItem 위젯을 가진 위젯"
25180
25181#. (itstool) path: page/title
25182#: C/menubar.c.page:23 C/menubar.vala.page:23
25183msgid "MenuBar"
25184msgstr "MenuBar"
25185
25186#. (itstool) path: page/media
25187#. This is a reference to an external file such as an image or video. When
25188#. the file changes, the md5 hash will change to let you know you need to
25189#. update your localized copy. The msgstr is not used at all. Set it to
25190#. whatever you like once you have updated your copy of the file.
25191#: C/menubar.c.page:25 C/menubar.py.page:29 C/menubar.vala.page:24
25192msgctxt "_"
25193msgid "external ref='media/menubar.png' md5='7b642aaa1628d5e43ab85ac230ac1c78'"
25194msgstr ""
25195
25196#. (itstool) path: page/p
25197#: C/menubar.c.page:26 C/menubar.py.page:30 C/menubar.vala.page:25
25198msgid "A MenuBar created using XML and GtkBuilder."
25199msgstr "XML과 GtkBuilder로 만든 MenuBar입니다."
25200
25201#. (itstool) path: note/p
25202#: C/menubar.c.page:27
25203msgid ""
25204"For a more in-depth look at this sample, please do not hesitate to check out the <link xref=\"menubar.vala\">Vala "
25205"MenuBar</link> and/or <link xref=\"menubar.py\">Python MenuBar</link> tutorials."
25206msgstr ""
25207"이 예제를 좀 더 자세한 관점에서 바라보려면, 망설이지 마시고 <link xref=\"menubar.vala\">Vala MenuBar</link> 또는 "
25208"<link xref=\"menubar.py\">Python MenuBar</link> 따라하기 지침서를 살펴보십시오."
25209
25210#. (itstool) path: page/code
25211#: C/menubar.c.page:31
25212#, no-wrap
25213msgid ""
25214"\n"
25215"#include &lt;gtk/gtk.h&gt;\n"
25216"\n"
25217"\n"
25218"\n"
25219"/* Callback function for the \"copy\" action */\n"
25220"static void\n"
25221"copy_callback (GSimpleAction *simple,\n"
25222"            GVariant      *parameter,\n"
25223"            gpointer       user_data)\n"
25224"{\n"
25225"   g_print (\"\\\"Copy\\\" activated\\n\");\n"
25226"}\n"
25227"\n"
25228"\n"
25229"\n"
25230"/* Callback function for the \"paste\" action */\n"
25231"static void\n"
25232"paste_callback (GSimpleAction *simple,\n"
25233"            GVariant      *parameter,\n"
25234"            gpointer       user_data)\n"
25235"{\n"
25236"   g_print (\"\\\"Paste\\\" activated\\n\");\n"
25237"}\n"
25238"\n"
25239"\n"
25240"\n"
25241"/* Callback function for the \"shape\" action */\n"
25242"static void\n"
25243"shape_callback (GSimpleAction *simple,\n"
25244"            GVariant      *parameter,\n"
25245"            gpointer       user_data)\n"
25246"{\n"
25247"   /* We first gather the value of the GVariant instance with a string type.\n"
25248"    * The overall goal here is to see if shape is set to line, triangle, etc,\n"
25249"    * and put that value within the variable \"answer\".\n"
25250"    */\n"
25251"   const gchar *answer = g_variant_get_string (parameter, NULL);\n"
25252"   g_printf (\"Shape is set to %s.\\n\", answer);\n"
25253"   /* Note that we set the state of the action */\n"
25254"   g_simple_action_set_state (simple, parameter);\n"
25255"}\n"
25256"\n"
25257"\n"
25258"\n"
25259"/* Callback function in which closes the about_dialog created below */\n"
25260"static void\n"
25261"on_close (GtkDialog *dialog,\n"
25262"          gint       response_id,\n"
25263"          gpointer   user_data)\n"
25264"{\n"
25265"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
25266"}\n"
25267"\n"
25268"\n"
25269"\n"
25270"/* Callback function for the about action (see aboutdialog.c example) */\n"
25271"static void\n"
25272"about_callback (GSimpleAction *simple,\n"
25273"            GVariant      *parameter,\n"
25274"            gpointer       user_data)\n"
25275"{\n"
25276"   GtkWidget *about_dialog;\n"
25277"\n"
25278"   about_dialog = gtk_about_dialog_new ();\n"
25279"\n"
25280"   const gchar *authors[] = {\"GNOME Documentation Team\", NULL};\n"
25281"   const gchar *documenters[] = {\"GNOME Documentation Team\", NULL};\n"
25282"\n"
25283"   /* Fill in the about_dialog with the desired information */\n"
25284"   gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about_dialog), \"AboutDialog Example\");\n"
25285"   gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about_dialog), \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\");\n"
25286"   gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about_dialog), authors);\n"
25287"   gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (about_dialog), documenters);\n"
25288"   gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (about_dialog), \"GNOME Developer Website\");\n"
25289"   gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about_dialog), \"http://developer.gnome.org\");\n"
25290"\n"
25291"   /* The \"response\" signal is emitted when the dialog receives a delete event,\n"
25292"    * therefore we connect that signal to the on_close callback function\n"
25293"    * created above.\n"
25294"    */\n"
25295"   g_signal_connect (GTK_DIALOG (about_dialog), \"response\",\n"
25296"                    G_CALLBACK (on_close), NULL);\n"
25297"\n"
25298"   /* Show the about dialog */\n"
25299"   gtk_widget_show (about_dialog);\n"
25300"}\n"
25301"\n"
25302"\n"
25303"\n"
25304"static void\n"
25305"activate (GtkApplication *app,\n"
25306"          gpointer        user_data)\n"
25307"{\n"
25308"  GtkWidget *window;\n"
25309"\n"
25310"  GSimpleAction *copy_action;\n"
25311"  GSimpleAction *paste_action;\n"
25312"  GSimpleAction *shape_action;\n"
25313"  GSimpleAction *about_action;\n"
25314"\n"
25315"  /* Create a window with a title and a default size */\n"
25316"  window = gtk_application_window_new (app);\n"
25317"  gtk_window_set_title (GTK_WINDOW (window), \"MenuBar Example\");\n"
25318"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);\n"
25319"\n"
25320"  /* Begin creating the \"copy\" action.\n"
25321"   * Note that it is an action without a state.\n"
25322"   */\n"
25323"  copy_action = g_simple_action_new (\"copy\", NULL);\n"
25324"  /* Connected to a callback function */\n"
25325"  g_signal_connect (copy_action, \"activate\", G_CALLBACK (copy_callback),\n"
25326"                    GTK_WINDOW (window));\n"
25327"  /* Added to the window */\n"
25328"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (copy_action));\n"
25329"\n"
25330"  /* Begin creating the \"paste\" action.\n"
25331"   * Note that it is an action without a state.\n"
25332"   */\n"
25333"  paste_action = g_simple_action_new (\"paste\", NULL);\n"
25334"  /* Connect the action to a callback function */\n"
25335"  g_signal_connect (paste_action, \"activate\", G_CALLBACK (paste_callback),\n"
25336"                    GTK_WINDOW (window));\n"
25337"  /* Add it to the window */\n"
25338"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (paste_action));\n"
25339"\n"
25340"  /* Begin creating the \"shape\" action.\n"
25341"   * Note that it is an action with a state.\n"
25342"   * First we state that the parameter type of the simple action is a string.\n"
25343"   * When using g_variant_type_new, it is appropriate to free the return value\n"
25344"   * once you're done with it.\n"
25345"   */\n"
25346"  GVariantType *type_string = g_variant_type_new (\"s\");\n"
25347"  /* parameters for the g_simple_action_new_stateful are: (name, parameter type,\n"
25348"   * initial state).\n"
25349"   */\n"
25350"  shape_action = g_simple_action_new_stateful (\"shape\", type_string,\n"
25351"                                               g_variant_new_string (\"line\"));\n"
25352"  /* Connect the action to a callback function */\n"
25353"  g_signal_connect (shape_action, \"activate\", G_CALLBACK (shape_callback),\n"
25354"                    GTK_WINDOW (window));\n"
25355"  /* Add it to the window */\n"
25356"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (shape_action));\n"
25357"  g_variant_type_free (type_string);\n"
25358"\n"
25359"  /* Begin creating the \"about\" action.\n"
25360"   * Note that it is an action without a state.\n"
25361"   */\n"
25362"  about_action = g_simple_action_new (\"about\", NULL);\n"
25363"  /* Connect the action to a callback function */\n"
25364"  g_signal_connect (about_action, \"activate\", G_CALLBACK (about_callback),\n"
25365"                    GTK_WINDOW (window));\n"
25366"  /* Add it to the window */\n"
25367"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (about_action));\n"
25368"\n"
25369"  gtk_widget_show_all (window);\n"
25370"}\n"
25371"\n"
25372"\n"
25373"\n"
25374"/* Callback function for the \"new\" action */\n"
25375"static void\n"
25376"new_callback (GSimpleAction *simple,\n"
25377"         GVariant      *parameter,\n"
25378"         gpointer       user_data)\n"
25379"{\n"
25380"  g_print (\"You clicked \\\"New\\\"\\n\");\n"
25381"}\n"
25382"\n"
25383"\n"
25384"\n"
25385"/* Callback function for the \"quit\" action */\n"
25386"static void\n"
25387"quit_callback (GSimpleAction *simple,\n"
25388"         GVariant      *parameter,\n"
25389"         gpointer       user_data)\n"
25390"{\n"
25391"  GApplication *application = user_data;\n"
25392"\n"
25393"  g_print (\"You clicked \\\"Quit\\\"\\n\");\n"
25394"  g_application_quit (application);\n"
25395"}\n"
25396"\n"
25397"\n"
25398"\n"
25399"/* Callback function for the \"state\" action */\n"
25400"static void\n"
25401"state_callback (GSimpleAction *simple,\n"
25402"         GVariant      *parameter,\n"
25403"         gpointer       user_data)\n"
25404"{\n"
25405"   /* The two possibilities in this case for the \"answer\" variable are either\n"
25406"    * \"on\" or \"off\".\n"
25407"    */\n"
25408"   const gchar *answer = g_variant_get_string (parameter, NULL);\n"
25409"   /* We print the information to the user */\n"
25410"   g_printf (\"State is set to %s.\\n\", answer);\n"
25411"   /* Note that we set the state of the action */\n"
25412"   g_simple_action_set_state (simple, parameter);\n"
25413"}\n"
25414"\n"
25415"\n"
25416"\n"
25417"/* Callback function for the \"awesome\" action */\n"
25418"static void\n"
25419"awesome_callback (GSimpleAction *simple,\n"
25420"         GVariant      *parameter,\n"
25421"         gpointer       user_data)\n"
25422"{\n"
25423"  GVariant *action_state = g_action_get_state (G_ACTION (simple));\n"
25424"  gboolean active = g_variant_get_boolean (action_state);\n"
25425"  GVariant *new_state = g_variant_new_boolean (!active);\n"
25426"  /* Set the new state for the action.\n"
25427"   * (Keeps track of whether it was last checked or unchecked).\n"
25428"   */\n"
25429"  g_simple_action_set_state (simple, new_state);\n"
25430"\n"
25431"  if (active)\n"
25432"     g_print (\"You unchecked \\\"Awesome\\\"\\n\");\n"
25433"  else\n"
25434"     g_print (\"You checked \\\"Awesome\\\"\\n\");\n"
25435"}\n"
25436"\n"
25437"\n"
25438"\n"
25439"/* Startup function for the menu we are creating in this sample */\n"
25440"static void\n"
25441"startup (GApplication *app,\n"
25442"         gpointer      user_data)\n"
25443"{\n"
25444"  /* Initialize variables */\n"
25445"  GSimpleAction *new_action;\n"
25446"  GSimpleAction *quit_action;\n"
25447"  GSimpleAction *state_action;\n"
25448"  GSimpleAction *awesome_action;\n"
25449"\n"
25450"  GtkBuilder *builder;\n"
25451"\n"
25452"  GError *error = NULL;\n"
25453"\n"
25454"  /* Begin creating the \"new\" action.\n"
25455"   * Note that it is an action without a state.\n"
25456"   */\n"
25457"  new_action = g_simple_action_new (\"new\", NULL);\n"
25458"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
25459"  /* It is added to the overall application */\n"
25460"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
25461"\n"
25462"  /* Begin creating the \"quit\" action.\n"
25463"   * Note that it is an action without a state.\n"
25464"   */\n"
25465"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
25466"  g_signal_connect (quit_action, \"activate\", G_CALLBACK (quit_callback), app);\n"
25467"  /* It is added to the overall application */\n"
25468"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
25469"\n"
25470"  /* Begin creating the \"state\" action.\n"
25471"   * Note that it is an action with a state.\n"
25472"   */\n"
25473"  GVariantType *type_string2 = g_variant_type_new (\"s\");\n"
25474"  state_action = g_simple_action_new_stateful (\"state\", type_string2,\n"
25475"                                               g_variant_new_string (\"off\"));\n"
25476"  g_signal_connect (state_action, \"activate\", G_CALLBACK (state_callback), app);\n"
25477"  /* It is added to the overall application */\n"
25478"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (state_action));\n"
25479"  g_variant_type_free (type_string2);\n"
25480"\n"
25481"  /* Begin creating the \"awesome\" action.\n"
25482"   * Note that it is an action with a state.\n"
25483"   */\n"
25484"  awesome_action = g_simple_action_new_stateful (\"awesome\", NULL, g_variant_new_boolean (FALSE));\n"
25485"  g_signal_connect (awesome_action, \"activate\", G_CALLBACK (awesome_callback), app);\n"
25486"  /* It is added to the overall application */\n"
25487"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (awesome_action));\n"
25488"\n"
25489"  /* A builder to add the User Interface designed with GLADE to the grid: */\n"
25490"  builder = gtk_builder_new ();\n"
25491"  /* Get the file (if it is there):\n"
25492"   * Note: you must make sure that the file is in the current directory for\n"
25493"   * this to work. The function used here returns a non-null value within\n"
25494"   * our variable \"error\" if an error is indeed found.\n"
25495"   */\n"
25496"  gtk_builder_add_from_file (builder, \"menubar.ui\", &amp;error);\n"
25497"  if (error != NULL) {\n"
25498"     g_print (\"%s\\n\", error-&gt;message);\n"
25499"     g_error_free (error);\n"
25500"  }\n"
25501"\n"
25502"  /* Extract the menubar */\n"
25503"  GObject *menubar = gtk_builder_get_object (builder, \"menubar\");\n"
25504"  gtk_application_set_menubar (GTK_APPLICATION (app), G_MENU_MODEL (menubar));\n"
25505"\n"
25506"  /* Extract the appmenu */\n"
25507"  GObject *appmenu = gtk_builder_get_object (builder, \"appmenu\");\n"
25508"  gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (appmenu));\n"
25509"}\n"
25510"\n"
25511"\n"
25512"\n"
25513"/* Startup function for the application */\n"
25514"int\n"
25515"main (int argc, char **argv)\n"
25516"{\n"
25517"  GtkApplication *app;\n"
25518"  int status;\n"
25519"\n"
25520"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
25521"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
25522"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
25523"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
25524"  g_object_unref (app);\n"
25525"\n"
25526"  return status;\n"
25527"}\n"
25528msgstr ""
25529"\n"
25530"#include &lt;gtk/gtk.h&gt;\n"
25531"\n"
25532"\n"
25533"\n"
25534"/* Callback function for the \"copy\" action */\n"
25535"static void\n"
25536"copy_callback (GSimpleAction *simple,\n"
25537"            GVariant      *parameter,\n"
25538"            gpointer       user_data)\n"
25539"{\n"
25540"   g_print (\"\\\"Copy\\\" activated\\n\");\n"
25541"}\n"
25542"\n"
25543"\n"
25544"\n"
25545"/* Callback function for the \"paste\" action */\n"
25546"static void\n"
25547"paste_callback (GSimpleAction *simple,\n"
25548"            GVariant      *parameter,\n"
25549"            gpointer       user_data)\n"
25550"{\n"
25551"   g_print (\"\\\"Paste\\\" activated\\n\");\n"
25552"}\n"
25553"\n"
25554"\n"
25555"\n"
25556"/* Callback function for the \"shape\" action */\n"
25557"static void\n"
25558"shape_callback (GSimpleAction *simple,\n"
25559"            GVariant      *parameter,\n"
25560"            gpointer       user_data)\n"
25561"{\n"
25562"   /* We first gather the value of the GVariant instance with a string type.\n"
25563"    * The overall goal here is to see if shape is set to line, triangle, etc,\n"
25564"    * and put that value within the variable \"answer\".\n"
25565"    */\n"
25566"   const gchar *answer = g_variant_get_string (parameter, NULL);\n"
25567"   g_printf (\"Shape is set to %s.\\n\", answer);\n"
25568"   /* Note that we set the state of the action */\n"
25569"   g_simple_action_set_state (simple, parameter);\n"
25570"}\n"
25571"\n"
25572"\n"
25573"\n"
25574"/* Callback function in which closes the about_dialog created below */\n"
25575"static void\n"
25576"on_close (GtkDialog *dialog,\n"
25577"          gint       response_id,\n"
25578"          gpointer   user_data)\n"
25579"{\n"
25580"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
25581"}\n"
25582"\n"
25583"\n"
25584"\n"
25585"/* Callback function for the about action (see aboutdialog.c example) */\n"
25586"static void\n"
25587"about_callback (GSimpleAction *simple,\n"
25588"            GVariant      *parameter,\n"
25589"            gpointer       user_data)\n"
25590"{\n"
25591"   GtkWidget *about_dialog;\n"
25592"\n"
25593"   about_dialog = gtk_about_dialog_new ();\n"
25594"\n"
25595"   const gchar *authors[] = {\"GNOME Documentation Team\", NULL};\n"
25596"   const gchar *documenters[] = {\"GNOME Documentation Team\", NULL};\n"
25597"\n"
25598"   /* Fill in the about_dialog with the desired information */\n"
25599"   gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about_dialog), \"AboutDialog Example\");\n"
25600"   gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about_dialog), \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\");\n"
25601"   gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about_dialog), authors);\n"
25602"   gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (about_dialog), documenters);\n"
25603"   gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (about_dialog), \"GNOME Developer Website\");\n"
25604"   gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about_dialog), \"http://developer.gnome.org\");\n"
25605"\n"
25606"   /* The \"response\" signal is emitted when the dialog receives a delete event,\n"
25607"    * therefore we connect that signal to the on_close callback function\n"
25608"    * created above.\n"
25609"    */\n"
25610"   g_signal_connect (GTK_DIALOG (about_dialog), \"response\",\n"
25611"                    G_CALLBACK (on_close), NULL);\n"
25612"\n"
25613"   /* Show the about dialog */\n"
25614"   gtk_widget_show (about_dialog);\n"
25615"}\n"
25616"\n"
25617"\n"
25618"\n"
25619"static void\n"
25620"activate (GtkApplication *app,\n"
25621"          gpointer        user_data)\n"
25622"{\n"
25623"  GtkWidget *window;\n"
25624"\n"
25625"  GSimpleAction *copy_action;\n"
25626"  GSimpleAction *paste_action;\n"
25627"  GSimpleAction *shape_action;\n"
25628"  GSimpleAction *about_action;\n"
25629"\n"
25630"  /* Create a window with a title and a default size */\n"
25631"  window = gtk_application_window_new (app);\n"
25632"  gtk_window_set_title (GTK_WINDOW (window), \"MenuBar Example\");\n"
25633"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);\n"
25634"\n"
25635"  /* Begin creating the \"copy\" action.\n"
25636"   * Note that it is an action without a state.\n"
25637"   */\n"
25638"  copy_action = g_simple_action_new (\"copy\", NULL);\n"
25639"  /* Connected to a callback function */\n"
25640"  g_signal_connect (copy_action, \"activate\", G_CALLBACK (copy_callback),\n"
25641"                    GTK_WINDOW (window));\n"
25642"  /* Added to the window */\n"
25643"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (copy_action));\n"
25644"\n"
25645"  /* Begin creating the \"paste\" action.\n"
25646"   * Note that it is an action without a state.\n"
25647"   */\n"
25648"  paste_action = g_simple_action_new (\"paste\", NULL);\n"
25649"  /* Connect the action to a callback function */\n"
25650"  g_signal_connect (paste_action, \"activate\", G_CALLBACK (paste_callback),\n"
25651"                    GTK_WINDOW (window));\n"
25652"  /* Add it to the window */\n"
25653"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (paste_action));\n"
25654"\n"
25655"  /* Begin creating the \"shape\" action.\n"
25656"   * Note that it is an action with a state.\n"
25657"   * First we state that the parameter type of the simple action is a string.\n"
25658"   * When using g_variant_type_new, it is appropriate to free the return value\n"
25659"   * once you're done with it.\n"
25660"   */\n"
25661"  GVariantType *type_string = g_variant_type_new (\"s\");\n"
25662"  /* parameters for the g_simple_action_new_stateful are: (name, parameter type,\n"
25663"   * initial state).\n"
25664"   */\n"
25665"  shape_action = g_simple_action_new_stateful (\"shape\", type_string,\n"
25666"                                               g_variant_new_string (\"line\"));\n"
25667"  /* Connect the action to a callback function */\n"
25668"  g_signal_connect (shape_action, \"activate\", G_CALLBACK (shape_callback),\n"
25669"                    GTK_WINDOW (window));\n"
25670"  /* Add it to the window */\n"
25671"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (shape_action));\n"
25672"  g_variant_type_free (type_string);\n"
25673"\n"
25674"  /* Begin creating the \"about\" action.\n"
25675"   * Note that it is an action without a state.\n"
25676"   */\n"
25677"  about_action = g_simple_action_new (\"about\", NULL);\n"
25678"  /* Connect the action to a callback function */\n"
25679"  g_signal_connect (about_action, \"activate\", G_CALLBACK (about_callback),\n"
25680"                    GTK_WINDOW (window));\n"
25681"  /* Add it to the window */\n"
25682"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (about_action));\n"
25683"\n"
25684"  gtk_widget_show_all (window);\n"
25685"}\n"
25686"\n"
25687"\n"
25688"\n"
25689"/* Callback function for the \"new\" action */\n"
25690"static void\n"
25691"new_callback (GSimpleAction *simple,\n"
25692"         GVariant      *parameter,\n"
25693"         gpointer       user_data)\n"
25694"{\n"
25695"  g_print (\"You clicked \\\"New\\\"\\n\");\n"
25696"}\n"
25697"\n"
25698"\n"
25699"\n"
25700"/* Callback function for the \"quit\" action */\n"
25701"static void\n"
25702"quit_callback (GSimpleAction *simple,\n"
25703"         GVariant      *parameter,\n"
25704"         gpointer       user_data)\n"
25705"{\n"
25706"  GApplication *application = user_data;\n"
25707"\n"
25708"  g_print (\"You clicked \\\"Quit\\\"\\n\");\n"
25709"  g_application_quit (application);\n"
25710"}\n"
25711"\n"
25712"\n"
25713"\n"
25714"/* Callback function for the \"state\" action */\n"
25715"static void\n"
25716"state_callback (GSimpleAction *simple,\n"
25717"         GVariant      *parameter,\n"
25718"         gpointer       user_data)\n"
25719"{\n"
25720"   /* The two possibilities in this case for the \"answer\" variable are either\n"
25721"    * \"on\" or \"off\".\n"
25722"    */\n"
25723"   const gchar *answer = g_variant_get_string (parameter, NULL);\n"
25724"   /* We print the information to the user */\n"
25725"   g_printf (\"State is set to %s.\\n\", answer);\n"
25726"   /* Note that we set the state of the action */\n"
25727"   g_simple_action_set_state (simple, parameter);\n"
25728"}\n"
25729"\n"
25730"\n"
25731"\n"
25732"/* Callback function for the \"awesome\" action */\n"
25733"static void\n"
25734"awesome_callback (GSimpleAction *simple,\n"
25735"         GVariant      *parameter,\n"
25736"         gpointer       user_data)\n"
25737"{\n"
25738"  GVariant *action_state = g_action_get_state (G_ACTION (simple));\n"
25739"  gboolean active = g_variant_get_boolean (action_state);\n"
25740"  GVariant *new_state = g_variant_new_boolean (!active);\n"
25741"  /* Set the new state for the action.\n"
25742"   * (Keeps track of whether it was last checked or unchecked).\n"
25743"   */\n"
25744"  g_simple_action_set_state (simple, new_state);\n"
25745"\n"
25746"  if (active)\n"
25747"     g_print (\"You unchecked \\\"Awesome\\\"\\n\");\n"
25748"  else\n"
25749"     g_print (\"You checked \\\"Awesome\\\"\\n\");\n"
25750"}\n"
25751"\n"
25752"\n"
25753"\n"
25754"/* Startup function for the menu we are creating in this sample */\n"
25755"static void\n"
25756"startup (GApplication *app,\n"
25757"         gpointer      user_data)\n"
25758"{\n"
25759"  /* Initialize variables */\n"
25760"  GSimpleAction *new_action;\n"
25761"  GSimpleAction *quit_action;\n"
25762"  GSimpleAction *state_action;\n"
25763"  GSimpleAction *awesome_action;\n"
25764"\n"
25765"  GtkBuilder *builder;\n"
25766"\n"
25767"  GError *error = NULL;\n"
25768"\n"
25769"  /* Begin creating the \"new\" action.\n"
25770"   * Note that it is an action without a state.\n"
25771"   */\n"
25772"  new_action = g_simple_action_new (\"new\", NULL);\n"
25773"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
25774"  /* It is added to the overall application */\n"
25775"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
25776"\n"
25777"  /* Begin creating the \"quit\" action.\n"
25778"   * Note that it is an action without a state.\n"
25779"   */\n"
25780"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
25781"  g_signal_connect (quit_action, \"activate\", G_CALLBACK (quit_callback), app);\n"
25782"  /* It is added to the overall application */\n"
25783"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
25784"\n"
25785"  /* Begin creating the \"state\" action.\n"
25786"   * Note that it is an action with a state.\n"
25787"   */\n"
25788"  GVariantType *type_string2 = g_variant_type_new (\"s\");\n"
25789"  state_action = g_simple_action_new_stateful (\"state\", type_string2,\n"
25790"                                               g_variant_new_string (\"off\"));\n"
25791"  g_signal_connect (state_action, \"activate\", G_CALLBACK (state_callback), app);\n"
25792"  /* It is added to the overall application */\n"
25793"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (state_action));\n"
25794"  g_variant_type_free (type_string2);\n"
25795"\n"
25796"  /* Begin creating the \"awesome\" action.\n"
25797"   * Note that it is an action with a state.\n"
25798"   */\n"
25799"  awesome_action = g_simple_action_new_stateful (\"awesome\", NULL, g_variant_new_boolean (FALSE));\n"
25800"  g_signal_connect (awesome_action, \"activate\", G_CALLBACK (awesome_callback), app);\n"
25801"  /* It is added to the overall application */\n"
25802"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (awesome_action));\n"
25803"\n"
25804"  /* A builder to add the User Interface designed with GLADE to the grid: */\n"
25805"  builder = gtk_builder_new ();\n"
25806"  /* Get the file (if it is there):\n"
25807"   * Note: you must make sure that the file is in the current directory for\n"
25808"   * this to work. The function used here returns a non-null value within\n"
25809"   * our variable \"error\" if an error is indeed found.\n"
25810"   */\n"
25811"  gtk_builder_add_from_file (builder, \"menubar.ui\", &amp;error);\n"
25812"  if (error != NULL) {\n"
25813"     g_print (\"%s\\n\", error-&gt;message);\n"
25814"     g_error_free (error);\n"
25815"  }\n"
25816"\n"
25817"  /* Extract the menubar */\n"
25818"  GObject *menubar = gtk_builder_get_object (builder, \"menubar\");\n"
25819"  gtk_application_set_menubar (GTK_APPLICATION (app), G_MENU_MODEL (menubar));\n"
25820"\n"
25821"  /* Extract the appmenu */\n"
25822"  GObject *appmenu = gtk_builder_get_object (builder, \"appmenu\");\n"
25823"  gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (appmenu));\n"
25824"}\n"
25825"\n"
25826"\n"
25827"\n"
25828"/* Startup function for the application */\n"
25829"int\n"
25830"main (int argc, char **argv)\n"
25831"{\n"
25832"  GtkApplication *app;\n"
25833"  int status;\n"
25834"\n"
25835"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
25836"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
25837"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
25838"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
25839"  g_object_unref (app);\n"
25840"\n"
25841"  return status;\n"
25842"}\n"
25843
25844#. (itstool) path: item/p
25845#: C/menubar.c.page:37 C/scrolledwindow.c.page:34
25846msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkApplication.html\">GtkApplication</link>"
25847msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkApplication.html\">GtkApplication</link>"
25848
25849#. (itstool) path: item/p
25850#: C/menubar.c.page:40
25851msgid "<link href=\"http://developer.gnome.org/gtk/stable/GtkAboutDialog.html\">GtkAboutDialog</link>"
25852msgstr "<link href=\"http://developer.gnome.org/gtk/stable/GtkAboutDialog.html\">GtkAboutDialog</link>"
25853
25854#. (itstool) path: item/p
25855#: C/menubar.c.page:41
25856msgid "<link href=\"http://developer.gnome.org/glib/stable/glib-GVariantType.html\">GtkVariantType</link>"
25857msgstr "<link href=\"http://developer.gnome.org/glib/stable/glib-GVariantType.html\">GtkVariantType</link>"
25858
25859#. (itstool) path: info/title
25860#: C/menubar.py.page:8
25861msgctxt "text"
25862msgid "MenuBar (Python)"
25863msgstr "MenuBar (Python)"
25864
25865#. (itstool) path: page/title
25866#: C/menubar.py.page:28
25867msgid "MenuBar created using XML and GtkBuilder"
25868msgstr "XML과 GtkBuilder로 만드는 MenuBar"
25869
25870#. (itstool) path: section/title
25871#: C/menubar.py.page:34 C/menubar.vala.page:29
25872msgid "Create a MenuBar using XML"
25873msgstr "XML로 MenuBar 만들기"
25874
25875#. (itstool) path: section/p
25876#: C/menubar.py.page:35 C/menubar.vala.page:30
25877msgid "To create the menubar using XML:"
25878msgstr "XML로 메뉴 표시줄을 만들려면:"
25879
25880#. (itstool) path: item/p
25881#: C/menubar.py.page:37 C/menubar.vala.page:32
25882msgid "Create <file>menubar.ui</file> using your favorite text editor."
25883msgstr "원하는 텍스트 편집기로 <file>menubar.ui</file> 파일을 만드십시오."
25884
25885#. (itstool) path: item/p
25886#: C/menubar.py.page:38 C/menubar.vala.page:33
25887msgid "Enter the following line at the top of the file:"
25888msgstr "다음 줄을 파일 상단에 입력합니다:"
25889
25890#. (itstool) path: item/code
25891#: C/menubar.py.page:39 C/menubar.vala.page:34
25892#, no-wrap
25893msgid ""
25894"\n"
25895"&lt;?xml version=\"1.0\"? encoding=\"UTF-8\"?&gt;"
25896msgstr ""
25897"\n"
25898"&lt;?xml version=\"1.0\"? encoding=\"UTF-8\"?&gt;"
25899
25900#. (itstool) path: item/p
25901#: C/menubar.py.page:42 C/menubar.vala.page:37
25902msgid ""
25903"We want to create the interface which will contain our menubar and its submenus. Our menubar will contain "
25904"<gui>File</gui>, <gui>Edit</gui>, <gui>Choices</gui> and <gui>Help</gui> submenus. We add the following XML code "
25905"to the file:"
25906msgstr ""
25907"메뉴 표시줄과 하위 메뉴를 넣을 인터페이스를 만들겠습니다. 메뉴 표시줄에는 <gui>파일</gui>, <gui>편집</gui>, <gui>선"
25908"택</gui> and <gui>도움말</gui> 하위 메뉴를 넣겠습니다. 다음 XML 코드를 파일에 넣겠습니다:"
25909
25910#. (itstool) path: item/code
25911#: C/menubar.py.page:43 C/menubar.vala.page:38
25912#, no-wrap
25913msgid ""
25914"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
25915"&lt;interface&gt;\n"
25916"  &lt;menu id=\"menubar\"&gt;\n"
25917"    &lt;submenu&gt;\n"
25918"      &lt;attribute name=\"label\"&gt;File&lt;/attribute&gt;\n"
25919"    &lt;/submenu&gt;\n"
25920"    &lt;submenu&gt;\n"
25921"      &lt;attribute name=\"label\"&gt;Edit&lt;/attribute&gt;\n"
25922"    &lt;/submenu&gt;\n"
25923"    &lt;submenu&gt;\n"
25924"      &lt;attribute name=\"label\"&gt;Choices&lt;/attribute&gt;\n"
25925"    &lt;/submenu&gt;\n"
25926"    &lt;submenu&gt;\n"
25927"      &lt;attribute name=\"label\"&gt;Help&lt;/attribute&gt;\n"
25928"    &lt;/submenu&gt;\n"
25929"  &lt;/menu&gt;\n"
25930"&lt;/interface&gt;\n"
25931msgstr ""
25932"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
25933"&lt;interface&gt;\n"
25934"  &lt;menu id=\"menubar\"&gt;\n"
25935"    &lt;submenu&gt;\n"
25936"      &lt;attribute name=\"label\"&gt;File&lt;/attribute&gt;\n"
25937"    &lt;/submenu&gt;\n"
25938"    &lt;submenu&gt;\n"
25939"      &lt;attribute name=\"label\"&gt;Edit&lt;/attribute&gt;\n"
25940"    &lt;/submenu&gt;\n"
25941"    &lt;submenu&gt;\n"
25942"      &lt;attribute name=\"label\"&gt;Choices&lt;/attribute&gt;\n"
25943"    &lt;/submenu&gt;\n"
25944"    &lt;submenu&gt;\n"
25945"      &lt;attribute name=\"label\"&gt;Help&lt;/attribute&gt;\n"
25946"    &lt;/submenu&gt;\n"
25947"  &lt;/menu&gt;\n"
25948"&lt;/interface&gt;\n"
25949
25950#. (itstool) path: item/p
25951#: C/menubar.py.page:45
25952msgid "Now we will create the .py file and use GtkBuilder to import the <file>menubar.ui</file> we just created."
25953msgstr "이제 .py 파일을 만들고 방금 만든 <file>menubar.ui</file>  파일을 가져올 때 GtkBuilder를 활용하겠습니다."
25954
25955#. (itstool) path: section/title
25956#: C/menubar.py.page:49 C/menubar.vala.page:43
25957msgid "Add the MenuBar to the window using GtkBuilder"
25958msgstr "GtkBuilder로 창에 MenuBar 추가하기"
25959
25960#. (itstool) path: section/code
25961#: C/menubar.py.page:50
25962#, no-wrap
25963msgid ""
25964"from gi.repository import Gtk\n"
25965"import sys\n"
25966"\n"
25967"\n"
25968"class MyWindow(Gtk.ApplicationWindow):\n"
25969"\n"
25970"    def __init__(self, app):\n"
25971"        Gtk.Window.__init__(self, title=\"MenuBar Example\", application=app)\n"
25972"        self.set_default_size(200, 200)\n"
25973"\n"
25974"\n"
25975"class MyApplication(Gtk.Application):\n"
25976"\n"
25977"    def __init__(self):\n"
25978"        Gtk.Application.__init__(self)\n"
25979"\n"
25980"    def do_activate(self):\n"
25981"        win = MyWindow(self)\n"
25982"        win.show_all()\n"
25983"\n"
25984"    def do_startup(self):\n"
25985"        Gtk.Application.do_startup(self)\n"
25986"\n"
25987"        # a builder to add the UI designed with Glade to the grid:\n"
25988"        builder = Gtk.Builder()\n"
25989"        # get the file (if it is there)\n"
25990"        try:\n"
25991"            builder.add_from_file(\"menubar_basis.ui\")\n"
25992"        except:\n"
25993"            print(\"file not found\")\n"
25994"            sys.exit()\n"
25995"\n"
25996"        # we use the method Gtk.Application.set_menubar(menubar) to add the menubar\n"
25997"        # to the application (Note: NOT the window!)\n"
25998"        self.set_menubar(builder.get_object(\"menubar\"))\n"
25999"\n"
26000"app = MyApplication()\n"
26001"exit_status = app.run(sys.argv)\n"
26002"sys.exit(exit_status)\n"
26003msgstr ""
26004"from gi.repository import Gtk\n"
26005"import sys\n"
26006"\n"
26007"\n"
26008"class MyWindow(Gtk.ApplicationWindow):\n"
26009"\n"
26010"    def __init__(self, app):\n"
26011"        Gtk.Window.__init__(self, title=\"MenuBar Example\", application=app)\n"
26012"        self.set_default_size(200, 200)\n"
26013"\n"
26014"\n"
26015"class MyApplication(Gtk.Application):\n"
26016"\n"
26017"    def __init__(self):\n"
26018"        Gtk.Application.__init__(self)\n"
26019"\n"
26020"    def do_activate(self):\n"
26021"        win = MyWindow(self)\n"
26022"        win.show_all()\n"
26023"\n"
26024"    def do_startup(self):\n"
26025"        Gtk.Application.do_startup(self)\n"
26026"\n"
26027"        # a builder to add the UI designed with Glade to the grid:\n"
26028"        builder = Gtk.Builder()\n"
26029"        # get the file (if it is there)\n"
26030"        try:\n"
26031"            builder.add_from_file(\"menubar_basis.ui\")\n"
26032"        except:\n"
26033"            print(\"file not found\")\n"
26034"            sys.exit()\n"
26035"\n"
26036"        # we use the method Gtk.Application.set_menubar(menubar) to add the menubar\n"
26037"        # to the application (Note: NOT the window!)\n"
26038"        self.set_menubar(builder.get_object(\"menubar\"))\n"
26039"\n"
26040"app = MyApplication()\n"
26041"exit_status = app.run(sys.argv)\n"
26042"sys.exit(exit_status)\n"
26043
26044#. (itstool) path: section/p
26045#: C/menubar.py.page:51
26046msgid "Now run the python application. It should look like the picture at the top of this page."
26047msgstr "이제 파이썬 프로그램을 실행하십시오 이 페이지의 상단의 그림과 비슷하게 나타납니다."
26048
26049#. (itstool) path: section/title
26050#: C/menubar.py.page:55 C/menubar.vala.page:51
26051msgid "Add items to the menus"
26052msgstr "항목을 메뉴에 추가하기"
26053
26054#. (itstool) path: section/p
26055#: C/menubar.py.page:56 C/menubar.vala.page:52
26056msgid ""
26057"We start off by adding 2 menuitems to the <gui>File</gui> menu: <gui>New</gui> and <gui>Quit</gui>. We do this by "
26058"adding a <code>section</code> to the the <code>File</code> submenu with these items. The <file>menubar.ui</file> "
26059"should look like this (lines 6 to 13 inclusive comprise the newly added section):"
26060msgstr ""
26061"<gui>파일</gui> 메뉴에 <gui>새로 만들기</gui>와 <gui>끝내기</gui> 메뉴 항목 2개 추가로 시작하겠습니다. <code>파일</"
26062"code> 하위 메뉴에 이 항목과 <code>section</code>을 추가하면 됩니다. <file>menubar.ui</file> 파일은 다음과 같이 나타"
26063"나야 합니다(6번째 줄부터 13번째 줄까지 새로 추가한 섹션 구성이 들어갑니다):"
26064
26065#. (itstool) path: listing/title
26066#: C/menubar.py.page:59
26067msgid "menubar.ui"
26068msgstr "menubar.ui"
26069
26070#. (itstool) path: listing/code
26071#. (itstool) path: section/code
26072#: C/menubar.py.page:60 C/menubar.vala.page:53
26073#, no-wrap
26074msgid ""
26075"\n"
26076"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
26077"&lt;interface&gt;\n"
26078"  &lt;menu id=\"menubar\"&gt;\n"
26079"    &lt;submenu&gt;\n"
26080"      &lt;attribute name=\"label\"&gt;File&lt;/attribute&gt;\n"
26081"      &lt;section&gt;\n"
26082"        &lt;item&gt;\n"
26083"          &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26084"        &lt;/item&gt;\n"
26085"        &lt;item&gt;\n"
26086"          &lt;attribute name =\"label\"&gt;Quit&lt;/attribute&gt;\n"
26087"        &lt;/item&gt;\n"
26088"      &lt;/section&gt;\n"
26089"    &lt;/submenu&gt;\n"
26090"    &lt;submenu&gt;\n"
26091"      &lt;attribute name=\"label\"&gt;Edit&lt;/attribute&gt;\n"
26092"    &lt;/submenu&gt;\n"
26093"    &lt;submenu&gt;\n"
26094"      &lt;attribute name=\"label\"&gt;Choices&lt;/attribute&gt;\n"
26095"    &lt;/submenu&gt;\n"
26096"    &lt;submenu&gt;\n"
26097"      &lt;attribute name=\"label\"&gt;Help&lt;/attribute&gt;\n"
26098"    &lt;/submenu&gt;\n"
26099"  &lt;/menu&gt;\n"
26100"&lt;/interface&gt;"
26101msgstr ""
26102"\n"
26103"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
26104"&lt;interface&gt;\n"
26105"  &lt;menu id=\"menubar\"&gt;\n"
26106"    &lt;submenu&gt;\n"
26107"      &lt;attribute name=\"label\"&gt;File&lt;/attribute&gt;\n"
26108"      &lt;section&gt;\n"
26109"        &lt;item&gt;\n"
26110"          &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26111"        &lt;/item&gt;\n"
26112"        &lt;item&gt;\n"
26113"          &lt;attribute name =\"label\"&gt;Quit&lt;/attribute&gt;\n"
26114"        &lt;/item&gt;\n"
26115"      &lt;/section&gt;\n"
26116"    &lt;/submenu&gt;\n"
26117"    &lt;submenu&gt;\n"
26118"      &lt;attribute name=\"label\"&gt;Edit&lt;/attribute&gt;\n"
26119"    &lt;/submenu&gt;\n"
26120"    &lt;submenu&gt;\n"
26121"      &lt;attribute name=\"label\"&gt;Choices&lt;/attribute&gt;\n"
26122"    &lt;/submenu&gt;\n"
26123"    &lt;submenu&gt;\n"
26124"      &lt;attribute name=\"label\"&gt;Help&lt;/attribute&gt;\n"
26125"    &lt;/submenu&gt;\n"
26126"  &lt;/menu&gt;\n"
26127"&lt;/interface&gt;"
26128
26129#. (itstool) path: section/p
26130#: C/menubar.py.page:88
26131msgid ""
26132"Following this pattern, you can now add a <code>Copy</code> and a <code>Paste</code> item to the <code>Edit</code> "
26133"submenu, and an <code>About</code> item to the <code>Help</code> submenu."
26134msgstr ""
26135"이런 방식으로 <code>편집</code> 하위 메뉴에 <code>복사</code> and a <code>붙여넣기</code>를 추가하고, <code>도움말"
26136"</code> 하위 메뉴로 <code>정보</code> 항목을 추가할 수 있습니다."
26137
26138#. (itstool) path: section/title
26139#: C/menubar.py.page:93 C/menubar.vala.page:87
26140msgid "Setup actions"
26141msgstr "설정 동작"
26142
26143#. (itstool) path: section/p
26144#: C/menubar.py.page:95
26145msgid ""
26146"We now create the actions for \"New\" and \"Quit\" connected to a callback function in the Python file; for "
26147"instance we create \"new\" as:"
26148msgstr ""
26149"파이썬 파일에서 콜백 함수로 연결한 \"New\"와 \"Quit\"에 대한 동작을 만들겠습니다. 예를 들어 \"new\"를 다음과 같이 "
26150"만듭니다:"
26151
26152#. (itstool) path: section/code
26153#: C/menubar.py.page:96
26154#, no-wrap
26155msgid ""
26156"\n"
26157"new_action = Gio.SimpleAction.new(\"new\", None)\n"
26158"new_action.connect(\"activate\", self.new_callback)"
26159msgstr ""
26160"\n"
26161"new_action = Gio.SimpleAction.new(\"new\", None)\n"
26162"new_action.connect(\"activate\", self.new_callback)"
26163
26164#. (itstool) path: section/p
26165#: C/menubar.py.page:100
26166msgid "And we create the callback function of \"new\" as"
26167msgstr "그리고 \"new\"의 콜백 함수를 다음과 같이 만듭니다"
26168
26169#. (itstool) path: section/code
26170#: C/menubar.py.page:101
26171#, no-wrap
26172msgid ""
26173"\n"
26174"def new_callback(self, action, parameter):\n"
26175"    print \"You clicked \\\"New\\\"\""
26176msgstr ""
26177"\n"
26178"def new_callback(self, action, parameter):\n"
26179"    print \"You clicked \\\"New\\\"\""
26180
26181#. (itstool) path: section/p
26182#: C/menubar.py.page:105
26183msgid ""
26184"Now, in the XML file, we connect the menu items to the actions in the XML file by adding the \"action\" attribute:"
26185msgstr "이제 XML 파일에서 \"action\" 속성을 추가하여 메뉴 항목을 XML 파일의 동작에 연결하겠습니다:"
26186
26187#. (itstool) path: section/code
26188#: C/menubar.py.page:106
26189#, no-wrap
26190msgid ""
26191"\n"
26192"&lt;item&gt;\n"
26193"  &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26194"  &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
26195"&lt;/item&gt;"
26196msgstr ""
26197"\n"
26198"&lt;item&gt;\n"
26199"  &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26200"  &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
26201"&lt;/item&gt;"
26202
26203#. (itstool) path: section/p
26204#: C/menubar.py.page:112
26205msgid ""
26206"Note that for an action that is relative to the application, we use the prefix <code>app.</code>; for actions that "
26207"are relative to the window we use the prefix <code>win.</code>."
26208msgstr ""
26209"참고로 프로그램과 관계있는 동작에는 <code>app</code> 접두부를 붙입니다. 창과 관계된 동작은 <code>win</code> 접두부"
26210"를 붙입니다."
26211
26212#. (itstool) path: section/p
26213#: C/menubar.py.page:114
26214msgid ""
26215"Finally, in the Python file, we add the action to the application or to the window - so for instance <code>app."
26216"new</code> will be added to the application in the method <code>do_startup(self)</code> as"
26217msgstr ""
26218"마지막으로 파이썬 파일에서 프로그램 또는 창에 동작을 추가하겠습니다. 그래서 예를 들어 <code>app.new</code>는 다음"
26219"과 같이 <code>do_startup(self)</code> 메서드에서 프로그램에 추가하겠습니다"
26220
26221#. (itstool) path: section/code
26222#: C/menubar.py.page:115
26223#, no-wrap
26224msgid ""
26225"\n"
26226"self.add_action(new_action)"
26227msgstr ""
26228"\n"
26229"self.add_action(new_action)"
26230
26231#. (itstool) path: section/p
26232#: C/menubar.py.page:118
26233msgid "See <link xref=\"signals-callbacks.py\"/> for a more detailed explanation of signals and callbacks."
26234msgstr "시그널과 콜백 함수에 대한 자세한 내용은 <link xref=\"signals-callbacks.py\"/>를 참고하십시오."
26235
26236#. (itstool) path: section/title
26237#: C/menubar.py.page:122 C/menubar.vala.page:139
26238msgid "Actions: Application or Window?"
26239msgstr "동작: 프로그램 또는 창?"
26240
26241#. (itstool) path: section/p
26242#: C/menubar.py.page:123 C/menubar.vala.page:140
26243msgid ""
26244"Above, we created the \"new\" and \"open\" actions as part of the MyApplication class. Actions which control the "
26245"application itself, such as \"quit\" should be created similarly."
26246msgstr ""
26247"위에서 MyApplication 클래스의 \"new\"와 \"open\" 동작을 만들었습니다. 프로그램 자체를 다루는 \"quit\" 같은 동작은 "
26248"비슷하게 만듭니다."
26249
26250#. (itstool) path: section/p
26251#: C/menubar.py.page:125 C/menubar.vala.page:143
26252msgid ""
26253"Some actions, such as \"copy\" and \"paste\" deal with the window, not the application. Window actions should be "
26254"created as part of the window class."
26255msgstr ""
26256"\"copy\"나 \"paste\" 같은 창을 다루는 일부 동작은, 프로그램에 넣지 않습니다. 창 동작은 창 클래스 부분에 만들어야합"
26257"니다."
26258
26259#. (itstool) path: section/p
26260#: C/menubar.py.page:127
26261msgid ""
26262"The complete example files contain both application actions and window actions. The window actions are the ones "
26263"usually included in the <link xref=\"gmenu.py\">application menu</link> also. It is not good practice to include "
26264"window actions in the application menu. For demonstration purposes, the complete example files which follow "
26265"include XML in the UI file which creates the application menu which includes a \"New\" and \"Open\" item, and "
26266"these are hooked up to the same actions as the menubar items of the same name."
26267msgstr ""
26268"완전한 예제 파일에는 프로그램 동작과 창 동작이 같이 들어있습니다. 창 동작은 보통  <link xref=\"gmenu.py\">프로그램 "
26269"메뉴</link> 에도 들어갑니다. 프로그램 메뉴에 창 동작이 들어가는건 좋은 실례가 아닙니다. 용도 증명 목적으로, 완전한 "
26270"예제 파일에서는, \"New\"와 \"Open\" 항목이 들어간 프로그램 메뉴를 만드는 사용자 인터페이스 파일에 들어간 XML 내용"
26271"을 따르며, 동일한 이름을 지닌 메뉴 표시줄 항목과 동일한 동작을 수행합니다."
26272
26273#. (itstool) path: section/title
26274#: C/menubar.py.page:131 C/menubar.vala.page:133
26275msgid "Choices submenu and items with state"
26276msgstr "상태가 들어간 선택 하위 메뉴 및 항목"
26277
26278#. (itstool) path: section/media
26279#. This is a reference to an external file such as an image or video. When
26280#. the file changes, the md5 hash will change to let you know you need to
26281#. update your localized copy. The msgstr is not used at all. Set it to
26282#. whatever you like once you have updated your copy of the file.
26283#: C/menubar.py.page:132 C/menubar.vala.page:134
26284msgctxt "_"
26285msgid "external ref='media/menubar_choices.png' md5='47cdfa12caf85ba20dd3e835bd7f893f'"
26286msgstr ""
26287
26288#. (itstool) path: section/p
26289#: C/menubar.py.page:133
26290msgid ""
26291"Lines 30 to 80 inclusive of the <link xref=\"menubar.py#xml-code\"/> demonstrate the XML code used to create the "
26292"UI for <gui>Choices</gui> menu."
26293msgstr ""
26294"30번째 줄 부터 80번째 줄 까지 <link xref=\"menubar.py#xml-code\"/> 코드가 들어간 부분에서 <gui>선택</gui> 메뉴의 사"
26295"용자 인터페이스를 만들 때 쓰는 XML 코드 예제를 시연합니다."
26296
26297#. (itstool) path: section/p
26298#: C/menubar.py.page:135
26299msgid ""
26300"The actions created so far are <em>stateless</em>, that is they do not retain or depend on a state given by the "
26301"action itself. The actions we need to create for the Choices submenu, on the other hand, are <em>stateful</em>. An "
26302"example of creation of a stateful action is:"
26303msgstr ""
26304"여지껏 만든 동작은 <em>상태가 없는</em> 상황인데 동작 자체에 주어진 상태에 따르거나 상태 값을 유지하지 않습니다. 반"
26305"면에 선택 하위 메뉴에 우리가 만들 동작은 <em>상태를 보유하고 있습니다</em>. 상태를 가진 동작을 만드는 예제는 다음"
26306"과 같습니다:"
26307
26308#. (itstool) path: section/code
26309#: C/menubar.py.page:136
26310#, no-wrap
26311msgid ""
26312"\n"
26313"shape_action = Gio.SimpleAction.new_stateful(\"shape\", GLib.VariantType.new('s'), GLib.Variant.new_string('line'))"
26314msgstr ""
26315"\n"
26316"shape_action = Gio.SimpleAction.new_stateful(\"shape\", GLib.VariantType.new('s'), GLib.Variant.new_string('line'))"
26317
26318#. (itstool) path: section/p
26319#: C/menubar.py.page:139
26320msgid ""
26321"where the variables of the method are: name, parameter type (in this case, a string - see <link href=\"http://"
26322"developer.gnome.org/glib/unstable/glib-GVariantType.html\">here</link> for a complete list of character meanings), "
26323"initial state (in this case, 'line' - in case of a <code>True</code> boolean value it should be <code>Glib.Variant."
26324"new_boolean(True)</code>, and so on, see <link href=\"http://developer.gnome.org/glib/unstable/glib-GVariant.html"
26325"\">here</link> for a complete list)"
26326msgstr ""
26327"메서드 변수 부분은 다음과 같습니다. 이름, 매개변수 형식(우리 같은 경우는 문자열입니다. 문자 의미에 대한 완전한 내용"
26328"은 <link href=\"http://developer.gnome.org/glib/unstable/glib-GVariantType.html\">여기</link> )에 있습니다), 초기 "
26329"상태(이 경우 'line' 입니다. <code>True</code> 부울린 값의 경우는 <code>Glib.Variant.new_boolean(True)</code>여야 합"
26330"니다. 완전한 내용은 <link href=\"http://developer.gnome.org/glib/unstable/glib-GVariant.html\">이 부분</link> 참고)"
26331"를 다룹니다."
26332
26333#. (itstool) path: section/p
26334#: C/menubar.py.page:141
26335msgid ""
26336"After creating the stateful SimpleAction we connect it to the callback function and we add it to the window (or "
26337"the application, if it is the case), as before:"
26338msgstr ""
26339"앞에서와 마찬가지로 상태가 들어간 SimpleAction을 만든 다음 콜백 함수로 연결하고 창(또는 지금 같은 경우는 프로그램)"
26340"에 추가하겠습니다:"
26341
26342#. (itstool) path: section/code
26343#: C/menubar.py.page:143
26344#, no-wrap
26345msgid ""
26346"\n"
26347"shape_action.connect(\"activate\", self.shape_callback)\n"
26348"self.add_action(shape_action)"
26349msgstr ""
26350"\n"
26351"shape_action.connect(\"activate\", self.shape_callback)\n"
26352"self.add_action(shape_action)"
26353
26354#. (itstool) path: section/title
26355#: C/menubar.py.page:150 C/menubar.vala.page:154
26356msgid "Complete XML UI file for this example"
26357msgstr "이 예제의 완전한 XML UI 파일"
26358
26359#. (itstool) path: section/code
26360#: C/menubar.py.page:151 C/menubar.vala.page:155
26361#, no-wrap
26362msgid ""
26363"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
26364"&lt;interface&gt;\n"
26365"  &lt;menu id=\"menubar\"&gt;\n"
26366"    &lt;submenu&gt;\n"
26367"      &lt;attribute name=\"label\"&gt;File&lt;/attribute&gt;\n"
26368"      &lt;section&gt;\n"
26369"        &lt;item&gt;\n"
26370"          &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26371"          &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
26372"        &lt;/item&gt;\n"
26373"        &lt;item&gt;\n"
26374"          &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
26375"          &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
26376"        &lt;/item&gt;\n"
26377"      &lt;/section&gt;\n"
26378"    &lt;/submenu&gt;\n"
26379"    &lt;submenu&gt;\n"
26380"      &lt;attribute name=\"label\"&gt;Edit&lt;/attribute&gt;\n"
26381"      &lt;section&gt;\n"
26382"        &lt;item&gt;\n"
26383"          &lt;attribute name=\"label\"&gt;Copy&lt;/attribute&gt;\n"
26384"          &lt;attribute name=\"action\"&gt;win.copy&lt;/attribute&gt;\n"
26385"        &lt;/item&gt;\n"
26386"        &lt;item&gt;\n"
26387"          &lt;attribute name=\"label\"&gt;Paste&lt;/attribute&gt;\n"
26388"          &lt;attribute name=\"action\"&gt;win.paste&lt;/attribute&gt;\n"
26389"        &lt;/item&gt;\n"
26390"      &lt;/section&gt;\n"
26391"    &lt;/submenu&gt;\n"
26392"    &lt;submenu&gt;\n"
26393"      &lt;attribute name=\"label\"&gt;Choices&lt;/attribute&gt;\n"
26394"      &lt;submenu&gt;\n"
26395"        &lt;attribute name=\"label\"&gt;Shapes&lt;/attribute&gt;\n"
26396"          &lt;section&gt;\n"
26397"            &lt;item&gt;\n"
26398"              &lt;attribute name=\"label\"&gt;Line&lt;/attribute&gt;\n"
26399"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26400"              &lt;attribute name=\"target\"&gt;line&lt;/attribute&gt;\n"
26401"            &lt;/item&gt;\n"
26402"            &lt;item&gt;\n"
26403"              &lt;attribute name=\"label\"&gt;Triangle&lt;/attribute&gt;\n"
26404"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26405"              &lt;attribute name=\"target\"&gt;triangle&lt;/attribute&gt;\n"
26406"            &lt;/item&gt;\n"
26407"            &lt;item&gt;\n"
26408"              &lt;attribute name=\"label\"&gt;Square&lt;/attribute&gt;\n"
26409"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26410"              &lt;attribute name=\"target\"&gt;square&lt;/attribute&gt;\n"
26411"            &lt;/item&gt;\n"
26412"            &lt;item&gt;\n"
26413"              &lt;attribute name=\"label\"&gt;Polygon&lt;/attribute&gt;\n"
26414"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26415"              &lt;attribute name=\"target\"&gt;polygon&lt;/attribute&gt;\n"
26416"            &lt;/item&gt;\n"
26417"            &lt;item&gt;\n"
26418"              &lt;attribute name=\"label\"&gt;Circle&lt;/attribute&gt;\n"
26419"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26420"              &lt;attribute name=\"target\"&gt;circle&lt;/attribute&gt;\n"
26421"            &lt;/item&gt;\n"
26422"          &lt;/section&gt;\n"
26423"      &lt;/submenu&gt;\n"
26424"      &lt;section&gt;\n"
26425"        &lt;item&gt;\n"
26426"          &lt;attribute name=\"label\"&gt;On&lt;/attribute&gt;\n"
26427"          &lt;attribute name=\"action\"&gt;app.state&lt;/attribute&gt;\n"
26428"          &lt;attribute name=\"target\"&gt;on&lt;/attribute&gt;\n"
26429"        &lt;/item&gt;\n"
26430"        &lt;item&gt;\n"
26431"          &lt;attribute name=\"label\"&gt;Off&lt;/attribute&gt;\n"
26432"          &lt;attribute name=\"action\"&gt;app.state&lt;/attribute&gt;\n"
26433"          &lt;attribute name=\"target\"&gt;off&lt;/attribute&gt;\n"
26434"        &lt;/item&gt;\n"
26435"      &lt;/section&gt;\n"
26436"      &lt;section&gt;\n"
26437"        &lt;item&gt;\n"
26438"          &lt;attribute name=\"label\"&gt;Awesome&lt;/attribute&gt;\n"
26439"          &lt;attribute name=\"action\"&gt;app.awesome&lt;/attribute&gt;\n"
26440"        &lt;/item&gt;\n"
26441"      &lt;/section&gt;\n"
26442"    &lt;/submenu&gt;\n"
26443"    &lt;submenu&gt;\n"
26444"      &lt;attribute name=\"label\"&gt;Help&lt;/attribute&gt;\n"
26445"      &lt;section&gt;\n"
26446"        &lt;item&gt;\n"
26447"          &lt;attribute name=\"label\"&gt;About&lt;/attribute&gt;\n"
26448"          &lt;attribute name=\"action\"&gt;win.about&lt;/attribute&gt;\n"
26449"        &lt;/item&gt;\n"
26450"      &lt;/section&gt;\n"
26451"    &lt;/submenu&gt;\n"
26452"  &lt;/menu&gt;\n"
26453"  &lt;menu id=\"appmenu\"&gt;\n"
26454"    &lt;section&gt;\n"
26455"      &lt;item&gt;\n"
26456"        &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26457"        &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
26458"      &lt;/item&gt;\n"
26459"      &lt;item&gt;\n"
26460"        &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
26461"        &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
26462"      &lt;/item&gt;\n"
26463"    &lt;/section&gt;\n"
26464"  &lt;/menu&gt;\n"
26465"&lt;/interface&gt;\n"
26466msgstr ""
26467"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
26468"&lt;interface&gt;\n"
26469"  &lt;menu id=\"menubar\"&gt;\n"
26470"    &lt;submenu&gt;\n"
26471"      &lt;attribute name=\"label\"&gt;File&lt;/attribute&gt;\n"
26472"      &lt;section&gt;\n"
26473"        &lt;item&gt;\n"
26474"          &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26475"          &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
26476"        &lt;/item&gt;\n"
26477"        &lt;item&gt;\n"
26478"          &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
26479"          &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
26480"        &lt;/item&gt;\n"
26481"      &lt;/section&gt;\n"
26482"    &lt;/submenu&gt;\n"
26483"    &lt;submenu&gt;\n"
26484"      &lt;attribute name=\"label\"&gt;Edit&lt;/attribute&gt;\n"
26485"      &lt;section&gt;\n"
26486"        &lt;item&gt;\n"
26487"          &lt;attribute name=\"label\"&gt;Copy&lt;/attribute&gt;\n"
26488"          &lt;attribute name=\"action\"&gt;win.copy&lt;/attribute&gt;\n"
26489"        &lt;/item&gt;\n"
26490"        &lt;item&gt;\n"
26491"          &lt;attribute name=\"label\"&gt;Paste&lt;/attribute&gt;\n"
26492"          &lt;attribute name=\"action\"&gt;win.paste&lt;/attribute&gt;\n"
26493"        &lt;/item&gt;\n"
26494"      &lt;/section&gt;\n"
26495"    &lt;/submenu&gt;\n"
26496"    &lt;submenu&gt;\n"
26497"      &lt;attribute name=\"label\"&gt;Choices&lt;/attribute&gt;\n"
26498"      &lt;submenu&gt;\n"
26499"        &lt;attribute name=\"label\"&gt;Shapes&lt;/attribute&gt;\n"
26500"          &lt;section&gt;\n"
26501"            &lt;item&gt;\n"
26502"              &lt;attribute name=\"label\"&gt;Line&lt;/attribute&gt;\n"
26503"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26504"              &lt;attribute name=\"target\"&gt;line&lt;/attribute&gt;\n"
26505"            &lt;/item&gt;\n"
26506"            &lt;item&gt;\n"
26507"              &lt;attribute name=\"label\"&gt;Triangle&lt;/attribute&gt;\n"
26508"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26509"              &lt;attribute name=\"target\"&gt;triangle&lt;/attribute&gt;\n"
26510"            &lt;/item&gt;\n"
26511"            &lt;item&gt;\n"
26512"              &lt;attribute name=\"label\"&gt;Square&lt;/attribute&gt;\n"
26513"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26514"              &lt;attribute name=\"target\"&gt;square&lt;/attribute&gt;\n"
26515"            &lt;/item&gt;\n"
26516"            &lt;item&gt;\n"
26517"              &lt;attribute name=\"label\"&gt;Polygon&lt;/attribute&gt;\n"
26518"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26519"              &lt;attribute name=\"target\"&gt;polygon&lt;/attribute&gt;\n"
26520"            &lt;/item&gt;\n"
26521"            &lt;item&gt;\n"
26522"              &lt;attribute name=\"label\"&gt;Circle&lt;/attribute&gt;\n"
26523"              &lt;attribute name=\"action\"&gt;win.shape&lt;/attribute&gt;\n"
26524"              &lt;attribute name=\"target\"&gt;circle&lt;/attribute&gt;\n"
26525"            &lt;/item&gt;\n"
26526"          &lt;/section&gt;\n"
26527"      &lt;/submenu&gt;\n"
26528"      &lt;section&gt;\n"
26529"        &lt;item&gt;\n"
26530"          &lt;attribute name=\"label\"&gt;On&lt;/attribute&gt;\n"
26531"          &lt;attribute name=\"action\"&gt;app.state&lt;/attribute&gt;\n"
26532"          &lt;attribute name=\"target\"&gt;on&lt;/attribute&gt;\n"
26533"        &lt;/item&gt;\n"
26534"        &lt;item&gt;\n"
26535"          &lt;attribute name=\"label\"&gt;Off&lt;/attribute&gt;\n"
26536"          &lt;attribute name=\"action\"&gt;app.state&lt;/attribute&gt;\n"
26537"          &lt;attribute name=\"target\"&gt;off&lt;/attribute&gt;\n"
26538"        &lt;/item&gt;\n"
26539"      &lt;/section&gt;\n"
26540"      &lt;section&gt;\n"
26541"        &lt;item&gt;\n"
26542"          &lt;attribute name=\"label\"&gt;Awesome&lt;/attribute&gt;\n"
26543"          &lt;attribute name=\"action\"&gt;app.awesome&lt;/attribute&gt;\n"
26544"        &lt;/item&gt;\n"
26545"      &lt;/section&gt;\n"
26546"    &lt;/submenu&gt;\n"
26547"    &lt;submenu&gt;\n"
26548"      &lt;attribute name=\"label\"&gt;Help&lt;/attribute&gt;\n"
26549"      &lt;section&gt;\n"
26550"        &lt;item&gt;\n"
26551"          &lt;attribute name=\"label\"&gt;About&lt;/attribute&gt;\n"
26552"          &lt;attribute name=\"action\"&gt;win.about&lt;/attribute&gt;\n"
26553"        &lt;/item&gt;\n"
26554"      &lt;/section&gt;\n"
26555"    &lt;/submenu&gt;\n"
26556"  &lt;/menu&gt;\n"
26557"  &lt;menu id=\"appmenu\"&gt;\n"
26558"    &lt;section&gt;\n"
26559"      &lt;item&gt;\n"
26560"        &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
26561"        &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
26562"      &lt;/item&gt;\n"
26563"      &lt;item&gt;\n"
26564"        &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
26565"        &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
26566"      &lt;/item&gt;\n"
26567"    &lt;/section&gt;\n"
26568"  &lt;/menu&gt;\n"
26569"&lt;/interface&gt;\n"
26570
26571#. (itstool) path: section/title
26572#: C/menubar.py.page:155
26573msgid "Complete Python file for this example"
26574msgstr "이 예제의 완전한 파이썬 파일"
26575
26576#. (itstool) path: section/code
26577#: C/menubar.py.page:156
26578#, no-wrap
26579msgid ""
26580"from gi.repository import Gtk\n"
26581"from gi.repository import GLib\n"
26582"from gi.repository import Gio\n"
26583"import sys\n"
26584"\n"
26585"\n"
26586"class MyWindow(Gtk.ApplicationWindow):\n"
26587"\n"
26588"    def __init__(self, app):\n"
26589"        Gtk.Window.__init__(self, title=\"MenuBar Example\", application=app)\n"
26590"        self.set_default_size(200, 200)\n"
26591"\n"
26592"        # action without a state created (name, parameter type)\n"
26593"        copy_action = Gio.SimpleAction.new(\"copy\", None)\n"
26594"        # connected with the callback function\n"
26595"        copy_action.connect(\"activate\", self.copy_callback)\n"
26596"        # added to the window\n"
26597"        self.add_action(copy_action)\n"
26598"\n"
26599"        # action without a state created (name, parameter type)\n"
26600"        paste_action = Gio.SimpleAction.new(\"paste\", None)\n"
26601"        # connected with the callback function\n"
26602"        paste_action.connect(\"activate\", self.paste_callback)\n"
26603"        # added to the window\n"
26604"        self.add_action(paste_action)\n"
26605"\n"
26606"        # action with a state created (name, parameter type, initial state)\n"
26607"        shape_action = Gio.SimpleAction.new_stateful(\n"
26608"            \"shape\", GLib.VariantType.new('s'), GLib.Variant.new_string('line'))\n"
26609"        # connected to the callback function\n"
26610"        shape_action.connect(\"activate\", self.shape_callback)\n"
26611"        # added to the window\n"
26612"        self.add_action(shape_action)\n"
26613"\n"
26614"        # action with a state created\n"
26615"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
26616"        # action connected to the callback function\n"
26617"        about_action.connect(\"activate\", self.about_callback)\n"
26618"        # action added to the application\n"
26619"        self.add_action(about_action)\n"
26620"\n"
26621"    # callback function for copy_action\n"
26622"    def copy_callback(self, action, parameter):\n"
26623"        print(\"\\\"Copy\\\" activated\")\n"
26624"\n"
26625"    # callback function for paste_action\n"
26626"    def paste_callback(self, action, parameter):\n"
26627"        print(\"\\\"Paste\\\" activated\")\n"
26628"\n"
26629"    # callback function for shape_action\n"
26630"    def shape_callback(self, action, parameter):\n"
26631"        print(\"Shape is set to\", parameter.get_string())\n"
26632"        # Note that we set the state of the action!\n"
26633"        action.set_state(parameter)\n"
26634"\n"
26635"    # callback function for about (see the AboutDialog example)\n"
26636"    def about_callback(self, action, parameter):\n"
26637"        # a  Gtk.AboutDialog\n"
26638"        aboutdialog = Gtk.AboutDialog()\n"
26639"\n"
26640"        # lists of authors and documenters (will be used later)\n"
26641"        authors = [\"GNOME Documentation Team\"]\n"
26642"        documenters = [\"GNOME Documentation Team\"]\n"
26643"\n"
26644"        # we fill in the aboutdialog\n"
26645"        aboutdialog.set_program_name(\"MenuBar Example\")\n"
26646"        aboutdialog.set_copyright(\n"
26647"            \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\")\n"
26648"        aboutdialog.set_authors(authors)\n"
26649"        aboutdialog.set_documenters(documenters)\n"
26650"        aboutdialog.set_website(\"http://developer.gnome.org\")\n"
26651"        aboutdialog.set_website_label(\"GNOME Developer Website\")\n"
26652"\n"
26653"        # to close the aboutdialog when \"close\" is clicked we connect the\n"
26654"        # \"response\" signal to on_close\n"
26655"        aboutdialog.connect(\"response\", self.on_close)\n"
26656"        # show the aboutdialog\n"
26657"        aboutdialog.show()\n"
26658"\n"
26659"    # a callback function to destroy the aboutdialog\n"
26660"    def on_close(self, action, parameter):\n"
26661"        action.destroy()\n"
26662"\n"
26663"\n"
26664"class MyApplication(Gtk.Application):\n"
26665"\n"
26666"    def __init__(self):\n"
26667"        Gtk.Application.__init__(self)\n"
26668"\n"
26669"    def do_activate(self):\n"
26670"        win = MyWindow(self)\n"
26671"        win.show_all()\n"
26672"\n"
26673"    def do_startup(self):\n"
26674"        # FIRST THING TO DO: do_startup()\n"
26675"        Gtk.Application.do_startup(self)\n"
26676"\n"
26677"        # action without a state created\n"
26678"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
26679"        # action connected to the callback function\n"
26680"        new_action.connect(\"activate\", self.new_callback)\n"
26681"        # action added to the application\n"
26682"        self.add_action(new_action)\n"
26683"\n"
26684"        # action without a state created\n"
26685"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
26686"        # action connected to the callback function\n"
26687"        quit_action.connect(\"activate\", self.quit_callback)\n"
26688"        # action added to the application\n"
26689"        self.add_action(quit_action)\n"
26690"\n"
26691"        # action with a state created\n"
26692"        state_action = Gio.SimpleAction.new_stateful(\n"
26693"            \"state\",  GLib.VariantType.new('s'), GLib.Variant.new_string('off'))\n"
26694"        # action connected to the callback function\n"
26695"        state_action.connect(\"activate\", self.state_callback)\n"
26696"        # action added to the application\n"
26697"        self.add_action(state_action)\n"
26698"\n"
26699"        # action with a state created\n"
26700"        awesome_action = Gio.SimpleAction.new_stateful(\n"
26701"            \"awesome\", None, GLib.Variant.new_boolean(False))\n"
26702"        # action connected to the callback function\n"
26703"        awesome_action.connect(\"activate\", self.awesome_callback)\n"
26704"        # action added to the application\n"
26705"        self.add_action(awesome_action)\n"
26706"\n"
26707"        # a builder to add the UI designed with Glade to the grid:\n"
26708"        builder = Gtk.Builder()\n"
26709"        # get the file (if it is there)\n"
26710"        try:\n"
26711"            builder.add_from_file(\"menubar.ui\")\n"
26712"        except:\n"
26713"            print(\"file not found\")\n"
26714"            sys.exit()\n"
26715"\n"
26716"        # we use the method Gtk.Application.set_menubar(menubar) to add the menubar\n"
26717"        # and the menu to the application (Note: NOT the window!)\n"
26718"        self.set_menubar(builder.get_object(\"menubar\"))\n"
26719"        self.set_app_menu(builder.get_object(\"appmenu\"))\n"
26720"\n"
26721"    # callback function for new\n"
26722"    def new_callback(self, action, parameter):\n"
26723"        print(\"You clicked \\\"New\\\"\")\n"
26724"\n"
26725"    # callback function for quit\n"
26726"    def quit_callback(self, action, parameter):\n"
26727"        print(\"You clicked \\\"Quit\\\"\")\n"
26728"        sys.exit()\n"
26729"\n"
26730"    # callback function for state\n"
26731"    def state_callback(self, action, parameter):\n"
26732"        print(\"State is set to\", parameter.get_string())\n"
26733"        action.set_state(parameter)\n"
26734"\n"
26735"    # callback function for awesome\n"
26736"    def awesome_callback(self, action, parameter):\n"
26737"        action.set_state(GLib.Variant.new_boolean(not action.get_state()))\n"
26738"        if action.get_state().get_boolean() is True:\n"
26739"            print(\"You checked \\\"Awesome\\\"\")\n"
26740"        else:\n"
26741"            print(\"You unchecked \\\"Awesome\\\"\")\n"
26742"\n"
26743"\n"
26744"app = MyApplication()\n"
26745"exit_status = app.run(sys.argv)\n"
26746"sys.exit(exit_status)\n"
26747msgstr ""
26748"from gi.repository import Gtk\n"
26749"from gi.repository import GLib\n"
26750"from gi.repository import Gio\n"
26751"import sys\n"
26752"\n"
26753"\n"
26754"class MyWindow(Gtk.ApplicationWindow):\n"
26755"\n"
26756"    def __init__(self, app):\n"
26757"        Gtk.Window.__init__(self, title=\"MenuBar Example\", application=app)\n"
26758"        self.set_default_size(200, 200)\n"
26759"\n"
26760"        # action without a state created (name, parameter type)\n"
26761"        copy_action = Gio.SimpleAction.new(\"copy\", None)\n"
26762"        # connected with the callback function\n"
26763"        copy_action.connect(\"activate\", self.copy_callback)\n"
26764"        # added to the window\n"
26765"        self.add_action(copy_action)\n"
26766"\n"
26767"        # action without a state created (name, parameter type)\n"
26768"        paste_action = Gio.SimpleAction.new(\"paste\", None)\n"
26769"        # connected with the callback function\n"
26770"        paste_action.connect(\"activate\", self.paste_callback)\n"
26771"        # added to the window\n"
26772"        self.add_action(paste_action)\n"
26773"\n"
26774"        # action with a state created (name, parameter type, initial state)\n"
26775"        shape_action = Gio.SimpleAction.new_stateful(\n"
26776"            \"shape\", GLib.VariantType.new('s'), GLib.Variant.new_string('line'))\n"
26777"        # connected to the callback function\n"
26778"        shape_action.connect(\"activate\", self.shape_callback)\n"
26779"        # added to the window\n"
26780"        self.add_action(shape_action)\n"
26781"\n"
26782"        # action with a state created\n"
26783"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
26784"        # action connected to the callback function\n"
26785"        about_action.connect(\"activate\", self.about_callback)\n"
26786"        # action added to the application\n"
26787"        self.add_action(about_action)\n"
26788"\n"
26789"    # callback function for copy_action\n"
26790"    def copy_callback(self, action, parameter):\n"
26791"        print(\"\\\"Copy\\\" activated\")\n"
26792"\n"
26793"    # callback function for paste_action\n"
26794"    def paste_callback(self, action, parameter):\n"
26795"        print(\"\\\"Paste\\\" activated\")\n"
26796"\n"
26797"    # callback function for shape_action\n"
26798"    def shape_callback(self, action, parameter):\n"
26799"        print(\"Shape is set to\", parameter.get_string())\n"
26800"        # Note that we set the state of the action!\n"
26801"        action.set_state(parameter)\n"
26802"\n"
26803"    # callback function for about (see the AboutDialog example)\n"
26804"    def about_callback(self, action, parameter):\n"
26805"        # a  Gtk.AboutDialog\n"
26806"        aboutdialog = Gtk.AboutDialog()\n"
26807"\n"
26808"        # lists of authors and documenters (will be used later)\n"
26809"        authors = [\"GNOME Documentation Team\"]\n"
26810"        documenters = [\"GNOME Documentation Team\"]\n"
26811"\n"
26812"        # we fill in the aboutdialog\n"
26813"        aboutdialog.set_program_name(\"MenuBar Example\")\n"
26814"        aboutdialog.set_copyright(\n"
26815"            \"Copyright \\xc2\\xa9 2012 GNOME Documentation Team\")\n"
26816"        aboutdialog.set_authors(authors)\n"
26817"        aboutdialog.set_documenters(documenters)\n"
26818"        aboutdialog.set_website(\"http://developer.gnome.org\")\n"
26819"        aboutdialog.set_website_label(\"GNOME Developer Website\")\n"
26820"\n"
26821"        # to close the aboutdialog when \"close\" is clicked we connect the\n"
26822"        # \"response\" signal to on_close\n"
26823"        aboutdialog.connect(\"response\", self.on_close)\n"
26824"        # show the aboutdialog\n"
26825"        aboutdialog.show()\n"
26826"\n"
26827"    # a callback function to destroy the aboutdialog\n"
26828"    def on_close(self, action, parameter):\n"
26829"        action.destroy()\n"
26830"\n"
26831"\n"
26832"class MyApplication(Gtk.Application):\n"
26833"\n"
26834"    def __init__(self):\n"
26835"        Gtk.Application.__init__(self)\n"
26836"\n"
26837"    def do_activate(self):\n"
26838"        win = MyWindow(self)\n"
26839"        win.show_all()\n"
26840"\n"
26841"    def do_startup(self):\n"
26842"        # FIRST THING TO DO: do_startup()\n"
26843"        Gtk.Application.do_startup(self)\n"
26844"\n"
26845"        # action without a state created\n"
26846"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
26847"        # action connected to the callback function\n"
26848"        new_action.connect(\"activate\", self.new_callback)\n"
26849"        # action added to the application\n"
26850"        self.add_action(new_action)\n"
26851"\n"
26852"        # action without a state created\n"
26853"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
26854"        # action connected to the callback function\n"
26855"        quit_action.connect(\"activate\", self.quit_callback)\n"
26856"        # action added to the application\n"
26857"        self.add_action(quit_action)\n"
26858"\n"
26859"        # action with a state created\n"
26860"        state_action = Gio.SimpleAction.new_stateful(\n"
26861"            \"state\",  GLib.VariantType.new('s'), GLib.Variant.new_string('off'))\n"
26862"        # action connected to the callback function\n"
26863"        state_action.connect(\"activate\", self.state_callback)\n"
26864"        # action added to the application\n"
26865"        self.add_action(state_action)\n"
26866"\n"
26867"        # action with a state created\n"
26868"        awesome_action = Gio.SimpleAction.new_stateful(\n"
26869"            \"awesome\", None, GLib.Variant.new_boolean(False))\n"
26870"        # action connected to the callback function\n"
26871"        awesome_action.connect(\"activate\", self.awesome_callback)\n"
26872"        # action added to the application\n"
26873"        self.add_action(awesome_action)\n"
26874"\n"
26875"        # a builder to add the UI designed with Glade to the grid:\n"
26876"        builder = Gtk.Builder()\n"
26877"        # get the file (if it is there)\n"
26878"        try:\n"
26879"            builder.add_from_file(\"menubar.ui\")\n"
26880"        except:\n"
26881"            print(\"file not found\")\n"
26882"            sys.exit()\n"
26883"\n"
26884"        # we use the method Gtk.Application.set_menubar(menubar) to add the menubar\n"
26885"        # and the menu to the application (Note: NOT the window!)\n"
26886"        self.set_menubar(builder.get_object(\"menubar\"))\n"
26887"        self.set_app_menu(builder.get_object(\"appmenu\"))\n"
26888"\n"
26889"    # callback function for new\n"
26890"    def new_callback(self, action, parameter):\n"
26891"        print(\"You clicked \\\"New\\\"\")\n"
26892"\n"
26893"    # callback function for quit\n"
26894"    def quit_callback(self, action, parameter):\n"
26895"        print(\"You clicked \\\"Quit\\\"\")\n"
26896"        sys.exit()\n"
26897"\n"
26898"    # callback function for state\n"
26899"    def state_callback(self, action, parameter):\n"
26900"        print(\"State is set to\", parameter.get_string())\n"
26901"        action.set_state(parameter)\n"
26902"\n"
26903"    # callback function for awesome\n"
26904"    def awesome_callback(self, action, parameter):\n"
26905"        action.set_state(GLib.Variant.new_boolean(not action.get_state()))\n"
26906"        if action.get_state().get_boolean() is True:\n"
26907"            print(\"You checked \\\"Awesome\\\"\")\n"
26908"        else:\n"
26909"            print(\"You unchecked \\\"Awesome\\\"\")\n"
26910"\n"
26911"\n"
26912"app = MyApplication()\n"
26913"exit_status = app.run(sys.argv)\n"
26914"sys.exit(exit_status)\n"
26915
26916#. (itstool) path: section/title
26917#: C/menubar.py.page:159
26918msgid "Mnemonics and Accelerators"
26919msgstr "접근 키와 단축키"
26920
26921#. (itstool) path: section/p
26922#: C/menubar.py.page:160 C/menubar.vala.page:162
26923msgid ""
26924"Labels may contain mnemonics. Mnemonics are underlined characters in the label, used for keyboard navigation. "
26925"Mnemonics are created by placing an underscore before the mnemonic character. For example \"_File\" instead of "
26926"just \"File\" in the menubar.ui label attribute."
26927msgstr ""
26928"레이블에는 접근 키가 들어갈 수 있습니다. 접근 키는 키보드로 탐색할 때 활용하는 레이블에 밑줄이 들어간 문자입니다. "
26929"접근 키는 접근키 문자 앞에 밑줄을 넣어 만듭니다. 예를 들어 menubar.ui 레이블 속성에서 \"File\" 대신 \"_File\"을 넣"
26930"습니다."
26931
26932#. (itstool) path: section/p
26933#: C/menubar.py.page:161 C/menubar.vala.page:163
26934msgid ""
26935"The mnemonics are visible when you press the <key>Alt</key> key. Pressing <keyseq><key>Alt</key><key>F</key></"
26936"keyseq> will open the <gui>File</gui> menu."
26937msgstr ""
26938"접근키는 <key>Alt</key> 키를 누르면 나타납니다. <keyseq><key>Alt</key><key>F</key></keyseq> 키를 누르면 <gui>파일</"
26939"gui> 메뉴가 나타납니다."
26940
26941#. (itstool) path: section/p
26942#: C/menubar.py.page:163 C/menubar.vala.page:168
26943msgid ""
26944"Accelerators can be explicitly added in the UI definitions. For example, it is common to be able to quit an "
26945"application by pressing <keyseq><key>Ctrl</key><key>Q</key></keyseq> or to save a file by pressing "
26946"<keyseq><key>Ctrl</key><key>S</key></keyseq>. To add an accelerator to the UI definition, you simply need add an "
26947"\"accel\" attribute to the item."
26948msgstr ""
26949"가속키는 UI 정의에 분명하게 추가할 수 있습니다. 예를 들어 일반적으로 프로그램을 끝내는 동작은 <keyseq><key>Ctrl</"
26950"key><key>Q</key></keyseq> 키를 눌러 진행할 수 있고, 또는 파일을 저장하는 동작은 <keyseq><key>Ctrl</key><key>S</"
26951"key></keyseq> 키를 눌러 진행할 수 있습니다. UI 정의에 가속키를 추가하려면 간단하게 항목의 \"accel\" 속성 값을 추가"
26952"하면 됩니다."
26953
26954#. (itstool) path: section/p
26955#: C/menubar.py.page:164 C/menubar.vala.page:169
26956msgid ""
26957"<code mime=\"application/xml\">&lt;attribute name=\"accel\"&gt;&amp;lt;Primary&amp;gt;q&lt;/attribute&gt;</code> "
26958"will create the <keyseq><key>Ctrl</key><key>Q</key></keyseq> sequence when added to the <code>Quit</code> label "
26959"item. Here, \"Primary\" refers to the <key>Ctrl</key> key on a PC or the <key>⌘</key> key on a Mac."
26960msgstr ""
26961"<code mime=\"application/xml\">&lt;attribute name=\"accel\"&gt;&amp;lt;Primary&amp;gt;q&lt;/attribute&gt;</code> 구"
26962"문은 <code>Quit</code> 레이블 항목에 추가할 <keyseq><key>Ctrl</key><key>Q</key></keyseq> 키 조합 입력을 만듭니다. "
26963"여기서, \"Primary\"는 PC의 <key>Ctrl</key>키 또는 맥의 <key>⌘</key> 키를 따릅니다."
26964
26965#. (itstool) path: section/code
26966#: C/menubar.py.page:166 C/menubar.vala.page:171
26967#, no-wrap
26968msgid ""
26969"\n"
26970"&lt;item&gt;\n"
26971"  &lt;attribute name=\"label\"&gt;_Quit&lt;/attribute&gt;\n"
26972"  &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
26973"  &lt;attribute name=\"accel\"&gt;&amp;lt;Primary&amp;gt;q&lt;/attribute&gt;\n"
26974"&lt;/item&gt;"
26975msgstr ""
26976"\n"
26977"&lt;item&gt;\n"
26978"  &lt;attribute name=\"label\"&gt;_Quit&lt;/attribute&gt;\n"
26979"  &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
26980"  &lt;attribute name=\"accel\"&gt;&amp;lt;Primary&amp;gt;q&lt;/attribute&gt;\n"
26981"&lt;/item&gt;"
26982
26983#. (itstool) path: section/title
26984#: C/menubar.py.page:174 C/menubar.vala.page:179
26985msgid "Translatable strings"
26986msgstr "번역할 문자열"
26987
26988#. (itstool) path: section/p
26989#: C/menubar.py.page:175 C/menubar.vala.page:180
26990msgid ""
26991"Since GNOME applications are being translated into <link href=\"http://l10n.gnome.org/languages/\">many languages</"
26992"link>, it is important that the strings in your application are translatable. To make a label translatable, simple "
26993"set <code>translatable=\"yes\"</code>:"
26994msgstr ""
26995"그놈 프로그램은 <link href=\"http://l10n.gnome.org/languages/\">다양한 언어</link>로 번역하기에 프로그램 문자열을 "
26996"번역할 수 있게 만들어 두는게 중요합니다. 레이블을 번역할 수 있게 하려면 간단히 <code>translatable=\"yes\"</code>를 "
26997"설정하십시오:"
26998
26999#. (itstool) path: section/code
27000#: C/menubar.py.page:179
27001#, no-wrap
27002msgid "&lt;attribute name=\"label\" translatable=\"yes\"&gt;Quit&lt;/attribute&gt;"
27003msgstr "&lt;attribute name=\"label\" translatable=\"yes\"&gt;Quit&lt;/attribute&gt;"
27004
27005#. (itstool) path: item/p
27006#: C/menubar.py.page:186
27007msgid "<link href=\"http://developer.gnome.org/gio/unstable/GSimpleAction.html\">GSimpleAction</link>"
27008msgstr "<link href=\"http://developer.gnome.org/gio/unstable/GSimpleAction.html\">GSimpleAction</link>"
27009
27010#. (itstool) path: item/p
27011#: C/menubar.py.page:187 C/toolbar_builder.py.page:197
27012msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkBuilder.html\">GtkBuilder</link>"
27013msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkBuilder.html\">GtkBuilder</link>"
27014
27015#. (itstool) path: info/title
27016#: C/menubar.vala.page:8
27017msgctxt "text"
27018msgid "MenuBar (Vala)"
27019msgstr "MenuBar (Vala)"
27020
27021#. (itstool) path: item/p
27022#: C/menubar.vala.page:40
27023msgid "Now we will create the .vala file and use GtkBuilder to import the <file>menubar.ui</file> we just created."
27024msgstr "이제 .vala 파일을 만들고 방금 추가한 <file>menubar.ui</file> 파일을 GtkBuilder를 사용하여 임포팅하겠습니다."
27025
27026#. (itstool) path: section/code
27027#: C/menubar.vala.page:44
27028#, no-wrap
27029msgid ""
27030"public class MyWindow : Gtk.ApplicationWindow {\n"
27031"\tinternal MyWindow (MyApplication app) {\n"
27032"\t\tObject (application: app, title: \"MenuBar Example\");\n"
27033"\t\tthis.set_default_size (200, 200);\n"
27034"\t}\n"
27035"}\n"
27036"\n"
27037"class MyApplication: Gtk.Application {\n"
27038"\tprotected override void activate () {\n"
27039"\t\tnew MyWindow (this).show ();\n"
27040"\t}\n"
27041"\tprotected override void startup () {\n"
27042"\t\tbase.startup ();\n"
27043"\n"
27044"\t\t/* Setup menubar. */\n"
27045"\t\t/* Get the UI file. */\n"
27046"\t\tvar builder = new Gtk.Builder ();\n"
27047"\t\ttry {\n"
27048"\t\t\tbuilder.add_from_file (\"menubar_basis.ui\");\n"
27049"\t\t/* Handle the exception. */\n"
27050"\t\t} catch (Error e) {\n"
27051"\t\t\terror (\"Unable to load file: %s\", e.message);\n"
27052"\t\t}\n"
27053"\n"
27054"\t\t/* Get the menubar from the builder. */\n"
27055"\t\tthis.menubar = builder.get_object (\"menubar\") as MenuModel;\n"
27056"\t}\n"
27057"}\n"
27058"\n"
27059"/* main creates and runs the application. */\n"
27060"public int main (string[] args) {\n"
27061"\treturn new MyApplication ().run (args);\n"
27062"}\n"
27063msgstr ""
27064"public class MyWindow : Gtk.ApplicationWindow {\n"
27065"\tinternal MyWindow (MyApplication app) {\n"
27066"\t\tObject (application: app, title: \"MenuBar Example\");\n"
27067"\t\tthis.set_default_size (200, 200);\n"
27068"\t}\n"
27069"}\n"
27070"\n"
27071"class MyApplication: Gtk.Application {\n"
27072"\tprotected override void activate () {\n"
27073"\t\tnew MyWindow (this).show ();\n"
27074"\t}\n"
27075"\tprotected override void startup () {\n"
27076"\t\tbase.startup ();\n"
27077"\n"
27078"\t\t/* Setup menubar. */\n"
27079"\t\t/* Get the UI file. */\n"
27080"\t\tvar builder = new Gtk.Builder ();\n"
27081"\t\ttry {\n"
27082"\t\t\tbuilder.add_from_file (\"menubar_basis.ui\");\n"
27083"\t\t/* Handle the exception. */\n"
27084"\t\t} catch (Error e) {\n"
27085"\t\t\terror (\"Unable to load file: %s\", e.message);\n"
27086"\t\t}\n"
27087"\n"
27088"\t\t/* Get the menubar from the builder. */\n"
27089"\t\tthis.menubar = builder.get_object (\"menubar\") as MenuModel;\n"
27090"\t}\n"
27091"}\n"
27092"\n"
27093"/* main creates and runs the application. */\n"
27094"public int main (string[] args) {\n"
27095"\treturn new MyApplication ().run (args);\n"
27096"}\n"
27097
27098#. (itstool) path: section/p
27099#: C/menubar.vala.page:45
27100msgid "Now, compile the vala file, and run it. The application should look like the picture at the top of this page."
27101msgstr "이제 vala 파일을 컴파일하고 실행하십시오. 프로그램은 페이지 상단의 사진과 같은 모습이 나타납니다."
27102
27103#. (itstool) path: section/p
27104#: C/menubar.vala.page:80
27105msgid ""
27106"Following this pattern, you can now add a <code>Copy</code> and a <code>Paste</code> item to the <code>Edit</code> "
27107"submenu, and an <code>About</code> item to the <code>Help</code> submenu. We will hold off on adding items to the "
27108"<link xref=\"menubar.vala#choices\">Choices submenu</link> until further in the tutorial."
27109msgstr ""
27110"이 방식을 따라 <code>편집</code> 하위 메뉴로 <code>복사</code> 와 <code>붙여넣기</code> 를 추가하고, <code>Help</"
27111"code> 하위 메뉴에 <code>정보</code>를 추가할 수 있습니다. 다음 따라하기 지침을 진행할 때까지 <link xref=\"menubar."
27112"vala#choices\">선택 하위 메뉴</link>로의 항목 추가를 보류하겠습니다."
27113
27114#. (itstool) path: note/p
27115#: C/menubar.vala.page:82
27116msgid ""
27117"You do not need to recompile the vala program if you only made changes to the UI file. Just run your previously "
27118"compiled application, and the UI changes will be reflected."
27119msgstr ""
27120"UI 파일만 바꾸었다면 vala 프로그램을 다시 컴파일할 필요는 없습니다. 그냥 이전에 컴파일한 프로그램을 실행만 하시면 "
27121"사용자 인터페이스를 반영합니다."
27122
27123#. (itstool) path: section/p
27124#: C/menubar.vala.page:88
27125msgid "This is a three step process."
27126msgstr "세 단계로 이루어집니다."
27127
27128#. (itstool) path: item/p
27129#: C/menubar.vala.page:90
27130msgid "First we create the ActionEntry array in the MyApplication class. An ActionEntry consists of:"
27131msgstr "우선 MyApplication 클래스에 ActionEntry 배열을 만들겠습니다. ActionEntry 구성은 다음과 같습니다:"
27132
27133#. (itstool) path: item/p
27134#: C/menubar.vala.page:93
27135msgid "the \"action name\" (mandatory)"
27136msgstr "\"동작 이름\"(필수)"
27137
27138#. (itstool) path: item/p
27139#: C/menubar.vala.page:94
27140msgid "the callback function to connect to the \"activate\" signal of the action (if applicable)"
27141msgstr "동작의 \"activate\" 시그널에 연결하는 콜백 함수(가능하다면)"
27142
27143#. (itstool) path: item/p
27144#: C/menubar.vala.page:95
27145msgid "the type of the parameter that must be passed to the activate function for the action (if applicable)"
27146msgstr "동작에 대한 활성화 함수로 전달할 매개변수 형식(가능하다면)"
27147
27148#. (itstool) path: item/p
27149#: C/menubar.vala.page:96
27150msgid "the initial state for this action (if applicable)"
27151msgstr "동작의 초기 상태(가능하다면)"
27152
27153#. (itstool) path: item/p
27154#: C/menubar.vala.page:97
27155msgid "the callback to connect to \"change-state\" signal (if applicable)"
27156msgstr "\"change-state\" 시그널에 연결할 콜백 함수(가능하다면)"
27157
27158#. (itstool) path: item/code
27159#: C/menubar.vala.page:99
27160#, no-wrap
27161msgid ""
27162"\n"
27163"const ActionEntry[] actions = {\n"
27164"    { \"new\", new_cb }, // {\"action name\", callback_function}\n"
27165"    { \"quit\", quit_cb }\n"
27166"};"
27167msgstr ""
27168"\n"
27169"const ActionEntry[] actions = {\n"
27170"    { \"new\", new_cb }, // {\"action name\", callback_function}\n"
27171"    { \"quit\", quit_cb }\n"
27172"};"
27173
27174#. (itstool) path: item/p
27175#: C/menubar.vala.page:106
27176msgid "Second, we create the callback functions the actions are connected to."
27177msgstr "두번째로 연결할 동작의 콜백 함수를 만들겠습니다."
27178
27179#. (itstool) path: item/code
27180#: C/menubar.vala.page:107
27181#, no-wrap
27182msgid ""
27183"\n"
27184"void new_cb (SimpleAction action, Variant? parameter) {\n"
27185"    print (\"You clicked \\\"New\\\"\\n\");\n"
27186"    //new MyWindow (this).show ();\n"
27187"}\n"
27188"\n"
27189"void quit_cb (SimpleAction action, Variant? parameter) {\n"
27190"    print (\"You clicked \\\"Quit\\\"\\n\");\n"
27191"    this.quit ();\n"
27192"}"
27193msgstr ""
27194"\n"
27195"void new_cb (SimpleAction action, Variant? parameter) {\n"
27196"    print (\"You clicked \\\"New\\\"\\n\");\n"
27197"    //new MyWindow (this).show ();\n"
27198"}\n"
27199"\n"
27200"void quit_cb (SimpleAction action, Variant? parameter) {\n"
27201"    print (\"You clicked \\\"Quit\\\"\\n\");\n"
27202"    this.quit ();\n"
27203"}"
27204
27205#. (itstool) path: item/p
27206#: C/menubar.vala.page:118
27207msgid "And lastly, we connect the menu items to the actions in the XML file by adding the \"action\" attribute:"
27208msgstr "마지막으로, \"action\" 속성을 추가하여 XML 파일의 동작에 메뉴 항목을 연결하겠습니다:"
27209
27210#. (itstool) path: item/code
27211#: C/menubar.vala.page:119
27212#, no-wrap
27213msgid ""
27214"\n"
27215"&lt;item&gt;\n"
27216"  &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
27217"  &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
27218"&lt;/item&gt;\n"
27219"&lt;item&gt;\n"
27220"  &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
27221"  &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
27222"&lt;/item&gt;"
27223msgstr ""
27224"\n"
27225"&lt;item&gt;\n"
27226"  &lt;attribute name=\"label\"&gt;New&lt;/attribute&gt;\n"
27227"  &lt;attribute name=\"action\"&gt;app.new&lt;/attribute&gt;\n"
27228"&lt;/item&gt;\n"
27229"&lt;item&gt;\n"
27230"  &lt;attribute name=\"label\"&gt;Quit&lt;/attribute&gt;\n"
27231"  &lt;attribute name=\"action\"&gt;app.quit&lt;/attribute&gt;\n"
27232"&lt;/item&gt;"
27233
27234#. (itstool) path: section/p
27235#: C/menubar.vala.page:135
27236msgid ""
27237"Lines 30 to 80 inclusive of the <link xref=\"menubar.vala#xml-code\"/> demonstrate the XML code used to create the "
27238"UI for <gui>Choices</gui> menu."
27239msgstr ""
27240"30줄부터 80줄 까지 <link xref=\"menubar.vala#xml-code\"/>가 들어간 부분에서 <gui>선택</gui> 메뉴 사용자 인터페이스"
27241"를 만드는 XML 코드를 시연하고 있습니다."
27242
27243#. (itstool) path: section/p
27244#: C/menubar.vala.page:146
27245msgid ""
27246"The complete example files contain both application actions and window applications. The window actions are the "
27247"ones usually included in the <link xref=\"gmenu.vala\">application menu</link> also. It is not good practice to "
27248"include window actions in the application menu. For demonstration purposes, the complete example files which "
27249"follow include XML in the UI file which creates the application menu which includes a \"New\" and \"Open\" item, "
27250"and these are hooked up to the same actions as the menubar items of the same name."
27251msgstr ""
27252"완전한 예제 파일에는 프로그램 동작과 창 프로그램이 들어있습니다. 창 동작은 보통 <link xref=\"gmenu.vala\">프로그램 "
27253"메뉴</link>에도 들어있습니다. 창 동작을 프로그램 메뉴에 넣는건 별로 좋은 습관이 아닙니다. 시연 목적으로 \"New\"와 "
27254"\"Open\" 항목이 들어간 프로그램 메뉴를 만드는 UI 파일에 들어간 XML의 내용을 따르며, 동일한 이름을 지닌 메뉴 표시줄 "
27255"항목 처럼 동일한 동작을 실행합니다."
27256
27257#. (itstool) path: section/title
27258#: C/menubar.vala.page:157
27259msgid "Complete Vala file for this example"
27260msgstr "이 예제에 대한 완전한 Vala 파일입니다"
27261
27262#. (itstool) path: section/code
27263#: C/menubar.vala.page:158
27264#, no-wrap
27265msgid ""
27266"public class MyWindow : Gtk.ApplicationWindow {\n"
27267"\n"
27268"\t/* Callback functions for the window actions. */\n"
27269"\tvoid copy_cb (SimpleAction action, Variant? parameter) {\n"
27270"\t\tprint (\"\\\"Copy\\\" activated\\n\");\n"
27271"\t}\n"
27272"\n"
27273"\tvoid paste_cb (SimpleAction action, Variant? parameter) {\n"
27274"\t\tprint (\"\\\"Paste\\\" activated\\n\");\n"
27275"\t}\n"
27276"\n"
27277"\tvoid shape_cb (SimpleAction action, Variant? parameter) {\n"
27278"\t\tprint (\"shape is set to %s\\n\", parameter.get_string(null));\n"
27279"\t\taction.set_state (parameter);\n"
27280"\t}\n"
27281"\n"
27282"\t/* Create the window actions. */\n"
27283"\tconst ActionEntry[] actions = {\n"
27284"\t\t/*{ \"action name\", cb to connect to \"activate\" signal, parameter type,\n"
27285"\t\t     initial state, cb to connect to \"change-state\" signal } */\n"
27286"\t\t{ \"copy\", copy_cb },\n"
27287"\t\t{ \"paste\", paste_cb },\n"
27288"\t\t{ \"shape\", shape_cb, \"s\", \"'line'\"}\n"
27289"\t};\n"
27290"\n"
27291"\tinternal MyWindow (MyApplication app) {\n"
27292"\t\tObject (application: app, title: \"MenuBar Example\");\n"
27293"\t\tthis.set_default_size (200, 200);\n"
27294"\n"
27295"\t\t/* Setup window actions. */\n"
27296"\t\tthis.add_action_entries (actions, this);\n"
27297"\t}\n"
27298"}\n"
27299"\n"
27300"class MyApplication: Gtk.Application {\n"
27301"\tprotected override void activate () {\n"
27302"\t\tnew MyWindow (this).show ();\n"
27303"\t}\n"
27304"\n"
27305"\t/* Callback functions for the application actions. */\n"
27306"\tvoid new_cb (SimpleAction action, Variant? parameter) {\n"
27307"\t\t//new MyWindow (this).show ();\n"
27308"\t\tprint (\"You clicked \\\"New\\\"\\n\");\n"
27309"\t}\n"
27310"\n"
27311"\tvoid quit_cb (SimpleAction action, Variant? parameter) {\n"
27312"\t\tprint (\"You clicked \\\"Quit\\\"\\n\");\n"
27313"\t\tthis.quit ();\n"
27314"\t}\n"
27315"\n"
27316"\tvoid awesome_cb (SimpleAction action, Variant? parameter) {\n"
27317"\t\tvar active = action.get_state ().get_boolean ();\n"
27318"\t\taction.set_state (new Variant.boolean (!active));\n"
27319"\t\tif (active)\n"
27320"\t\t\tprint (\"You unchecked \\\"Awesome\\\"\\n\");\n"
27321"\t\telse\n"
27322"\t\t\tprint (\"You checked \\\"Awesome\\\"\\n\");\n"
27323"\t}\n"
27324"\n"
27325"\tvoid state_cb (SimpleAction action, Variant? parameter) {\n"
27326"\t\tprint (\"state is set to %s\\n\", parameter.get_string(null));\n"
27327"\t\taction.set_state (parameter);\n"
27328"\t}\n"
27329"\n"
27330"\t/* Create the application actions. */\n"
27331"\tconst ActionEntry[] actions = {\n"
27332"\t\t{ \"new\", new_cb },\n"
27333"\t\t{ \"quit\", quit_cb },\n"
27334"\t\t{ \"awesome\", awesome_cb, null, \"false\" },\n"
27335"\t\t{ \"state\", state_cb, \"s\", \"'off'\" }\n"
27336"\t};\n"
27337"\n"
27338"\tprotected override void startup () {\n"
27339"\t\tbase.startup ();\n"
27340"\n"
27341"\t\t/* Setup application actions. */\n"
27342"\t\tthis.add_action_entries (actions, this);\n"
27343"\n"
27344"\t\t/* Setup menubar and app_menu. */\n"
27345"\t\t/* Get the UI file. */\n"
27346"\t\tvar builder = new Gtk.Builder ();\n"
27347"\t\ttry {\n"
27348"\t\t\tbuilder.add_from_file (\"menubar.ui\");\n"
27349"\t\t} catch (Error e) {\n"
27350"\t\t\terror (\"Unable to load file: %s\", e.message);\n"
27351"\t\t}\n"
27352"\n"
27353"\t\t/* Get the menubar from the builder. */\n"
27354"\t\tthis.menubar = builder.get_object (\"menubar\") as MenuModel;\n"
27355"\n"
27356"\t\t/* Get the app_menu from the builder. */\n"
27357"\t\tthis.app_menu = builder.get_object (\"appmenu\") as MenuModel;\n"
27358"\t}\n"
27359"}\n"
27360"\n"
27361"/* main creates and runs the application. */\n"
27362"public int main (string[] args) {\n"
27363"\treturn new MyApplication ().run (args);\n"
27364"}\n"
27365msgstr ""
27366"public class MyWindow : Gtk.ApplicationWindow {\n"
27367"\n"
27368"\t/* Callback functions for the window actions. */\n"
27369"\tvoid copy_cb (SimpleAction action, Variant? parameter) {\n"
27370"\t\tprint (\"\\\"Copy\\\" activated\\n\");\n"
27371"\t}\n"
27372"\n"
27373"\tvoid paste_cb (SimpleAction action, Variant? parameter) {\n"
27374"\t\tprint (\"\\\"Paste\\\" activated\\n\");\n"
27375"\t}\n"
27376"\n"
27377"\tvoid shape_cb (SimpleAction action, Variant? parameter) {\n"
27378"\t\tprint (\"shape is set to %s\\n\", parameter.get_string(null));\n"
27379"\t\taction.set_state (parameter);\n"
27380"\t}\n"
27381"\n"
27382"\t/* Create the window actions. */\n"
27383"\tconst ActionEntry[] actions = {\n"
27384"\t\t/*{ \"action name\", cb to connect to \"activate\" signal, parameter type,\n"
27385"\t\t     initial state, cb to connect to \"change-state\" signal } */\n"
27386"\t\t{ \"copy\", copy_cb },\n"
27387"\t\t{ \"paste\", paste_cb },\n"
27388"\t\t{ \"shape\", shape_cb, \"s\", \"'line'\"}\n"
27389"\t};\n"
27390"\n"
27391"\tinternal MyWindow (MyApplication app) {\n"
27392"\t\tObject (application: app, title: \"MenuBar Example\");\n"
27393"\t\tthis.set_default_size (200, 200);\n"
27394"\n"
27395"\t\t/* Setup window actions. */\n"
27396"\t\tthis.add_action_entries (actions, this);\n"
27397"\t}\n"
27398"}\n"
27399"\n"
27400"class MyApplication: Gtk.Application {\n"
27401"\tprotected override void activate () {\n"
27402"\t\tnew MyWindow (this).show ();\n"
27403"\t}\n"
27404"\n"
27405"\t/* Callback functions for the application actions. */\n"
27406"\tvoid new_cb (SimpleAction action, Variant? parameter) {\n"
27407"\t\t//new MyWindow (this).show ();\n"
27408"\t\tprint (\"You clicked \\\"New\\\"\\n\");\n"
27409"\t}\n"
27410"\n"
27411"\tvoid quit_cb (SimpleAction action, Variant? parameter) {\n"
27412"\t\tprint (\"You clicked \\\"Quit\\\"\\n\");\n"
27413"\t\tthis.quit ();\n"
27414"\t}\n"
27415"\n"
27416"\tvoid awesome_cb (SimpleAction action, Variant? parameter) {\n"
27417"\t\tvar active = action.get_state ().get_boolean ();\n"
27418"\t\taction.set_state (new Variant.boolean (!active));\n"
27419"\t\tif (active)\n"
27420"\t\t\tprint (\"You unchecked \\\"Awesome\\\"\\n\");\n"
27421"\t\telse\n"
27422"\t\t\tprint (\"You checked \\\"Awesome\\\"\\n\");\n"
27423"\t}\n"
27424"\n"
27425"\tvoid state_cb (SimpleAction action, Variant? parameter) {\n"
27426"\t\tprint (\"state is set to %s\\n\", parameter.get_string(null));\n"
27427"\t\taction.set_state (parameter);\n"
27428"\t}\n"
27429"\n"
27430"\t/* Create the application actions. */\n"
27431"\tconst ActionEntry[] actions = {\n"
27432"\t\t{ \"new\", new_cb },\n"
27433"\t\t{ \"quit\", quit_cb },\n"
27434"\t\t{ \"awesome\", awesome_cb, null, \"false\" },\n"
27435"\t\t{ \"state\", state_cb, \"s\", \"'off'\" }\n"
27436"\t};\n"
27437"\n"
27438"\tprotected override void startup () {\n"
27439"\t\tbase.startup ();\n"
27440"\n"
27441"\t\t/* Setup application actions. */\n"
27442"\t\tthis.add_action_entries (actions, this);\n"
27443"\n"
27444"\t\t/* Setup menubar and app_menu. */\n"
27445"\t\t/* Get the UI file. */\n"
27446"\t\tvar builder = new Gtk.Builder ();\n"
27447"\t\ttry {\n"
27448"\t\t\tbuilder.add_from_file (\"menubar.ui\");\n"
27449"\t\t} catch (Error e) {\n"
27450"\t\t\terror (\"Unable to load file: %s\", e.message);\n"
27451"\t\t}\n"
27452"\n"
27453"\t\t/* Get the menubar from the builder. */\n"
27454"\t\tthis.menubar = builder.get_object (\"menubar\") as MenuModel;\n"
27455"\n"
27456"\t\t/* Get the app_menu from the builder. */\n"
27457"\t\tthis.app_menu = builder.get_object (\"appmenu\") as MenuModel;\n"
27458"\t}\n"
27459"}\n"
27460"\n"
27461"/* main creates and runs the application. */\n"
27462"public int main (string[] args) {\n"
27463"\treturn new MyApplication ().run (args);\n"
27464"}\n"
27465
27466#. (itstool) path: section/title
27467#: C/menubar.vala.page:161
27468msgid "Mnemonics"
27469msgstr "접근 키"
27470
27471#. (itstool) path: section/title
27472#: C/menubar.vala.page:167
27473msgid "Accelerators"
27474msgstr "가속키"
27475
27476#. (itstool) path: section/p
27477#: C/menubar.vala.page:183
27478msgid ""
27479"<code mime=\"application/xml\">&lt;attribute name=\"label\" translatable=\"yes\"&gt;Quit&lt;/attribute&gt;</code>"
27480msgstr ""
27481"<code mime=\"application/xml\">&lt;attribute name=\"label\" translatable=\"yes\"&gt;Quit&lt;/attribute&gt;</code>"
27482
27483#. (itstool) path: item/p
27484#: C/menubar.vala.page:192
27485msgid "<link href=\"http://valadoc.org/gio-2.0/GLib.ActionEntry.html\">Glib.ActionEntry</link>"
27486msgstr "<link href=\"http://valadoc.org/gio-2.0/GLib.ActionEntry.html\">Glib.ActionEntry</link>"
27487
27488#. (itstool) path: item/p
27489#: C/menubar.vala.page:193
27490msgid "<link href=\"http://valadoc.org/gio-2.0/Gtk.Builder.html\">Gtk.Builder</link>"
27491msgstr "<link href=\"http://valadoc.org/gio-2.0/Gtk.Builder.html\">Gtk.Builder</link>"
27492
27493#. (itstool) path: info/title
27494#: C/menubutton.c.page:8 C/menubutton.py.page:8
27495msgctxt "text"
27496msgid "MenuButton"
27497msgstr "MenuButton"
27498
27499#. (itstool) path: info/desc
27500#: C/menubutton.c.page:18 C/menubutton.js.page:18 C/menubutton.py.page:25 C/menubutton.vala.page:18
27501msgid "A widget that shows a menu when clicked on"
27502msgstr "누르면 메뉴를 보여주는 위젯입니다"
27503
27504#. (itstool) path: page/title
27505#: C/menubutton.c.page:21 C/menubutton.js.page:21 C/menubutton.py.page:28 C/menubutton.vala.page:21
27506msgid "MenuButton"
27507msgstr "MenuButton"
27508
27509#. (itstool) path: page/media
27510#. This is a reference to an external file such as an image or video. When
27511#. the file changes, the md5 hash will change to let you know you need to
27512#. update your localized copy. The msgstr is not used at all. Set it to
27513#. whatever you like once you have updated your copy of the file.
27514#: C/menubutton.c.page:22 C/menubutton.js.page:22 C/menubutton.py.page:29 C/menubutton.vala.page:22
27515msgctxt "_"
27516msgid "external ref='media/menubutton.png' md5='99eedc5ef2d6c56d32ca9ae7f3f3320f'"
27517msgstr ""
27518
27519#. (itstool) path: page/p
27520#: C/menubutton.c.page:23 C/menubutton.js.page:23 C/menubutton.py.page:30 C/menubutton.vala.page:23
27521msgid ""
27522"The GtkMenuButton widget is used to display a menu when clicked on. This menu can be provided either as a GtkMenu, "
27523"or an abstract GMenuModel. The GtkMenuButton widget can hold any valid child widget. That is, it can hold almost "
27524"any other standard GtkWidget. The most commonly used child is the provided GtkArrow."
27525msgstr ""
27526"GtkMenuButton 위젯은 눌렀을 때 메뉴를 띄울 목적으로 활용합니다. 이 메뉴는 GtkMenu로 또는 GMenuModel로도 제공합니"
27527"다. GtkMenuButton 위젯은 제대로 된 하위 위젯을 지니고 있을 수 있습니다. 즉, GtkMenuButton으로 대부분의 다른 표준 "
27528"GtkWidget을 붙들어둘 수 있습니다. 가장 널리 활용하는 하위 요소는 GtkArrow입니다."
27529
27530#. (itstool) path: note/p
27531#: C/menubutton.c.page:25 C/menubutton.js.page:27
27532msgid "You need to be running GNOME 3.6 or later for the MenuButton to work."
27533msgstr "MenuButton을 동작하게 하려면 그놈 3.6 이상이 필요합니다."
27534
27535#. (itstool) path: section/code
27536#: C/menubutton.c.page:31
27537#, no-wrap
27538msgid ""
27539"#include &lt;gtk/gtk.h&gt;\n"
27540"\n"
27541"/* Callback function for the undo action */\n"
27542"static void\n"
27543"about_callback (GSimpleAction *simple,\n"
27544"               GVariant      *parameter,\n"
27545"               gpointer       user_data)\n"
27546"{\n"
27547"  g_print (\"You clicked \\\"About\\\"\\n\");\n"
27548"}\n"
27549"\n"
27550"static void\n"
27551"activate (GtkApplication *app,\n"
27552"          gpointer        user_data)\n"
27553"{\n"
27554"  GMenu *submenu;\n"
27555"  GtkWidget *grid;\n"
27556"  GMenu *menumodel;\n"
27557"  GtkWidget *window;\n"
27558"  GtkWidget *menubutton;\n"
27559"  GSimpleAction *about_action;\n"
27560"\n"
27561"  window = gtk_application_window_new (app);\n"
27562"  grid = gtk_grid_new ();\n"
27563"\n"
27564"  gtk_window_set_title (GTK_WINDOW (window), \"MenuButton Example\");\n"
27565"  gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);\n"
27566"\n"
27567"  menubutton = gtk_menu_button_new ();\n"
27568"  gtk_widget_set_size_request (menubutton, 80, 35);\n"
27569"\n"
27570"  gtk_grid_attach (GTK_GRID (grid), menubutton, 0, 0, 1, 1);\n"
27571"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
27572"\n"
27573"  menumodel = g_menu_new ();\n"
27574"  g_menu_append (menumodel, \"New\", \"app.new\");\n"
27575"  g_menu_append (menumodel, \"About\", \"win.about\");\n"
27576"\n"
27577"  submenu = g_menu_new ();\n"
27578"  g_menu_append_submenu (menumodel, \"Other\", G_MENU_MODEL (submenu));\n"
27579"  g_menu_append (submenu, \"Quit\", \"app.quit\");\n"
27580"  gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menubutton), G_MENU_MODEL (menumodel));\n"
27581"\n"
27582"  about_action = g_simple_action_new (\"about\", NULL);\n"
27583"  g_signal_connect (about_action, \"activate\", G_CALLBACK (about_callback),\n"
27584"                    GTK_WINDOW (window));\n"
27585"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (about_action));\n"
27586"\n"
27587"  gtk_widget_show_all (window);\n"
27588"}\n"
27589"\n"
27590"\n"
27591"static void\n"
27592"new_callback (GSimpleAction *simple,\n"
27593"              GVariant      *parameter,\n"
27594"              gpointer       user_data)\n"
27595"{\n"
27596"  g_print (\"You clicked \\\"New\\\"\\n\");\n"
27597"}\n"
27598"\n"
27599"static void\n"
27600"quit_callback (GSimpleAction *simple,\n"
27601"               GVariant      *parameter,\n"
27602"               gpointer       user_data)\n"
27603"{\n"
27604"  GApplication *application = user_data;\n"
27605"\n"
27606"  g_application_quit (application);\n"
27607"}\n"
27608"\n"
27609"static void\n"
27610"startup (GApplication *app,\n"
27611"         gpointer      user_data)\n"
27612"{\n"
27613"  GSimpleAction *new_action;\n"
27614"  GSimpleAction *quit_action;\n"
27615"\n"
27616"  new_action = g_simple_action_new (\"new\", NULL);\n"
27617"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
27618"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
27619"\n"
27620"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
27621"  g_signal_connect (quit_action, \"activate\", G_CALLBACK (quit_callback), app);\n"
27622"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
27623"}\n"
27624"\n"
27625"\n"
27626"int\n"
27627"main (int argc, char **argv)\n"
27628"{\n"
27629"  GtkApplication *app;\n"
27630"  int status;\n"
27631"\n"
27632"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
27633"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
27634"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
27635"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
27636"  g_object_unref (app);\n"
27637"  return status;\n"
27638"}\n"
27639msgstr ""
27640"#include &lt;gtk/gtk.h&gt;\n"
27641"\n"
27642"/* Callback function for the undo action */\n"
27643"static void\n"
27644"about_callback (GSimpleAction *simple,\n"
27645"               GVariant      *parameter,\n"
27646"               gpointer       user_data)\n"
27647"{\n"
27648"  g_print (\"You clicked \\\"About\\\"\\n\");\n"
27649"}\n"
27650"\n"
27651"static void\n"
27652"activate (GtkApplication *app,\n"
27653"          gpointer        user_data)\n"
27654"{\n"
27655"  GMenu *submenu;\n"
27656"  GtkWidget *grid;\n"
27657"  GMenu *menumodel;\n"
27658"  GtkWidget *window;\n"
27659"  GtkWidget *menubutton;\n"
27660"  GSimpleAction *about_action;\n"
27661"\n"
27662"  window = gtk_application_window_new (app);\n"
27663"  grid = gtk_grid_new ();\n"
27664"\n"
27665"  gtk_window_set_title (GTK_WINDOW (window), \"MenuButton Example\");\n"
27666"  gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);\n"
27667"\n"
27668"  menubutton = gtk_menu_button_new ();\n"
27669"  gtk_widget_set_size_request (menubutton, 80, 35);\n"
27670"\n"
27671"  gtk_grid_attach (GTK_GRID (grid), menubutton, 0, 0, 1, 1);\n"
27672"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
27673"\n"
27674"  menumodel = g_menu_new ();\n"
27675"  g_menu_append (menumodel, \"New\", \"app.new\");\n"
27676"  g_menu_append (menumodel, \"About\", \"win.about\");\n"
27677"\n"
27678"  submenu = g_menu_new ();\n"
27679"  g_menu_append_submenu (menumodel, \"Other\", G_MENU_MODEL (submenu));\n"
27680"  g_menu_append (submenu, \"Quit\", \"app.quit\");\n"
27681"  gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (menubutton), G_MENU_MODEL (menumodel));\n"
27682"\n"
27683"  about_action = g_simple_action_new (\"about\", NULL);\n"
27684"  g_signal_connect (about_action, \"activate\", G_CALLBACK (about_callback),\n"
27685"                    GTK_WINDOW (window));\n"
27686"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (about_action));\n"
27687"\n"
27688"  gtk_widget_show_all (window);\n"
27689"}\n"
27690"\n"
27691"\n"
27692"static void\n"
27693"new_callback (GSimpleAction *simple,\n"
27694"              GVariant      *parameter,\n"
27695"              gpointer       user_data)\n"
27696"{\n"
27697"  g_print (\"You clicked \\\"New\\\"\\n\");\n"
27698"}\n"
27699"\n"
27700"static void\n"
27701"quit_callback (GSimpleAction *simple,\n"
27702"               GVariant      *parameter,\n"
27703"               gpointer       user_data)\n"
27704"{\n"
27705"  GApplication *application = user_data;\n"
27706"\n"
27707"  g_application_quit (application);\n"
27708"}\n"
27709"\n"
27710"static void\n"
27711"startup (GApplication *app,\n"
27712"         gpointer      user_data)\n"
27713"{\n"
27714"  GSimpleAction *new_action;\n"
27715"  GSimpleAction *quit_action;\n"
27716"\n"
27717"  new_action = g_simple_action_new (\"new\", NULL);\n"
27718"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
27719"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
27720"\n"
27721"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
27722"  g_signal_connect (quit_action, \"activate\", G_CALLBACK (quit_callback), app);\n"
27723"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
27724"}\n"
27725"\n"
27726"\n"
27727"int\n"
27728"main (int argc, char **argv)\n"
27729"{\n"
27730"  GtkApplication *app;\n"
27731"  int status;\n"
27732"\n"
27733"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
27734"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
27735"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
27736"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
27737"  g_object_unref (app);\n"
27738"  return status;\n"
27739"}\n"
27740
27741#. (itstool) path: item/p
27742#: C/menubutton.c.page:38
27743msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMenuButton.html\">GtkMenuButton</link>"
27744msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMenuButton.html\">GtkMenuButton</link>"
27745
27746#. (itstool) path: item/p
27747#: C/menubutton.c.page:39
27748msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMenu.html\">GtkMenu</link>"
27749msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMenu.html\">GtkMenu</link>"
27750
27751#. (itstool) path: item/p
27752#: C/menubutton.c.page:40
27753msgid "<link href=\"https://developer.gnome.org/gio/unstable/GMenuModel.html\">GMenuModel</link>"
27754msgstr "<link href=\"https://developer.gnome.org/gio/unstable/GMenuModel.html\">GMenuModel</link>"
27755
27756#. (itstool) path: item/p
27757#: C/menubutton.c.page:41
27758msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkArrow.html\">GtkArrow</link>"
27759msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkArrow.html\">GtkArrow</link>"
27760
27761#. (itstool) path: info/title
27762#: C/menubutton.js.page:8
27763msgctxt "text"
27764msgid "MenuButton (JavaScript)"
27765msgstr "MenuButton (JavaScript)"
27766
27767#. (itstool) path: credit/name
27768#: C/menubutton.js.page:13
27769msgid "Anna Zacchi"
27770msgstr "Anna Zacchi"
27771
27772#. (itstool) path: page/code
27773#: C/menubutton.js.page:28
27774#, no-wrap
27775msgid ""
27776"#!/usr/bin/gjs\n"
27777"\n"
27778"imports.gi.versions.Gtk = '3.0';\n"
27779"\n"
27780"const Gio = imports.gi.Gio;\n"
27781"const GLib = imports.gi.GLib;\n"
27782"const Gtk = imports.gi.Gtk;\n"
27783"\n"
27784"class Application {\n"
27785"\n"
27786"    //create the application\n"
27787"    constructor() {\n"
27788"        this.application = new Gtk.Application({\n"
27789"            application_id: 'org.example.myapp',\n"
27790"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
27791"        });\n"
27792"\n"
27793"        //connect to 'activate' and 'startup' signals to the callback functions\n"
27794"        this.application.connect('activate', this._onActivate.bind(this));\n"
27795"        this.application.connect('startup', this._onStartup.bind(this));\n"
27796"    }\n"
27797"\n"
27798"    //create the UI (in this case it's just the ApplicationWindow)\n"
27799"    _buildUI() {\n"
27800"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
27801"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
27802"                                                   title: \"MenuButton Example\" });\n"
27803"        this._window.set_default_size(600, 400);\n"
27804"        this.grid = new Gtk.Grid();\n"
27805"        this._window.add(this.grid);\n"
27806"\n"
27807"\n"
27808"        this._menuButton = new Gtk.MenuButton();\n"
27809"        this.grid.attach(this._menuButton, 0, 0, 1, 1 );\n"
27810"        this.menu = Gtk.Menu.new_from_model(this.menuModel);\n"
27811"\n"
27812"        this.menu.show();\n"
27813"        this._menuButton.set_menu_model (this.menuModel);\n"
27814"        this._menuButton.set_size_request(80, 35);\n"
27815"        this._menuButton.show();\n"
27816"\n"
27817"        this._window.show_all();\n"
27818"    }\n"
27819"\n"
27820"    _showNew() {\n"
27821"        print(\"You clicked \\\"New\\\"\");\n"
27822"    }\n"
27823"\n"
27824"    _showAbout() {\n"
27825"        print(\"You clicked \\\"About\\\"\");\n"
27826"    }\n"
27827"\n"
27828"    //create the menu items and connect the signals to the callback functions.\n"
27829"    _initMenus() {\n"
27830"        let newAction = new Gio.SimpleAction({ name: 'new' });\n"
27831"        newAction.connect('activate', () =&gt; { this._showNew(); });\n"
27832"        this.application.add_action(newAction);\n"
27833"\n"
27834"        let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
27835"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
27836"        this.application.add_action(aboutAction);\n"
27837"\n"
27838"        let quitAction = new Gio.SimpleAction({ name: 'quit' });\n"
27839"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
27840"         this.application.add_action(quitAction);\n"
27841"\n"
27842"        this.menuModel = new Gio.Menu();\n"
27843"\n"
27844"        this.menuItemNew = Gio.MenuItem.new(\"New\", 'app.new');\n"
27845"        this.menuItemAbout = Gio.MenuItem.new(\"About\", 'app.about');\n"
27846"        this.fileMenuItem = Gio.MenuItem.new(\"Other\", null);\n"
27847"\n"
27848"        this.menuModel.append_item(this.menuItemNew);\n"
27849"        this.menuModel.append_item(this.menuItemAbout);\n"
27850"\n"
27851"        //submenu\n"
27852"        this.subMenu = new Gio.Menu();\n"
27853"        this.fileMenuItem.set_submenu(this.subMenu);\n"
27854"        this.menuItemQuit = Gio.MenuItem.new(\"Quit\", 'app.quit');\n"
27855"        this.subMenu.append_item(this.menuItemQuit);\n"
27856"        this.menuModel.append_item(this.fileMenuItem);\n"
27857"    }\n"
27858"\n"
27859"    //callback function for 'activate' signal\n"
27860"    _onActivate() {\n"
27861"        this._window.present();\n"
27862"    }\n"
27863"\n"
27864"    //callback function for 'startup' signal\n"
27865"    _onStartup() {\n"
27866"        //You must call _initMenus() before calling _buildUI().\n"
27867"        this._initMenus();\n"
27868"        this._buildUI();\n"
27869"    }\n"
27870"};\n"
27871"\n"
27872"//run the application\n"
27873"let app = new Application();\n"
27874"app.application.run(ARGV);\n"
27875msgstr ""
27876"#!/usr/bin/gjs\n"
27877"\n"
27878"imports.gi.versions.Gtk = '3.0';\n"
27879"\n"
27880"const Gio = imports.gi.Gio;\n"
27881"const GLib = imports.gi.GLib;\n"
27882"const Gtk = imports.gi.Gtk;\n"
27883"\n"
27884"class Application {\n"
27885"\n"
27886"    //create the application\n"
27887"    constructor() {\n"
27888"        this.application = new Gtk.Application({\n"
27889"            application_id: 'org.example.myapp',\n"
27890"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
27891"        });\n"
27892"\n"
27893"        //connect to 'activate' and 'startup' signals to the callback functions\n"
27894"        this.application.connect('activate', this._onActivate.bind(this));\n"
27895"        this.application.connect('startup', this._onStartup.bind(this));\n"
27896"    }\n"
27897"\n"
27898"    //create the UI (in this case it's just the ApplicationWindow)\n"
27899"    _buildUI() {\n"
27900"        this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
27901"                                                   window_position: Gtk.WindowPosition.CENTER,\n"
27902"                                                   title: \"MenuButton Example\" });\n"
27903"        this._window.set_default_size(600, 400);\n"
27904"        this.grid = new Gtk.Grid();\n"
27905"        this._window.add(this.grid);\n"
27906"\n"
27907"\n"
27908"        this._menuButton = new Gtk.MenuButton();\n"
27909"        this.grid.attach(this._menuButton, 0, 0, 1, 1 );\n"
27910"        this.menu = Gtk.Menu.new_from_model(this.menuModel);\n"
27911"\n"
27912"        this.menu.show();\n"
27913"        this._menuButton.set_menu_model (this.menuModel);\n"
27914"        this._menuButton.set_size_request(80, 35);\n"
27915"        this._menuButton.show();\n"
27916"\n"
27917"        this._window.show_all();\n"
27918"    }\n"
27919"\n"
27920"    _showNew() {\n"
27921"        print(\"You clicked \\\"New\\\"\");\n"
27922"    }\n"
27923"\n"
27924"    _showAbout() {\n"
27925"        print(\"You clicked \\\"About\\\"\");\n"
27926"    }\n"
27927"\n"
27928"    //create the menu items and connect the signals to the callback functions.\n"
27929"    _initMenus() {\n"
27930"        let newAction = new Gio.SimpleAction({ name: 'new' });\n"
27931"        newAction.connect('activate', () =&gt; { this._showNew(); });\n"
27932"        this.application.add_action(newAction);\n"
27933"\n"
27934"        let aboutAction = new Gio.SimpleAction({ name: 'about' });\n"
27935"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
27936"        this.application.add_action(aboutAction);\n"
27937"\n"
27938"        let quitAction = new Gio.SimpleAction({ name: 'quit' });\n"
27939"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
27940"         this.application.add_action(quitAction);\n"
27941"\n"
27942"        this.menuModel = new Gio.Menu();\n"
27943"\n"
27944"        this.menuItemNew = Gio.MenuItem.new(\"New\", 'app.new');\n"
27945"        this.menuItemAbout = Gio.MenuItem.new(\"About\", 'app.about');\n"
27946"        this.fileMenuItem = Gio.MenuItem.new(\"Other\", null);\n"
27947"\n"
27948"        this.menuModel.append_item(this.menuItemNew);\n"
27949"        this.menuModel.append_item(this.menuItemAbout);\n"
27950"\n"
27951"        //submenu\n"
27952"        this.subMenu = new Gio.Menu();\n"
27953"        this.fileMenuItem.set_submenu(this.subMenu);\n"
27954"        this.menuItemQuit = Gio.MenuItem.new(\"Quit\", 'app.quit');\n"
27955"        this.subMenu.append_item(this.menuItemQuit);\n"
27956"        this.menuModel.append_item(this.fileMenuItem);\n"
27957"    }\n"
27958"\n"
27959"    //callback function for 'activate' signal\n"
27960"    _onActivate() {\n"
27961"        this._window.present();\n"
27962"    }\n"
27963"\n"
27964"    //callback function for 'startup' signal\n"
27965"    _onStartup() {\n"
27966"        //You must call _initMenus() before calling _buildUI().\n"
27967"        this._initMenus();\n"
27968"        this._buildUI();\n"
27969"    }\n"
27970"};\n"
27971"\n"
27972"//run the application\n"
27973"let app = new Application();\n"
27974"app.application.run(ARGV);\n"
27975
27976#. (itstool) path: item/p
27977#: C/menubutton.js.page:33 C/menubutton.vala.page:33
27978msgid "<link href=\"http://developer.gnome.org/gtk3/3.5/gtk3-GtkMenuButton.html\">MenuButton</link>"
27979msgstr "<link href=\"http://developer.gnome.org/gtk3/3.5/gtk3-GtkMenuButton.html\">MenuButton</link>"
27980
27981#. (itstool) path: note/p
27982#: C/menubutton.py.page:32 C/menubutton.vala.page:27
27983msgid "You need to be running GNOME 3.6 for the MenuButton to work."
27984msgstr "MenuButton을 동작하게 하려면 그놈 3.6이 필요합니다."
27985
27986#. (itstool) path: section/code
27987#: C/menubutton.py.page:38
27988#, no-wrap
27989msgid ""
27990"from gi.repository import Gtk\n"
27991"from gi.repository import Gio\n"
27992"import sys\n"
27993"\n"
27994"\n"
27995"class MyWindow(Gtk.ApplicationWindow):\n"
27996"\n"
27997"    def __init__(self, app):\n"
27998"        Gtk.Window.__init__(self, title=\"Menubutton Example\", application=app)\n"
27999"        self.set_default_size(600, 400)\n"
28000"\n"
28001"        grid = Gtk.Grid()\n"
28002"\n"
28003"        # a menubutton\n"
28004"        menubutton = Gtk.MenuButton()\n"
28005"        menubutton.set_size_request(80, 35)\n"
28006"\n"
28007"        grid.attach(menubutton, 0, 0, 1, 1)\n"
28008"\n"
28009"        # a menu with two actions\n"
28010"        menumodel = Gio.Menu()\n"
28011"        menumodel.append(\"New\", \"app.new\")\n"
28012"        menumodel.append(\"About\", \"win.about\")\n"
28013"\n"
28014"        # a submenu with one action for the menu\n"
28015"        submenu = Gio.Menu()\n"
28016"        submenu.append(\"Quit\", \"app.quit\")\n"
28017"        menumodel.append_submenu(\"Other\", submenu)\n"
28018"\n"
28019"        # the menu is set as the menu of the menubutton\n"
28020"        menubutton.set_menu_model(menumodel)\n"
28021"\n"
28022"        # the action related to the window (about)\n"
28023"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
28024"        about_action.connect(\"activate\", self.about_callback)\n"
28025"        self.add_action(about_action)\n"
28026"\n"
28027"        self.add(grid)\n"
28028"\n"
28029"    # callback for \"about\"\n"
28030"    def about_callback(self, action, parameter):\n"
28031"        print(\"You clicked \\\"About\\\"\")\n"
28032"\n"
28033"\n"
28034"class MyApplication(Gtk.Application):\n"
28035"\n"
28036"    def __init__(self):\n"
28037"        Gtk.Application.__init__(self)\n"
28038"\n"
28039"    def do_activate(self):\n"
28040"        win = MyWindow(self)\n"
28041"        win.show_all()\n"
28042"\n"
28043"    def do_startup(self):\n"
28044"        Gtk.Application.do_startup(self)\n"
28045"\n"
28046"        #  the actions related to the application\n"
28047"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
28048"        new_action.connect(\"activate\", self.new_callback)\n"
28049"        self.add_action(new_action)\n"
28050"\n"
28051"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
28052"        quit_action.connect(\"activate\", self.quit_callback)\n"
28053"        self.add_action(quit_action)\n"
28054"\n"
28055"    # callback functions for the actions related to the application\n"
28056"    def new_callback(self, action, parameter):\n"
28057"        print(\"You clicked \\\"New\\\"\")\n"
28058"\n"
28059"    def quit_callback(self, action, parameter):\n"
28060"        print(\"You clicked \\\"Quit\\\"\")\n"
28061"        self.quit()\n"
28062"\n"
28063"app = MyApplication()\n"
28064"exit_status = app.run(sys.argv)\n"
28065"sys.exit(exit_status)\n"
28066msgstr ""
28067"from gi.repository import Gtk\n"
28068"from gi.repository import Gio\n"
28069"import sys\n"
28070"\n"
28071"\n"
28072"class MyWindow(Gtk.ApplicationWindow):\n"
28073"\n"
28074"    def __init__(self, app):\n"
28075"        Gtk.Window.__init__(self, title=\"Menubutton Example\", application=app)\n"
28076"        self.set_default_size(600, 400)\n"
28077"\n"
28078"        grid = Gtk.Grid()\n"
28079"\n"
28080"        # a menubutton\n"
28081"        menubutton = Gtk.MenuButton()\n"
28082"        menubutton.set_size_request(80, 35)\n"
28083"\n"
28084"        grid.attach(menubutton, 0, 0, 1, 1)\n"
28085"\n"
28086"        # a menu with two actions\n"
28087"        menumodel = Gio.Menu()\n"
28088"        menumodel.append(\"New\", \"app.new\")\n"
28089"        menumodel.append(\"About\", \"win.about\")\n"
28090"\n"
28091"        # a submenu with one action for the menu\n"
28092"        submenu = Gio.Menu()\n"
28093"        submenu.append(\"Quit\", \"app.quit\")\n"
28094"        menumodel.append_submenu(\"Other\", submenu)\n"
28095"\n"
28096"        # the menu is set as the menu of the menubutton\n"
28097"        menubutton.set_menu_model(menumodel)\n"
28098"\n"
28099"        # the action related to the window (about)\n"
28100"        about_action = Gio.SimpleAction.new(\"about\", None)\n"
28101"        about_action.connect(\"activate\", self.about_callback)\n"
28102"        self.add_action(about_action)\n"
28103"\n"
28104"        self.add(grid)\n"
28105"\n"
28106"    # callback for \"about\"\n"
28107"    def about_callback(self, action, parameter):\n"
28108"        print(\"You clicked \\\"About\\\"\")\n"
28109"\n"
28110"\n"
28111"class MyApplication(Gtk.Application):\n"
28112"\n"
28113"    def __init__(self):\n"
28114"        Gtk.Application.__init__(self)\n"
28115"\n"
28116"    def do_activate(self):\n"
28117"        win = MyWindow(self)\n"
28118"        win.show_all()\n"
28119"\n"
28120"    def do_startup(self):\n"
28121"        Gtk.Application.do_startup(self)\n"
28122"\n"
28123"        #  the actions related to the application\n"
28124"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
28125"        new_action.connect(\"activate\", self.new_callback)\n"
28126"        self.add_action(new_action)\n"
28127"\n"
28128"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
28129"        quit_action.connect(\"activate\", self.quit_callback)\n"
28130"        self.add_action(quit_action)\n"
28131"\n"
28132"    # callback functions for the actions related to the application\n"
28133"    def new_callback(self, action, parameter):\n"
28134"        print(\"You clicked \\\"New\\\"\")\n"
28135"\n"
28136"    def quit_callback(self, action, parameter):\n"
28137"        print(\"You clicked \\\"Quit\\\"\")\n"
28138"        self.quit()\n"
28139"\n"
28140"app = MyApplication()\n"
28141"exit_status = app.run(sys.argv)\n"
28142"sys.exit(exit_status)\n"
28143
28144#. (itstool) path: section/title
28145#: C/menubutton.py.page:42
28146msgid "Useful methods for a MenuButton widget"
28147msgstr "MenuButton 위젯에 쓸만한 메서드"
28148
28149#. (itstool) path: section/p
28150#: C/menubutton.py.page:43
28151msgid ""
28152"In line 33 the signal <code>\"activate\"</code> from the action <code>about_action</code> is connected to the "
28153"callback function <code>about_callback()</code> using <code><var>action</var>.connect(<var>signal</var>, "
28154"<var>callback function</var>)</code>. See <link xref=\"signals-callbacks.py\"/> for a more detailed explanation."
28155msgstr ""
28156"33번째 줄에서 <code>\"activate\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
28157"function</var>)</code> 함수로  <code>about_callback()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
28158"\"signals-callbacks.py\"/>를 참조하십시오."
28159
28160#. (itstool) path: section/p
28161#: C/menubutton.py.page:45
28162msgid ""
28163"The positioning of the menu is determined by the \"direction\" property of the menu button and the \"halign\" or "
28164"\"valign\" properties of the menu. For example, when the direction is <code>Gtk.ArrowType.DOWN</code> (other "
28165"option: <code>UP</code>) and the horizontal alignment is <code>Gtk.Align.START</code> (other options: "
28166"<code>CENTER</code> and <code>END</code>), the menu will be positioned below the button, with the starting edge "
28167"(depending on the text direction) of the menu aligned with the starting edge of the button. If there is not enough "
28168"space below the button, the menu is popped up above the button instead. If the alignment would move part of the "
28169"menu offscreen, it is 'pushed in'."
28170msgstr ""
28171"메뉴 배치는 메뉴 단추의 \"direction\" 속성과 메뉴의 \"halign\" 속성 또는  \"valign\" 속성으로 결정합니다. 예를 들"
28172"어 direction 값이 <code>Gtk.ArrowType.DOWN</code>(다른 옵션: <code>UP</code>)이고, 수평 정렬을 <code>Gtk.Align."
28173"START</code>로(다른 옵션: <code>CENTER</code>, <code>END</code>) 했다면 메뉴는, 시작 모서리(텍스트 방향에 따라)를 "
28174"따라 정렬한 메뉴의 시작 모서리로 단추 아래에 들어갑니다. 단추 아래에 공간이 충분치 않다면 단추 위로 대신 메뉴를 띄"
28175"웁니다. 정렬 상태가 메뉴 바깥 부분을 움직인다면 '눌러넣은' 상태입니다."
28176
28177#. (itstool) path: section/p
28178#: C/menubutton.py.page:47
28179msgid ""
28180"In the case of vertical alignment, the possible ArrowType directions are <code>LEFT</code> and <code>RIGHT</code> "
28181"and the vertical alignment is again <code>START</code>, <code>CENTER</code> or <code>END</code>."
28182msgstr ""
28183"수직으로 정렬하는 경우 적용할 수 있는 ArrowType 방향은  <code>LEFT</code>와 <code>RIGHT</code> 이며, <code>START</"
28184"code>, <code>CENTER</code>, <code>END</code> 중 한 가지 방식으로 수직 정렬합니다.나입니다."
28185
28186#. (itstool) path: section/p
28187#: C/menubutton.py.page:49
28188msgid ""
28189"<code>set_align_widget(alignment)</code> and <code>set_direction(direction)</code> can be used to set these "
28190"properties."
28191msgstr ""
28192"이 속성을 설정할 때 <code>set_align_widget(alignment)</code> 메서드와 <code>set_direction(direction)</code> 메서드"
28193"를 사용할 수 있습니다."
28194
28195#. (itstool) path: item/p
28196#: C/menubutton.py.page:56
28197msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMenuButton.html\">MenuButton</link>"
28198msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMenuButton.html\">MenuButton</link>"
28199
28200#. (itstool) path: info/title
28201#: C/menubutton.vala.page:8
28202msgctxt "text"
28203msgid "MenuButton (Vala)"
28204msgstr "MenuButton (Vala)"
28205
28206#. (itstool) path: page/code
28207#: C/menubutton.vala.page:28
28208#, no-wrap
28209msgid ""
28210"public class MyWindow : Gtk.ApplicationWindow {\n"
28211"\n"
28212"\tinternal MyWindow (MyApplication app) {\n"
28213"\t\tObject (application: app, title: \"MenuButton Example\");\n"
28214"\t\tthis.set_default_size (600, 400);\n"
28215"\t\tvar grid = new Gtk.Grid ();\n"
28216"\n"
28217"\t\tvar menubutton = new Gtk.MenuButton();\n"
28218"\t\tmenubutton.set_size_request (80, 35);\n"
28219"\n"
28220"\t\tvar menumodel = new Menu ();\n"
28221"\t\tmenumodel.append (\"New\", \"app.new\");\n"
28222"\t\tmenumodel.append (\"About\", \"win.about\");\n"
28223"\n"
28224"\t\t/* We create the last item as a MenuItem, so that\n"
28225"\t\t * a submenu can be appended to this menu item.\n"
28226"\t\t */\n"
28227"\t\tvar submenu = new Menu ();\n"
28228"\t\tmenumodel.append_submenu (\"Other\", submenu);\n"
28229"\t\tsubmenu.append (\"Quit\", \"app.quit\");\n"
28230"\t\tmenubutton.set_menu_model (menumodel);\n"
28231"\n"
28232"\t\tvar about_action = new SimpleAction (\"about\", null);\n"
28233"\t\tabout_action.activate.connect (this.about_cb);\n"
28234"\t\tthis.add_action (about_action);\n"
28235"\n"
28236"\t\tthis.add(grid);\n"
28237"\t\tgrid.attach(menubutton, 0, 0, 1, 1);\n"
28238"\t}\n"
28239"\n"
28240"\tvoid about_cb (SimpleAction simple, Variant? parameter) {\n"
28241"\t\tprint (\"You clicked \\\"About\\\"\\n\");\n"
28242"\t}\n"
28243"}\n"
28244"\n"
28245"public class MyApplication : Gtk.Application {\n"
28246"\tprotected override void activate () {\n"
28247"\t\tnew MyWindow (this).show_all ();\n"
28248"\t}\n"
28249"\n"
28250"\tinternal MyApplication () {\n"
28251"\t\tObject (application_id: \"org.example.MyApplication\");\n"
28252"\t}\n"
28253"\n"
28254"\t/* Override the 'startup' signal of GLib.Application. */\n"
28255"\tprotected override void startup () {\n"
28256"\t\tbase.startup ();\n"
28257"\n"
28258"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
28259"\t\tnew_action.activate.connect (this.new_cb);\n"
28260"\t\tthis.add_action (new_action);\n"
28261"\n"
28262"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
28263"\t\tquit_action.activate.connect (this.quit);\n"
28264"\t\tthis.add_action (quit_action);\n"
28265"\t}\n"
28266"\n"
28267"\tvoid new_cb (SimpleAction simple, Variant? parameter) {\n"
28268"\t\tprint (\"You clicked \\\"New\\\"\\n\");\n"
28269"\t}\n"
28270"}\n"
28271"\n"
28272"public int main (string[] args) {\n"
28273"\treturn new MyApplication ().run (args);\n"
28274"}\n"
28275msgstr ""
28276"public class MyWindow : Gtk.ApplicationWindow {\n"
28277"\n"
28278"\tinternal MyWindow (MyApplication app) {\n"
28279"\t\tObject (application: app, title: \"MenuButton Example\");\n"
28280"\t\tthis.set_default_size (600, 400);\n"
28281"\t\tvar grid = new Gtk.Grid ();\n"
28282"\n"
28283"\t\tvar menubutton = new Gtk.MenuButton();\n"
28284"\t\tmenubutton.set_size_request (80, 35);\n"
28285"\n"
28286"\t\tvar menumodel = new Menu ();\n"
28287"\t\tmenumodel.append (\"New\", \"app.new\");\n"
28288"\t\tmenumodel.append (\"About\", \"win.about\");\n"
28289"\n"
28290"\t\t/* We create the last item as a MenuItem, so that\n"
28291"\t\t * a submenu can be appended to this menu item.\n"
28292"\t\t */\n"
28293"\t\tvar submenu = new Menu ();\n"
28294"\t\tmenumodel.append_submenu (\"Other\", submenu);\n"
28295"\t\tsubmenu.append (\"Quit\", \"app.quit\");\n"
28296"\t\tmenubutton.set_menu_model (menumodel);\n"
28297"\n"
28298"\t\tvar about_action = new SimpleAction (\"about\", null);\n"
28299"\t\tabout_action.activate.connect (this.about_cb);\n"
28300"\t\tthis.add_action (about_action);\n"
28301"\n"
28302"\t\tthis.add(grid);\n"
28303"\t\tgrid.attach(menubutton, 0, 0, 1, 1);\n"
28304"\t}\n"
28305"\n"
28306"\tvoid about_cb (SimpleAction simple, Variant? parameter) {\n"
28307"\t\tprint (\"You clicked \\\"About\\\"\\n\");\n"
28308"\t}\n"
28309"}\n"
28310"\n"
28311"public class MyApplication : Gtk.Application {\n"
28312"\tprotected override void activate () {\n"
28313"\t\tnew MyWindow (this).show_all ();\n"
28314"\t}\n"
28315"\n"
28316"\tinternal MyApplication () {\n"
28317"\t\tObject (application_id: \"org.example.MyApplication\");\n"
28318"\t}\n"
28319"\n"
28320"\t/* Override the 'startup' signal of GLib.Application. */\n"
28321"\tprotected override void startup () {\n"
28322"\t\tbase.startup ();\n"
28323"\n"
28324"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
28325"\t\tnew_action.activate.connect (this.new_cb);\n"
28326"\t\tthis.add_action (new_action);\n"
28327"\n"
28328"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
28329"\t\tquit_action.activate.connect (this.quit);\n"
28330"\t\tthis.add_action (quit_action);\n"
28331"\t}\n"
28332"\n"
28333"\tvoid new_cb (SimpleAction simple, Variant? parameter) {\n"
28334"\t\tprint (\"You clicked \\\"New\\\"\\n\");\n"
28335"\t}\n"
28336"}\n"
28337"\n"
28338"public int main (string[] args) {\n"
28339"\treturn new MyApplication ().run (args);\n"
28340"}\n"
28341
28342#. (itstool) path: info/title
28343#: C/message-board.c.page:8
28344msgctxt "text"
28345msgid "Message board (C)"
28346msgstr "게시판 (C)"
28347
28348#. (itstool) path: info/desc
28349#: C/message-board.c.page:11
28350msgid "A simple program using WebKitGTK+ and the DOM."
28351msgstr "WebKitGTK+와 DOM을 사용한 간단한 프로그램."
28352
28353#. (itstool) path: page/title
28354#: C/message-board.c.page:26
28355msgid "Message board"
28356msgstr "게시판"
28357
28358#. (itstool) path: item/p
28359#: C/message-board.c.page:31
28360msgid "How to display a web page with WebKit."
28361msgstr "WebKit으로 웹 페이지를 표시합니다."
28362
28363#. (itstool) path: item/p
28364#: C/message-board.c.page:32
28365msgid "How to manipulate the contents of a web page using WebKit's DOM functions."
28366msgstr "WebKit의 DOM 함수로 웹 페이지 내용을 다룹니다."
28367
28368#. (itstool) path: synopsis/p
28369#: C/message-board.c.page:35
28370msgid ""
28371"This tutorial assumes you are familiar with the C programming language and have a basic understanding of GTK+, "
28372"including how to create and place widgets and how to connect callback functions to signals. See <link xref=\"image-"
28373"viewer.c\"/> to learn the basics of GTK+."
28374msgstr ""
28375"이 따라하기 예제에서는 독자 여러분이 C 프로그래밍 언어에 익숙하며, 위젯을 어떻게 만들어 두고, 콜백 함수를 시그널에 "
28376"어떻게 연결하는지에 대해  GTK+를 기본적으로 이해하고 있다고 간주합니다. GTK+ 기본을 배우려면 <link xref=\"image-"
28377"viewer.c\"/>를 참고하십시오."
28378
28379#. (itstool) path: page/media
28380#. This is a reference to an external file such as an image or video. When
28381#. the file changes, the md5 hash will change to let you know you need to
28382#. update your localized copy. The msgstr is not used at all. Set it to
28383#. whatever you like once you have updated your copy of the file.
28384#: C/message-board.c.page:41
28385msgctxt "_"
28386msgid "external ref='media/message-board.ogv' md5='beb80c4538776dc2cdd26c95abea5027'"
28387msgstr ""
28388
28389#. (itstool) path: section/p
28390#: C/message-board.c.page:48
28391msgid ""
28392"The GNOME platform includes WebKitGTK+, built on top of the powerful WebKit HTML framework. WebKit is used "
28393"throughout GNOME, not just to view web pages on the Internet, but also to create rich user interfaces that can be "
28394"easily styled with CSS."
28395msgstr ""
28396"그놈 플랫폼에는 강력한 웹킷 HTML 프레임워크를 바탕으로 만든 WebKitGTK+가 있습니다. WebKit은 그놈 전반적으로 활용하"
28397"며, 인터넷의 웹 페이지를 보기만 하는 목적으로 쓰는게 아니라, CSS로 쉽게 스타일을 지정할 수 있는 리치 사용자 인터페"
28398"이스를 만들 때도 사용합니다."
28399
28400#. (itstool) path: section/p
28401#: C/message-board.c.page:53
28402msgid ""
28403"In this tutorial, you will create a simple message board using WebKit. The message board will allow you to enter "
28404"some text and have it added to a list of messages in HTML. Before you begin, you need to set up a project in "
28405"Anjuta."
28406msgstr ""
28407"이 따라하기 지침에서는 WebKit으로 간단한 게시판을 만들어보겠습니다. 게시판에서는 일부 텍스트를 입력할 수 있으며  "
28408"HTML 메시지 목록을 추가할 수 있습니다. 시작하기 전에 Anjuta에서 프로젝트를 설정해야합니다."
28409
28410#. (itstool) path: item/p
28411#: C/message-board.c.page:59
28412msgid ""
28413"In Anjuta, click <guiseq><gui>File</gui><gui>New</gui> <gui>Project</gui></guiseq> to open the new project "
28414"assistant."
28415msgstr ""
28416"안주타에서  <guiseq><gui>파일</gui><gui>새로 만들기</gui> <gui>프로젝트</gui></guiseq>를 눌러 새 프로젝트 도우미를 "
28417"여십시오."
28418
28419#. (itstool) path: item/p
28420#: C/message-board.c.page:61
28421msgid "Select <gui>GTK+ (simple)</gui> on the <gui>C</gui> tab, and click <gui>Continue</gui>."
28422msgstr "<gui>C</gui> 탭에서 <gui>GTK+ (단순)</gui>을 선택하고, <gui>계속</gui>을 누르십시오."
28423
28424#. (itstool) path: item/p
28425#: C/message-board.c.page:63
28426msgid ""
28427"Fill out your details on the <gui>Basic information</gui> page. Use <input>message-board</input> for the project "
28428"name. Click <gui>Continue</gui>."
28429msgstr ""
28430"<gui>기본 정보</gui> 페이지에 자세한 내용을 적어나가심시오. 프로젝트 이름은 <input>message-board</input>라고 하십시"
28431"오. <gui>계속</gui>을 누르십시오."
28432
28433#. (itstool) path: item/p
28434#: C/message-board.c.page:66
28435msgid ""
28436"Disable the <gui>Use GtkBuilder for user interface</gui> option as this tutorial builds the user-interface "
28437"manually."
28438msgstr ""
28439"따라하기 지침을 통해 사용자 인터페이스를 직접 만들 예정이므로 <gui>사용자 인터페이스에 GtkBuilder 사용</gui> 설정"
28440"을 끄십시오."
28441
28442#. (itstool) path: item/p
28443#: C/message-board.c.page:69
28444msgid ""
28445"You need to tell Anjuta you're using WebKitGTK+ on this project. On the <gui>Project options</gui> page, select "
28446"<gui>Configure external packages</gui>. Click <gui>Continue</gui>. On the <gui>Configure external packages</gui> "
28447"page, check <gui>webkitgtk-3.0</gui>."
28448msgstr ""
28449"안주타 프로그램에서 프로젝트에 WebkitGTK+를 사용한다고 알려야합니다. <gui>프로젝트 옵션</gui> 페이지에서, <gui>외"
28450"부 패키지 설정</gui>을 선택하십시오. <gui>계속</gui>을 누르십시오. <gui>외부 패키지 설정</gui> 페이지에서 "
28451"<gui>webkitgtk-3.0</gui>을 선택하십시오."
28452
28453#. (itstool) path: section/p
28454#: C/message-board.c.page:75
28455msgid ""
28456"After you finish the new project assistant, open the file <file>src/main.c</file> from either the <gui>Project</"
28457"gui> or the <gui>File</gui> tab. Anjuta will have filled this in with some basic GTK+ code from its templates. "
28458"Since you are creating a WebKit project, you first need to include the WebKit headers. After the line that "
28459"includes <code>gtk/gtk.h</code>, add the following line:"
28460msgstr ""
28461"새 프로젝트 도우미를 끝내고 나면 <gui>프로젝트</gui>탭 또는 the <gui>파일</gui>탭에서 <file>src/main.c</file> 파일"
28462"을 여십시오 안주타에서는 서식에 일부 기본 GTK+ 코드를 채워넣습니다. WebKit 프로젝트를 만들고 있으니 WebKit 레더를 "
28463"추가해야합니다. <code>gtk/gtk.h</code>줄 다음에 다음 줄을 추가하십시오:"
28464
28465#. (itstool) path: section/code
28466#: C/message-board.c.page:82
28467#, no-wrap
28468msgid "#include &lt;webkit/webkit.h&gt;"
28469msgstr "#include &lt;webkit/webkit.h&gt;"
28470
28471#. (itstool) path: section/p
28472#: C/message-board.c.page:84
28473msgid ""
28474"Verify that everything works by building what you have so far. Click <guiseq><gui>Build</gui><gui>Build Project</"
28475"gui></guiseq> or just press <keyseq><key>Shift</key><key>F7</key></keyseq>. The first time you build, you will be "
28476"asked for some configure options. Just accept the defaults and click <gui>Execute</gui>."
28477msgstr ""
28478"여태껏 작성해오던 코드로 모든 부분이 동작하는지 확인하십시오. <guiseq><gui>빌드</gui><gui>프로젝트 빌드</gui></"
28479"guiseq> 를 누르거나 그냥 <keyseq><key>Shift</key><key>F7</key></keyseq>키를 누르십시오. 처음 빌드할 때는 몇가지 설"
28480"정 옵션을 물어봅니다. 그냥 기본 값으로 설정하고 <gui>실행</gui>을 누르십시오."
28481
28482#. (itstool) path: section/p
28483#: C/message-board.c.page:90
28484msgid ""
28485"You should now be able to run the program. Click <guiseq> <gui>Run</gui><gui>Execute</gui></guiseq> or just press "
28486"<key>F3</key>. You should see an empty window appear."
28487msgstr ""
28488"이제 프로그램을 실행할 수 있어야합니다. <guiseq> <gui>실행</gui><gui>실행</gui></guiseq>을 누르든지 그냥 <key>F3</"
28489"key> 키를 누르십시오. 빈 창이 나타납니다."
28490
28491#. (itstool) path: section/title
28492#: C/message-board.c.page:96
28493msgid "Lay out your window and web view"
28494msgstr "창과 웹 뷰 배치"
28495
28496#. (itstool) path: section/p
28497#: C/message-board.c.page:98
28498msgid ""
28499"Now that you can show a window, it's time to start working with WebKit. For this tutorial, you'll create a text "
28500"entry and a web view and pack them both into a window. Find the function <code>create_window</code> and replace it "
28501"with the following:"
28502msgstr ""
28503"이제 창을 보여줄 수 있으니 WebKit을 다룰 시간입니다. 이 따라하기 안내에 따라 텍스트 항목과 웹 뷰를 만들고 이 요소"
28504"를 창에 추가합니다. <code>create_window</code>  함수를 찾아 다음 코드로 바꾸십시오:"
28505
28506#. (itstool) path: section/code
28507#: C/message-board.c.page:103
28508#, no-wrap
28509msgid ""
28510"\n"
28511"static GtkWidget*\n"
28512"create_window (void)\n"
28513"{\n"
28514"    GtkWidget *window, *box, *scroll, *view, *entry;\n"
28515"\n"
28516"    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);\n"
28517"    gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);\n"
28518"    gtk_window_set_title (GTK_WINDOW (window), \"Message Board\");\n"
28519"    g_signal_connect (window, \"delete-event\", G_CALLBACK (gtk_main_quit), NULL);\n"
28520"\n"
28521"    box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);\n"
28522"    gtk_container_set_border_width (GTK_CONTAINER (box), 6);\n"
28523"    gtk_container_add (GTK_CONTAINER (window), box);\n"
28524"\n"
28525"    entry = gtk_entry_new ();\n"
28526"    gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 0);\n"
28527"\n"
28528"    scroll = gtk_scrolled_window_new (NULL, NULL);\n"
28529"    g_object_set (scroll, \"shadow-type\", GTK_SHADOW_IN, NULL);\n"
28530"    gtk_box_pack_start (GTK_BOX (box), scroll, TRUE, TRUE, 0);\n"
28531"\n"
28532"    view = webkit_web_view_new ();\n"
28533"    gtk_container_add (GTK_CONTAINER (scroll), view);\n"
28534"    webkit_web_view_load_string (WEBKIT_WEB_VIEW (view),\n"
28535"                                 \"&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;\",\n"
28536"                                 \"text/html\",\n"
28537"                                 \"UTF-8\",\n"
28538"                                 NULL);\n"
28539"\n"
28540"    gtk_widget_show_all (GTK_WIDGET (box));\n"
28541"    return window;\n"
28542"}\n"
28543msgstr ""
28544"\n"
28545"static GtkWidget*\n"
28546"create_window (void)\n"
28547"{\n"
28548"    GtkWidget *window, *box, *scroll, *view, *entry;\n"
28549"\n"
28550"    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);\n"
28551"    gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);\n"
28552"    gtk_window_set_title (GTK_WINDOW (window), \"Message Board\");\n"
28553"    g_signal_connect (window, \"delete-event\", G_CALLBACK (gtk_main_quit), NULL);\n"
28554"\n"
28555"    box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);\n"
28556"    gtk_container_set_border_width (GTK_CONTAINER (box), 6);\n"
28557"    gtk_container_add (GTK_CONTAINER (window), box);\n"
28558"\n"
28559"    entry = gtk_entry_new ();\n"
28560"    gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 0);\n"
28561"\n"
28562"    scroll = gtk_scrolled_window_new (NULL, NULL);\n"
28563"    g_object_set (scroll, \"shadow-type\", GTK_SHADOW_IN, NULL);\n"
28564"    gtk_box_pack_start (GTK_BOX (box), scroll, TRUE, TRUE, 0);\n"
28565"\n"
28566"    view = webkit_web_view_new ();\n"
28567"    gtk_container_add (GTK_CONTAINER (scroll), view);\n"
28568"    webkit_web_view_load_string (WEBKIT_WEB_VIEW (view),\n"
28569"                                 \"&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;\",\n"
28570"                                 \"text/html\",\n"
28571"                                 \"UTF-8\",\n"
28572"                                 NULL);\n"
28573"\n"
28574"    gtk_widget_show_all (GTK_WIDGET (box));\n"
28575"    return window;\n"
28576"}\n"
28577
28578#. (itstool) path: section/p
28579#: C/message-board.c.page:138
28580msgid ""
28581"You first create a <code>GtkWindow</code> object and set its title and default size. You also connect the "
28582"<code>gtk_main_quit</code> function to the <code>delete-event</code> signal. The <code>delete-event</code> signal "
28583"is emitted when the window is closed. The <code>gtk_main_quit</code> function is part of GTK, and it quits the "
28584"application."
28585msgstr ""
28586"우선 <code>GtkWindow</code> 객체를 만들고 제목과 기본 크기를 설정합니다. <code>gtk_main_quit</code> 함수를 "
28587"<code>delete-event</code> 시그널에 연결하기도 합니다. <code>delete-event</code>시그널은 창을 닫을때 방출합니다. "
28588"<code>gtk_main_quit</code> 함수는 GTK의 알부이며, 프로그램을 끝냅니다."
28589
28590#. (itstool) path: section/p
28591#: C/message-board.c.page:144
28592msgid ""
28593"You then create a vertical box and add it to the window. A window can only hold a single child widget, so you need "
28594"to use a box to add multiple widgets. The second argument to <code>gtk_box_new</code> sets the amount of padding "
28595"(in pixels) between each child, and the next line puts a six-pixel border around the entire thing."
28596msgstr ""
28597"이제 수직 박스를 만들어 창에 추가했습니다. 창은 오직 단일 하위 위젯을 가질 수 있기 때문에 여러 위젯을 추가하려면 박"
28598"스를 사용해야합니다. <code>gtk_box_new</code>의 두번째 인자는 각 하위 위젯의 (픽셀 단위)간격을 설정하고 다음 줄에"
28599"는 전체에 6 픽셀 두께의 테두리를 넣습니다."
28600
28601#. (itstool) path: section/p
28602#: C/message-board.c.page:150
28603msgid ""
28604"You next create a <code>GtkEntry</code> object and pack it into the box. The third and fourth arguments to "
28605"<code>gtk_box_pack_start</code> specify that the entry shouldn't take up any extra space the box has available. "
28606"The fourth argument is the amount of padding you want around the entry. In this case, you set the padding to zero, "
28607"because you're allowing the box to handle all the padding."
28608msgstr ""
28609"다음 <code>GtkEntry</code> 객체를 만들어 박스에 넣으십시오. <code>gtk_box_pack_start</code>의 세번째, 네번째 인자"
28610"는 박스에 추가 여유 공간이 있을때, 항목이 차지하지 않도록 설정합니다. 네번째 인저에서는 항목 주변의 여백 공간입니"
28611"다. 지금의 경우 여백 공간을 0으로 설정했는데 박스에서 내부 여백을 처리할 수 있기 때문입니다."
28612
28613#. (itstool) path: section/p
28614#: C/message-board.c.page:157
28615msgid ""
28616"Before you add a web view, you have to create a scrolled window to put it inside of. The scrolled window will "
28617"place scrollbars on the right and bottom when necessary, and prevent your web view from filling your entire "
28618"screen. This time, you pass <code>TRUE</code> and <code>TRUE</code> to <code>gtk_box_pack_start</code> to allow "
28619"the scrolled window (and thus, the web view) to use any extra space available in the box."
28620msgstr ""
28621"웹 뷰를 추가하기 전에 웹 뷰를 넣을 스크롤 뷰를 우선 넣어야합니다. 스크롤 뷰는 필요한 경우 스크롤 표시줄을 오른편과 "
28622"하단에 두고  웹 뷰가 화면 전체를 차지하지 않게 막아줍니다.  여기서는 <code>gtk_box_pack_start</code>에 <code>TRUE</"
28623"code>와 <code>TRUE</code>를 넣어 스크롤 창(웹 뷰!)에서 박스의 추가 여분 공간을 사용합니다."
28624
28625#. (itstool) path: section/p
28626#: C/message-board.c.page:164
28627msgid ""
28628"Finally, you create a <code>WebKitWebView</code> and add it to the scrolled window. Then load a very basic HTML "
28629"page into the web view by calling <code>webkit_web_view_load_string</code> with the following arguments:"
28630msgstr ""
28631"마지막으로 <code>WebKitWebView</code>를 만들고 스크롤 창에 추가했습니다. 그리고 <code>webkit_web_view_load_string</"
28632"code> 함수와 다음 인자를 통해 매우 기본적인 HTML페이지를 웹 뷰에 불러다놓았습니다:"
28633
28634#. (itstool) path: item/title
28635#: C/message-board.c.page:170
28636msgid "<code>WEBKIT_WEB_VIEW (view)</code>"
28637msgstr "<code>WEBKIT_WEB_VIEW (view)</code>"
28638
28639#. (itstool) path: item/p
28640#: C/message-board.c.page:171
28641msgid ""
28642"The view itself. Because <code>view</code> is typed as a <code>GtkWidget*</code>, you have to use "
28643"<code>WEBKIT_WEB_VIEW</code> to safely cast the object."
28644msgstr ""
28645"뷰 자체입니다.  <code>view</code> 는 <code>GtkWidget*</code> 형식이므로 객체를 안전하게 캐스팅하려면 "
28646"<code>WEBKIT_WEB_VIEW</code> 를 사용해야합니다."
28647
28648#. (itstool) path: item/title
28649#: C/message-board.c.page:176
28650msgid "<code>\"&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;\"</code>"
28651msgstr "<code>\"&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;\"</code>"
28652
28653#. (itstool) path: item/p
28654#: C/message-board.c.page:177
28655msgid "The simplest HTML file you could possibly write."
28656msgstr "여러분이 작성할 수 있는 간단한 HTML 파일입니다."
28657
28658#. (itstool) path: item/title
28659#: C/message-board.c.page:180
28660msgid "<code>\"text/html\"</code>"
28661msgstr "<code>\"text/html\"</code>"
28662
28663#. (itstool) path: item/p
28664#: C/message-board.c.page:181
28665msgid "The MIME type of the content you provided. In this case, you're using plain HTML."
28666msgstr "여러분이 제공한 컨텐트의 MIME 형식입니다. 지금 같은 경우는 플레인 HTML을 사용중입니다."
28667
28668#. (itstool) path: item/title
28669#: C/message-board.c.page:185
28670msgid "<code>\"UTF-8\"</code>"
28671msgstr "<code>\"UTF-8\"</code>"
28672
28673#. (itstool) path: item/p
28674#: C/message-board.c.page:186
28675msgid ""
28676"The character encoding of the content you provided. Although you only used ASCII characters, it's a good idea to "
28677"specify UTF-8. UTF-8 is used as the default encoding throughout the GNOME platform."
28678msgstr ""
28679"여러분이 제공한 내용의 문자 인코딩 방식입니다. ASCII 문자만 활용했다 히더라도 UTF-8로 지정하시는게 좋습니다. UTF-8"
28680"은 그놈 플랫폼 이곳저곳에서 기본 인코딩으로 활용합니다."
28681
28682#. (itstool) path: item/title
28683#: C/message-board.c.page:191
28684msgid "<code>NULL</code>"
28685msgstr "<code>NULL</code>"
28686
28687#. (itstool) path: item/p
28688#: C/message-board.c.page:192
28689msgid ""
28690"The base URI. You don't need it in this simple example, but you might want to provide a <sys>file:</sys> URI if "
28691"you add images or other features where you want to use relative URI references."
28692msgstr ""
28693"기본 URI. 이 간단한 예제에서는 필요하지 않습니다만, 그림을 추가하거나 상대 URI 참고 경로를 추가한다면 <sys>file:</"
28694"sys> URI를 제공하는게 좋습니다."
28695
28696#. (itstool) path: note/p
28697#: C/message-board.c.page:199
28698msgid ""
28699"Every time you add a widget, you have to call <code>gtk_widget_show</code> on it for it to be visible. If you call "
28700"<code>gtk_widget_show_all</code> on a container widget like a <code>GtkBox</code>, GTK+ will automatically show "
28701"all the widgets inside the container, to any depth. Sometimes you don't want to call <code>gtk_widget_show_all</"
28702"code>, such as when you want to dynamically hide and show some widgets in response to events."
28703msgstr ""
28704"위젯을 추가할 때마다 위젯이 나타나게 <code>gtk_widget_show</code>  함수를 호출해야합니다. <code>GtkBox</code>와 같"
28705"은 컨테이너 위젯에서 <code>gtk_widget_show_all</code>  함수를 호출하면, GTK+에서 알아서 컨테이너의 어떤 깊은 곳에 "
28706"있든 다 끄집어내어 자동으로 보여줍니다. 때로는 이벤트에 대한 응답으로 위젯을 동적으로 숨기거나 보이려고 하는 그런 "
28707"경우에 <code>gtk_widget_show_all</code>을 호출하고 싶지 않을 때도 있습니다."
28708
28709#. (itstool) path: section/p
28710#: C/message-board.c.page:207
28711msgid ""
28712"Finally, you have to call <code>gtk_widget_show_all</code> on the box. Otherwise, none of the widgets you created "
28713"will be visible. (The window is shown in the <code>main</code> function with <code>gtk_widget_show</code>.)"
28714msgstr ""
28715"마지막으로 박스의 <code>gtk_widget_show_all</code>를 호출해야 합니다. 그렇지 않으면 만들어 둔 어떤 위젯도 볼 수 없"
28716"습니다(창은 <code>main</code> 함수의 <code>gtk_widget_show</code> 호출로 나타납니다.)"
28717
28718#. (itstool) path: section/p
28719#: C/message-board.c.page:211
28720msgid ""
28721"Build and run the message board again. You should see a window with a text entry and a web view. It doesn't do "
28722"anything yet because the text entry and the web view don't know anything about each other."
28723msgstr ""
28724"게시판을 다시 빌드하고 실행하십시오. 텍스트 항목과 웹 뷰가 나타납니다. 텍스트 항목과 웹 뷰는 서로를 알지 못하기 대"
28725"문에 어떤 일도 일어나지 않습니다."
28726
28727#. (itstool) path: section/title
28728#: C/message-board.c.page:217
28729msgid "Hook up signals"
28730msgstr "시그널 걸어두기"
28731
28732#. (itstool) path: section/p
28733#: C/message-board.c.page:219
28734msgid ""
28735"Now you want to make the message board actually <em>do</em> something when you enter text into the text entry. To "
28736"do this, connect a callback function to the <code>activate</code> signal of <code>entry</code>. GTK+ emits the "
28737"<code>activate</code> signal whenever the user presses <key>Enter</key> in the entry. Add the following into "
28738"<code>create_window</code>, anywhere after both <code>entry</code> and <code>view</code> have been defined:"
28739msgstr ""
28740"이제 텍스트 항목에 텍스트를 입력했을때 실제로 게시판에서 어떤 <em>일</em>을 일어나게 하려고 합니다. 콜백 함수를 "
28741"<code>entry</code>의 <code>activate</code> 시그널로 연결합니다. GTK+는 사용자가 항목 위치에서 <key>Enter</key> 키"
28742"를 누를 때마다 <code>activate</code> 시그널을 내보냅니다. <code>entry</code>와 <code>view</code>를 정의한 어디에든 "
28743"다음 코드를 <code>create_window</code>에 넣으십시오:"
28744
28745#. (itstool) path: section/code
28746#: C/message-board.c.page:226
28747#, no-wrap
28748msgid ""
28749"\n"
28750"g_signal_connect (entry, \"activate\", G_CALLBACK (entry_activate_cb), view);\n"
28751msgstr ""
28752"\n"
28753"g_signal_connect (entry, \"activate\", G_CALLBACK (entry_activate_cb), view);\n"
28754
28755#. (itstool) path: section/p
28756#: C/message-board.c.page:230
28757msgid ""
28758"You then have to actually define <code>entry_activate_cb</code>. Define it as follows, anywhere above "
28759"<code>create_window</code>:"
28760msgstr ""
28761"실제로 <code>entry_activate_cb</code>를 정의해야합니다. <code>create_window</code> 위 어디에든 다음 처럼 정의하십시"
28762"오:"
28763
28764#. (itstool) path: section/code
28765#: C/message-board.c.page:233
28766#, no-wrap
28767msgid ""
28768"\n"
28769"static void\n"
28770"entry_activate_cb (GtkEntry *entry, WebKitWebView *view)\n"
28771"{\n"
28772"    WebKitDOMDocument *document;\n"
28773"    WebKitDOMElement *body, *div;\n"
28774"\n"
28775"    document = webkit_web_view_get_dom_document (view);\n"
28776"    body = webkit_dom_document_query_selector (document, \"body\", NULL);\n"
28777"    div = webkit_dom_document_create_element (document, \"div\", NULL);\n"
28778"    webkit_dom_node_set_text_content (WEBKIT_DOM_NODE (div),\n"
28779"                                      gtk_entry_get_text (entry),\n"
28780"                                      NULL);\n"
28781"    webkit_dom_node_append_child (WEBKIT_DOM_NODE (body),\n"
28782"                                  WEBKIT_DOM_NODE (div),\n"
28783"                                  NULL);\n"
28784"    gtk_entry_set_text (entry, \"\");\n"
28785"}\n"
28786msgstr ""
28787"\n"
28788"static void\n"
28789"entry_activate_cb (GtkEntry *entry, WebKitWebView *view)\n"
28790"{\n"
28791"    WebKitDOMDocument *document;\n"
28792"    WebKitDOMElement *body, *div;\n"
28793"\n"
28794"    document = webkit_web_view_get_dom_document (view);\n"
28795"    body = webkit_dom_document_query_selector (document, \"body\", NULL);\n"
28796"    div = webkit_dom_document_create_element (document, \"div\", NULL);\n"
28797"    webkit_dom_node_set_text_content (WEBKIT_DOM_NODE (div),\n"
28798"                                      gtk_entry_get_text (entry),\n"
28799"                                      NULL);\n"
28800"    webkit_dom_node_append_child (WEBKIT_DOM_NODE (body),\n"
28801"                                  WEBKIT_DOM_NODE (div),\n"
28802"                                  NULL);\n"
28803"    gtk_entry_set_text (entry, \"\");\n"
28804"}\n"
28805
28806#. (itstool) path: section/p
28807#: C/message-board.c.page:253
28808msgid ""
28809"The first thing you do is get a <code>WebKitDOMDocument</code> object that represents the HTML document displayed "
28810"in <code>view</code>. The DOM classes and methods in WebKit allow you to inspect and manipulate the HTML document, "
28811"and work very similarly to the DOM APIs you might already know from JavaScript."
28812msgstr ""
28813"여러분은 우선 <code>view</code>에 HTML 문서를 나타내는 <code>WebKitDOMDocument</code>를 가져와야 합니다. 웹킷 DOM "
28814"클래스와 메서드는 HTML을 살펴보고 다룰 수 있게 하며, JavaScript를 통해 이미 알고 있는 DOM API와 매우 유사하게 다룰 "
28815"수 있습니다."
28816
28817#. (itstool) path: section/p
28818#: C/message-board.c.page:259
28819msgid ""
28820"Once you have the document, you want to get the <code>body</code> element so that you can add <code>div</code> "
28821"elements to it. The <code>webkit_dom_document_query_selector</code> function lets you find an element in the "
28822"document using CSS selectors. This keeps you from having to write tedious loops to traverse the document."
28823msgstr ""
28824"문서를 가져온 후에는 <code>body</code> 구성요소를 가져와서 <code>div</code> 구성요소를 넣을 수 있게 해야합니다. "
28825"<code>webkit_dom_document_query_selector</code> 함수는 CSS 선택자로 문서의 구성 요소를 찾게 해줍니다. 이 방식을 통"
28826"해 문서를 돌아볼 때 짜증나는 반복문을 작성하지 않게 해줍니다."
28827
28828#. (itstool) path: section/p
28829#: C/message-board.c.page:270
28830msgid ""
28831"Next, you create a new <code>div</code> element to hold the message. Every element you create has to be attached "
28832"to a document, so the function to create an element takes the <code>WebKitDOMDocument</code> as its first "
28833"arguments. You then set the text content of the element to the contents of the text entry. Because "
28834"<code>gtk_entry_get_text</code> returns a <code>const gchar*</code>, you don't have to free the result."
28835msgstr ""
28836"다음, 메시지를 넣어둘 새 <code>div</code> 구성요소를 만듭니다. 여러분이 만든 모든 구성 요소는 문서에 붙으므로, 구"
28837"성 요소를 만드는 함수의 첫번째 인자로 <code>WebKitDOMDocument</code>를 갖습니다. 그 다음 텍스트 항목의 컨텐트로 구"
28838"성 요소의 텍스트를 설정합니다. <code>gtk_entry_get_text</code> 에서 <code>const gchar*</code>를 반환하기에, 결과를 "
28839"굳이 해제하지 않아도 됩니다."
28840
28841#. (itstool) path: section/p
28842#: C/message-board.c.page:283
28843msgid ""
28844"Finally, you append the new <code>div</code> element to the body and clear out the text entry so you can type "
28845"something new. Build and run the program again and test it for yourself."
28846msgstr ""
28847"마지막으로 <code>div</code> 구성요소를 body에 추가하고 텍스트 항목을 지워서 새 내용을 입력할 수 있게 하십시오.프로"
28848"그램을 다시 빌드하고 실행한 후 여러분 자신이 직접 테스트해보십시오."
28849
28850#. (itstool) path: section/title
28851#: C/message-board.c.page:290
28852msgid "Make it look better with CSS"
28853msgstr "CSS로 더 멋지게 만들기"
28854
28855#. (itstool) path: section/p
28856#: C/message-board.c.page:292
28857msgid ""
28858"At this point, your program is completely functional, but not very pretty. You can style the message display with "
28859"CSS, just like you can with any other HTML page. There are many ways you could attach some CSS to the page: You "
28860"could add it in the initial HTML document. You could inline it in the <code>style</code> attribute of the "
28861"<code>div</code> elements. You could even programmatically construct it using the DOM APIs."
28862msgstr ""
28863"여기서 프로그램의 기능은 완벽하게 동작하지만 썩 매력있는 편은 아닙니다. 화면에 나타나는 메시지를 다른 HTML페이지를 "
28864"다루어왔던 것처럼 CSS로 장식할 수 있습니다. 일부 CSS를 페이지에 붙여넣는 방법에는 여러가지가 있는데, 처음 HTML 문서"
28865"에 추가하는 방법, <code>div</code> 구성 요소의 <code>style</code> 속성에 넣는 방법, DOM API로 프로그래밍 방식으로 "
28866"넣는 방법이 있습니다."
28867
28868#. (itstool) path: section/p
28869#: C/message-board.c.page:299
28870msgid ""
28871"In this tutorial, you'll attach the CSS using the <code>user-stylesheet-uri</code> property of the "
28872"<code>WebKitWebSetting</code> object attached to your web view. In a more complete application, you would want to "
28873"save and load your HTML file. Keeping the style information outside the actual HTML means that you can change the "
28874"styling completely within your application, without having to change users' files. You would normally just install "
28875"a file along with your application, but just to keep everything in one file for this demo, we'll use a trick "
28876"called a data URI. First, define the CSS as a static string near the top of your file."
28877msgstr ""
28878"이 따라하기 지침에서는 웹 뷰에 붙은 <code>WebKitWebSetting</code> 객체의 <code>user-stylesheet-uri</code> 속성으로 "
28879"CSS를 붙입니다. 좀 더 완벽한 프로그램에서는 HTML 파일을 저장하고 불러오고 싶을 수도 있습니다. HTML의 실제 스타일 정"
28880"보를 외부에서 유지한다는건, 굳이 사용자 파일을 건드리지 않아도 프로그램에서 완벽하게 스타일을 바꿀 수 있다는 의미"
28881"가 되겠습니다.  보통 프로그램과 해당 파일을 같이 설치해야 하겠지만 이 시연 프로그램에서는 하나의 파일에 모두 담아두"
28882"고 데이터 URI로 꼼수를 쓰겠습니다. 우선 파일 상단 부분에 정적 CSS를 정의하십시오."
28883
28884#. (itstool) path: section/code
28885#: C/message-board.c.page:308
28886#, no-wrap
28887msgid ""
28888"\n"
28889"static const guchar CSS[] =\n"
28890"\"body { margin: 0; padding: 0; }\\n\"\n"
28891"\"div { \"\n"
28892"\" -webkit-border-radius: 2px;\"\n"
28893"\" background: -webkit-gradient(linear, 0% 100%, 0% 0%,\"\n"
28894"\" from(#f1f1f1), to(white));\"\n"
28895"\" border: solid 1px #c6c6c6;\"\n"
28896"\" -webkit-box-shadow: 0px 0px 2px #c6c6c6;\"\n"
28897"\" margin: 12px; padding: 6px;\"\n"
28898"\"}\";\n"
28899msgstr ""
28900"\n"
28901"static const guchar CSS[] =\n"
28902"\"body { margin: 0; padding: 0; }\\n\"\n"
28903"\"div { \"\n"
28904"\" -webkit-border-radius: 2px;\"\n"
28905"\" background: -webkit-gradient(linear, 0% 100%, 0% 0%,\"\n"
28906"\" from(#f1f1f1), to(white));\"\n"
28907"\" border: solid 1px #c6c6c6;\"\n"
28908"\" -webkit-box-shadow: 0px 0px 2px #c6c6c6;\"\n"
28909"\" margin: 12px; padding: 6px;\"\n"
28910"\"}\";\n"
28911
28912#. (itstool) path: section/p
28913#: C/message-board.c.page:321
28914msgid ""
28915"All you have in this example are <code>div</code> elements inside a <code>body</code> element. If you created more "
28916"complicated HTML, you could use whatever CSS is necessary. In fact, if you're comfortable with CSS, you should "
28917"trying changing this to something you like better."
28918msgstr ""
28919"이 예제에 들어간 모든 내용은 <code>body</code> 구성 요소의 <code>div</code> 구성요소입니다. 더 복잡한 HTML을 만든다"
28920"면 어떤 CSS든 필요합니다. 사실, CSS가 편하다면 여러분이 더 좋아하는 방식대로, 이 코드를 바꿔보시는게 좋습니다."
28921
28922#. (itstool) path: section/p
28923#: C/message-board.c.page:326
28924msgid ""
28925"To apply the CSS, you set the <code>user-stylesheet-uri</code> in the <code>create_window</code> function, "
28926"anywhere after <code>view</code> has already been defined."
28927msgstr ""
28928"CSS를 적용하려면, <code>view</code> 를 설정한 이후 어디든 <code>create_window</code> 함수에서 <code>user-"
28929"stylesheet-uri</code>를 설정하십시오."
28930
28931#. (itstool) path: section/code
28932#: C/message-board.c.page:332
28933#, no-wrap
28934msgid ""
28935"\n"
28936"tmp = g_base64_encode (CSS, strlen((gchar *) CSS));\n"
28937"css = g_strconcat (\"data:text/css;charset=utf-8;base64,\",\n"
28938"                   tmp, NULL);\n"
28939"g_object_set (webkit_web_view_get_settings (WEBKIT_WEB_VIEW (view)),\n"
28940"              \"user-stylesheet-uri\", css, NULL);\n"
28941"g_free (css);\n"
28942"g_free (tmp);\n"
28943msgstr ""
28944"\n"
28945"tmp = g_base64_encode (CSS, strlen((gchar *) CSS));\n"
28946"css = g_strconcat (\"data:text/css;charset=utf-8;base64,\",\n"
28947"                   tmp, NULL);\n"
28948"g_object_set (webkit_web_view_get_settings (WEBKIT_WEB_VIEW (view)),\n"
28949"              \"user-stylesheet-uri\", css, NULL);\n"
28950"g_free (css);\n"
28951"g_free (tmp);\n"
28952
28953#. (itstool) path: section/p
28954#: C/message-board.c.page:342
28955msgid ""
28956"Also, make sure to add variable declarations for <code>tmp</code> and <code>css</code> to the top of "
28957"<code>create_window</code>."
28958msgstr ""
28959"또한 <code>create_window</code> 상단에 <code>tmp</code> 와 <code>css</code> 변수 선언을 추가했는지 확인하십시오."
28960
28961#. (itstool) path: section/code
28962#: C/message-board.c.page:345
28963#, no-wrap
28964msgid ""
28965"\n"
28966"gchar *tmp, *css;\n"
28967msgstr ""
28968"\n"
28969"gchar *tmp, *css;\n"
28970
28971#. (itstool) path: section/p
28972#: C/message-board.c.page:349
28973msgid ""
28974"A data URI starts with <sys>data:</sys> and some information about the content type and how the data is encoded. "
28975"The actual data follows after a comma, in this case encoded in Base64. Unlike other URI schemes like <sys>http:</"
28976"sys>, <sys>ftp:</sys>, and <sys>file:</sys>, the <sys>data:</sys> URI scheme doesn't specify where to find a file "
28977"to load. Rather, it gives the entire contents of the file."
28978msgstr ""
28979"<sys>data:</sys>로 시작하는 데이터 URI와 컨텐트 형식 일부 정보, 데이터 인코딩 방식입니다. 실제 데이터는 콤마 뒤에 "
28980"따라오는데 이 경우에는 Base64 방식으로 인코딩합니다. <sys>http:</sys>, <sys>ftp:</sys>, <sys>file:</sys> 같은 다른 "
28981"URI 형식과는 다르게 URI 스킴에는 불러올 파일이 어디있는지 지정하지 않습니다. 대신 파일의 전체 내용을 제시해줍니다."
28982
28983#. (itstool) path: section/p
28984#: C/message-board.c.page:356
28985msgid ""
28986"The code above first encodes your CSS definitions in Base64, then combines that with a fixed string to create a "
28987"data URI. The <code>g_strconcat</code> function can take any number of string arguments and concatenate them all "
28988"together, so you have to pass <code>NULL</code> as the final argument so it knows when to stop. And don't forget "
28989"to free those temporary strings after you set the stylesheet property."
28990msgstr ""
28991"위 코드는 우선 CSS 정의를 Base64 방식으로 인코딩한 다음 데이터 URI를 만드는 정적 문자열과 합칩니다. "
28992"<code>g_strconcat</code> 함수에서는 여러 문자열 인자를 취하여 합칠 수 있으므로, 마지막 인자 값은 <code>NULL</code>"
28993"로 주어 언제 문자열을 합치는 동작을 멈출 지 알려야합니다. 그리고 스타일 시트를 올바르게 설정하고 나면 잊지 마시고 "
28994"임시 문자열에 대해 메모리 해제를 반드시 수행하십시오."
28995
28996#. (itstool) path: section/p
28997#: C/message-board.c.page:363
28998msgid ""
28999"Build and run the program again. It should now work exactly the same as at the end of the last section, except the "
29000"messages will be nicely styled with a border and a subtle background gradient."
29001msgstr ""
29002"프로그램을 다시 빌드하고 실행하십시오. 테두리와 미묘한 백그라운드 그레디언트로 멋지게 장식할 메시지 부분을 제외하고"
29003"는 섹션의 마지막 부분과 정확히 동일하게 동작합니다."
29004
29005#. (itstool) path: section/title
29006#: C/message-board.c.page:369
29007msgid "Learn more"
29008msgstr "더 알아보기"
29009
29010#. (itstool) path: section/p
29011#: C/message-board.c.page:371
29012msgid ""
29013"This tutorial showed you how to create a basic application using GTK+ and WebKit, including showing a document and "
29014"manipulating its contents. To create a real application, you probably want to do a little bit more. Try adding "
29015"features on your own. Here are a few ideas:"
29016msgstr ""
29017"이 따라하기 지침에서는 GTK+와 웹킷으로 문서를 보여주고 내용을 다루는 기본적인 프로그램을 만드는 방법을 보여줍니다. "
29018"실제 프로그램을 만들려면, 프로그램에 좀 더 이것저것 붙여보고 싶을지도 모릅니다. 기능 추가는 여러분이 직접 해보시"
29019"죠. 몇가지 아이디어를 드리겠습니다:"
29020
29021#. (itstool) path: item/p
29022#: C/message-board.c.page:377
29023msgid ""
29024"If you're comfortable with CSS, try changing the style of the message display. CSS is easy to get started with, "
29025"but increasingly more powerful. There is a wealth of CSS tutorials on the Internet, and just about everything you "
29026"can do on the web, you can do in this application."
29027msgstr ""
29028"CSS가 불편하다면 메시지 표시 방식을 바꿔보십시오. CSS는 시작하기 쉬우면서도 다루어 볼수록 점점 강력해집니다. 인터넷"
29029"에는 다양한 CSS 따라하기 문서가 있으며, 웹에 할 수 있는 모든걸 이 프로그램에서 해볼 수 있습니다."
29030
29031#. (itstool) path: item/p
29032#: C/message-board.c.page:383
29033msgid ""
29034"Right now, you lose all your messages whenever you close the message board. Try saving the HTML contents after "
29035"each post, and loading the saved file (if it exists) on startup."
29036msgstr ""
29037"바로 지금 게시판을 닫는다면 모든 메시지가 증발합니다. 각 게시물을 올린 다음 HTML 문서를 저장해보고 시작할 때 저장"
29038"한 파일(있을 경우)을 불려와보십시오."
29039
29040#. (itstool) path: item/p
29041#: C/message-board.c.page:391
29042msgid ""
29043"If you keep your messages around for a long time, you'll start wondering when you posted them. Add a timestamp to "
29044"each message when it's posted. You'll probably want to create some additional child <code>div</code> elements with "
29045"different classes that you can style in the CSS."
29046msgstr ""
29047"메시지를 오랫동안 유지했다면 언제 게시했는지 궁금해하실겁니다. 각 메시지를 게시할 때 타임 스탬프를 추가하십시오. 아"
29048"마도 CSS로 모양새를 갖출 수 있도록 다른 클래스 이름을 부여한 추가 하위 <code>div</code> 구성요소를 만들고 싶을 수"
29049"도 있습니다."
29050
29051#. (itstool) path: item/p
29052#: C/message-board.c.page:398
29053msgid ""
29054"This program keeps messages around forever. Think about ways you could allow the user to delete messages. Perhaps "
29055"you want messages to disappear automatically after they're too old, or after there are a certain number of "
29056"messages before them. Or you could add a link in each message to delete it. You could even override the context "
29057"menu when you right-click on a message. These features involve exploring WebKit's DOM API more."
29058msgstr ""
29059"이 프로그램은 메시지를 계속 유지합니다. 사용자가 메시지를 지울 수 있게 하는 방법을 생각해보시죠. 아마도 너무 오래됐"
29060"거나, 일정 갯수가 넘어가면 자동으로 메시지를 사라지게 하고 싶을지도 모릅니다. 아니면 각 메시지에 삭제할 수 있는 링"
29061"크를 달아둘 수 있습니다. 심지어 메시지에 마우스 단추를 올려두고 오른쪽 단추를 눌렀을 때 단축 메뉴를 띄울 수 있습니"
29062"다. 이 기능을 구현하려면 웹킷 DOM API를 좀 더 찾아봐야 합니다."
29063
29064#. (itstool) path: info/title
29065#: C/messagedialog.c.page:8
29066msgctxt "text"
29067msgid "MessageDialog (C)"
29068msgstr "MessageDialog (C)"
29069
29070#. (itstool) path: info/desc
29071#: C/messagedialog.c.page:19 C/messagedialog.py.page:19 C/messagedialog.vala.page:18
29072msgid "A message window"
29073msgstr "메시지 창"
29074
29075#. (itstool) path: page/title
29076#: C/messagedialog.c.page:22 C/messagedialog.js.page:24 C/messagedialog.py.page:22 C/messagedialog.vala.page:21
29077msgid "MessageDialog"
29078msgstr "MessageDialog"
29079
29080#. (itstool) path: page/media
29081#. This is a reference to an external file such as an image or video. When
29082#. the file changes, the md5 hash will change to let you know you need to
29083#. update your localized copy. The msgstr is not used at all. Set it to
29084#. whatever you like once you have updated your copy of the file.
29085#: C/messagedialog.c.page:24 C/messagedialog.js.page:25 C/messagedialog.py.page:23 C/messagedialog.vala.page:22
29086msgctxt "_"
29087msgid "external ref='media/messagedialog.png' md5='1956288274018e2386d9cba96a2101de'"
29088msgstr ""
29089
29090#. (itstool) path: page/p
29091#: C/messagedialog.c.page:25 C/messagedialog.vala.page:23
29092msgid "A modal message dialog which can cause the world to explode."
29093msgstr "전 세계를 폭발하게 만들 수 있는 모달 메시지 대화상자입니다."
29094
29095#. (itstool) path: note/p
29096#: C/messagedialog.c.page:26
29097msgid ""
29098"To test out the application once it has started running, you can click on the \"Message Dialog\" tab that appears "
29099"in the top menubar of the screen."
29100msgstr ""
29101"프로그램을 시작하고 나서 시험해보려면, 화면 상단에 메뉴 표시줄을 띄우는 “메시지 대화 상자” 탭을 눌러볼 수 있습니다."
29102
29103#. (itstool) path: page/code
29104#: C/messagedialog.c.page:30
29105#, no-wrap
29106msgid ""
29107"\n"
29108"#include &lt;gtk/gtk.h&gt;\n"
29109"\n"
29110"\n"
29111"\n"
29112"/* Callback function in which reacts to the \"response\" signal from the user in\n"
29113" * the message dialog window.\n"
29114" * This function is used to interact with the user in the terminal.\n"
29115" */\n"
29116"static void\n"
29117"on_response (GtkDialog *dialog,\n"
29118"             gint       response_id,\n"
29119"             gpointer   user_data)\n"
29120"{\n"
29121"  /* If the button clicked gives response OK (response_id being -5) */\n"
29122"  if (response_id == GTK_RESPONSE_OK) \n"
29123"     g_print (\"*boom*\\n\");\n"
29124"\n"
29125"  /* If the button clicked gives response CANCEL (response_id being -6) */\n"
29126"  else if (response_id == GTK_RESPONSE_CANCEL)\n"
29127"     g_print (\"good choice\\n\");\n"
29128"\n"
29129"  /* If the message dialog is destroyed (for example by pressing escape) */\n"
29130"  else if (response_id == GTK_RESPONSE_DELETE_EVENT)\n"
29131"     g_print (\"dialog closed or cancelled\\n\");\n"
29132"\n"
29133"  /* Destroy the dialog after one of the above actions have taken place */\n"
29134"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
29135"\n"
29136"}\n"
29137"\n"
29138"\n"
29139"\n"
29140"/* Callback function for the response signal \"activate\" related to the SimpleAction\n"
29141" * message_action.\n"
29142" * This function is used to cause the message dialog window to popup.\n"
29143" */\n"
29144"static void\n"
29145"message_cb (GSimpleAction *simple,\n"
29146"            GVariant      *parameter,\n"
29147"            gpointer       user_data)\n"
29148"{\n"
29149"   /* the parent variable in this case represents the window */\n"
29150"   GtkWidget *message_dialog;\n"
29151"   GtkWindow *parent = user_data;\n"
29152"   \n"
29153"   /* Create a new message dialog, and set the parameters as follows:\n"
29154"    * Dialog Flags - make the constructed dialog modal \n"
29155"    * (modal windows prevent interaction with other windows in the application)\n"
29156"    * Message Type - nonfatal warning message\n"
29157"    * Buttons Type - use the ok and cancel buttons\n"
29158"    * message_format - text that you want the user to see in the window \n"
29159"    */\n"
29160"   message_dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, \n"
29161"                                            GTK_MESSAGE_WARNING, \n"
29162"                                            GTK_BUTTONS_OK_CANCEL, \n"
29163"                                            \"This action will cause the universe to stop existing.\");\n"
29164"\n"
29165"   gtk_widget_show_all (message_dialog);\n"
29166"\n"
29167"   g_signal_connect (GTK_DIALOG (message_dialog), \"response\", \n"
29168"                    G_CALLBACK (on_response), NULL);\n"
29169"\n"
29170"}\n"
29171"\n"
29172"\n"
29173"\n"
29174"static void\n"
29175"activate (GtkApplication *app,\n"
29176"          gpointer        user_data)\n"
29177"{\n"
29178"  GtkWidget *window;\n"
29179"  GtkWidget *label;\n"
29180"\n"
29181"  GSimpleAction *message_action;\n"
29182"\n"
29183"  /* Create a window with a title and a default size */\n"
29184"  window = gtk_application_window_new (app);\n"
29185"  gtk_window_set_title (GTK_WINDOW (window), \"GMenu Example\");\n"
29186"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 200);\n"
29187"\n"
29188"  /* Create a label and add it to the window */\n"
29189"  label = gtk_label_new (\"This application goes boom!\");\n"
29190"  gtk_container_add (GTK_CONTAINER (window), label);\n"
29191"\n"
29192"  /* Create a new simple action, giving it a NULL parameter type. It will \n"
29193"   * always be NULL for actions invoked from a menu. (e.g clicking on an \"ok\" \n"
29194"   * or \"cancel\" button)\n"
29195"   */\n"
29196"  message_action = g_simple_action_new (\"message\", NULL); \n"
29197"\n"
29198"  /* Connect the \"activate\" signal to the appropriate callback function */\n"
29199"  g_signal_connect (message_action, \"activate\", G_CALLBACK (message_cb), \n"
29200"                    GTK_WINDOW (window));\n"
29201"\n"
29202"  /* Adds the message_action to the overall action map. An Action map is an \n"
29203"   * interface that contains a number of named GAction instances \n"
29204"   * (such as message_action) \n"
29205"   */\n"
29206"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (message_action));\n"
29207"\n"
29208"  gtk_widget_show_all (window);\n"
29209"}\n"
29210"\n"
29211"\n"
29212"\n"
29213"/* Callback function for the response signal \"activate\" from the \"quit\" action \n"
29214" * in the function directly below.\n"
29215" */ \n"
29216"static void\n"
29217"quit_cb (GSimpleAction *simple,\n"
29218"         GVariant      *parameter,\n"
29219"         gpointer       user_data)\n"
29220"{\n"
29221"  GApplication *application = user_data;\n"
29222"\n"
29223"  g_application_quit (application);\n"
29224"}\n"
29225"\n"
29226"\n"
29227"\n"
29228"/* Startup function for the menu we are creating in this sample */\n"
29229"static void\n"
29230"startup (GApplication *app,\n"
29231"         gpointer      user_data)\n"
29232"{\n"
29233"  GMenu *menu;\n"
29234"  GSimpleAction *quit_action;\n"
29235"\n"
29236"  /* Initialize the GMenu, and add a menu item with label \"Message\" and action \n"
29237"   * \"win.message\". Also add another menu item with label \"Quit\" and action \n"
29238"   * \"app.quit\" \n"
29239"   */\n"
29240"  menu = g_menu_new ();\n"
29241"  g_menu_append (menu, \"Message\", \"win.message\");\n"
29242"  g_menu_append (menu, \"Quit\", \"app.quit\");\n"
29243"\n"
29244"  /* Create a new simple action for the application. (In this case it is the \n"
29245"   * \"quit\" action.\n"
29246"   */\n"
29247"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
29248"\n"
29249"  /* Ensure that the menu we have just created is set for the overall application */\n"
29250"  gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (menu));\n"
29251"\n"
29252"  g_signal_connect (quit_action, \n"
29253"                    \"activate\", \n"
29254"                    G_CALLBACK (quit_cb), \n"
29255"                    app);\n"
29256"\n"
29257"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
29258"\n"
29259"}\n"
29260"\n"
29261"\n"
29262"\n"
29263"/* Startup function for the application */\n"
29264"int\n"
29265"main (int argc, char **argv)\n"
29266"{\n"
29267"  GtkApplication *app;\n"
29268"  int status;\n"
29269"\n"
29270"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
29271"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
29272"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
29273"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
29274"  g_object_unref (app);\n"
29275"\n"
29276"  return status;\n"
29277"}\n"
29278msgstr ""
29279"\n"
29280"#include &lt;gtk/gtk.h&gt;\n"
29281"\n"
29282"\n"
29283"\n"
29284"/* Callback function in which reacts to the \"response\" signal from the user in\n"
29285" * the message dialog window.\n"
29286" * This function is used to interact with the user in the terminal.\n"
29287" */\n"
29288"static void\n"
29289"on_response (GtkDialog *dialog,\n"
29290"             gint       response_id,\n"
29291"             gpointer   user_data)\n"
29292"{\n"
29293"  /* If the button clicked gives response OK (response_id being -5) */\n"
29294"  if (response_id == GTK_RESPONSE_OK) \n"
29295"     g_print (\"*boom*\\n\");\n"
29296"\n"
29297"  /* If the button clicked gives response CANCEL (response_id being -6) */\n"
29298"  else if (response_id == GTK_RESPONSE_CANCEL)\n"
29299"     g_print (\"good choice\\n\");\n"
29300"\n"
29301"  /* If the message dialog is destroyed (for example by pressing escape) */\n"
29302"  else if (response_id == GTK_RESPONSE_DELETE_EVENT)\n"
29303"     g_print (\"dialog closed or cancelled\\n\");\n"
29304"\n"
29305"  /* Destroy the dialog after one of the above actions have taken place */\n"
29306"  gtk_widget_destroy (GTK_WIDGET (dialog));\n"
29307"\n"
29308"}\n"
29309"\n"
29310"\n"
29311"\n"
29312"/* Callback function for the response signal \"activate\" related to the SimpleAction\n"
29313" * message_action.\n"
29314" * This function is used to cause the message dialog window to popup.\n"
29315" */\n"
29316"static void\n"
29317"message_cb (GSimpleAction *simple,\n"
29318"            GVariant      *parameter,\n"
29319"            gpointer       user_data)\n"
29320"{\n"
29321"   /* the parent variable in this case represents the window */\n"
29322"   GtkWidget *message_dialog;\n"
29323"   GtkWindow *parent = user_data;\n"
29324"   \n"
29325"   /* Create a new message dialog, and set the parameters as follows:\n"
29326"    * Dialog Flags - make the constructed dialog modal \n"
29327"    * (modal windows prevent interaction with other windows in the application)\n"
29328"    * Message Type - nonfatal warning message\n"
29329"    * Buttons Type - use the ok and cancel buttons\n"
29330"    * message_format - text that you want the user to see in the window \n"
29331"    */\n"
29332"   message_dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL, \n"
29333"                                            GTK_MESSAGE_WARNING, \n"
29334"                                            GTK_BUTTONS_OK_CANCEL, \n"
29335"                                            \"This action will cause the universe to stop existing.\");\n"
29336"\n"
29337"   gtk_widget_show_all (message_dialog);\n"
29338"\n"
29339"   g_signal_connect (GTK_DIALOG (message_dialog), \"response\", \n"
29340"                    G_CALLBACK (on_response), NULL);\n"
29341"\n"
29342"}\n"
29343"\n"
29344"\n"
29345"\n"
29346"static void\n"
29347"activate (GtkApplication *app,\n"
29348"          gpointer        user_data)\n"
29349"{\n"
29350"  GtkWidget *window;\n"
29351"  GtkWidget *label;\n"
29352"\n"
29353"  GSimpleAction *message_action;\n"
29354"\n"
29355"  /* Create a window with a title and a default size */\n"
29356"  window = gtk_application_window_new (app);\n"
29357"  gtk_window_set_title (GTK_WINDOW (window), \"GMenu Example\");\n"
29358"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 200);\n"
29359"\n"
29360"  /* Create a label and add it to the window */\n"
29361"  label = gtk_label_new (\"This application goes boom!\");\n"
29362"  gtk_container_add (GTK_CONTAINER (window), label);\n"
29363"\n"
29364"  /* Create a new simple action, giving it a NULL parameter type. It will \n"
29365"   * always be NULL for actions invoked from a menu. (e.g clicking on an \"ok\" \n"
29366"   * or \"cancel\" button)\n"
29367"   */\n"
29368"  message_action = g_simple_action_new (\"message\", NULL); \n"
29369"\n"
29370"  /* Connect the \"activate\" signal to the appropriate callback function */\n"
29371"  g_signal_connect (message_action, \"activate\", G_CALLBACK (message_cb), \n"
29372"                    GTK_WINDOW (window));\n"
29373"\n"
29374"  /* Adds the message_action to the overall action map. An Action map is an \n"
29375"   * interface that contains a number of named GAction instances \n"
29376"   * (such as message_action) \n"
29377"   */\n"
29378"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (message_action));\n"
29379"\n"
29380"  gtk_widget_show_all (window);\n"
29381"}\n"
29382"\n"
29383"\n"
29384"\n"
29385"/* Callback function for the response signal \"activate\" from the \"quit\" action \n"
29386" * in the function directly below.\n"
29387" */ \n"
29388"static void\n"
29389"quit_cb (GSimpleAction *simple,\n"
29390"         GVariant      *parameter,\n"
29391"         gpointer       user_data)\n"
29392"{\n"
29393"  GApplication *application = user_data;\n"
29394"\n"
29395"  g_application_quit (application);\n"
29396"}\n"
29397"\n"
29398"\n"
29399"\n"
29400"/* Startup function for the menu we are creating in this sample */\n"
29401"static void\n"
29402"startup (GApplication *app,\n"
29403"         gpointer      user_data)\n"
29404"{\n"
29405"  GMenu *menu;\n"
29406"  GSimpleAction *quit_action;\n"
29407"\n"
29408"  /* Initialize the GMenu, and add a menu item with label \"Message\" and action \n"
29409"   * \"win.message\". Also add another menu item with label \"Quit\" and action \n"
29410"   * \"app.quit\" \n"
29411"   */\n"
29412"  menu = g_menu_new ();\n"
29413"  g_menu_append (menu, \"Message\", \"win.message\");\n"
29414"  g_menu_append (menu, \"Quit\", \"app.quit\");\n"
29415"\n"
29416"  /* Create a new simple action for the application. (In this case it is the \n"
29417"   * \"quit\" action.\n"
29418"   */\n"
29419"  quit_action = g_simple_action_new (\"quit\", NULL);\n"
29420"\n"
29421"  /* Ensure that the menu we have just created is set for the overall application */\n"
29422"  gtk_application_set_app_menu (GTK_APPLICATION (app), G_MENU_MODEL (menu));\n"
29423"\n"
29424"  g_signal_connect (quit_action, \n"
29425"                    \"activate\", \n"
29426"                    G_CALLBACK (quit_cb), \n"
29427"                    app);\n"
29428"\n"
29429"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (quit_action));\n"
29430"\n"
29431"}\n"
29432"\n"
29433"\n"
29434"\n"
29435"/* Startup function for the application */\n"
29436"int\n"
29437"main (int argc, char **argv)\n"
29438"{\n"
29439"  GtkApplication *app;\n"
29440"  int status;\n"
29441"\n"
29442"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
29443"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
29444"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
29445"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
29446"  g_object_unref (app);\n"
29447"\n"
29448"  return status;\n"
29449"}\n"
29450
29451#. (itstool) path: item/p
29452#: C/messagedialog.c.page:37
29453msgid "<link href=\"http://developer.gnome.org/gio/stable/GApplication.html\">GApplication</link>"
29454msgstr "<link href=\"http://developer.gnome.org/gio/stable/GApplication.html\">GApplication</link>"
29455
29456#. (itstool) path: item/p
29457#: C/messagedialog.c.page:39
29458msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkMessageDialog.html\">GtkMessageDialog</link>"
29459msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkMessageDialog.html\">GtkMessageDialog</link>"
29460
29461#. (itstool) path: item/p
29462#: C/messagedialog.c.page:40
29463msgid ""
29464"<link href=\"http://developer.gnome.org/gio/stable/GSimpleAction.html#g-simple-action-new\">GSimpleAction</link>"
29465msgstr ""
29466"<link href=\"http://developer.gnome.org/gio/stable/GSimpleAction.html#g-simple-action-new\">GSimpleAction</link>"
29467
29468#. (itstool) path: info/title
29469#: C/messagedialog.js.page:8
29470msgctxt "text"
29471msgid "MessageDialog (JavaScript)"
29472msgstr "MessageDialog(JavaScript)"
29473
29474#. (itstool) path: info/desc
29475#: C/messagedialog.js.page:21
29476msgid "A popup message attached to a window"
29477msgstr "창에 붙여 띄우는 메시지"
29478
29479#. (itstool) path: page/p
29480#: C/messagedialog.js.page:26
29481msgid ""
29482"A MessageDialog is a modal message dialog, which means a popup that you have to respond to before you get back to "
29483"what you were doing in the window that it's attached to. This one can cause the world to explode (or at least it "
29484"says that it can). To make the popup appear when you run this sample, click on \"Message\" inside of its "
29485"application menu -- that's the menu that appears when you click on an application's name in the upper-left screen "
29486"corner, next to Activities."
29487msgstr ""
29488"MessageDialog는 모달 메시지 대화상자인데, 대화상자가 붙어 어떤 일을 하던 창으로 돌아가려면 반드시 응답해야 하는 팝"
29489"업입니다. 이렇게 해서 전세계를 폭발하게 할 수 있습니다(아니면 최소한 그럴 수 있다고 해두죠). 이 예제를 실행할 때 팝"
29490"업을 나타내려면, 프로그램 메뉴의 “Message”를 누르십시오. 좌측 상단 화면 구석에 있는 현재 활동 옆 프로그램 이름을 누"
29491"르면 나타나는 메뉴입니다."
29492
29493#. (itstool) path: note/p
29494#: C/messagedialog.js.page:27
29495msgid ""
29496"The difference between a MessageDialog and a <link xref=\"dialog.js\">Dialog</link> is that a Dialog can contain "
29497"whatever widgets and content you want to put in it, whereas a MessageDialog is just a convenient way to make "
29498"popups appear with a basic message and buttons."
29499msgstr ""
29500"MessageDialog와 <link xref=\"dialog.js\">Dialog</link> 의 차이점은 Dialog는 어떤 위젯이든 넣고 여러분이 넣고 싶은 "
29501"컨텐트를 넣을- 수 있습니다, 다만 MessageDialog는 기본 메시지와 단추로 팝업을 띄우는 편의 수단일 뿐입니다."
29502
29503#. (itstool) path: section/code
29504#: C/messagedialog.js.page:32 C/radiobutton.js.page:29 C/scale.js.page:29 C/spinbutton.js.page:32
29505#: C/statusbar.js.page:29 C/switch.js.page:36 C/togglebutton.js.page:29
29506#, no-wrap
29507msgid ""
29508"\n"
29509"#!/usr/bin/gjs\n"
29510"\n"
29511"const Gio = imports.gi.Gio;\n"
29512"const Gtk = imports.gi.Gtk;\n"
29513"const Lang = imports.lang;\n"
29514msgstr ""
29515"\n"
29516"#!/usr/bin/gjs\n"
29517"\n"
29518"const Gio = imports.gi.Gio;\n"
29519"const Gtk = imports.gi.Gtk;\n"
29520"const Lang = imports.lang;\n"
29521
29522#. (itstool) path: section/code
29523#: C/messagedialog.js.page:44
29524#, no-wrap
29525msgid ""
29526"\n"
29527"const MessageDialogExample = new Lang.Class ({\n"
29528"    Name: 'MessageDialog Example',\n"
29529"\n"
29530"    // Create the application itself\n"
29531"    _init: function () {\n"
29532"        this.application = new Gtk.Application ({\n"
29533"            application_id: 'org.example.jsmessagedialog',\n"
29534"            flags: Gio.ApplicationFlags.FLAGS_NONE });\n"
29535"\n"
29536"        // Connect 'activate' and 'startup' signals to the callback functions\n"
29537"        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
29538"        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
29539"    },\n"
29540"\n"
29541"    // Callback function for 'activate' signal presents windows when active\n"
29542"    _onActivate: function () {\n"
29543"        this._window.present ();\n"
29544"    },\n"
29545"\n"
29546"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
29547"    _onStartup: function () {\n"
29548"        this._initMenus();\n"
29549"        this._buildUI ();\n"
29550"    },\n"
29551msgstr ""
29552"\n"
29553"const MessageDialogExample = new Lang.Class ({\n"
29554"    Name: 'MessageDialog Example',\n"
29555"\n"
29556"    // Create the application itself\n"
29557"    _init: function () {\n"
29558"        this.application = new Gtk.Application ({\n"
29559"            application_id: 'org.example.jsmessagedialog',\n"
29560"            flags: Gio.ApplicationFlags.FLAGS_NONE });\n"
29561"\n"
29562"        // Connect 'activate' and 'startup' signals to the callback functions\n"
29563"        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
29564"        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
29565"    },\n"
29566"\n"
29567"    // Callback function for 'activate' signal presents windows when active\n"
29568"    _onActivate: function () {\n"
29569"        this._window.present ();\n"
29570"    },\n"
29571"\n"
29572"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
29573"    _onStartup: function () {\n"
29574"        this._initMenus();\n"
29575"        this._buildUI ();\n"
29576"    },\n"
29577
29578#. (itstool) path: note/p
29579#: C/messagedialog.js.page:71 C/switch.js.page:76
29580msgid ""
29581"Before we call _buildUI to create the window and the widgets inside it, we need to call _initMenus, which tells "
29582"GNOME to create the menu. We can put the actual code for _initMenus after the code for _buildUI, since it doesn't "
29583"matter what order we put them in so long as _initMenus is called first in _onStartup."
29584msgstr ""
29585"창을 만들고 위젯을 그 안에 넣으려 _buildUI를 호출할 수 있기 전, 그놈에 메뉴를 만들어주라고 지시하는 _initMenus를 호"
29586"출해야합니다. _onStartup에서 _initMenus를 우선 호출하는 동안 어떤 순서로 두는지는 중요하지 않으니, _buildUI 코드 다"
29587"음에 _initMenus의 실제 코드를 둘 수 있습니다."
29588
29589#. (itstool) path: section/code
29590#: C/messagedialog.js.page:72
29591#, no-wrap
29592msgid ""
29593"\n"
29594"    // Build the application's UI\n"
29595"    _buildUI: function () {\n"
29596"\n"
29597"        // Create the application window\n"
29598"        this._window = new Gtk.ApplicationWindow  ({\n"
29599"            application: this.application,\n"
29600"            window_position: Gtk.WindowPosition.CENTER,\n"
29601"            title: \"Gtk.MessageDialog Example\",\n"
29602"            default_height: 200,\n"
29603"            default_width: 400 });\n"
29604msgstr ""
29605"\n"
29606"    // Build the application's UI\n"
29607"    _buildUI: function () {\n"
29608"\n"
29609"        // Create the application window\n"
29610"        this._window = new Gtk.ApplicationWindow  ({\n"
29611"            application: this.application,\n"
29612"            window_position: Gtk.WindowPosition.CENTER,\n"
29613"            title: \"Gtk.MessageDialog Example\",\n"
29614"            default_height: 200,\n"
29615"            default_width: 400 });\n"
29616
29617#. (itstool) path: section/code
29618#: C/messagedialog.js.page:86
29619#, no-wrap
29620msgid ""
29621"\n"
29622"        // Create a silly warning message and add it to the window\n"
29623"        this.warningLabel = new Gtk.Label ({\n"
29624"            label: \"This application goes boom! (Not really.)\"});\n"
29625"        this._window.add (this.warningLabel);\n"
29626msgstr ""
29627"\n"
29628"        // Create a silly warning message and add it to the window\n"
29629"        this.warningLabel = new Gtk.Label ({\n"
29630"            label: \"This application goes boom! (Not really.)\"});\n"
29631"        this._window.add (this.warningLabel);\n"
29632
29633#. (itstool) path: section/p
29634#: C/messagedialog.js.page:92
29635msgid ""
29636"For this example, all that we have in the window the popup comes out of is a silly warning <link xref=\"label.js"
29637"\">Label</link>."
29638msgstr ""
29639"이 예제에서는 창에 모든걸 넣고, 저기에서 띄워줄 문장은 유치한 경고 <link xref=\"label.js\">Label</link>입니다."
29640
29641#. (itstool) path: section/title
29642#: C/messagedialog.js.page:96
29643msgid "Creating the application's menu"
29644msgstr "프로그램 메뉴 만들기"
29645
29646#. (itstool) path: section/code
29647#: C/messagedialog.js.page:97
29648#, no-wrap
29649msgid ""
29650"\n"
29651"    // Build the application menu, including the button that calls the dialog\n"
29652"    _initMenus: function() {\n"
29653"        let menu = new Gio.Menu();\n"
29654"        menu.append(\"Message\",'app.message');\n"
29655"        menu.append(\"Quit\",'app.quit');\n"
29656"        this.application.set_app_menu(menu);\n"
29657"\n"
29658"        // This pops up a MessageDialog when \"Message\" is clicked in the menu\n"
29659"        let messageAction = new Gio.SimpleAction ({ name: 'message' });\n"
29660"        messageAction.connect('activate', Lang.bind(this,\n"
29661"            function() {\n"
29662"                this._showMessageDialog();\n"
29663"            }));\n"
29664"        this.application.add_action(messageAction);\n"
29665"\n"
29666"        // This closes the window when \"Quit\" is clicked in the menu\n"
29667"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
29668"        quitAction.connect('activate', Lang.bind(this,\n"
29669"            function() {\n"
29670"                this._window.destroy();\n"
29671"            }));\n"
29672"        this.application.add_action(quitAction);\n"
29673"    },\n"
29674msgstr ""
29675"\n"
29676"    // Build the application menu, including the button that calls the dialog\n"
29677"    _initMenus: function() {\n"
29678"        let menu = new Gio.Menu();\n"
29679"        menu.append(\"Message\",'app.message');\n"
29680"        menu.append(\"Quit\",'app.quit');\n"
29681"        this.application.set_app_menu(menu);\n"
29682"\n"
29683"        // This pops up a MessageDialog when \"Message\" is clicked in the menu\n"
29684"        let messageAction = new Gio.SimpleAction ({ name: 'message' });\n"
29685"        messageAction.connect('activate', Lang.bind(this,\n"
29686"            function() {\n"
29687"                this._showMessageDialog();\n"
29688"            }));\n"
29689"        this.application.add_action(messageAction);\n"
29690"\n"
29691"        // This closes the window when \"Quit\" is clicked in the menu\n"
29692"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
29693"        quitAction.connect('activate', Lang.bind(this,\n"
29694"            function() {\n"
29695"                this._window.destroy();\n"
29696"            }));\n"
29697"        this.application.add_action(quitAction);\n"
29698"    },\n"
29699
29700#. (itstool) path: section/p
29701#: C/messagedialog.js.page:122
29702msgid ""
29703"Here, we build the <link xref=\"gmenu.js\">GMenu</link> where we'll be putting the \"Message\" button which "
29704"triggers the popup MessageDialog. The GMenu is the menu that appears when you click the application's name in the "
29705"upper-left corner of the screen, next to the Activities menu. Our menu only has two options in it: Message, and "
29706"Quit."
29707msgstr ""
29708"여기서 우리가 나중에 팝업 MessageDialog를 실행할 \"Message\" 단추를 두는 <link xref=\"gmenu.js\">GMenu</link>를 만"
29709"들겠습니다. GMenu는 화면의 좌측 상단, 현재 활동 옆에 프로그램 이름을 눌렀을 때 프로그램 이름을 나타내는 메뉴입니"
29710"다. 우리가 쓰는 메뉴는 옵션을 Message, Quit 두 개만 두었습니다."
29711
29712#. (itstool) path: section/title
29713#: C/messagedialog.js.page:126
29714msgid "Creating the MessageDialog"
29715msgstr "MessageDialog 만들기"
29716
29717#. (itstool) path: section/code
29718#: C/messagedialog.js.page:127
29719#, no-wrap
29720msgid ""
29721"\n"
29722"    _showMessageDialog: function () {\n"
29723"\n"
29724"        // Create a modal MessageDialog whose parent is the window\n"
29725"        this._messageDialog = new Gtk.MessageDialog ({\n"
29726"            transient_for: this._window,\n"
29727"            modal: true,\n"
29728"            buttons: Gtk.ButtonsType.OK_CANCEL,\n"
29729"            message_type: Gtk.MessageType.WARNING,\n"
29730"            text: \"This action will cause the universe to stop existing.\" });\n"
29731"\n"
29732"        this._messageDialog.connect ('response', Lang.bind(this, this._response_cb));\n"
29733"        this._messageDialog.show();\n"
29734"    },\n"
29735msgstr ""
29736"\n"
29737"    _showMessageDialog: function () {\n"
29738"\n"
29739"        // Create a modal MessageDialog whose parent is the window\n"
29740"        this._messageDialog = new Gtk.MessageDialog ({\n"
29741"            transient_for: this._window,\n"
29742"            modal: true,\n"
29743"            buttons: Gtk.ButtonsType.OK_CANCEL,\n"
29744"            message_type: Gtk.MessageType.WARNING,\n"
29745"            text: \"This action will cause the universe to stop existing.\" });\n"
29746"\n"
29747"        this._messageDialog.connect ('response', Lang.bind(this, this._response_cb));\n"
29748"        this._messageDialog.show();\n"
29749"    },\n"
29750
29751#. (itstool) path: section/p
29752#: C/messagedialog.js.page:142
29753msgid ""
29754"To make our MessageDialog a popup attached to the main window, we set its modal property to true and set it to be "
29755"\"transient_for\" _window. After that, we can set what kind of buttons it has and what kind of message it is "
29756"(which determines what icon appears next to the message), and write out the text inside it, before connecting its "
29757"\"response\" signal to the callback function which handles it."
29758msgstr ""
29759"MessageDialog 팝업을 메인 창에 붙이려면, 모달 속성을 True로 설정하고 \"transient_for\" 창을 설정합니다. 다음 단추 "
29760"종류를 설정하고 어떤 메시지를 보여줄지 설정(메시지 옆 아이콘 표시 종류를 결정)할 수 있으며, \"response\" 시그널을 "
29761"처리할 콜백 함수에 연결하기 전에 텍스트를 넣을 수 있습니다."
29762
29763#. (itstool) path: note/p
29764#: C/messagedialog.js.page:143
29765msgid "Here are some resources for making your own MessageDialogs:"
29766msgstr "여기에 MessageDialog를 만들 때 몇가지 참고할 자료가 있습니다:"
29767
29768#. (itstool) path: item/p
29769#: C/messagedialog.js.page:145
29770msgid ""
29771"<link href=\"http://developer.gnome.org/gtk3/stable/GtkMessageDialog.html#GtkButtonsType\">List of button types</"
29772"link>"
29773msgstr ""
29774"<link href=\"http://developer.gnome.org/gtk3/stable/GtkMessageDialog.html#GtkButtonsType\">단추 형식 목록</link>"
29775
29776#. (itstool) path: item/p
29777#: C/messagedialog.js.page:146
29778msgid ""
29779"<link href=\"http://developer.gnome.org/gtk3/stable/GtkMessageDialog.html#GtkMessageType\">List of message types</"
29780"link>"
29781msgstr ""
29782"<link href=\"http://developer.gnome.org/gtk3/stable/GtkMessageDialog.html#GtkMessageType\">메시지 형식 목록</link>"
29783
29784#. (itstool) path: section/code
29785#: C/messagedialog.js.page:150
29786#, no-wrap
29787msgid ""
29788"\n"
29789"    // Callback function (aka signal handler) for the response signal\n"
29790"    _response_cb: function (messagedialog, response_id) {\n"
29791"\n"
29792"        // A simple switch that changes the main window's label\n"
29793"        switch (response_id) {\n"
29794"            case Gtk.ResponseType.OK:\n"
29795"                this.warningLabel.set_label (\"*BOOM*\\n\");\n"
29796"                break;\n"
29797"            case Gtk.ResponseType.CANCEL:\n"
29798"                this.warningLabel.set_label (\"Good choice!\\n\");\n"
29799"                break;\n"
29800"            case Gtk.ResponseType.DELETE_EVENT:\n"
29801"                this.warningLabel.set_label (\"Dialog closed or cancelled.\\n\");\n"
29802"                break;\n"
29803"        }\n"
29804"\n"
29805"        this._messageDialog.destroy();\n"
29806"\n"
29807"    }\n"
29808"\n"
29809"});\n"
29810msgstr ""
29811"\n"
29812"    // Callback function (aka signal handler) for the response signal\n"
29813"    _response_cb: function (messagedialog, response_id) {\n"
29814"\n"
29815"        // A simple switch that changes the main window's label\n"
29816"        switch (response_id) {\n"
29817"            case Gtk.ResponseType.OK:\n"
29818"                this.warningLabel.set_label (\"*BOOM*\\n\");\n"
29819"                break;\n"
29820"            case Gtk.ResponseType.CANCEL:\n"
29821"                this.warningLabel.set_label (\"Good choice!\\n\");\n"
29822"                break;\n"
29823"            case Gtk.ResponseType.DELETE_EVENT:\n"
29824"                this.warningLabel.set_label (\"Dialog closed or cancelled.\\n\");\n"
29825"                break;\n"
29826"        }\n"
29827"\n"
29828"        this._messageDialog.destroy();\n"
29829"\n"
29830"    }\n"
29831"\n"
29832"});\n"
29833
29834#. (itstool) path: section/p
29835#: C/messagedialog.js.page:173
29836msgid ""
29837"This function takes two parameters, the MessageDialog and its response_id, both of which are automatically "
29838"supplied (you don't have to manually pass them to it for it to work). Here we use a simple switch to change the "
29839"\"warning label\"'s text, depending on which option you select. The DELETE_EVENT occurs if you press Escape to "
29840"cancel the MessageDialog, instead of clicking OK or Cancel. Whatever you select, the popup is destroyed afterwards."
29841msgstr ""
29842"이 함수에는 MessageDialog와 response_id 두 매개변수가 있는데, 두 매개 변수 값은 자동으로 들어갑니다(동작하게 할 때 "
29843"직접 넣을 필요는 없습니다). 여기서, 선택한 옵션에 따라 “warning label”의 텍스트를 바꾸는 간단한 스위치를 사용하겠습"
29844"니다. DELETE_EVENT는 확인 또는 취소를 누르는 대신 MessageDialog 처리를 취소하려고 Escape 키를 누를 경우 발생합니"
29845"다. 무얼 선택하든지간에 팝업은 나중에 해체됩니다."
29846
29847#. (itstool) path: section/code
29848#: C/messagedialog.js.page:175
29849#, no-wrap
29850msgid ""
29851"\n"
29852"// Run the application\n"
29853"let app = new MessageDialogExample ();\n"
29854"app.application.run (ARGV);\n"
29855msgstr ""
29856"\n"
29857"// Run the application\n"
29858"let app = new MessageDialogExample ();\n"
29859"app.application.run (ARGV);\n"
29860
29861#. (itstool) path: section/p
29862#: C/messagedialog.js.page:180
29863msgid ""
29864"Finally, we create a new instance of the finished MessageDialogExample class, and set the application running."
29865msgstr "마지막으로 작성을 끝낸 MessageDialogExample 클래스의 새 인스턴스를 만들고 프로그램 실행을 설정하겠습니다."
29866
29867#. (itstool) path: section/code
29868#: C/messagedialog.js.page:185
29869#, no-wrap
29870msgid ""
29871"#!/usr/bin/gjs\n"
29872"\n"
29873"imports.gi.versions.Gtk = '3.0';\n"
29874"\n"
29875"const Gio = imports.gi.Gio;\n"
29876"const Gtk = imports.gi.Gtk;\n"
29877"\n"
29878"class MessageDialogExample {\n"
29879"\n"
29880"    // Create the application itself\n"
29881"    constructor() {\n"
29882"        this.application = new Gtk.Application({\n"
29883"            application_id: 'org.example.jsmessagedialog',\n"
29884"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
29885"        });\n"
29886"\n"
29887"        // Connect 'activate' and 'startup' signals to the callback functions\n"
29888"        this.application.connect('activate', this._onActivate.bind(this));\n"
29889"        this.application.connect('startup', this._onStartup.bind(this));\n"
29890"    }\n"
29891"\n"
29892"    // Callback function for 'activate' signal presents windows when active\n"
29893"    _onActivate() {\n"
29894"        this._window.present();\n"
29895"    }\n"
29896"\n"
29897"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
29898"    _onStartup() {\n"
29899"        this._initMenus();\n"
29900"        this._buildUI ();\n"
29901"    }\n"
29902"\n"
29903"    // Build the application's UI\n"
29904"    _buildUI() {\n"
29905"\n"
29906"        // Create the application window\n"
29907"        this._window = new Gtk.ApplicationWindow({\n"
29908"            application: this.application,\n"
29909"            window_position: Gtk.WindowPosition.CENTER,\n"
29910"            title: \"Gtk.MessageDialog Example\",\n"
29911"            default_height: 200,\n"
29912"            default_width: 400\n"
29913"        });\n"
29914"\n"
29915"        // Create a silly warning message and add it to the window\n"
29916"        this.warningLabel = new Gtk.Label({\n"
29917"            label: \"This application goes boom! (Not really.)\"\n"
29918"        });\n"
29919"        this._window.add (this.warningLabel);\n"
29920"\n"
29921"        // Show the window and all child widgets\n"
29922"        this._window.show_all();\n"
29923"    }\n"
29924"\n"
29925"    // Build the application menu, including the button that calls the dialog\n"
29926"    _initMenus() {\n"
29927"        let menu = new Gio.Menu();\n"
29928"        menu.append(\"Message\",'app.message');\n"
29929"        menu.append(\"Quit\",'app.quit');\n"
29930"        this.application.set_app_menu(menu);\n"
29931"\n"
29932"        // This pops up a MessageDialog when \"Message\" is clicked in the menu\n"
29933"        let messageAction = new Gio.SimpleAction ({ name: 'message' });\n"
29934"        messageAction.connect('activate', () =&gt; { this._showMessageDialog(); });\n"
29935"        this.application.add_action(messageAction);\n"
29936"\n"
29937"        // This closes the window when \"Quit\" is clicked in the menu\n"
29938"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
29939"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
29940"        this.application.add_action(quitAction);\n"
29941"    }\n"
29942"\n"
29943"    _showMessageDialog() {\n"
29944"\n"
29945"        // Create a modal MessageDialog whose parent is the window\n"
29946"        this._messageDialog = new Gtk.MessageDialog ({\n"
29947"            transient_for: this._window,\n"
29948"            modal: true,\n"
29949"            buttons: Gtk.ButtonsType.OK_CANCEL,\n"
29950"            message_type: Gtk.MessageType.WARNING,\n"
29951"            text: \"This action will cause the universe to stop existing.\" });\n"
29952"\n"
29953"        this._messageDialog.connect ('response', this._response_cb.bind(this));\n"
29954"        this._messageDialog.show();\n"
29955"    }\n"
29956"\n"
29957"    // Callback function (aka signal handler) for the response signal\n"
29958"    _response_cb(messagedialog, response_id) {\n"
29959"\n"
29960"        // A simple switch that changes the main window's label\n"
29961"        switch (response_id) {\n"
29962"            case Gtk.ResponseType.OK:\n"
29963"                this.warningLabel.set_label (\"*BOOM*\\n\");\n"
29964"                break;\n"
29965"            case Gtk.ResponseType.CANCEL:\n"
29966"                this.warningLabel.set_label (\"Good choice!\\n\");\n"
29967"                break;\n"
29968"            case Gtk.ResponseType.DELETE_EVENT:\n"
29969"                this.warningLabel.set_label (\"Dialog closed or cancelled.\\n\");\n"
29970"                break;\n"
29971"        }\n"
29972"\n"
29973"        this._messageDialog.destroy();\n"
29974"\n"
29975"    }\n"
29976"};\n"
29977"\n"
29978"// Run the application\n"
29979"let app = new MessageDialogExample ();\n"
29980"app.application.run (ARGV);\n"
29981msgstr ""
29982"#!/usr/bin/gjs\n"
29983"\n"
29984"imports.gi.versions.Gtk = '3.0';\n"
29985"\n"
29986"const Gio = imports.gi.Gio;\n"
29987"const Gtk = imports.gi.Gtk;\n"
29988"\n"
29989"class MessageDialogExample {\n"
29990"\n"
29991"    // Create the application itself\n"
29992"    constructor() {\n"
29993"        this.application = new Gtk.Application({\n"
29994"            application_id: 'org.example.jsmessagedialog',\n"
29995"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
29996"        });\n"
29997"\n"
29998"        // Connect 'activate' and 'startup' signals to the callback functions\n"
29999"        this.application.connect('activate', this._onActivate.bind(this));\n"
30000"        this.application.connect('startup', this._onStartup.bind(this));\n"
30001"    }\n"
30002"\n"
30003"    // Callback function for 'activate' signal presents windows when active\n"
30004"    _onActivate() {\n"
30005"        this._window.present();\n"
30006"    }\n"
30007"\n"
30008"    // Callback function for 'startup' signal initializes menus and builds the UI\n"
30009"    _onStartup() {\n"
30010"        this._initMenus();\n"
30011"        this._buildUI ();\n"
30012"    }\n"
30013"\n"
30014"    // Build the application's UI\n"
30015"    _buildUI() {\n"
30016"\n"
30017"        // Create the application window\n"
30018"        this._window = new Gtk.ApplicationWindow({\n"
30019"            application: this.application,\n"
30020"            window_position: Gtk.WindowPosition.CENTER,\n"
30021"            title: \"Gtk.MessageDialog Example\",\n"
30022"            default_height: 200,\n"
30023"            default_width: 400\n"
30024"        });\n"
30025"\n"
30026"        // Create a silly warning message and add it to the window\n"
30027"        this.warningLabel = new Gtk.Label({\n"
30028"            label: \"This application goes boom! (Not really.)\"\n"
30029"        });\n"
30030"        this._window.add (this.warningLabel);\n"
30031"\n"
30032"        // Show the window and all child widgets\n"
30033"        this._window.show_all();\n"
30034"    }\n"
30035"\n"
30036"    // Build the application menu, including the button that calls the dialog\n"
30037"    _initMenus() {\n"
30038"        let menu = new Gio.Menu();\n"
30039"        menu.append(\"Message\",'app.message');\n"
30040"        menu.append(\"Quit\",'app.quit');\n"
30041"        this.application.set_app_menu(menu);\n"
30042"\n"
30043"        // This pops up a MessageDialog when \"Message\" is clicked in the menu\n"
30044"        let messageAction = new Gio.SimpleAction ({ name: 'message' });\n"
30045"        messageAction.connect('activate', () =&gt; { this._showMessageDialog(); });\n"
30046"        this.application.add_action(messageAction);\n"
30047"\n"
30048"        // This closes the window when \"Quit\" is clicked in the menu\n"
30049"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
30050"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
30051"        this.application.add_action(quitAction);\n"
30052"    }\n"
30053"\n"
30054"    _showMessageDialog() {\n"
30055"\n"
30056"        // Create a modal MessageDialog whose parent is the window\n"
30057"        this._messageDialog = new Gtk.MessageDialog ({\n"
30058"            transient_for: this._window,\n"
30059"            modal: true,\n"
30060"            buttons: Gtk.ButtonsType.OK_CANCEL,\n"
30061"            message_type: Gtk.MessageType.WARNING,\n"
30062"            text: \"This action will cause the universe to stop existing.\" });\n"
30063"\n"
30064"        this._messageDialog.connect ('response', this._response_cb.bind(this));\n"
30065"        this._messageDialog.show();\n"
30066"    }\n"
30067"\n"
30068"    // Callback function (aka signal handler) for the response signal\n"
30069"    _response_cb(messagedialog, response_id) {\n"
30070"\n"
30071"        // A simple switch that changes the main window's label\n"
30072"        switch (response_id) {\n"
30073"            case Gtk.ResponseType.OK:\n"
30074"                this.warningLabel.set_label (\"*BOOM*\\n\");\n"
30075"                break;\n"
30076"            case Gtk.ResponseType.CANCEL:\n"
30077"                this.warningLabel.set_label (\"Good choice!\\n\");\n"
30078"                break;\n"
30079"            case Gtk.ResponseType.DELETE_EVENT:\n"
30080"                this.warningLabel.set_label (\"Dialog closed or cancelled.\\n\");\n"
30081"                break;\n"
30082"        }\n"
30083"\n"
30084"        this._messageDialog.destroy();\n"
30085"\n"
30086"    }\n"
30087"};\n"
30088"\n"
30089"// Run the application\n"
30090"let app = new MessageDialogExample ();\n"
30091"app.application.run (ARGV);\n"
30092
30093#. (itstool) path: info/title
30094#: C/messagedialog.py.page:8
30095msgctxt "text"
30096msgid "MessageDialog (Python)"
30097msgstr "MessageDialog(Python)"
30098
30099#. (itstool) path: page/p
30100#: C/messagedialog.py.page:24
30101msgid "A message dialog which prints messages on the terminal, depending on your choices."
30102msgstr "선택에 따라 메시지를 터미널에 출력하는 메시지 대화 상자입니다."
30103
30104#. (itstool) path: section/code
30105#: C/messagedialog.py.page:31
30106#, no-wrap
30107msgid ""
30108"from gi.repository import Gtk\n"
30109"from gi.repository import Gio\n"
30110"import sys\n"
30111"\n"
30112"\n"
30113"class MyWindow(Gtk.ApplicationWindow):\n"
30114"\n"
30115"    # constructor for a window (the parent window) with a label\n"
30116"    def __init__(self, app):\n"
30117"        Gtk.Window.__init__(self, title=\"GMenu Example\", application=app)\n"
30118"        self.set_default_size(400, 200)\n"
30119"        label = Gtk.Label()\n"
30120"        label.set_text(\"This application goes boom!\")\n"
30121"        self.add(label)\n"
30122"\n"
30123"        # create the message_action (a Gio.SimpleAction) - for the window\n"
30124"        message_action = Gio.SimpleAction.new(\"message\", None)\n"
30125"        # connect the signal from the action to the function message_cb()\n"
30126"        message_action.connect(\"activate\", self.message_cb)\n"
30127"        # add the action to the application\n"
30128"        app.add_action(message_action)\n"
30129"\n"
30130"    # callback function for the signal \"activate\" from the message_action\n"
30131"    # in the menu of the parent window\n"
30132"    def message_cb(self, action, parameter):\n"
30133"        # a Gtk.MessageDialog\n"
30134"        messagedialog = Gtk.MessageDialog(parent=self,\n"
30135"                                          flags=Gtk.DialogFlags.MODAL,\n"
30136"                                          type=Gtk.MessageType.WARNING,\n"
30137"                                          buttons=Gtk.ButtonsType.OK_CANCEL,\n"
30138"                                          message_format=\"This action will cause the universe to stop existing.\")\n"
30139"        # connect the response (of the button clicked) to the function\n"
30140"        # dialog_response()\n"
30141"        messagedialog.connect(\"response\", self.dialog_response)\n"
30142"        # show the messagedialog\n"
30143"        messagedialog.show()\n"
30144"\n"
30145"    def dialog_response(self, widget, response_id):\n"
30146"        # if the button clicked gives response OK (-5)\n"
30147"        if response_id == Gtk.ResponseType.OK:\n"
30148"            print(\"*boom*\")\n"
30149"        # if the button clicked gives response CANCEL (-6)\n"
30150"        elif response_id == Gtk.ResponseType.CANCEL:\n"
30151"            print(\"good choice\")\n"
30152"        # if the messagedialog is destroyed (by pressing ESC)\n"
30153"        elif response_id == Gtk.ResponseType.DELETE_EVENT:\n"
30154"            print(\"dialog closed or cancelled\")\n"
30155"        # finally, destroy the messagedialog\n"
30156"        widget.destroy()\n"
30157"\n"
30158"\n"
30159"class MyApplication(Gtk.Application):\n"
30160"\n"
30161"    def __init__(self):\n"
30162"        Gtk.Application.__init__(self)\n"
30163"\n"
30164"    def do_activate(self):\n"
30165"        win = MyWindow(self)\n"
30166"        win.show_all()\n"
30167"\n"
30168"    def quit_cb(self, action, parameter):\n"
30169"        self.quit()\n"
30170"\n"
30171"    def do_startup(self):\n"
30172"        Gtk.Application.do_startup(self)\n"
30173"\n"
30174"        # create a menu (a Gio.Menu)\n"
30175"        menu = Gio.Menu()\n"
30176"        # append a menu item with label \"Message\" and action \"app.message\"\n"
30177"        menu.append(\"Message\", \"app.message\")\n"
30178"        # append a menu item with label \"Quit\" and action \"app.quit\"\n"
30179"        menu.append(\"Quit\", \"app.quit\")\n"
30180"        # set menu as the menu for the application\n"
30181"        self.set_app_menu(menu)\n"
30182"\n"
30183"        # a new simpleaction - for the application\n"
30184"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
30185"        quit_action.connect(\"activate\", self.quit_cb)\n"
30186"        self.add_action(quit_action)\n"
30187"\n"
30188"app = MyApplication()\n"
30189"exit_status = app.run(sys.argv)\n"
30190"sys.exit(exit_status)\n"
30191msgstr ""
30192"from gi.repository import Gtk\n"
30193"from gi.repository import Gio\n"
30194"import sys\n"
30195"\n"
30196"\n"
30197"class MyWindow(Gtk.ApplicationWindow):\n"
30198"\n"
30199"    # constructor for a window (the parent window) with a label\n"
30200"    def __init__(self, app):\n"
30201"        Gtk.Window.__init__(self, title=\"GMenu Example\", application=app)\n"
30202"        self.set_default_size(400, 200)\n"
30203"        label = Gtk.Label()\n"
30204"        label.set_text(\"This application goes boom!\")\n"
30205"        self.add(label)\n"
30206"\n"
30207"        # create the message_action (a Gio.SimpleAction) - for the window\n"
30208"        message_action = Gio.SimpleAction.new(\"message\", None)\n"
30209"        # connect the signal from the action to the function message_cb()\n"
30210"        message_action.connect(\"activate\", self.message_cb)\n"
30211"        # add the action to the application\n"
30212"        app.add_action(message_action)\n"
30213"\n"
30214"    # callback function for the signal \"activate\" from the message_action\n"
30215"    # in the menu of the parent window\n"
30216"    def message_cb(self, action, parameter):\n"
30217"        # a Gtk.MessageDialog\n"
30218"        messagedialog = Gtk.MessageDialog(parent=self,\n"
30219"                                          flags=Gtk.DialogFlags.MODAL,\n"
30220"                                          type=Gtk.MessageType.WARNING,\n"
30221"                                          buttons=Gtk.ButtonsType.OK_CANCEL,\n"
30222"                                          message_format=\"This action will cause the universe to stop existing.\")\n"
30223"        # connect the response (of the button clicked) to the function\n"
30224"        # dialog_response()\n"
30225"        messagedialog.connect(\"response\", self.dialog_response)\n"
30226"        # show the messagedialog\n"
30227"        messagedialog.show()\n"
30228"\n"
30229"    def dialog_response(self, widget, response_id):\n"
30230"        # if the button clicked gives response OK (-5)\n"
30231"        if response_id == Gtk.ResponseType.OK:\n"
30232"            print(\"*boom*\")\n"
30233"        # if the button clicked gives response CANCEL (-6)\n"
30234"        elif response_id == Gtk.ResponseType.CANCEL:\n"
30235"            print(\"good choice\")\n"
30236"        # if the messagedialog is destroyed (by pressing ESC)\n"
30237"        elif response_id == Gtk.ResponseType.DELETE_EVENT:\n"
30238"            print(\"dialog closed or cancelled\")\n"
30239"        # finally, destroy the messagedialog\n"
30240"        widget.destroy()\n"
30241"\n"
30242"\n"
30243"class MyApplication(Gtk.Application):\n"
30244"\n"
30245"    def __init__(self):\n"
30246"        Gtk.Application.__init__(self)\n"
30247"\n"
30248"    def do_activate(self):\n"
30249"        win = MyWindow(self)\n"
30250"        win.show_all()\n"
30251"\n"
30252"    def quit_cb(self, action, parameter):\n"
30253"        self.quit()\n"
30254"\n"
30255"    def do_startup(self):\n"
30256"        Gtk.Application.do_startup(self)\n"
30257"\n"
30258"        # create a menu (a Gio.Menu)\n"
30259"        menu = Gio.Menu()\n"
30260"        # append a menu item with label \"Message\" and action \"app.message\"\n"
30261"        menu.append(\"Message\", \"app.message\")\n"
30262"        # append a menu item with label \"Quit\" and action \"app.quit\"\n"
30263"        menu.append(\"Quit\", \"app.quit\")\n"
30264"        # set menu as the menu for the application\n"
30265"        self.set_app_menu(menu)\n"
30266"\n"
30267"        # a new simpleaction - for the application\n"
30268"        quit_action = Gio.SimpleAction.new(\"quit\", None)\n"
30269"        quit_action.connect(\"activate\", self.quit_cb)\n"
30270"        self.add_action(quit_action)\n"
30271"\n"
30272"app = MyApplication()\n"
30273"exit_status = app.run(sys.argv)\n"
30274"sys.exit(exit_status)\n"
30275
30276#. (itstool) path: section/title
30277#: C/messagedialog.py.page:36
30278msgid "Useful methods for a MessageDialog widget"
30279msgstr "MessageDialog 위젯에 쓸만한 메서드"
30280
30281#. (itstool) path: section/p
30282#: C/messagedialog.py.page:37
30283msgid ""
30284"In line 18 the signal <code>\"activate\"</code> is connected to the callback function <code>message_cb()</code> "
30285"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
30286"\"signals-callbacks.py\"/> for a more detailed explanation."
30287msgstr ""
30288"18번째 줄에서 <code>\"activate\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
30289"function</var>)</code> 함수로  <code>message_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
30290"\"signals-callbacks.py\"/>를 참조하십시오."
30291
30292#. (itstool) path: item/p
30293#: C/messagedialog.py.page:39
30294msgid ""
30295"In the constructor of MessageDialog we could set flags as <code>Gtk.DialogFlags.DESTROY_WITH_PARENT</code> (to "
30296"destroy the messagedialog window when its parent window is destroyed) or as <code>Gtk.DialogFlags.MODAL</code> (no "
30297"interaction with other windows of the application)."
30298msgstr ""
30299"MessageDialog 생성자에서 <code>Gtk.DialogFlags.DESTROY_WITH_PARENT</code> 플래그(상위 창을 해체할 때 messagedialog "
30300"창을 해체) 또는 <code>Gtk.DialogFlags.MODAL</code> 플래그(프로그램의 다른 창과 동작하지 않음)을 설정할 수 있습니다."
30301
30302#. (itstool) path: item/p
30303#: C/messagedialog.py.page:40
30304msgid ""
30305"In the constructor of MessageDialog we could set type as any of <code>Gtk.MessageType.INFO, Gtk.MessageType."
30306"WARNING, Gtk.MessageType.QUESTION, Gtk.MessageType.ERROR, Gtk.MessageType.OTHER</code> depending on what type of "
30307"message we want."
30308msgstr ""
30309"MessageDialog 생성자에서 원하는 메시지 형식에 따라 <code>Gtk.MessageType.INFO, Gtk.MessageType.WARNING, Gtk."
30310"MessageType.QUESTION, Gtk.MessageType.ERROR, Gtk.MessageType.OTHER</code> 중 하나를 설정할 수 있습니다."
30311
30312#. (itstool) path: item/p
30313#: C/messagedialog.py.page:41
30314msgid ""
30315"In the constructor of MessageDialog we could set buttons as any of <code>Gtk.ButtonsType.NONE, Gtk.ButtonsType.OK, "
30316"Gtk.ButtonsType.CLOSE, Gtk.ButtonsType.CANCEL, Gtk.ButtonsType.YES_NO, Gtk.ButtonsType.OK_CANCEL</code>, or any "
30317"button using <code>add_button()</code> as in Gtk.Dialog."
30318msgstr ""
30319"MessageDialog 생성자에서 <code>Gtk.ButtonsType.NONE, Gtk.ButtonsType.OK, Gtk.ButtonsType.CLOSE, Gtk.ButtonsType."
30320"CANCEL, Gtk.ButtonsType.YES_NO, Gtk.ButtonsType.OK_CANCEL</code> 또는 Gtk.Dialog에서와 같이 <code>add_button()</"
30321"code>를 활용한 그 어떤 요소든 단추로 설정할 수 있습니다."
30322
30323#. (itstool) path: item/p
30324#: C/messagedialog.py.page:42
30325msgid "We could substitute the default image of the MessageDialog with another image using"
30326msgstr "다른 그림을 활용하여 MessageDialog의 기본 그림을 대신할 수 있습니다."
30327
30328#. (itstool) path: item/code
30329#: C/messagedialog.py.page:43
30330#, no-wrap
30331msgid ""
30332"\n"
30333"image = Gtk.Image()\n"
30334"image.set_from_stock(Gtk.STOCK_CAPS_LOCK_WARNING, Gtk.IconSize.DIALOG)\n"
30335"image.show()\n"
30336"messagedialog.set_image(image)"
30337msgstr ""
30338"\n"
30339"image = Gtk.Image()\n"
30340"image.set_from_stock(Gtk.STOCK_CAPS_LOCK_WARNING, Gtk.IconSize.DIALOG)\n"
30341"image.show()\n"
30342"messagedialog.set_image(image)"
30343
30344#. (itstool) path: item/p
30345#: C/messagedialog.py.page:48
30346msgid ""
30347"where <code>Gtk.STOCK_CAPS_LOCK_WARNING</code> is any image from <link href=\"http://developer.gnome.org/gtk3/"
30348"unstable/gtk3-Stock-Items.html\">Stock Items</link>. We could also set any image as in the Image widget, as "
30349"<code>image.set_from_file(\"filename.png\")</code>."
30350msgstr ""
30351"<code>Gtk.STOCK_CAPS_LOCK_WARNING</code>은 <link href=\"http://developer.gnome.org/gtk3/unstable/gtk3-Stock-Items."
30352"html\">스톡 항목</link>의 그림입니다. <code>image.set_from_file(\"filename.png\")</code> 코드로 그림 위젯처럼 어떤 "
30353"그림이든 설정할 수 있습니다."
30354
30355#. (itstool) path: item/p
30356#: C/messagedialog.py.page:49
30357msgid ""
30358"<code>format_secondary_text(\"some secondary message\")</code> sets a secondary message. The primary text becomes "
30359"bold."
30360msgstr ""
30361"<code>format_secondary_text(\"some secondary message\")</code>는 부차적인 메시지를 설정합니다. 주 텍스트는 굵은 글"
30362"씨로 나타납니다."
30363
30364#. (itstool) path: item/p
30365#: C/messagedialog.py.page:59
30366msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMessageDialog.html\">GtkMessageDialog</link>"
30367msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkMessageDialog.html\">GtkMessageDialog</link>"
30368
30369#. (itstool) path: item/p
30370#: C/messagedialog.py.page:63
30371msgid "<link href=\"http://developer.gnome.org/gio/unstable/GActionMap.html\">GActionMap</link>"
30372msgstr "<link href=\"http://developer.gnome.org/gio/unstable/GActionMap.html\">GActionMap</link>"
30373
30374#. (itstool) path: info/title
30375#: C/messagedialog.vala.page:8
30376msgctxt "text"
30377msgid "MessageDialog (Vala)"
30378msgstr "MessageDialog(Vala)"
30379
30380#. (itstool) path: page/code
30381#: C/messagedialog.vala.page:25
30382#, no-wrap
30383msgid ""
30384"\n"
30385"//A window in the application\n"
30386"public class Window : Gtk.ApplicationWindow {\n"
30387"\tpublic Window (Application app) {\n"
30388"\t\tObject (application: app, title: \"Gtk.MessageDialog Example\");\n"
30389"\n"
30390"\t\tvar label = new Gtk.Label (\"This application goes boom!\");\n"
30391"\t\tthis.add (label);\n"
30392"\n"
30393"\t\tvar message_action = new SimpleAction (\"message\", null);\n"
30394"\t\tmessage_action.activate.connect (message);\n"
30395"\t\tthis.add_action (message_action);\n"
30396"\n"
30397"\t\tthis.set_default_size (400, 200);\n"
30398"\t\tthis.show_all ();\n"
30399"\t}\n"
30400"\n"
30401"\tvoid dialog_response (Gtk.Dialog dialog, int response_id) {\n"
30402"\t\tswitch (response_id) {\n"
30403"\t\t\tcase Gtk.ResponseType.OK:\n"
30404"\t\t\t\tprint (\"*boom*\\n\");\n"
30405"\t\t\t\tbreak;\n"
30406"\t\t\tcase Gtk.ResponseType.CANCEL:\n"
30407"\t\t\t\tprint (\"good choice\\n\");\n"
30408"\t\t\t\tbreak;\n"
30409"\t\t\tcase Gtk.ResponseType.DELETE_EVENT:\n"
30410"\t\t\t\tprint (\"dialog closed or cancelled\\n\");\n"
30411"\t\t\t\tbreak;\n"
30412"\t\t}\n"
30413"\t\t\tdialog.destroy();\n"
30414"\t}\n"
30415"\n"
30416"\tvoid message (SimpleAction simple, Variant? parameter) {\n"
30417"\t\tvar messagedialog = new Gtk.MessageDialog (this,\n"
30418"                            Gtk.DialogFlags.MODAL,\n"
30419"                            Gtk.MessageType.WARNING,\n"
30420"                            Gtk.ButtonsType.OK_CANCEL,\n"
30421"                            \"This action will cause the universe to stop existing.\");\n"
30422"\n"
30423"\t\tmessagedialog.response.connect (dialog_response);\n"
30424"\t\tmessagedialog.show ();\n"
30425"\t}\n"
30426"}\n"
30427"\n"
30428"//This is the Application\n"
30429"public class Application : Gtk.Application {\n"
30430"\tprotected override void activate () {\n"
30431"\t\tnew Window (this);\n"
30432"\t}\n"
30433"\n"
30434"\tprotected override void startup () {\n"
30435"\t\tbase.startup ();\n"
30436"\n"
30437"\t\tvar menu = new Menu ();\n"
30438"\t\tmenu.append (\"Message\", \"win.message\");\n"
30439"\t\tmenu.append (\"Quit\", \"app.quit\");\n"
30440"\t\tthis.app_menu = menu;\n"
30441"\n"
30442"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
30443"\t\t//quit_action.activate.connect (this.quit);\n"
30444"\t\tthis.add_action (quit_action);\n"
30445"\t}\n"
30446"\n"
30447"\tpublic Application () {\n"
30448"\t\tObject (application_id: \"org.example.application\");\n"
30449"\t}\n"
30450"}\n"
30451"\n"
30452"//main function creates Application and runs it\n"
30453"int main (string[] args) {\n"
30454"\treturn new Application ().run (args);\n"
30455"}\n"
30456msgstr ""
30457"\n"
30458"//A window in the application\n"
30459"public class Window : Gtk.ApplicationWindow {\n"
30460"\tpublic Window (Application app) {\n"
30461"\t\tObject (application: app, title: \"Gtk.MessageDialog Example\");\n"
30462"\n"
30463"\t\tvar label = new Gtk.Label (\"This application goes boom!\");\n"
30464"\t\tthis.add (label);\n"
30465"\n"
30466"\t\tvar message_action = new SimpleAction (\"message\", null);\n"
30467"\t\tmessage_action.activate.connect (message);\n"
30468"\t\tthis.add_action (message_action);\n"
30469"\n"
30470"\t\tthis.set_default_size (400, 200);\n"
30471"\t\tthis.show_all ();\n"
30472"\t}\n"
30473"\n"
30474"\tvoid dialog_response (Gtk.Dialog dialog, int response_id) {\n"
30475"\t\tswitch (response_id) {\n"
30476"\t\t\tcase Gtk.ResponseType.OK:\n"
30477"\t\t\t\tprint (\"*boom*\\n\");\n"
30478"\t\t\t\tbreak;\n"
30479"\t\t\tcase Gtk.ResponseType.CANCEL:\n"
30480"\t\t\t\tprint (\"good choice\\n\");\n"
30481"\t\t\t\tbreak;\n"
30482"\t\t\tcase Gtk.ResponseType.DELETE_EVENT:\n"
30483"\t\t\t\tprint (\"dialog closed or cancelled\\n\");\n"
30484"\t\t\t\tbreak;\n"
30485"\t\t}\n"
30486"\t\t\tdialog.destroy();\n"
30487"\t}\n"
30488"\n"
30489"\tvoid message (SimpleAction simple, Variant? parameter) {\n"
30490"\t\tvar messagedialog = new Gtk.MessageDialog (this,\n"
30491"                            Gtk.DialogFlags.MODAL,\n"
30492"                            Gtk.MessageType.WARNING,\n"
30493"                            Gtk.ButtonsType.OK_CANCEL,\n"
30494"                            \"This action will cause the universe to stop existing.\");\n"
30495"\n"
30496"\t\tmessagedialog.response.connect (dialog_response);\n"
30497"\t\tmessagedialog.show ();\n"
30498"\t}\n"
30499"}\n"
30500"\n"
30501"//This is the Application\n"
30502"public class Application : Gtk.Application {\n"
30503"\tprotected override void activate () {\n"
30504"\t\tnew Window (this);\n"
30505"\t}\n"
30506"\n"
30507"\tprotected override void startup () {\n"
30508"\t\tbase.startup ();\n"
30509"\n"
30510"\t\tvar menu = new Menu ();\n"
30511"\t\tmenu.append (\"Message\", \"win.message\");\n"
30512"\t\tmenu.append (\"Quit\", \"app.quit\");\n"
30513"\t\tthis.app_menu = menu;\n"
30514"\n"
30515"\t\tvar quit_action = new SimpleAction (\"quit\", null);\n"
30516"\t\t//quit_action.activate.connect (this.quit);\n"
30517"\t\tthis.add_action (quit_action);\n"
30518"\t}\n"
30519"\n"
30520"\tpublic Application () {\n"
30521"\t\tObject (application_id: \"org.example.application\");\n"
30522"\t}\n"
30523"}\n"
30524"\n"
30525"//main function creates Application and runs it\n"
30526"int main (string[] args) {\n"
30527"\treturn new Application ().run (args);\n"
30528"}\n"
30529
30530#. (itstool) path: item/p
30531#: C/messagedialog.vala.page:31
30532msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ResponseType.html\">Gtk.ResponseType</link>"
30533msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ResponseType.html\">Gtk.ResponseType</link>"
30534
30535#. (itstool) path: item/p
30536#: C/messagedialog.vala.page:32
30537msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.MessageDialog.html\">Gtk.MessageDialog</link>"
30538msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.MessageDialog.html\">Gtk.MessageDialog</link>"
30539
30540#. (itstool) path: item/p
30541#: C/messagedialog.vala.page:33
30542msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.DialogFlags.html\">Gtk.DialogFlags</link>"
30543msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.DialogFlags.html\">Gtk.DialogFlags</link>"
30544
30545#. (itstool) path: item/p
30546#: C/messagedialog.vala.page:34
30547msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.MessageType.html\">Gtk.MessageType</link>"
30548msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.MessageType.html\">Gtk.MessageType</link>"
30549
30550#. (itstool) path: item/p
30551#: C/messagedialog.vala.page:35
30552msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ButtonsType.html\">Gtk.ButtonsType</link>"
30553msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ButtonsType.html\">Gtk.ButtonsType</link>"
30554
30555#. (itstool) path: info/title
30556#: C/model-view-controller.py.page:9
30557msgctxt "text"
30558msgid "The Model/View/Controller design (Python)"
30559msgstr "모델/뷰/컨트롤러 설계(Python)"
30560
30561#. (itstool) path: info/desc
30562#. (itstool) path: page/title
30563#: C/model-view-controller.py.page:14 C/model-view-controller.py.page:27
30564msgid "The Model/View/Controller design"
30565msgstr "MessageDialog"
30566
30567#. (itstool) path: section/title
30568#: C/model-view-controller.py.page:32 C/properties.py.page:32 C/signals-callbacks.py.page:32
30569msgid "Overview"
30570msgstr "개요"
30571
30572#. (itstool) path: section/p
30573#: C/model-view-controller.py.page:34
30574msgid ""
30575"Both the <link xref=\"treeview_simple_liststore.py\">TreeView</link> and the <link xref=\"combobox.py\">ComboBox</"
30576"link> widgets are built on the <em>Model/View/Controller</em> design. The <em>Model</em> (an implementation of "
30577"<code>Gtk.TreeModel</code>, usually <code>Gtk.TreeStore</code> or <code>Gtk.ListStore</code>) stores the data; the "
30578"<em>View</em> (e.g. <code>Gtk.TreeView</code>, <code>Gtk.ComboBox</code>, or <code>Gtk.ComboBoxText</code>) gets "
30579"change notifications and displays the content of the model. The <em>Controller</em>, finally, changes the state of "
30580"the model (via some methods in the model's implementation - such as <code>append()</code> or <code>remove()</"
30581"code>) and notifies the view of these changes (via signals like <code>\"changed\"</code>)."
30582msgstr ""
30583"<link xref=\"treeview_simple_liststore.py\">TreeView</link> 와 <link xref=\"combobox.py\">ComboBox</link> 위젯은 "
30584"<em>모델/뷰/컨트롤러</em> 디자인을 기반으로 만들었습니다. <em>모델</em>(<code>Gtk.TreeModel</code> 구현체는 보통 "
30585"<code>Gtk.TreeStore</code> 또는 <code>Gtk.ListStore</code> 입니다)은 데이터를 저장하고, <em>뷰</em>(예를 들어 "
30586"<code>Gtk.TreeView</code>, <code>Gtk.ComboBox</code>, <code>Gtk.ComboBoxText</code>가 있습니다)는 바뀐 알림을 보여"
30587"주고 모델 내용을 보여줍니다. 마지막으로 <em>Controller</em>는 모델의 상태를 (<code>append()</code> 또는 "
30588"<code>remote()</code> 같은 모델 구현체의 일부 메서드로) 바꾸며, 이 바꾼 내용의 뷰를 (<code>\"changed\"</code> 같은 "
30589"시그널)로 알립니다."
30590
30591#. (itstool) path: section/title
30592#: C/model-view-controller.py.page:39
30593msgid "The Model"
30594msgstr "모델"
30595
30596#. (itstool) path: section/p
30597#: C/model-view-controller.py.page:41
30598msgid ""
30599"The main difference between the two main implementations of <code>Gtk.TreeModel</code> is that <code>Gtk."
30600"ListStore</code> contains simple rows of data without children, whereas <code>Gtk.TreeStore</code> also contains "
30601"rows of data, but each row may have child rows (which in turn can have child rows, and so on)."
30602msgstr ""
30603"<code>Gtk.TreeModel</code>의 주요 구현체 두가지에 대한 차이점은 <code>Gtk.ListStore</code>에 하위 요소 없이 데이터 "
30604"한 줄이 있지만, <code>Gtk.TreeStore</code>에는 데이터 한 줄이 들어있고, 각 줄에 하위 줄(이 하위 줄에 하위 줄을 또 "
30605"넣을 수 있습니다)이 있습니다."
30606
30607#. (itstool) path: section/p
30608#: C/model-view-controller.py.page:43
30609msgid ""
30610"The data in the Model can be retrieved or modified using the tree iter and column index, or <code>Gtk.TreeIter</"
30611"code>, or <code>Gtk.TreePath</code>."
30612msgstr ""
30613"모델의 데이터는 TreeIter나 열 인덱스, <code>Gtk.TreeIter</code>, <code>Gtk.TreePath</code>를 사용하여 가져오거나 수"
30614"정할 수 있습니다."
30615
30616#. (itstool) path: section/p
30617#: C/model-view-controller.py.page:45
30618msgid ""
30619"As with Python's built-in list object you can use <code>len()</code> to get the number of rows and use slices to "
30620"retrieve or set values. Otherwise, the method <code>append()</code> returns a <code>Gtk.TreeIter</code> instance, "
30621"which points to the location of the newly inserted row. You can also retrieve a <code>Gtk.TreeIter</code> by "
30622"calling <code>get_iter()</code>."
30623msgstr ""
30624"파이썬 내장 목록 객체에서 마찬가지로 값을 가져오거나 설정할 수많은 행 갯수를 가져올 <code>len()</code>을 사용하거"
30625"나 슬라이스를 사용할 수 있습니다. 아니면 <code>append()</code> 메서드에서 새로 삽입한 행 위치를 가리키는 <code>Gtk."
30626"TreeIter</code> 인스턴스를 반환합니다. 또한 <code>get_iter()</code>를 호출하여 <code>Gtk.TreeIter</code>를 가져올 "
30627"수 있습니다."
30628
30629#. (itstool) path: section/p
30630#: C/model-view-controller.py.page:47
30631msgid ""
30632"As <code>Gtk.ListStore</code> contains only one level, i.e. nodes do not have any child nodes, a path is "
30633"essentially the index of the row you want to access. In the case of <code>Gtk.TreeStore</code>, a path is a list "
30634"of indexes or a string. The string form is a list of numbers separated by a colon. Each number refers to the "
30635"offset at that level. Thus, the path <code>\"0\"</code> refers to the root node and the path <code>\"2:4\"</code> "
30636"refers to the fifth child of the third node."
30637msgstr ""
30638"각각의 노드는 하위 노드를 둘 수 없어 <code>Gtk.ListStore</code>에 한 계층만 넣을 수 있기에, 각 노드의 경로는 접근하"
30639"고자 하는 행의 인덱스입니다. <code>Gtk.TreeStore</code>의 경우 경로는 인덱스 목록 또는 문자열입니다. 문자열로 된 모"
30640"양새는 쉼표로 구분한 숫자 목록입니다. 각 숫자는 해당 레벨의 오프셋입니다. 따라서 <code>\"0\"</code>번째 경로는 최상"
30641"위(루트) 노드이며, <code>\"2:4\"</code> 경로는 세번째 노드의 다섯번째 하위 노드입니다."
30642
30643#. (itstool) path: section/p
30644#: C/model-view-controller.py.page:49
30645msgid "Useful methods for a <code>Gtk.TreeModel</code>:"
30646msgstr "<code>Gtk.TreeModel</code>에 쓸만한 메서드:"
30647
30648#. (itstool) path: item/p
30649#: C/model-view-controller.py.page:51
30650msgid ""
30651"<code>get_iter(path)</code> returns a <code>Gtk.TreeIter</code> instance pointing to <code>path</code>. This is "
30652"expected to be a colon-separated list of numbers, or a tuple. For example, the string <code>\"10:4:0\"</code> is "
30653"equivalent to the tuple <code>(10, 4, 0)</code>, as both would create a path of depth 3 pointing to the 11th child "
30654"of the root node, the 5th child of that 11th child, and the 1st child of that 5th child."
30655msgstr ""
30656"<code>get_iter(path)</code>는 <code>path</code>를 가리키는 <code>Gtk.TreeIter</code> 인스턴스를 반환합니다. 콜론으"
30657"로 구분한 숫자 목록 또는 튜플 값을 넣습니다. 예를 들어 <code>\"10:4:0\"</code> 문자열은 <code>(10, 4, 0)</code> 튜"
30658"플과 동일하며, 두 값으로 루트로부터 11번째 떨어진 하위 노드를 가리키도록 깊이 3의 경로를 만듭니다. 11번째의 하위 노"
30659"드는 5번째 노드, 5번째 하위 노드는 첫번째 노드입니다."
30660
30661#. (itstool) path: item/p
30662#: C/model-view-controller.py.page:52
30663msgid ""
30664"<code>iter_next(treeiter)</code> returns a <code>Gtk.TreeIter</code> instance pointing the node following treeiter "
30665"at the current level or <code>None</code> if there is no next iter."
30666msgstr ""
30667"<code>iter_next(treeiter)</code>는 현재 레벨의 treeiter를 따르는 노드를 가리키는 <code>Gtk.TreeIter</code> 인스턴스"
30668"를 반환하거나 다음 iter가 없으면 <code>Node</code> 합니다."
30669
30670#. (itstool) path: item/p
30671#: C/model-view-controller.py.page:53
30672msgid ""
30673"<code>iter_has_child(treeiter)</code> returns <code>True</code> if <code>treeiter</code> has children, "
30674"<code>False</code> otherwise."
30675msgstr ""
30676"<code>iter_has_child(treeiter)</code>는 <code>treeiter</code>에 하위 구성요소가 있으면 <code>True</code>를, 그렇지 "
30677"않으면 <code>False</code>를 반환합니다."
30678
30679#. (itstool) path: item/p
30680#: C/model-view-controller.py.page:54
30681msgid ""
30682"<code>iter_children(treeiter)</code> returns a <code>Gtk.TreeIter</code> instance pointing to the first child of "
30683"<code>treeiter</code> or <code>None</code> if <code>treeiter</code> has no children."
30684msgstr ""
30685"<code>iter_children(treeiter)</code> <code>treeiter</code>의 첫 하위 노드를 가리키는 <code>Gtk.TreeIter</code> 인스"
30686"턴스를 반환합니다. <code>treeiter</code>에 하위 노드가 없으면 <code>None</code>을 반환합니다."
30687
30688#. (itstool) path: item/p
30689#: C/model-view-controller.py.page:55
30690msgid ""
30691"<code>get_iter_first()</code> returns a <code>Gtk.TreeIter</code> instance pointing to the first iterator in the "
30692"tree (the one at the path <code>\"0\"</code>) or <code>None</code> if the tree is empty."
30693msgstr ""
30694"<code>get_iter_first()</code>는 트리(경로의 <code>\"0\"</code>번째)의 첫 Iterator를 가리키는 <code>Gtk.TreeIter</"
30695"code> 인스턴스를 반환하며 트리가 비어있을 경우는 <code>None</code>을 반환합니다."
30696
30697#. (itstool) path: section/p
30698#: C/model-view-controller.py.page:58
30699msgid "Useful methods for a <code>Gtk.ListStore</code>:"
30700msgstr "<code>Gtk.ListStore</code>에 쓸만한 메서드:"
30701
30702#. (itstool) path: item/p
30703#: C/model-view-controller.py.page:60
30704msgid ""
30705"<code>append(row)</code> appends a new row to this list store, where <code>row</code> can be a list of values for "
30706"each column; <code>row</code> can also be omitted or <code>None</code>, and in that case an empty row will be "
30707"appended. The method returns a <code>Gtk.TreeIter</code> pointing to the appended row."
30708msgstr ""
30709"<code>append(row)</code>는 리스트 스토어에 각각의 열에 대한 목록 값이 될 수 있는 새 <code>row</code>를 붙입니다. "
30710"<code>row</code> 값은 생략하거나 <code>None</code> 값을 넣을 수 있으며, 어떨 때는 빈 row를 붙일 수 있습니다. 메서드"
30711"에서는 붙인 row를 가리키는 <code>Gtk.TreeIter</code>를 반환합니다."
30712
30713#. (itstool) path: item/p
30714#: C/model-view-controller.py.page:61 C/model-view-controller.py.page:67
30715msgid ""
30716"<code>remove(iter)</code> removes <code>iter</code> from the <code>Gtk.ListStore</code>, and returns <code>True</"
30717"code> if the iter is valid, and <code>False</code> if the iter is not. After being removed, <code>iter</code> is "
30718"set to be the next valid row."
30719msgstr ""
30720"<code>remove(iter)</code>는 <code>Gtk.ListStore</code>의 <code>iter</code>를 제거하며, iter 값이 유효하면 "
30721"<code>True</code>를, 그렇지 않으면 <code>False</code>를 반환합니다. 제거하고 나면 <code>iter</code>를 다음 유효 행"
30722"이 되도록 설정합니다."
30723
30724#. (itstool) path: section/p
30725#: C/model-view-controller.py.page:64
30726msgid "Useful methods for a <code>Gtk.TreeStore</code>:"
30727msgstr "<code>Gtk.TreeStore</code>에 쓸만한 메서드:"
30728
30729#. (itstool) path: item/p
30730#: C/model-view-controller.py.page:66
30731msgid ""
30732"<code>append(parent, row)</code> appends a new row to this tree store; <code>parent</code> must be a valid Gtk."
30733"TreeIter. If parent is not <code>None</code>, then it will append the new row after the last child of parent, "
30734"otherwise it will append a row to the top level; <code>row</code> can be a list of values for each column, or it "
30735"can be omitted or <code>None</code>; in this latter case an empty row will be appended. The method returns a "
30736"<code>Gtk.TreeIter</code> pointing to the appended row."
30737msgstr ""
30738"<code>append(parent, row)</code>는 트리 스토어에 새 행을 붙입니다. <code>parent</code>는 올바른 Gtk.TreeIter여야 합"
30739"니다. 상위 요소가 <code>None</code>이면, 상위 요소의 마지막 하위 요소 다음에 새 행을 붙이며, 상위요소가 "
30740"<code>None</code>이 아니면, 최상위 레벨에 행을 붙입니다. <code>row</code>은 각 열에 대한 값 목록이거나, 생략하거"
30741"나, <code>None</code>값일 수 있습니다. 마지막의 경우 빈 행을 붙입니다. 메서드는 붙인 행을 가리키는 <code>Gtk."
30742"TreeIter</code>를 반환합니다."
30743
30744#. (itstool) path: section/title
30745#: C/model-view-controller.py.page:73
30746msgid "The View: the TreeView case"
30747msgstr "뷰: TreeView의 경우"
30748
30749#. (itstool) path: section/p
30750#: C/model-view-controller.py.page:75
30751msgid ""
30752"A Treeview shows the structure of children and parent items as a tree. See for instance <link xref="
30753"\"treeview_treestore.py\">this example</link>."
30754msgstr ""
30755"트리뷰는 하위 구성 요소와 상위 항목을 트리로 보여줍니다. 예시를 보려면 <link xref=\"treeview_treestore.py\">이 예제"
30756"</link>를 참고하십시오."
30757
30758#. (itstool) path: section/p
30759#: C/model-view-controller.py.page:77
30760msgid "The <code>Gtk.TreeViewColumn</code> is used to organize the vertical columns."
30761msgstr "<code>Gtk.TreeViewColumn</code>는 수직 방향 열을 모아 보여줄 때 사용합니다."
30762
30763#. (itstool) path: section/p
30764#: C/model-view-controller.py.page:79
30765msgid "Useful methods for a <code>Gtk.TreeView</code>:"
30766msgstr "<code>Gtk.TreeView</code>에 쓸만한 메서드:"
30767
30768#. (itstool) path: item/p
30769#: C/model-view-controller.py.page:81
30770msgid ""
30771"<code>set_model(model)</code> sets the model for this tree view. If this tree view already has a model set, it "
30772"will remove it before setting the new model. If model is <code>None</code>, then it will unset the old model."
30773msgstr ""
30774"<code>set_model(model)</code>은 이 트리뷰의 모델을 설정합니다. 이 트리뷰가 이미 모델 세트을 들고 있다면, 새 모델을 "
30775"설정하기 전에 제거랍니다. 모델이 <code>None</code> 상태라면 이전 모델의 설정을 해제합니다."
30776
30777#. (itstool) path: item/p
30778#: C/model-view-controller.py.page:82
30779msgid ""
30780"<code>get_model()</code> returns the model this tree view is based on, <code>None</code> if the model is unset."
30781msgstr ""
30782"<code>get_model()</code>은 이 트리 뷰의 기반 모델을 반환합니다. 모델이 없으면 <code>None</code>을 반환합니다."
30783
30784#. (itstool) path: item/p
30785#: C/model-view-controller.py.page:83
30786msgid "<code>append_column(column)</code> appends <code>column</code> to the list of columns."
30787msgstr "<code>append_column(column)</code>은 열 목록에 <code>column</code>을 추가합니다."
30788
30789#. (itstool) path: item/p
30790#: C/model-view-controller.py.page:84
30791msgid "<code>get_selection()</code> gets the <code>Gtk.TreeSelection</code> associated with this tree view."
30792msgstr "<code>get_selection()</code>은 트리뷰 관련  <code>Gtk.TreeSelection</code>을 가져옵니다."
30793
30794#. (itstool) path: section/p
30795#: C/model-view-controller.py.page:87
30796msgid "Useful methods for a <code>Gtk.TreeViewColumn</code>:"
30797msgstr "<code>Gtk.TreeViewColumn</code>에 쓸만한 메서드:"
30798
30799#. (itstool) path: item/p
30800#: C/model-view-controller.py.page:89
30801msgid ""
30802"<code>add_attribute(renderer, attribute, value)</code> adds an attribute mapping to this column. <code>attribute</"
30803"code> is the parameter on <code>renderer</code> to be set from the <code>value</code>"
30804msgstr ""
30805"<code>add_attribute(renderer, attribute, value)</code>는 이 열에 속성 매핑을 추가합니다. <code>attribute</code>는 "
30806"<code>value</code>에서 설정할 <code>renderer</code>의 매개변수입니다."
30807
30808#. (itstool) path: item/p
30809#: C/model-view-controller.py.page:90
30810msgid ""
30811"<code>pack_start(renderer, expand)</code> packs <code>renderer</code> into the beginning of this column. If "
30812"<code>expand</code> is <code>False</code>, then <code>renderer</code> is allocated no more space than it needs. "
30813"Any unused space is divided evenly between cells for which expand is <code>True</code>."
30814msgstr ""
30815"<code>pack_start(renderer, expand)</code>는 이 열의 시작 부분에 <code>renderer</code>를 패킹합니다. <code>expand</"
30816"code> 값이 <code>False</code>면, <code>renderer</code>는 필요한 만큼보다 적은 공간을 할당합니다. 활용하지 않은 공간"
30817"은 expand 값이 <code>True</code>인 각각의 셀을 균등하게 나눕니다."
30818
30819#. (itstool) path: item/p
30820#: C/model-view-controller.py.page:91
30821msgid ""
30822"<code>pack_end(renderer, expand)</code> adds <code>renderer</code> to end of this column. If <code>expand</code> "
30823"is <code>False</code>, then <code>renderer</code> is allocated no more space than it needs. Any unused space is "
30824"divided evenly between cells for which <code>expand</code> is <code>True</code>."
30825msgstr ""
30826"<code>pack_end(renderer, expand)</code>는 열의 마지막 부분의 <code>renderer</code>를 추가합니다. <code>expand</"
30827"code>값이 <code>False</code>면, <code>renderer</code>는 필요한 만큼보다 적은 공간을 할당합니다. 활용하지 않은 공간"
30828"은 expand 값이 <code>True</code>인 각각의 셀을 균등하게 나눕니다."
30829
30830#. (itstool) path: item/p
30831#: C/model-view-controller.py.page:92
30832msgid ""
30833"<code>set_sort_column_id(sort_column_id)</code> sets the column of the model by which this column (of the view) "
30834"should be sorted. This also makes the column header clickable."
30835msgstr ""
30836"<code>set_sort_column_id(sort_column_id)</code>는 정렬할 (뷰의) 열 기준으로 모델 열을 설정합니다. 열 헤더를 누를 "
30837"수 있게 합니다."
30838
30839#. (itstool) path: item/p
30840#: C/model-view-controller.py.page:93
30841msgid ""
30842"<code>set_sort_indicator(setting)</code> sets whether a little arrow is displayed in the column header; "
30843"<code>setting</code> can either be <code>True</code> (indicator is shown) or <code>False</code>."
30844msgstr ""
30845"<code>set_sort_indicator(setting)</code>는 열 헤더에 작은 화살표를 나타낼 지 여부를 설정합니다. <code>setting</"
30846"code> 값은 <code>True</code>(화살표가 나타남) 또는 <code>False</code>일 수 있습니다."
30847
30848#. (itstool) path: item/p
30849#: C/model-view-controller.py.page:94
30850msgid ""
30851"<code>set_sort_order(order)</code> changes the order by which the column is sorted; <code>order</code> can either "
30852"be <code>Gtk.SortType.ASCENDING</code> or <code>Gtk.SortType.DESCENDING</code>."
30853msgstr ""
30854"<code>set_sort_order(order)</code>는 어떤 열을 정렬할 지 정렬 기준을 바꿉니다. <code>order</code> 값은 <code>Gtk."
30855"SortType.ASCENDING</code> 또는 <code>Gtk.SortType.DESCENDING</code> 일 수 있습니다."
30856
30857#. (itstool) path: section/title
30858#: C/model-view-controller.py.page:100
30859msgid "The View: the ComboBox case"
30860msgstr "뷰: ComboBox의 경우"
30861
30862#. (itstool) path: section/p
30863#: C/model-view-controller.py.page:102
30864msgid ""
30865"A <code>Gtk.ComboBox</code> allows for the selection of an item from a dropdown menu, see for instance <link xref="
30866"\"combobox.py\">this example</link>. For a list of textual choices, one can also use the simpler <code>Gtk."
30867"ComboBoxText</code>. Both <code>Gtk.ComboBox</code> and <code>Gtk.ComboBoxText</code> can contain an entry."
30868msgstr ""
30869"<code>Gtk.ComboBox</code> 는 드롭 다운 메뉴의 항목 섹션을 허용합니다. 예시는 <link xref=\"combobox.py\">이 예제</"
30870"link>를 참고하십시오. 텍스트 방식의 목록을 선택한다면 더 단순한 <code>Gtk.ComboBoxText</code>를 활용할 수 있습니"
30871"다. <code>Gtk.ComboBox</code> 와 <code>Gtk.ComboBoxText</code>에는 항목을 넣을 수 있습니다."
30872
30873#. (itstool) path: section/p
30874#: C/model-view-controller.py.page:104
30875msgid "Useful methods for a <code>Gtk.ComboBox</code>:"
30876msgstr "<code>Gtk.ComboBox</code>에 쓸만한 메서드:"
30877
30878#. (itstool) path: item/p
30879#: C/model-view-controller.py.page:106
30880msgid ""
30881"The static method <code>new_with_entry()</code> creates a new empty <code>Gtk.ComboBox</code> with an entry; the "
30882"static method <code>new_with_model(model)</code> creates a new one with the model initialized to <code>model</"
30883"code>; and the static method <code>new_with_model_and_entry(model)</code> is a combination of the two."
30884msgstr ""
30885"<code>new_with_entry()</code> 정적 메서드에서는 항목으로 비어있는 새 <code>Gtk.ComboBox</code> 를 만들며, "
30886"<code>new_with_model(model)</code> 정적 메서드에서는 <code>model</code>로 초기화 한 새 모델로 만듭니다. 그리고 "
30887"<code>new_with_model_and_entry(model)</code> 정적 메서드는 이 두가지 경우를 모두 수행합니다."
30888
30889#. (itstool) path: item/p
30890#: C/model-view-controller.py.page:107
30891msgid ""
30892"<code>get_active_iter()</code> returns a <code>Gtk.TreeIter</code> pointing to the current active item. If no "
30893"active item exists, <code>None</code> is returned."
30894msgstr ""
30895"<code>get_active_iter()</code>는 현재 활성 항목을 가리키는 <code>Gtk.TreeIter</code>를 반환합니다. 활성 항목이 없으"
30896"면 <code>None</code>을 반환합니다."
30897
30898#. (itstool) path: item/p
30899#: C/model-view-controller.py.page:108
30900msgid ""
30901"<code>set_model(model)</code> sets the model used by this combo box to be <code>model</code>, and it will unset a "
30902"previously set model (if there is any). If <code>model</code> is <code>None</code>, then it will unset the model. "
30903"Note that this function does not clear the cell renderers."
30904msgstr ""
30905"<code>set_model(model)</code> 는 콤보 상자의 모델을 <code>model</code>로 설정하며, 이전에 설정한 모델(이 있다면) 설"
30906"정을 해제합니다. <code>model</code> 값이 <code>None</code>이면, 이미 있던 모델 설정을 해제합니다. 참고로 이 함수는 "
30907"셀 렌더러 자체를 지우지 않습니다."
30908
30909#. (itstool) path: item/p
30910#: C/model-view-controller.py.page:109
30911msgid ""
30912"<code>set_entry_text_column(text_column)</code> sets the model column which this combo box should use to get "
30913"strings from to be <code>text_column</code>. The column <code>text_column</code> in the model of this combo box "
30914"must be of type <code>str</code> (this is only relevant if this combo box has been created with the “has-entry” "
30915"property set to True)."
30916msgstr ""
30917"<code>set_entry_text_column(text_column)</code>은 문자열을 가져올 콤보 상자 모델 열을 <code>text_column</code>으로 "
30918"설정합니다. 이 콤보 상자 모델의 <code>text_column</code>은 <code>str</code> 형식이어야합니다(이 콤보 상자의 “has-"
30919"entry” 속성을 True로 설정했을 때만 해당합니다)."
30920
30921#. (itstool) path: item/p
30922#: C/model-view-controller.py.page:110
30923msgid ""
30924"<code>set_wrap_width(width)</code> sets the wrap width of this combo box to be <code>width</code>. The wrap width "
30925"is basically the preferred number of columns when you want the popup to be laid out in a grid."
30926msgstr ""
30927"<code>set_wrap_width(width)</code> 함수는 콤보 박스의 줄바꿈 너비를 <code>width</code>로 설정합니다. 줄바꿈 너비는 "
30928"기본적으로 그리드에 팝업을 두고자 할 때 원하는 열 갯수입니다."
30929
30930#. (itstool) path: section/p
30931#: C/model-view-controller.py.page:113
30932msgid "Useful methods for a <code>Gtk.ComboBoxText</code>:"
30933msgstr "<code>Gtk.ComboBoxText</code>에 쓸만한 메서드:"
30934
30935#. (itstool) path: item/p
30936#: C/model-view-controller.py.page:115
30937msgid ""
30938"The static method <code>new_with_entry()</code> creates a new empty <code>Gtk.ComboBoxText</code> with an entry."
30939msgstr ""
30940"<code>new_with_entry()</code> 정적 메서드는 비어있는 새 <code>Gtk.ComboBoxText</code>를 항목을 넣어 만듭니다."
30941
30942#. (itstool) path: item/p
30943#: C/model-view-controller.py.page:116
30944msgid "<code>append_text(text)</code> appends <code>text</code> to the list of strings stored in this combo box."
30945msgstr "<code>append_text(text)</code>는 콤보 박스에 저장한 문자열 목록에 <code>text</code>를 추가합니다."
30946
30947#. (itstool) path: item/p
30948#: C/model-view-controller.py.page:117
30949msgid ""
30950"<code>get_active_text()</code> returns the currently active string in this combo box, or <code>None</code> if none "
30951"is selected. If this combo box contains an entry, this function will return its contents (which will not "
30952"necessarily be an item from the list)."
30953msgstr ""
30954"<code>get_active_text()</code>는 콤보 박스의 현재 활성 문자열을 반환하거나 선택한 항목이 없을 경우는 <code>None</"
30955"code>을 반환합니다. 콤보 박스에 항목이 있다면 이 함수는 항목의 내용을 반환합니다(꼭 목록 항목일 필요는 없습니다)."
30956
30957#. (itstool) path: section/title
30958#: C/model-view-controller.py.page:123
30959msgid "The View: the Cellrenderers"
30960msgstr "뷰: CellRenderer의 경우"
30961
30962#. (itstool) path: section/p
30963#: C/model-view-controller.py.page:125
30964msgid "The View makes use of <code>Gtk.CellRenderer</code>s of various types to draw the data."
30965msgstr "다양한 형식의 <code>Gtk.CellRenderer</code>를 활용하여 데이터를 그리는 뷰입니다."
30966
30967#. (itstool) path: section/p
30968#: C/model-view-controller.py.page:127
30969msgid "Implementations of <code>Gtk.CellRenderer</code> and useful methods:"
30970msgstr "<code>Gtk.CellRenderer</code> 구현체와 쓸만한 메서드:"
30971
30972#. (itstool) path: item/p
30973#: C/model-view-controller.py.page:129
30974msgid "<code>Gtk.CellRendererText</code> - renders text in a cell"
30975msgstr "<code>Gtk.CellRendererText</code> - 셀에 텍스트를 보여줍니다."
30976
30977#. (itstool) path: item/p
30978#: C/model-view-controller.py.page:130
30979msgid "<code>Gtk.CellRendererToggle</code> - renders a toggle or radio button in a cell. Useful methods:"
30980msgstr "<code>Gtk.CellRendererToggle</code> - 토글 단추 또는 라디오 단추를 셀에 보여줍니다 쓸만한 메서드는:"
30981
30982#. (itstool) path: item/p
30983#: C/model-view-controller.py.page:132
30984msgid "<code>set_active(setting)</code> - activates or deactivates a cell renderer"
30985msgstr "<code>set_active(setting)</code> - 셀 렌더러를 활성 처리하거나 비활성 처리합니다."
30986
30987#. (itstool) path: item/p
30988#: C/model-view-controller.py.page:133
30989msgid "<code>get_active()</code> - returns whether the cell renderer is active"
30990msgstr "<code>get_active()</code> - 셀 렌더러 활성화 혀부를 반환합니다."
30991
30992#. (itstool) path: item/p
30993#: C/model-view-controller.py.page:134
30994msgid ""
30995"<code>set_radio(radio)</code> - if radio is <code>True</code>, the cell renderer renders a radio toggle (i.e. a "
30996"toggle in a group of mutually-exclusive toggles); if <code>False</code>, it renders a check toggle (a standalone "
30997"boolean option)"
30998msgstr ""
30999"<code>set_radio(radio)</code> - radio가 참이면 셀 렌더러는 라디오 토글을 나타냅니다(예: 그룹 단위로 상호 배타적으"
31000"로 토글). <code>False</code> 값을 설정하면 확인 상자로 나타냅니다(단독 부울린 옵션)."
31001
31002#. (itstool) path: item/p
31003#: C/model-view-controller.py.page:135
31004msgid "<code>get_radio()</code> - returns whether we are rendering radio toggles rather than checkboxes."
31005msgstr "<code>get_radio()</code> - 확인 상자 대신 라디오 토글을 보여줄 지 여부를 반환합니다."
31006
31007#. (itstool) path: item/p
31008#: C/model-view-controller.py.page:138
31009msgid "<code>Gtk.CellRendererPixbuf</code> - renders an image in a cell"
31010msgstr "<code>Gtk.CellRendererPixbuf</code> - 셀 그림을 보여줍니다"
31011
31012#. (itstool) path: item/p
31013#: C/model-view-controller.py.page:139
31014msgid ""
31015"<code>Gtk.CellRendererCombo</code> - renders text in a cell; but while <code>Gtk.CellRendererText</code> offers a "
31016"simple entry to edit the text, <code>Gtk.CellRendererCombo</code> offers a <code>Gtk.ComboBox</code> widget to "
31017"edit the text. It can be used with and without an associated Gtk.Entry widget, depending on the value of the “has-"
31018"entry” property."
31019msgstr ""
31020"<code>Gtk.CellRendererCombo</code> - 셀 텍스트를 보여줍니다만 <code>Gtk.CellRendererText</code>는 텍스트를 편집할 "
31021"간단한 항목을 제공하지만 <code>Gtk.CellRendererCombo</code> 에는 텍스트를 편집할 <code>Gtk.ComboBox</code>  위젯도 "
31022"들어있습니다. 관련 Gtk.Entry 위젯을 넣든 아니든 사용할 수 있으며,  “has-entry” 속성 값에 따라 다릅니다."
31023
31024#. (itstool) path: item/p
31025#: C/model-view-controller.py.page:140
31026msgid ""
31027"<code>Gtk.CellRendererProgress</code> - renders a numeric value as a progress bar in a cell; it can display a text "
31028"on top of the progress bar"
31029msgstr ""
31030"<code>Gtk.CellRendererProgress</code> - 셀에서 진행 표시줄처럼 숫자 값을 나타냅니다. 진행 표시줄의 상단 텍스트로 표"
31031"시할 수 있습니다"
31032
31033#. (itstool) path: item/p
31034#: C/model-view-controller.py.page:141
31035msgid "<code>Gtk.CellRendererSpinner</code> - renders a spinning animation in a cell"
31036msgstr "<code>Gtk.CellRendererSpinner</code> - 셀에서 스핀 움직임 동작을 나타냅니다"
31037
31038#. (itstool) path: item/p
31039#: C/model-view-controller.py.page:142
31040msgid "<code>Gtk.CellRendererSpin</code> - renders a spin button in a cell"
31041msgstr "<code>Gtk.CellRendererSpin</code> - 셀에서 스핀 단추를 나타냅니다"
31042
31043#. (itstool) path: item/p
31044#: C/model-view-controller.py.page:143
31045msgid "<code>Gtk.CellRendererAccel</code> - renders a keyboard accelerator in a cell"
31046msgstr "<code>Gtk.CellRendererAccel</code>- 셀에서 키보드 바로 가기 키를 나타냅니다"
31047
31048#. (itstool) path: section/title
31049#: C/model-view-controller.py.page:149
31050msgid "The Controller: the Selection"
31051msgstr "컨트롤러: Selection"
31052
31053#. (itstool) path: section/p
31054#: C/model-view-controller.py.page:151
31055msgid ""
31056"Most applications will need to not only deal with displaying data, but also receiving input events from users. To "
31057"do this, simply get a reference to a selection object and connect to the <code>\"changed\"</code> signal."
31058msgstr ""
31059"대부분 프로글매에서는 데이터를 표시할 뿐만 아니라 사용자로부터 입력 이벤트를 받아 처리합니다. 이 때, 간단하게 선택 "
31060"객체 참조를 가져온 후 <code>\"changed\"</code> 시그널에 연결합니다."
31061
31062#. (itstool) path: section/code
31063#: C/model-view-controller.py.page:153
31064#, no-wrap
31065msgid ""
31066"\n"
31067"select = tree.get_selection()\n"
31068"select.connect(\"changed\", on_tree_selection_changed)\n"
31069msgstr ""
31070"\n"
31071"select = tree.get_selection()\n"
31072"select.connect(\"changed\", on_tree_selection_changed)\n"
31073
31074#. (itstool) path: section/p
31075#: C/model-view-controller.py.page:158
31076msgid "Then to retrieve data for the row selected:"
31077msgstr "그 다음 선택한 행 데이터를 가져오려면:"
31078
31079#. (itstool) path: section/code
31080#: C/model-view-controller.py.page:160
31081#, no-wrap
31082msgid ""
31083"\n"
31084"def on_tree_selection_changed(selection):\n"
31085"    model, treeiter = selection.get_selected()\n"
31086"    if treeiter != None:\n"
31087"        print \"You selected\", model[treeiter][0]\n"
31088msgstr ""
31089"\n"
31090"def on_tree_selection_changed(selection):\n"
31091"    model, treeiter = selection.get_selected()\n"
31092"    if treeiter != None:\n"
31093"        print \"You selected\", model[treeiter][0]\n"
31094
31095#. (itstool) path: section/p
31096#: C/model-view-controller.py.page:167
31097msgid "Useful methods for a <code>Gtk.TreeSelection</code>:"
31098msgstr "<code>Gtk.TreeSelection</code>에 쓸만한 메서드:"
31099
31100#. (itstool) path: item/p
31101#: C/model-view-controller.py.page:170
31102msgid "<code>set_mode(type)</code> sets the type of selection, where type is one of"
31103msgstr "<code>set_mode(type)</code>는 다음 중 선택 형식을 설정합니다"
31104
31105#. (itstool) path: item/p
31106#: C/model-view-controller.py.page:172
31107msgid "<code>Gtk.SelectionMode.NONE</code> - no selection is possible"
31108msgstr "<code>Gtk.SelectionMode.NONE</code> - 가능하면 아무것도 선택하지 않음"
31109
31110#. (itstool) path: item/p
31111#: C/model-view-controller.py.page:173
31112msgid "<code>Gtk.SelectionMode.SINGLE</code> - zero or one element may be selected"
31113msgstr "<code>Gtk.SelectionMode.SINGLE</code> - 한 개 이하로 선택할 수 있음"
31114
31115#. (itstool) path: item/p
31116#: C/model-view-controller.py.page:174
31117msgid ""
31118"<code>Gtk.SelectionMode.BROWSE</code> - exactly one element is selected. In some circumstances, such as initially "
31119"or during a search operation, it’s possible for no element to be selected. What is really enforced is that the "
31120"user can’t deselect a currently selected element except by selecting another element."
31121msgstr ""
31122"<code>Gtk.SelectionMode.BROWSE</code> - 정확히 요소 한개만 선택합니다. 검색 동작 초기 또는 진행 단계인 경우, 아무것"
31123"도 선택하지 않을 수도 있습니다. 다른 요소를 선택할 때를 제외하고는 현재 선택한 요소의 선택 상태를 해제할 수 없도록 "
31124"강제합니다."
31125
31126#. (itstool) path: item/p
31127#: C/model-view-controller.py.page:175
31128msgid ""
31129"<code>Gtk.SelectionMode.MULTIPLE</code> -any number of elements may be selected. Clicks toggle the state of an "
31130"item. The Ctrl key may be used to enlarge the selection, and Shift key to select between the focus and the child "
31131"pointed to. Some widgets may also allow Click-drag to select a range of elements."
31132msgstr ""
31133"<code>Gtk.SelectionMode.MULTIPLE</code> - 몇가지든 선택할 수 있습니다. 항목을 누를 때마다 선택 상태를 바꿉니다. "
31134"Ctrl키로 선택 갯수를 늘릴 수 있고, Shift키로 현재 선택한 항목 부터 다음 선택한 하위 항목까지 쭉 선택할 수 있습니"
31135"다. 일부 위젯에서는 눌러서 끄는 방식으로 일정 범위 항목을 선택할 수 있습니다."
31136
31137#. (itstool) path: item/p
31138#: C/model-view-controller.py.page:178
31139msgid ""
31140"<code>get_selected()</code> returns a tuple <code>(model, treeiter)</code>, where <code>model</code> is the "
31141"current model and <code>treeiter</code> a <code>Gtk.TreeIter</code> pointing to the currently selected row, or "
31142"None if no rows are selected. The method does not work if the selection mode is set to <code>Gtk.SelectionMode."
31143"MULTIPLE</code>; in that case, use <code>get_selected_rows()</code> instead, which Returns a list of <code>Gtk."
31144"TreePath</code> instances of all selected rows."
31145msgstr ""
31146"<code>get_selected()</code>는 현재 모델을 의미하는 <code>model</code>과 현재 선택한 행을 가리키는 <code>Gtk."
31147"TreeIter</code>인 <code>treeiter</code> 또는 아무 행도 선택하지 않았을 경우 None 값이 들어가는 <code>(model, "
31148"treeiter)</code> 튜플을 반환합니다. 이 메서드는 선택 모드를 <code>Gtk.SelectionMode.MULTIPLE</code>로 선택했을 때"
31149"는 동작하지 않습니다. 이 경우, 선택한 행의 <code>Gtk.TreePath</code> 안스턴스 목록을 반환하는 "
31150"<code>get_selected_rows()</code>를 대신 사용하십시오."
31151
31152#. (itstool) path: section/title
31153#: C/model-view-controller.py.page:184 C/properties.py.page:57 C/signals-callbacks.py.page:46 C/strings.py.page:112
31154msgid "References"
31155msgstr "참고 자료"
31156
31157#. (itstool) path: item/p
31158#: C/model-view-controller.py.page:187 C/treeview_advanced_liststore.py.page:45
31159#: C/treeview_cellrenderertoggle.py.page:45 C/treeview_simple_liststore.py.page:46 C/treeview_treestore.py.page:45
31160msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeModel.html\">GtkTreeModel</link>"
31161msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeModel.html\">GtkTreeModel</link>"
31162
31163#. (itstool) path: item/p
31164#: C/model-view-controller.py.page:188 C/treeview_advanced_liststore.py.page:44
31165#: C/treeview_cellrenderertoggle.py.page:44 C/treeview_simple_liststore.py.page:45 C/treeview_treestore.py.page:44
31166msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeView.html\">GtkTreeView</link>"
31167msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeView.html\">GtkTreeView</link>"
31168
31169#. (itstool) path: item/p
31170#: C/model-view-controller.py.page:189 C/treeview_advanced_liststore.py.page:48
31171#: C/treeview_cellrenderertoggle.py.page:49 C/treeview_simple_liststore.py.page:49 C/treeview_treestore.py.page:48
31172msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeViewColumn.html\">GtkTreeViewColumn</link>"
31173msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeViewColumn.html\">GtkTreeViewColumn</link>"
31174
31175#. (itstool) path: item/p
31176#: C/model-view-controller.py.page:191
31177msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRenderer.html\">GtkCellRenderer</link>"
31178msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRenderer.html\">GtkCellRenderer</link>"
31179
31180#. (itstool) path: info/title
31181#: C/paned.c.page:8
31182msgctxt "text"
31183msgid "Paned (C)"
31184msgstr "Paned(C)"
31185
31186#. (itstool) path: info/desc
31187#: C/paned.c.page:18 C/paned.js.page:18 C/paned.py.page:19 C/paned.vala.page:18
31188msgid "A widget with two adjustable panes"
31189msgstr "크기 조절 가능한 두 창을 가진 위젯입니다"
31190
31191#. (itstool) path: page/title
31192#: C/paned.c.page:21 C/paned.js.page:21 C/paned.py.page:22 C/paned.vala.page:21
31193msgid "Paned"
31194msgstr "Paned"
31195
31196#. (itstool) path: page/media
31197#. This is a reference to an external file such as an image or video. When
31198#. the file changes, the md5 hash will change to let you know you need to
31199#. update your localized copy. The msgstr is not used at all. Set it to
31200#. whatever you like once you have updated your copy of the file.
31201#: C/paned.c.page:22 C/paned.js.page:22 C/paned.py.page:23 C/paned.vala.page:22
31202msgctxt "_"
31203msgid "external ref='media/paned.png' md5='8c7e1df065395c9aafcd65036a293d8a'"
31204msgstr ""
31205
31206#. (itstool) path: page/p
31207#: C/paned.c.page:23 C/paned.js.page:23 C/paned.py.page:24 C/paned.vala.page:23
31208msgid "Two images in two adjustable panes, horizontally aligned."
31209msgstr "크기 조절 가능한 두 창에 그림 둘을 두고 수평 방향으로 정렬합니다."
31210
31211#. (itstool) path: section/code
31212#: C/paned.c.page:29
31213#, no-wrap
31214msgid ""
31215"#include &lt;gtk/gtk.h&gt;\n"
31216"\n"
31217"static void\n"
31218"activate (GtkApplication *app,\n"
31219"          gpointer        user_data)\n"
31220"{\n"
31221"  GtkWidget *paned;\n"
31222"  GtkWidget *window;\n"
31223"  GtkWidget *image1;\n"
31224"  GtkWidget *image2;\n"
31225"\n"
31226"  window = gtk_application_window_new (app);\n"
31227"  gtk_window_set_title (GTK_WINDOW (window), \"Paned Example\");\n"
31228"  gtk_window_set_default_size (GTK_WINDOW (window), 450, 350);\n"
31229"\n"
31230"  paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);\n"
31231"  image1 = gtk_image_new_from_file (\"gnome-image.png\");\n"
31232"  image2 = gtk_image_new_from_file (\"tux.png\");\n"
31233"\n"
31234"  gtk_paned_add1 (GTK_PANED (paned), image1);\n"
31235"  gtk_paned_add2 (GTK_PANED (paned), image2);\n"
31236"\n"
31237"  gtk_container_add (GTK_CONTAINER (window), paned);\n"
31238"\n"
31239"  gtk_widget_show_all (window);\n"
31240"}\n"
31241"\n"
31242"int\n"
31243"main (int argc, char **argv)\n"
31244"{\n"
31245"  GtkApplication *app;\n"
31246"  int status;\n"
31247"\n"
31248"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
31249"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
31250"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
31251"  g_object_unref (app);\n"
31252"  return status;\n"
31253"}\n"
31254msgstr ""
31255"#include &lt;gtk/gtk.h&gt;\n"
31256"\n"
31257"static void\n"
31258"activate (GtkApplication *app,\n"
31259"          gpointer        user_data)\n"
31260"{\n"
31261"  GtkWidget *paned;\n"
31262"  GtkWidget *window;\n"
31263"  GtkWidget *image1;\n"
31264"  GtkWidget *image2;\n"
31265"\n"
31266"  window = gtk_application_window_new (app);\n"
31267"  gtk_window_set_title (GTK_WINDOW (window), \"Paned Example\");\n"
31268"  gtk_window_set_default_size (GTK_WINDOW (window), 450, 350);\n"
31269"\n"
31270"  paned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);\n"
31271"  image1 = gtk_image_new_from_file (\"gnome-image.png\");\n"
31272"  image2 = gtk_image_new_from_file (\"tux.png\");\n"
31273"\n"
31274"  gtk_paned_add1 (GTK_PANED (paned), image1);\n"
31275"  gtk_paned_add2 (GTK_PANED (paned), image2);\n"
31276"\n"
31277"  gtk_container_add (GTK_CONTAINER (window), paned);\n"
31278"\n"
31279"  gtk_widget_show_all (window);\n"
31280"}\n"
31281"\n"
31282"int\n"
31283"main (int argc, char **argv)\n"
31284"{\n"
31285"  GtkApplication *app;\n"
31286"  int status;\n"
31287"\n"
31288"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
31289"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
31290"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
31291"  g_object_unref (app);\n"
31292"  return status;\n"
31293"}\n"
31294
31295#. (itstool) path: item/p
31296#: C/paned.c.page:36 C/paned.py.page:42
31297msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkPaned.html\">GtkPaned</link>"
31298msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkPaned.html\">GtkPaned</link>"
31299
31300#. (itstool) path: item/p
31301#: C/paned.c.page:37 C/paned.js.page:37 C/paned.py.page:43 C/paned.vala.page:37
31302msgid ""
31303"<link href=\"http://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkOrientation\">Standard "
31304"Enumerations</link>"
31305msgstr ""
31306"<link href=\"http://developer.gnome.org/gtk3/stable/gtk3-Standard-Enumerations.html#GtkOrientation\">표준 에뮬레이"
31307"션</link>"
31308
31309#. (itstool) path: info/title
31310#: C/paned.js.page:8
31311msgctxt "text"
31312msgid "Paned (JavaScript)"
31313msgstr "Paned (JavaScript)"
31314
31315#. (itstool) path: section/code
31316#: C/paned.js.page:29
31317#, no-wrap
31318msgid ""
31319"#!/usr/bin/gjs\n"
31320"\n"
31321"imports.gi.versions.Gtk = '3.0';\n"
31322"const Gtk = imports.gi.Gtk;\n"
31323"\n"
31324"class PanedExample {\n"
31325"\n"
31326"    // Create the application itself\n"
31327"    constructor() {\n"
31328"        this.application = new Gtk.Application({ application_id: 'org.example.panedexample' });\n"
31329"\n"
31330"       // Connect 'activate' and 'startup' signals to the callback functions\n"
31331"        this.application.connect('activate', this._onActivate.bind(this));\n"
31332"        this.application.connect('startup', this._onStartup.bind(this));\n"
31333"    }\n"
31334"\n"
31335"    // Callback function for 'activate' signal presents windows when active\n"
31336"    _onActivate() {\n"
31337"        this.window.present();\n"
31338"    }\n"
31339"\n"
31340"    // Callback function for 'startup' signal builds the UI\n"
31341"    _onStartup() {\n"
31342"        this._buildUI();\n"
31343"    }\n"
31344"\n"
31345"    // Build the application's UI\n"
31346"    _buildUI() {\n"
31347"        // Create the application window\n"
31348"        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
31349"                                                    window_position: Gtk.WindowPosition.CENTER,\n"
31350"                                                    title: \"Paned Window Example\",\n"
31351"                                                    default_width: 450,\n"
31352"                                                    default_height: 350,\n"
31353"                                                    border_width: 10 });\n"
31354"\n"
31355"        // a new widget with two adjustable panes,\n"
31356"        // one on the left and one on the right\n"
31357"        this.paned = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL);\n"
31358"\n"
31359"        // two images\n"
31360"        this.image1 = new Gtk.Image();\n"
31361"        this.image1.set_from_file(\"gnome-image.png\");\n"
31362"        this.image2 = new Gtk.Image();\n"
31363"        this.image2.set_from_file(\"tux.png\");\n"
31364"\n"
31365"        // add the first image to the left pane\n"
31366"        this.paned.add1(this.image1);\n"
31367"        // add the second image to the right pane\n"
31368"        this.paned.add2(this.image2)\n"
31369"\n"
31370"        // add the panes to the window\n"
31371"        this.window.add(this.paned)\n"
31372"        this.window.show_all();\n"
31373"    }\n"
31374"};\n"
31375"\n"
31376"// Run the application\n"
31377"let app = new PanedExample();\n"
31378"app.application.run (ARGV);\n"
31379msgstr ""
31380"#!/usr/bin/gjs\n"
31381"\n"
31382"imports.gi.versions.Gtk = '3.0';\n"
31383"const Gtk = imports.gi.Gtk;\n"
31384"\n"
31385"class PanedExample {\n"
31386"\n"
31387"    // Create the application itself\n"
31388"    constructor() {\n"
31389"        this.application = new Gtk.Application({ application_id: 'org.example.panedexample' });\n"
31390"\n"
31391"       // Connect 'activate' and 'startup' signals to the callback functions\n"
31392"        this.application.connect('activate', this._onActivate.bind(this));\n"
31393"        this.application.connect('startup', this._onStartup.bind(this));\n"
31394"    }\n"
31395"\n"
31396"    // Callback function for 'activate' signal presents windows when active\n"
31397"    _onActivate() {\n"
31398"        this.window.present();\n"
31399"    }\n"
31400"\n"
31401"    // Callback function for 'startup' signal builds the UI\n"
31402"    _onStartup() {\n"
31403"        this._buildUI();\n"
31404"    }\n"
31405"\n"
31406"    // Build the application's UI\n"
31407"    _buildUI() {\n"
31408"        // Create the application window\n"
31409"        this.window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
31410"                                                    window_position: Gtk.WindowPosition.CENTER,\n"
31411"                                                    title: \"Paned Window Example\",\n"
31412"                                                    default_width: 450,\n"
31413"                                                    default_height: 350,\n"
31414"                                                    border_width: 10 });\n"
31415"\n"
31416"        // a new widget with two adjustable panes,\n"
31417"        // one on the left and one on the right\n"
31418"        this.paned = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL);\n"
31419"\n"
31420"        // two images\n"
31421"        this.image1 = new Gtk.Image();\n"
31422"        this.image1.set_from_file(\"gnome-image.png\");\n"
31423"        this.image2 = new Gtk.Image();\n"
31424"        this.image2.set_from_file(\"tux.png\");\n"
31425"\n"
31426"        // add the first image to the left pane\n"
31427"        this.paned.add1(this.image1);\n"
31428"        // add the second image to the right pane\n"
31429"        this.paned.add2(this.image2)\n"
31430"\n"
31431"        // add the panes to the window\n"
31432"        this.window.add(this.paned)\n"
31433"        this.window.show_all();\n"
31434"    }\n"
31435"};\n"
31436"\n"
31437"// Run the application\n"
31438"let app = new PanedExample();\n"
31439"app.application.run (ARGV);\n"
31440
31441#. (itstool) path: item/p
31442#: C/paned.js.page:36
31443msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Paned.html\">GtkPaned</link>"
31444msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Paned.html\">GtkPaned</link>"
31445
31446#. (itstool) path: item/p
31447#: C/paned.js.page:38 C/scrolledwindow.js.page:38
31448msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Image.html\">GtkImage</link>"
31449msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Image.html\">GtkImage</link>"
31450
31451#. (itstool) path: info/title
31452#: C/paned.py.page:8
31453msgctxt "text"
31454msgid "Paned (Python)"
31455msgstr "Paned (Python)"
31456
31457#. (itstool) path: section/code
31458#: C/paned.py.page:30
31459#, no-wrap
31460msgid ""
31461"from gi.repository import Gtk\n"
31462"import sys\n"
31463"\n"
31464"\n"
31465"class MyWindow(Gtk.ApplicationWindow):\n"
31466"\n"
31467"    def __init__(self, app):\n"
31468"        Gtk.Window.__init__(self, title=\"Paned Example\", application=app)\n"
31469"        self.set_default_size(450, 350)\n"
31470"\n"
31471"        # a new widget with two adjustable panes,\n"
31472"        # one on the left and one on the right\n"
31473"        paned = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL)\n"
31474"\n"
31475"        # two images\n"
31476"        image1 = Gtk.Image()\n"
31477"        image1.set_from_file(\"gnome-image.png\")\n"
31478"        image2 = Gtk.Image()\n"
31479"        image2.set_from_file(\"tux.png\")\n"
31480"\n"
31481"        # add the first image to the left pane\n"
31482"        paned.add1(image1)\n"
31483"        # add the second image to the right pane\n"
31484"        paned.add2(image2)\n"
31485"\n"
31486"        # add the panes to the window\n"
31487"        self.add(paned)\n"
31488"\n"
31489"\n"
31490"class MyApplication(Gtk.Application):\n"
31491"\n"
31492"    def __init__(self):\n"
31493"        Gtk.Application.__init__(self)\n"
31494"\n"
31495"    def do_activate(self):\n"
31496"        win = MyWindow(self)\n"
31497"        win.show_all()\n"
31498"\n"
31499"    def do_startup(self):\n"
31500"        Gtk.Application.do_startup(self)\n"
31501"\n"
31502"app = MyApplication()\n"
31503"exit_status = app.run(sys.argv)\n"
31504"sys.exit(exit_status)\n"
31505msgstr ""
31506"from gi.repository import Gtk\n"
31507"import sys\n"
31508"\n"
31509"\n"
31510"class MyWindow(Gtk.ApplicationWindow):\n"
31511"\n"
31512"    def __init__(self, app):\n"
31513"        Gtk.Window.__init__(self, title=\"Paned Example\", application=app)\n"
31514"        self.set_default_size(450, 350)\n"
31515"\n"
31516"        # a new widget with two adjustable panes,\n"
31517"        # one on the left and one on the right\n"
31518"        paned = Gtk.Paned.new(Gtk.Orientation.HORIZONTAL)\n"
31519"\n"
31520"        # two images\n"
31521"        image1 = Gtk.Image()\n"
31522"        image1.set_from_file(\"gnome-image.png\")\n"
31523"        image2 = Gtk.Image()\n"
31524"        image2.set_from_file(\"tux.png\")\n"
31525"\n"
31526"        # add the first image to the left pane\n"
31527"        paned.add1(image1)\n"
31528"        # add the second image to the right pane\n"
31529"        paned.add2(image2)\n"
31530"\n"
31531"        # add the panes to the window\n"
31532"        self.add(paned)\n"
31533"\n"
31534"\n"
31535"class MyApplication(Gtk.Application):\n"
31536"\n"
31537"    def __init__(self):\n"
31538"        Gtk.Application.__init__(self)\n"
31539"\n"
31540"    def do_activate(self):\n"
31541"        win = MyWindow(self)\n"
31542"        win.show_all()\n"
31543"\n"
31544"    def do_startup(self):\n"
31545"        Gtk.Application.do_startup(self)\n"
31546"\n"
31547"app = MyApplication()\n"
31548"exit_status = app.run(sys.argv)\n"
31549"sys.exit(exit_status)\n"
31550
31551#. (itstool) path: section/title
31552#: C/paned.py.page:34
31553msgid "Useful methods for a Paned widget"
31554msgstr "Paned 위젯에 쓸만한 메서드"
31555
31556#. (itstool) path: section/p
31557#: C/paned.py.page:35
31558msgid ""
31559"To have two vertically aligned panes, use <code>Gtk.Orientation.VERTICAL</code> instead of <code>Gtk.Orientation."
31560"HORIZONTAL</code>. The method <code>add1(widget1)</code> will add the <code>widget1</code> to the top pane, and "
31561"<code>add2(widget2)</code> will add the <code>widget2</code> to the bottom pane."
31562msgstr ""
31563"수직 처리 창을 두려면 <code>Gtk.Orientation.HORIZONTAL</code> 대신 <code>Gtk.Orientation.VERTICAL</code>를 사용하십"
31564"시오. <code>add1(widget1)</code> 메서드는, 최상단 창에 <code>widget1</code>를 추가하며, <code>add2(widget2)</code> "
31565"메서드는 하단 창에 <code>widget2</code>를 추가합니다."
31566
31567#. (itstool) path: info/title
31568#: C/paned.vala.page:8
31569msgctxt "text"
31570msgid "Paned (Vala)"
31571msgstr "Paned (Vala)"
31572
31573#. (itstool) path: section/code
31574#: C/paned.vala.page:29
31575#, no-wrap
31576msgid ""
31577"/* This is the application. */\n"
31578"public class MyApplication : Gtk.Application {\n"
31579"\t/* Override the 'activate' signal of GLib.Application. */\n"
31580"\tprotected override void activate () {\n"
31581"\n"
31582"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
31583"\t\twindow.title = \"Paned Example\";\n"
31584"\t\twindow.set_default_size (450,350);\n"
31585"\n"
31586"\t\t// a new widget with two adjustable panes,\n"
31587"\t\t// one on the left and one on the right\n"
31588"\t\tvar paned = new Gtk.Paned (Gtk.Orientation.HORIZONTAL);\n"
31589"\n"
31590"\t\t/* two images */\n"
31591"\t\tvar image1 = new Gtk.Image ();\n"
31592"\t\timage1.set_from_file (\"gnome-image.png\");\n"
31593"\t\tvar image2 = new Gtk.Image ();\n"
31594"\t\timage2.set_from_file (\"tux.png\");\n"
31595"\n"
31596"\t\t/* add the first image to the left pane */\n"
31597"\t\tpaned.add1 (image1);\n"
31598"\n"
31599"\t\t/* add the second image to the right pane */\n"
31600"\t\tpaned.add2 (image2);\n"
31601"\n"
31602"\t\t/* add the panes to the window */\n"
31603"\t\twindow.add (paned);\n"
31604"\t\twindow.show_all ();\n"
31605"\t}\n"
31606"}\n"
31607"\n"
31608"/* main creates and runs the application. */\n"
31609"public int main (string[] args) {\n"
31610"\treturn new MyApplication ().run (args);\n"
31611"}\n"
31612msgstr ""
31613"/* This is the application. */\n"
31614"public class MyApplication : Gtk.Application {\n"
31615"\t/* Override the 'activate' signal of GLib.Application. */\n"
31616"\tprotected override void activate () {\n"
31617"\n"
31618"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
31619"\t\twindow.title = \"Paned Example\";\n"
31620"\t\twindow.set_default_size (450,350);\n"
31621"\n"
31622"\t\t// a new widget with two adjustable panes,\n"
31623"\t\t// one on the left and one on the right\n"
31624"\t\tvar paned = new Gtk.Paned (Gtk.Orientation.HORIZONTAL);\n"
31625"\n"
31626"\t\t/* two images */\n"
31627"\t\tvar image1 = new Gtk.Image ();\n"
31628"\t\timage1.set_from_file (\"gnome-image.png\");\n"
31629"\t\tvar image2 = new Gtk.Image ();\n"
31630"\t\timage2.set_from_file (\"tux.png\");\n"
31631"\n"
31632"\t\t/* add the first image to the left pane */\n"
31633"\t\tpaned.add1 (image1);\n"
31634"\n"
31635"\t\t/* add the second image to the right pane */\n"
31636"\t\tpaned.add2 (image2);\n"
31637"\n"
31638"\t\t/* add the panes to the window */\n"
31639"\t\twindow.add (paned);\n"
31640"\t\twindow.show_all ();\n"
31641"\t}\n"
31642"}\n"
31643"\n"
31644"/* main creates and runs the application. */\n"
31645"public int main (string[] args) {\n"
31646"\treturn new MyApplication ().run (args);\n"
31647"}\n"
31648
31649#. (itstool) path: item/p
31650#: C/paned.vala.page:36
31651msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Paned.html\">GtkPaned</link>"
31652msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Paned.html\">GtkPaned</link>"
31653
31654#. (itstool) path: info/title
31655#: C/photo-wall.c.page:7
31656msgctxt "text"
31657msgid "Photo wall (C)"
31658msgstr "Photo wall(C)"
31659
31660#. (itstool) path: info/desc
31661#: C/photo-wall.c.page:10
31662msgid "A Clutter image viewer"
31663msgstr "클러터 그림 보기"
31664
31665#. (itstool) path: credit/name
31666#: C/photo-wall.c.page:14
31667msgid "Chris Kühl"
31668msgstr "Chris Kühl"
31669
31670#. (itstool) path: page/title
31671#: C/photo-wall.c.page:28
31672msgid "Photo wall"
31673msgstr "포토 월"
31674
31675#. (itstool) path: synopsis/p
31676#: C/photo-wall.c.page:31
31677msgid "For this example we will build a simple image viewer using Clutter. You will learn:"
31678msgstr "이 예제에서는 클러터로 간단한 그림 보기 프로그램을 만들겠습니다. 다음을 익히는 과정입니다:"
31679
31680#. (itstool) path: item/p
31681#: C/photo-wall.c.page:33
31682msgid "How to size and position <code>ClutterActor</code>s"
31683msgstr "<code>ClutterActor</code>에서 크기 위치 설정하는 방법"
31684
31685#. (itstool) path: item/p
31686#: C/photo-wall.c.page:34
31687msgid "How to place an image in a <code>ClutterActor</code>"
31688msgstr "<code>ClutterActor</code>에서 그림 배치하는 방법"
31689
31690#. (itstool) path: item/p
31691#: C/photo-wall.c.page:35
31692msgid "How to do simple transitions using Clutter's animation framework"
31693msgstr "클러터 애니메이션 프레임워크로 간단하게 트랜지션 처리하는 방법"
31694
31695#. (itstool) path: item/p
31696#: C/photo-wall.c.page:36
31697msgid "How to make <code>ClutterActor</code>s respond to mouse events"
31698msgstr "마우스 이벤트에 대해 <code>ClutterActor</code>에서 응답하는 방법"
31699
31700#. (itstool) path: item/p
31701#: C/photo-wall.c.page:37
31702msgid "How to get file names from a directory"
31703msgstr "디렉터리에서 파일 이름 가져오기"
31704
31705#. (itstool) path: section/title
31706#: C/photo-wall.c.page:42 C/record-collection.js.page:40
31707msgid "Introduction"
31708msgstr "도입부"
31709
31710#. (itstool) path: section/p
31711#: C/photo-wall.c.page:43
31712msgid ""
31713"Clutter is a library for creating dynamic user interfaces using OpenGL for hardware acceleration. This example "
31714"demonstrates a small, but central, part of the Clutter library to create a simple but attractive image viewing "
31715"program."
31716msgstr ""
31717"클러터는 하드웨어 가속 OpenGL을 활용하여 동적 사용자 인터페이스를 만드는 라이브러리입니다. 이 예제는 작은 일부를 보"
31718"여주지만, 중심적으로는, 간단하지만 매력적인 그림 보기 프로그램을 만드는 클러터 라이브러리의 일부 동작을 시연합니다."
31719
31720#. (itstool) path: section/p
31721#: C/photo-wall.c.page:46
31722msgid ""
31723"To help us reach our goal we will be utilising a few other common pieces of GLib as well. Most importantly, we'll "
31724"use one <code>GPtrArray</code>, a dynamic array of pointers, to hold the file path names. We will also use "
31725"<code>GDir</code>, a utility for working with directories, to access our image directory and gather file paths."
31726msgstr ""
31727"목적을 위해 GLib 같은 일부 일반적인 부분도 마찬가지로 활용합니다. 상당히 중요하게 <code>GPtrArray</code> 동적 포인"
31728"터 배열을 활용하여 파일 경로 이름을 넣어두겠습니다. 또한 디렉터리를 다루는 <code>GDir</code>로 그림 디렉터리에 접근"
31729"하고 경로를 가져올 때 활용하겠습니다."
31730
31731#. (itstool) path: item/p
31732#: C/photo-wall.c.page:59
31733msgid ""
31734"Choose <gui>GTK+ (simple)</gui> from the <gui>C</gui> tab, click <gui>Continue</gui>, and fill out your details on "
31735"the next few pages. Use <file>photo-wall</file> as project name and directory."
31736msgstr ""
31737"<gui>C</gui> 탭에서 <gui>GTK+ (단순)</gui>를 선택하고, <gui>계속</gui>을 누른 다음, 나타난 페이지에서 몇가지 자세"
31738"한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>photo-wall</file>을 입력하십시오."
31739
31740#. (itstool) path: item/p
31741#: C/photo-wall.c.page:62
31742msgid ""
31743"Make sure that <gui>Use GtkBuilder for user interface</gui> is disabled as we will create the UI manually in this "
31744"tutorial. Check the <link xref=\"guitar-tuner.c\">Guitar-Tuner</link> tutorial using the interface builder."
31745msgstr ""
31746"앞서 따라하기 지침을 통해 사용자 인터페이스를 직접 만들 예정이므로 <gui>사용자 인터페이스에 GtkBuilder 사용</gui> "
31747"설정을 껐는지 확인하십시오. 인터페이스 빌더 사용법을 알아보려면 <link xref=\"guitar-tuner.c\">기타 조율 프로그램</"
31748"link> 따라하기 지침서를 확인하십시오."
31749
31750#. (itstool) path: item/p
31751#: C/photo-wall.c.page:67
31752msgid ""
31753"Enable <gui>Configure external packages</gui>. On the next page, select <em>clutter-1.0</em> from the list to "
31754"include the Clutter library in your project."
31755msgstr ""
31756"<gui>외부 패키지 설정</gui>을 <gui>켬</gui>으로 설정했는지 확인하십시오. 다음 페이지의 목록에서 "
31757"<em>gstreamer-0.10</em>를 선택하여 프로젝트에 지스트리머 라이브러리를 넣으십시오."
31758
31759#. (itstool) path: section/title
31760#: C/photo-wall.c.page:80
31761msgid "A look at Photo Wall"
31762msgstr "포토 월 살펴보기"
31763
31764#. (itstool) path: section/p
31765#: C/photo-wall.c.page:81
31766msgid "Our image viewer presents the user with a wall of images."
31767msgstr "그립 보기 프로그램에서는 그림 벽으로 사용자를 나타냅니다."
31768
31769#. (itstool) path: section/media
31770#. This is a reference to an external file such as an image or video. When
31771#. the file changes, the md5 hash will change to let you know you need to
31772#. update your localized copy. The msgstr is not used at all. Set it to
31773#. whatever you like once you have updated your copy of the file.
31774#: C/photo-wall.c.page:84
31775msgctxt "_"
31776msgid "external ref='media/photo-wall.png' md5='f19590d97e8ec029cda3c44b769c11cd'"
31777msgstr ""
31778
31779#. (itstool) path: section/p
31780#: C/photo-wall.c.page:85
31781msgid ""
31782"When an image is clicked, it is animated to fill the viewing area. When the image having focus is clicked it is "
31783"returned to its original position using an animation with the same duration of 500 milliseconds."
31784msgstr ""
31785"그림을 누르면 보기 영역을 채울 때 움직입니다. 포커스를 획득한 그림이 눌린 상태면, 500 밀리초 동안 움직임을 활용하"
31786"여 원래 위치로 돌아옵니다."
31787
31788#. (itstool) path: section/media
31789#. This is a reference to an external file such as an image or video. When
31790#. the file changes, the md5 hash will change to let you know you need to
31791#. update your localized copy. The msgstr is not used at all. Set it to
31792#. whatever you like once you have updated your copy of the file.
31793#: C/photo-wall.c.page:87
31794msgctxt "_"
31795msgid "external ref='media/photo-wall-focused.png' md5='9f1ceecf3a28c1e468597b093a10cbae'"
31796msgstr ""
31797
31798#. (itstool) path: section/title
31799#: C/photo-wall.c.page:91
31800msgid "Initial setup"
31801msgstr "초기 설정"
31802
31803#. (itstool) path: section/p
31804#: C/photo-wall.c.page:92
31805msgid ""
31806"The following code segment contains many of the defines and variables we will be using in the following sections. "
31807"Use this as a reference for later sections. Copy this code to the beginning of <file>src/main.c</file>:"
31808msgstr ""
31809"다음 코드 일부에는 다음 섹션에서 활용할 정의와 변수 대부분이 들어갑니다. 이 부분을 다음 섹션 참고 용도로 활용하십시"
31810"오. 이 코드를 <file>src/main.c</file> 시작 부분에 복사해두십시오:"
31811
31812#. (itstool) path: section/code
31813#: C/photo-wall.c.page:95
31814#, no-wrap
31815msgid ""
31816"\n"
31817"#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;\n"
31818"#include &lt;clutter/clutter.h&gt;\n"
31819"\n"
31820"#define STAGE_WIDTH  800\n"
31821"#define STAGE_HEIGHT 600\n"
31822"\n"
31823"#define THUMBNAIL_SIZE 200\n"
31824"#define ROW_COUNT (STAGE_HEIGHT / THUMBNAIL_SIZE)\n"
31825"#define COL_COUNT (STAGE_WIDTH  / THUMBNAIL_SIZE)\n"
31826"#define THUMBNAIL_COUNT (ROW_COUNT * COL_COUNT)\n"
31827"\n"
31828"#define ANIMATION_DURATION_MS 500\n"
31829"\n"
31830"#define IMAGE_DIR_PATH \"./berlin_images/\"\n"
31831"\n"
31832"static GPtrArray *img_paths;\n"
31833"\n"
31834"static ClutterPoint unfocused_pos;\n"
31835"\n"
31836msgstr ""
31837"\n"
31838"#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;\n"
31839"#include &lt;clutter/clutter.h&gt;\n"
31840"\n"
31841"#define STAGE_WIDTH  800\n"
31842"#define STAGE_HEIGHT 600\n"
31843"\n"
31844"#define THUMBNAIL_SIZE 200\n"
31845"#define ROW_COUNT (STAGE_HEIGHT / THUMBNAIL_SIZE)\n"
31846"#define COL_COUNT (STAGE_WIDTH  / THUMBNAIL_SIZE)\n"
31847"#define THUMBNAIL_COUNT (ROW_COUNT * COL_COUNT)\n"
31848"\n"
31849"#define ANIMATION_DURATION_MS 500\n"
31850"\n"
31851"#define IMAGE_DIR_PATH \"./berlin_images/\"\n"
31852"\n"
31853"static GPtrArray *img_paths;\n"
31854"\n"
31855"static ClutterPoint unfocused_pos;\n"
31856"\n"
31857
31858#. (itstool) path: section/title
31859#: C/photo-wall.c.page:119
31860msgid "Jumping into the code"
31861msgstr "코드로 넘어가기"
31862
31863#. (itstool) path: section/p
31864#: C/photo-wall.c.page:120
31865msgid ""
31866"We will start by taking a look at the <code>main()</code> function as a whole. Then we'll discuss the other code "
31867"sections in detail. Change the <file>src/main.c</file> to contain this <code>main()</code> function. You can "
31868"delete the <code>create_window()</code> function as we don't need it in this example."
31869msgstr ""
31870"<code>main()</code> 함수를 전체로서 먼저 살펴보겠습니다. 그 다음 다른 코드 부분을 자세하게 살펴보면서 이야기하겠습"
31871"니다. <file>src/main.c</file> 파일을 이 <code>main()</code> 함수 코드가 들어가도록 바꾸십시오. 이 예제를 실행할 때 "
31872"<code>create_window()</code> 함수는 필요 없으므로 삭제할 수 있습니다."
31873
31874#. (itstool) path: section/code
31875#: C/photo-wall.c.page:123
31876#, no-wrap
31877msgid ""
31878"\n"
31879"int\n"
31880"main(int argc, char *argv[])\n"
31881"{\n"
31882"    ClutterColor stage_color = { 16, 16, 16, 255 };\n"
31883"    ClutterActor *stage = NULL;\n"
31884"\n"
31885"    if (clutter_init (&amp;argc, &amp;argv) != CLUTTER_INIT_SUCCESS)\n"
31886"        return 1;\n"
31887"\n"
31888"    stage = clutter_stage_new();\n"
31889"    clutter_actor_set_size(stage, STAGE_WIDTH, STAGE_HEIGHT);\n"
31890"    clutter_actor_set_background_color(stage, &amp;stage_color);\n"
31891"    clutter_stage_set_title(CLUTTER_STAGE (stage), \"Photo Wall\");\n"
31892"    g_signal_connect(stage, \"destroy\", G_CALLBACK(clutter_main_quit), NULL);\n"
31893"\n"
31894"    load_image_path_names();\n"
31895"\n"
31896"    guint row = 0;\n"
31897"    guint col = 0;\n"
31898"    for(row=0; row &lt; ROW_COUNT; ++row)\n"
31899"    {\n"
31900"        for(col=0; col &lt; COL_COUNT; ++col)\n"
31901"        {\n"
31902"            const char *img_path = g_ptr_array_index(img_paths, (row * COL_COUNT) + col);\n"
31903"            GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size(img_path, STAGE_HEIGHT, STAGE_HEIGHT, NULL);\n"
31904"            ClutterContent *image = clutter_image_new ();\n"
31905"            ClutterActor *actor = clutter_actor_new ();\n"
31906"\n"
31907"            if (pixbuf != NULL)\n"
31908"            {\n"
31909"                clutter_image_set_data(CLUTTER_IMAGE(image),\n"
31910"                                       gdk_pixbuf_get_pixels(pixbuf),\n"
31911"                                       gdk_pixbuf_get_has_alpha(pixbuf)\n"
31912"                                           ? COGL_PIXEL_FORMAT_RGBA_8888\n"
31913"                                           : COGL_PIXEL_FORMAT_RGB_888,\n"
31914"                                       gdk_pixbuf_get_width(pixbuf),\n"
31915"                                       gdk_pixbuf_get_height(pixbuf),\n"
31916"                                       gdk_pixbuf_get_rowstride(pixbuf),\n"
31917"                                       NULL);\n"
31918"            }\n"
31919"\n"
31920"            clutter_actor_set_content(actor, image);\n"
31921"            g_object_unref(image);\n"
31922"            g_object_unref(pixbuf);\n"
31923"\n"
31924"            initialize_actor(actor, row, col);\n"
31925"            clutter_actor_add_child(stage, actor);\n"
31926"        }\n"
31927"    }\n"
31928"\n"
31929"    /* Show the stage. */\n"
31930"    clutter_actor_show(stage);\n"
31931"\n"
31932"    /* Start the clutter main loop. */\n"
31933"    clutter_main();\n"
31934"\n"
31935"    g_ptr_array_unref(img_paths);\n"
31936"\n"
31937"    return 0;\n"
31938"}"
31939msgstr ""
31940"\n"
31941"int\n"
31942"main(int argc, char *argv[])\n"
31943"{\n"
31944"    ClutterColor stage_color = { 16, 16, 16, 255 };\n"
31945"    ClutterActor *stage = NULL;\n"
31946"\n"
31947"    if (clutter_init (&amp;argc, &amp;argv) != CLUTTER_INIT_SUCCESS)\n"
31948"        return 1;\n"
31949"\n"
31950"    stage = clutter_stage_new();\n"
31951"    clutter_actor_set_size(stage, STAGE_WIDTH, STAGE_HEIGHT);\n"
31952"    clutter_actor_set_background_color(stage, &amp;stage_color);\n"
31953"    clutter_stage_set_title(CLUTTER_STAGE (stage), \"Photo Wall\");\n"
31954"    g_signal_connect(stage, \"destroy\", G_CALLBACK(clutter_main_quit), NULL);\n"
31955"\n"
31956"    load_image_path_names();\n"
31957"\n"
31958"    guint row = 0;\n"
31959"    guint col = 0;\n"
31960"    for(row=0; row &lt; ROW_COUNT; ++row)\n"
31961"    {\n"
31962"        for(col=0; col &lt; COL_COUNT; ++col)\n"
31963"        {\n"
31964"            const char *img_path = g_ptr_array_index(img_paths, (row * COL_COUNT) + col);\n"
31965"            GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size(img_path, STAGE_HEIGHT, STAGE_HEIGHT, NULL);\n"
31966"            ClutterContent *image = clutter_image_new ();\n"
31967"            ClutterActor *actor = clutter_actor_new ();\n"
31968"\n"
31969"            if (pixbuf != NULL)\n"
31970"            {\n"
31971"                clutter_image_set_data(CLUTTER_IMAGE(image),\n"
31972"                                       gdk_pixbuf_get_pixels(pixbuf),\n"
31973"                                       gdk_pixbuf_get_has_alpha(pixbuf)\n"
31974"                                           ? COGL_PIXEL_FORMAT_RGBA_8888\n"
31975"                                           : COGL_PIXEL_FORMAT_RGB_888,\n"
31976"                                       gdk_pixbuf_get_width(pixbuf),\n"
31977"                                       gdk_pixbuf_get_height(pixbuf),\n"
31978"                                       gdk_pixbuf_get_rowstride(pixbuf),\n"
31979"                                       NULL);\n"
31980"            }\n"
31981"\n"
31982"            clutter_actor_set_content(actor, image);\n"
31983"            g_object_unref(image);\n"
31984"            g_object_unref(pixbuf);\n"
31985"\n"
31986"            initialize_actor(actor, row, col);\n"
31987"            clutter_actor_add_child(stage, actor);\n"
31988"        }\n"
31989"    }\n"
31990"\n"
31991"    /* Show the stage. */\n"
31992"    clutter_actor_show(stage);\n"
31993"\n"
31994"    /* Start the clutter main loop. */\n"
31995"    clutter_main();\n"
31996"\n"
31997"    g_ptr_array_unref(img_paths);\n"
31998"\n"
31999"    return 0;\n"
32000"}"
32001
32002#. (itstool) path: item/p
32003#: C/photo-wall.c.page:185
32004msgid ""
32005"Line 4: <code>ClutterColor</code> is defined by setting the red, green, blue and transparency (alpha) values. The "
32006"values range from 0-255. For transparency a value of 255 is opaque."
32007msgstr ""
32008"4번째 줄: <code>ClutterColor</code>는 적색, 녹색, 청색, 투명도(alpha) 값을 설정하여 정의합니다. 값 범위는 0부터 255"
32009"까지입니다. 255는 투명 수치가 가장 낮습니다."
32010
32011#. (itstool) path: item/p
32012#: C/photo-wall.c.page:186
32013msgid "Line 7: You must initialize Clutter. If you forget to do this, you will get very strange errors. Be warned."
32014msgstr "7번째 줄: 클러터를 초기화해야 합니다. 까먹었다면 이상한 오류가 납니다. 유의하세요."
32015
32016#. (itstool) path: item/p
32017#: C/photo-wall.c.page:187
32018msgid ""
32019"Lines 10‒14: Here we create a new <code>ClutterStage</code> . We then set the size using the defines from the "
32020"previous section and the address of the <code>ClutterColor</code> we just defined."
32021msgstr ""
32022"10~14번째 줄: 여기서 새 <code>ClutterStage</code>를 만듭니다. 앞 부분에서 정의한 코드로 사이즈를 설정하고 방금 정의"
32023"한 <code>ClutterColor</code> 의 위치를 정의합니다."
32024
32025#. (itstool) path: note/p
32026#: C/photo-wall.c.page:188
32027msgid ""
32028"A <code>ClutterStage</code> is the top-level <code>ClutterActor</code> onto which other <code>ClutterActor</code>s "
32029"are placed."
32030msgstr ""
32031"<code>ClutterStage</code>는 다른 <code>ClutterActor</code>가 놓인 곳의 최상위 <code>ClutterActor</code> 입니다."
32032
32033#. (itstool) path: item/p
32034#: C/photo-wall.c.page:190
32035msgid "Line 16: Here we call our function for getting the image file paths. We'll look at this in a bit."
32036msgstr "16번째 줄: 여기서 그림 파일 경로를 가져오는 함수를 호출합니다. 이 부분을 조금 살펴보겠습니다."
32037
32038#. (itstool) path: item/p
32039#: C/photo-wall.c.page:191
32040msgid ""
32041"Lines 18‒49: This is where we set up the <code>ClutterActor</code>s, load the images and place them into their "
32042"spot in the image wall. We will look at this in detail in the next section."
32043msgstr ""
32044"18~49번째 줄: 이 부분은 그림을 불러오고 그림 벽 부분에 두는 <code>ClutterActor</code>을 설정하는 부분입니다. 다음 "
32045"섹션에서 자세하게 이 부분을 살펴보겠습니다."
32046
32047#. (itstool) path: item/p
32048#: C/photo-wall.c.page:192
32049msgid "Line 52: Show the stage and <em>all its children</em>, meaning our images."
32050msgstr "52번째 줄: 그림의 스테이지와 <em>하위 요소</em>를 나타냅니다."
32051
32052#. (itstool) path: item/p
32053#: C/photo-wall.c.page:193
32054msgid "Line 55: Start the Clutter main loop."
32055msgstr "55번째 줄: 클러터 메인 루프를 시작합니다."
32056
32057#. (itstool) path: section/title
32058#: C/photo-wall.c.page:198
32059msgid "Setting up our image actors"
32060msgstr "그림 액터 구성"
32061
32062#. (itstool) path: note/p
32063#: C/photo-wall.c.page:199
32064msgid "In Clutter, an actor is the most basic visual element. Basically, everything you see is an actor."
32065msgstr "클러터에서 액터는 사장 기본적인 시각 구성 요소입니다. 근본적으로 여러분이 보는 모든 구성 요소는 액터입니다."
32066
32067#. (itstool) path: section/p
32068#: C/photo-wall.c.page:200
32069msgid ""
32070"In this section, we are going to take a closer look at the loop used for setting up the <code>ClutterActor</code>s "
32071"that will display our images."
32072msgstr "이 부분에서는 그림을 나타내는 <code>ClutterActor</code>를 설정하는 루프를 더 자세하게 살펴보겠습니다."
32073
32074#. (itstool) path: section/code
32075#: C/photo-wall.c.page:203
32076#, no-wrap
32077msgid ""
32078"\n"
32079"guint row = 0;\n"
32080"guint col = 0;\n"
32081"for(row=0; row &lt; ROW_COUNT; ++row)\n"
32082"{\n"
32083"    for(col=0; col &lt; COL_COUNT; ++col)\n"
32084"    {\n"
32085"        const char *img_path = g_ptr_array_index(img_paths, (row * COL_COUNT) + col);\n"
32086"        GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size(img_path, STAGE_HEIGHT, STAGE_HEIGHT, NULL);\n"
32087"        ClutterContent *image = clutter_image_new ();\n"
32088"        ClutterActor *actor = clutter_actor_new ();\n"
32089"\n"
32090"        if (pixbuf != NULL)\n"
32091"        {\n"
32092"            clutter_image_set_data(CLUTTER_IMAGE(image),\n"
32093"                                   gdk_pixbuf_get_pixels(pixbuf),\n"
32094"                                   gdk_pixbuf_get_has_alpha(pixbuf)\n"
32095"                                       ? COGL_PIXEL_FORMAT_RGBA_8888\n"
32096"                                       : COGL_PIXEL_FORMAT_RGB_888,\n"
32097"                                   gdk_pixbuf_get_width(pixbuf),\n"
32098"                                   gdk_pixbuf_get_height(pixbuf),\n"
32099"                                   gdk_pixbuf_get_rowstride(pixbuf),\n"
32100"                                   NULL);\n"
32101"        }\n"
32102"\n"
32103"        clutter_actor_set_content(actor, image);\n"
32104"        g_object_unref(image);\n"
32105"        g_object_unref(pixbuf);\n"
32106"\n"
32107"        initialize_actor(actor, row, col);\n"
32108"        clutter_actor_add_child(stage, actor);\n"
32109"    }\n"
32110"}\n"
32111"\n"
32112msgstr ""
32113"\n"
32114"guint row = 0;\n"
32115"guint col = 0;\n"
32116"for(row=0; row &lt; ROW_COUNT; ++row)\n"
32117"{\n"
32118"    for(col=0; col &lt; COL_COUNT; ++col)\n"
32119"    {\n"
32120"        const char *img_path = g_ptr_array_index(img_paths, (row * COL_COUNT) + col);\n"
32121"        GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file_at_size(img_path, STAGE_HEIGHT, STAGE_HEIGHT, NULL);\n"
32122"        ClutterContent *image = clutter_image_new ();\n"
32123"        ClutterActor *actor = clutter_actor_new ();\n"
32124"\n"
32125"        if (pixbuf != NULL)\n"
32126"        {\n"
32127"            clutter_image_set_data(CLUTTER_IMAGE(image),\n"
32128"                                   gdk_pixbuf_get_pixels(pixbuf),\n"
32129"                                   gdk_pixbuf_get_has_alpha(pixbuf)\n"
32130"                                       ? COGL_PIXEL_FORMAT_RGBA_8888\n"
32131"                                       : COGL_PIXEL_FORMAT_RGB_888,\n"
32132"                                   gdk_pixbuf_get_width(pixbuf),\n"
32133"                                   gdk_pixbuf_get_height(pixbuf),\n"
32134"                                   gdk_pixbuf_get_rowstride(pixbuf),\n"
32135"                                   NULL);\n"
32136"        }\n"
32137"\n"
32138"        clutter_actor_set_content(actor, image);\n"
32139"        g_object_unref(image);\n"
32140"        g_object_unref(pixbuf);\n"
32141"\n"
32142"        initialize_actor(actor, row, col);\n"
32143"        clutter_actor_add_child(stage, actor);\n"
32144"    }\n"
32145"}\n"
32146"\n"
32147
32148#. (itstool) path: item/p
32149#: C/photo-wall.c.page:239
32150msgid ""
32151"Line 7: Here we want to get the path at the <var>n</var>th location in the <code>GPtrArray</code> that is holding "
32152"our image path names. The <var>n</var>th position is calculated based on <code>row</code> and <code>col</code>."
32153msgstr ""
32154"7번째 줄:  여기서는 그림 경로 이름을 넣는 <code>GPtrArray</code>의 <var>n</var>번째 위치에서 경로를 가져오려고 합니"
32155"다. <var>n</var>번째  위치는 <code>행</code>과 <code>열</code> 기반으로 계산합니다."
32156
32157#. (itstool) path: item/p
32158#: C/photo-wall.c.page:241
32159msgid ""
32160"Line 8‒23: This is where we actually create the <code>ClutterActor</code> and place the image into the actor. The "
32161"first argument is the path which we access through our <code>GSList</code> node. The second argument is for error "
32162"reporting but we are ignoring that to keep things short."
32163msgstr ""
32164"8~23번째 줄: 실제로 <code>ClutterActor</code>를 만들고 액터에 그림을 넣는 부분입니다. 첫 인자는 <code>GSList</"
32165"code> 노드로 접근할 경로입니다. 두번째 인자는 오류 보고용이지만 단순성을 유지할 목적으로 무시합니다."
32166
32167#. (itstool) path: item/p
32168#: C/photo-wall.c.page:243
32169msgid ""
32170"Line 47: This adds the <code>ClutterActor</code> to the stage, which is a container. It also assumes ownership of "
32171"the <code>ClutterActor</code> which is something you'll want to look into as you get deeper into GNOME "
32172"development. See the <link href=\"http://library.gnome.org/devel/gobject/stable/gobject-memory.html"
32173"\"><code>GObject</code> documentation</link> for the gory details."
32174msgstr ""
32175"47번째 줄: <code>ClutterActor</code>를 컨테이너 스테이지에 추가합니다. 또한 여러분이 그놈 개발상 깊숙한 부분을 보려"
32176"는 <code>ClutterActor</code>의 소유자를 간주합니다. 적나라한 세부 내용은 <link href=\"http://library.gnome.org/"
32177"devel/gobject/stable/gobject-memory.html\"><code>GObject</code> 문서</link>를 참고하십시오."
32178
32179#. (itstool) path: section/title
32180#: C/photo-wall.c.page:249
32181msgid "Loading the images"
32182msgstr "그림 불러오기"
32183
32184#. (itstool) path: section/p
32185#: C/photo-wall.c.page:250
32186msgid "Let's take a short break from Clutter to see how we can get the file names from our image directory."
32187msgstr "그림 디렉터리에서 파일 이름을 가져오는 방법을 살펴볼 참에 클러터 내용 다루는 부분은 잠시 접어두겠습니다."
32188
32189#. (itstool) path: section/code
32190#: C/photo-wall.c.page:251
32191#, no-wrap
32192msgid ""
32193"\n"
32194"static void\n"
32195"load_image_path_names()\n"
32196"{\n"
32197"    /* Ensure we can access the directory. */\n"
32198"    GError *error = NULL;\n"
32199"    GDir *dir = g_dir_open(IMAGE_DIR_PATH, 0, &amp;error);\n"
32200"    if(error)\n"
32201"    {\n"
32202"        g_warning(\"g_dir_open() failed with error: %s\\n\", error-&gt;message);\n"
32203"        g_clear_error(&amp;error);\n"
32204"        return;\n"
32205"    }\n"
32206"\n"
32207"    img_paths = g_ptr_array_new_with_free_func (g_free);\n"
32208"\n"
32209"    const gchar *filename = g_dir_read_name(dir);\n"
32210"    while(filename)\n"
32211"    {\n"
32212"        if(g_str_has_suffix(filename, \".jpg\") || g_str_has_suffix(filename, \".png\"))\n"
32213"        {\n"
32214"            gchar *path = g_build_filename(IMAGE_DIR_PATH, filename, NULL);\n"
32215"            g_ptr_array_add (img_paths, path);\n"
32216"        }\n"
32217"        filename = g_dir_read_name(dir);\n"
32218"    }\n"
32219"}"
32220msgstr ""
32221"\n"
32222"static void\n"
32223"load_image_path_names()\n"
32224"{\n"
32225"    /* Ensure we can access the directory. */\n"
32226"    GError *error = NULL;\n"
32227"    GDir *dir = g_dir_open(IMAGE_DIR_PATH, 0, &amp;error);\n"
32228"    if(error)\n"
32229"    {\n"
32230"        g_warning(\"g_dir_open() failed with error: %s\\n\", error-&gt;message);\n"
32231"        g_clear_error(&amp;error);\n"
32232"        return;\n"
32233"    }\n"
32234"\n"
32235"    img_paths = g_ptr_array_new_with_free_func (g_free);\n"
32236"\n"
32237"    const gchar *filename = g_dir_read_name(dir);\n"
32238"    while(filename)\n"
32239"    {\n"
32240"        if(g_str_has_suffix(filename, \".jpg\") || g_str_has_suffix(filename, \".png\"))\n"
32241"        {\n"
32242"            gchar *path = g_build_filename(IMAGE_DIR_PATH, filename, NULL);\n"
32243"            g_ptr_array_add (img_paths, path);\n"
32244"        }\n"
32245"        filename = g_dir_read_name(dir);\n"
32246"    }\n"
32247"}"
32248
32249#. (itstool) path: item/p
32250#: C/photo-wall.c.page:279
32251msgid "Lines 5 and 12: This opens our directory or, if an error occurred, returns after printing an error message."
32252msgstr "5~12번째 줄: 디렉터리를 열거나 오류가 발생했을 경우 오류 메시지를 출력한 후 값을 반환합니다."
32253
32254#. (itstool) path: item/p
32255#: C/photo-wall.c.page:280
32256msgid ""
32257"Lines 16‒25: The first line gets another file name from the <code>GDir</code> we opened earlier. If there was an "
32258"image file (which we check by looking at its extension, \".png\" or \".jpg\") in the directory we proceed to "
32259"prepend the image directory path to the filename and prepend that to the list we set up earlier. Lastly we attempt "
32260"to get the next path name and reenter the loop if another file was found."
32261msgstr ""
32262"16~25번째 줄: 첫 줄은 앞서 열어둔 <code>GDir</code>에서 다른 파일 이름을 가져옵니다. 디렉터리에 그림 파일(\".png\" "
32263"또는 \".jpg\" 확장자를 보고 확인)이 있다면 파일 이름에 그림 디렉터리 경로를 붙이고 앞서 설정한 목록에 추가합니다. "
32264"마지막으로, 그 다음 경로 이름을 가져온 다음, 해당 경로에서 다른 파일을 찾으면 반복문에 다시 들어갑니다."
32265
32266#. (itstool) path: section/title
32267#: C/photo-wall.c.page:285
32268msgid "Set up the actors"
32269msgstr "액터 구성"
32270
32271#. (itstool) path: section/p
32272#: C/photo-wall.c.page:286
32273msgid ""
32274"We now take a look at the sizing and positioning of <code>ClutterActor</code>s and also readying the "
32275"<code>ClutterActor</code> for user interaction."
32276msgstr "이제 <code>ClutterActor</code>의 크기 조절 및 위치 설정, 사용자 반응 대기 부분을 살펴보겠습니다."
32277
32278#. (itstool) path: section/code
32279#: C/photo-wall.c.page:289
32280#, no-wrap
32281msgid ""
32282"\n"
32283"/* This function handles setting up and placing the rectangles. */\n"
32284"static void\n"
32285"initialize_actor(ClutterActor *actor, guint row, guint col)\n"
32286"{\n"
32287"    clutter_actor_set_size(actor, THUMBNAIL_SIZE, THUMBNAIL_SIZE);\n"
32288"    clutter_actor_set_position(actor, col * THUMBNAIL_SIZE, row * THUMBNAIL_SIZE);\n"
32289"    clutter_actor_set_reactive(actor, TRUE);\n"
32290"\n"
32291"    g_signal_connect(actor,\n"
32292"                     \"button-press-event\",\n"
32293"                     G_CALLBACK(actor_clicked_cb),\n"
32294"                     NULL);\n"
32295"}"
32296msgstr ""
32297"\n"
32298"/* This function handles setting up and placing the rectangles. */\n"
32299"static void\n"
32300"initialize_actor(ClutterActor *actor, guint row, guint col)\n"
32301"{\n"
32302"    clutter_actor_set_size(actor, THUMBNAIL_SIZE, THUMBNAIL_SIZE);\n"
32303"    clutter_actor_set_position(actor, col * THUMBNAIL_SIZE, row * THUMBNAIL_SIZE);\n"
32304"    clutter_actor_set_reactive(actor, TRUE);\n"
32305"\n"
32306"    g_signal_connect(actor,\n"
32307"                     \"button-press-event\",\n"
32308"                     G_CALLBACK(actor_clicked_cb),\n"
32309"                     NULL);\n"
32310"}"
32311
32312#. (itstool) path: item/p
32313#: C/photo-wall.c.page:305
32314msgid ""
32315"Line 7: Setting an actor reactive means that it reacts to events, such as <code>button-press-event</code> in our "
32316"case. For Photo Wall, all <code>ClutterActor</code>s in the wall should initially be reactive."
32317msgstr ""
32318"7번째 줄: 액터 반응 설정은 액터가 <code>button-press-event</code> 같은 이벤트에 반응하게 합니다. 포토 월에서는 벽"
32319"에 있는 모든 <code>ClutterActor</code>에 반응 규칙을 초기화해야합니다."
32320
32321#. (itstool) path: item/p
32322#: C/photo-wall.c.page:308
32323msgid ""
32324"Line 9‒12: Now we connect the <code>button-press-event</code> to the <code>actor_clicked_cb</code> callback which "
32325"we will look at next."
32326msgstr ""
32327"9~12번째 줄: 이제 <code>button-press-event</code> 이벤트를 다음에 살펴볼 <code>actor_clicked_cb</code> 콜백 함수에 "
32328"연결합니다."
32329
32330#. (itstool) path: section/p
32331#: C/photo-wall.c.page:311
32332msgid "At this point we've got a wall of images that are ready to be viewed."
32333msgstr "여기서 볼 준비를 마친 그림 벽을 가져옵니다."
32334
32335#. (itstool) path: section/title
32336#: C/photo-wall.c.page:315
32337msgid "Reacting to the clicks"
32338msgstr "누름 동작에 반응"
32339
32340#. (itstool) path: section/code
32341#: C/photo-wall.c.page:319
32342#, no-wrap
32343msgid ""
32344"\n"
32345"static gboolean\n"
32346"actor_clicked_cb(ClutterActor *actor,\n"
32347"                 ClutterEvent *event,\n"
32348"                 gpointer      user_data)\n"
32349"{\n"
32350"    /* Flag to keep track of our state. */\n"
32351"    static gboolean is_focused = FALSE;\n"
32352"    ClutterActorIter iter;\n"
32353"    ClutterActor *child;\n"
32354"\n"
32355"    /* Reset the focus state on all the images */\n"
32356"    clutter_actor_iter_init (&amp;iter, clutter_actor_get_parent(actor));\n"
32357"    while (clutter_actor_iter_next(&amp;iter, &amp;child))\n"
32358"      clutter_actor_set_reactive(child, is_focused);\n"
32359"\n"
32360"    clutter_actor_save_easing_state(actor);\n"
32361"    clutter_actor_set_easing_duration(actor, ANIMATION_DURATION_MS);\n"
32362"\n"
32363"    if(is_focused)\n"
32364"    {\n"
32365"        /* Restore the old location and size. */\n"
32366"        clutter_actor_set_position(actor, unfocused_pos.x, unfocused_pos.y);\n"
32367"        clutter_actor_set_size(actor, THUMBNAIL_SIZE, THUMBNAIL_SIZE);\n"
32368"    }\n"
32369"    else\n"
32370"    {\n"
32371"        /* Save the current location before animating. */\n"
32372"        clutter_actor_get_position(actor, &amp;unfocused_pos.x, &amp;unfocused_pos.y);\n"
32373"        /* Only the currently focused image should receive events. */\n"
32374"        clutter_actor_set_reactive(actor, TRUE);\n"
32375"\n"
32376"        /* Put the focused image on top. */\n"
32377"        clutter_actor_set_child_above_sibling(clutter_actor_get_parent(actor), actor, NULL);\n"
32378"\n"
32379"        clutter_actor_set_position(actor, (STAGE_WIDTH - STAGE_HEIGHT) / 2.0, 0);\n"
32380"        clutter_actor_set_size(actor, STAGE_HEIGHT, STAGE_HEIGHT);\n"
32381"    }\n"
32382"\n"
32383"    clutter_actor_restore_easing_state(actor);\n"
32384"\n"
32385"    /* Toggle our flag. */\n"
32386"    is_focused = !is_focused;\n"
32387"\n"
32388"    return TRUE;\n"
32389"}"
32390msgstr ""
32391"\n"
32392"static gboolean\n"
32393"actor_clicked_cb(ClutterActor *actor,\n"
32394"                 ClutterEvent *event,\n"
32395"                 gpointer      user_data)\n"
32396"{\n"
32397"    /* Flag to keep track of our state. */\n"
32398"    static gboolean is_focused = FALSE;\n"
32399"    ClutterActorIter iter;\n"
32400"    ClutterActor *child;\n"
32401"\n"
32402"    /* Reset the focus state on all the images */\n"
32403"    clutter_actor_iter_init (&amp;iter, clutter_actor_get_parent(actor));\n"
32404"    while (clutter_actor_iter_next(&amp;iter, &amp;child))\n"
32405"      clutter_actor_set_reactive(child, is_focused);\n"
32406"\n"
32407"    clutter_actor_save_easing_state(actor);\n"
32408"    clutter_actor_set_easing_duration(actor, ANIMATION_DURATION_MS);\n"
32409"\n"
32410"    if(is_focused)\n"
32411"    {\n"
32412"        /* Restore the old location and size. */\n"
32413"        clutter_actor_set_position(actor, unfocused_pos.x, unfocused_pos.y);\n"
32414"        clutter_actor_set_size(actor, THUMBNAIL_SIZE, THUMBNAIL_SIZE);\n"
32415"    }\n"
32416"    else\n"
32417"    {\n"
32418"        /* Save the current location before animating. */\n"
32419"        clutter_actor_get_position(actor, &amp;unfocused_pos.x, &amp;unfocused_pos.y);\n"
32420"        /* Only the currently focused image should receive events. */\n"
32421"        clutter_actor_set_reactive(actor, TRUE);\n"
32422"\n"
32423"        /* Put the focused image on top. */\n"
32424"        clutter_actor_set_child_above_sibling(clutter_actor_get_parent(actor), actor, NULL);\n"
32425"\n"
32426"        clutter_actor_set_position(actor, (STAGE_WIDTH - STAGE_HEIGHT) / 2.0, 0);\n"
32427"        clutter_actor_set_size(actor, STAGE_HEIGHT, STAGE_HEIGHT);\n"
32428"    }\n"
32429"\n"
32430"    clutter_actor_restore_easing_state(actor);\n"
32431"\n"
32432"    /* Toggle our flag. */\n"
32433"    is_focused = !is_focused;\n"
32434"\n"
32435"    return TRUE;\n"
32436"}"
32437
32438#. (itstool) path: item/p
32439#: C/photo-wall.c.page:366
32440msgid ""
32441"Lines 1‒4: We have to make sure our callback function matches the signature required for the "
32442"<code>button_clicked_event</code> signal. For our example, we will only use the first argument, the "
32443"<code>ClutterActor</code> that is actually clicked."
32444msgstr ""
32445"1~4번째 줄: <code>button_clicked_event</code> 시그널에 필요한 시그니쳐에 일치하는 콜백 함수를 확인해야합니다. 예를 "
32446"들면 실제로 누를 <code>ClutterActor</code>가 들어가는 첫번째 인자만 씁니다."
32447
32448#. (itstool) path: note/p
32449#: C/photo-wall.c.page:368
32450msgid ""
32451"A few words on the arguments we are not using in this example. The <code>ClutterEvent</code> is different "
32452"depending on what event is being handled. For example, a key event produces a <code>ClutterKeyEvent</code> from "
32453"which you can get the key being pressed among other information. For mouse click events you get a "
32454"<code>ClutterButtonEvent</code> from which you can get the <code>x</code> and <code>y</code> values. See the "
32455"Clutter documentation for other <code>ClutterEvent</code> types."
32456msgstr ""
32457"이 예제에서 사용하지 않는 인자에 대해 몇가지 알아둘 내용이 있습니다. <code>ClutterEvent</code>는 어떤 이벤트를 처리"
32458"할지에 따라 다릅니다. 예를 들면, 키 이벤트는 여러 이벤트 중에 키누름 이벤트를 받을 수 있는 <code>ClutterKeyEvent</"
32459"code>를 내보냅니다. 마우스 단추 누름 이벤트 상황에선 <code>x</code>, <code>y</code> 값을 받을 수 있는 "
32460"<code>ClutterButtonEvent</code>를 취할 수 있습니다. 다른 <code>ClutterEvent</code> 형식을 알아보려면 클러터 문서를 "
32461"참고하십시오."
32462
32463#. (itstool) path: note/p
32464#: C/photo-wall.c.page:369
32465msgid ""
32466"The <code>user_data</code> is what one uses to pass data into the function. A pointer to any data type can be "
32467"passed in. If you need multiple data to be passed into the callback, you can place the data into a struct and pass "
32468"its address in."
32469msgstr ""
32470"<code>user_data</code>는 함수에 데이터를 전달할 때 활용합니다. 어떤 데이터 형식의 포인터든 전달할 수 있습니다. 콜백"
32471"에 여러 데이터를 넘겨야 한다면, 구조체에 데이터를 넣고 전달할 수 있습니다."
32472
32473#. (itstool) path: item/p
32474#: C/photo-wall.c.page:373
32475msgid ""
32476"Line 7: We set up a static flag to track which state we are in: wall mode or focus mode. We start out in wall mode "
32477"so no image has focus. Thus, we set the flag to <code>FALSE</code> initially."
32478msgstr ""
32479"7번째 줄: 우리가 보는 상태를 보여줄 정적 플래그 벽 모드 또는 포커스 모드를 설정합니다. 벽 모드로 시작해서 어떤 이미"
32480"지에도 포커스를 맞추지 않도록 합니다. 따라서 초기 플래그 값은 <code>FALSE</code> 입니다."
32481
32482#. (itstool) path: item/p
32483#: C/photo-wall.c.page:374
32484msgid "Line 12‒14: These set the image actors to receive events if they are focused."
32485msgstr "12~14번째 줄: 이 부분에서 그림에 포커스를 맞췄을 때 이벤트를 받을 그림 액터를 설정합니다."
32486
32487#. (itstool) path: item/p
32488#: C/photo-wall.c.page:375
32489msgid "Line 16‒17: Here we set the animation duration and save the current state."
32490msgstr "16~17번째 줄: 여기서 움직임 시간을 설정하고 현재 상태를 저장합니다."
32491
32492#. (itstool) path: item/p
32493#: C/photo-wall.c.page:376
32494msgid ""
32495"Lines 21‒23: Reaching this code means that one image currently has focus and we want to return to wall mode. "
32496"Setting a position on a <code>ClutterActor</code> begins an animation with the duration that we set in line 17."
32497msgstr ""
32498"21~23번째 줄: 이 코드에 도달한다는 건 그림 하나에 포커스를 맞췄으며, 벽 모드로 돌아가려 함을 의미합니다. "
32499"<code>ClutterActor</code>에 위치를 설정하면 17번째 줄에서 설정한 시간만큼 그림 움직임을 시작합니다."
32500
32501#. (itstool) path: item/p
32502#: C/photo-wall.c.page:378
32503msgid ""
32504"Line 24: Reaching this line of code means we are currently in the wall state and are about to give a "
32505"<code>ClutterActor</code> focus. Here we save the starting position so that we can return to it later."
32506msgstr ""
32507"24번째 줄: 이 코드 줄에 도달하면 현재 벽 상태에 있으며 <code>ClutterActor</code> 포커스를 주려는 상황입니다. 여기"
32508"서 시작 위치를 저장하여 나중에 다시 이 위치로 돌아올 수 있습니다."
32509
32510#. (itstool) path: item/p
32511#: C/photo-wall.c.page:379
32512msgid ""
32513"Line 25: Setting the <code>ClutterActor</code>'s <code>reactive</code> property to <code>TRUE</code> makes this "
32514"<code>ClutterActor</code> react to events. In this focused state the only <code>ClutterActor</code> that we want "
32515"to receive events will be the <code>ClutterActor</code> being viewed. Clicking on the <code>ClutterActor</code> "
32516"will return it to its starting position."
32517msgstr ""
32518"25번째 줄: <code>ClutterActor</code>의 <code>reactive</code> 속성을 <code>TRUE</code>로 설정하면, "
32519"<code>ClutterActor</code>에서 이벤트에 반응합니다. 이 포커스 상태에서 우리가 이벤트를 받으려는 <code>ClutterActor</"
32520"code>는 우리가 보고 있는 <code>ClutterActor</code>입니다. <code>ClutterActor</code>를 누르면 액터의 시작 위치로 돌"
32521"아갑니다."
32522
32523#. (itstool) path: item/p
32524#: C/photo-wall.c.page:380
32525msgid ""
32526"Lines 27‒36: This is where we save the current position of the image, set it to receive events and then make it "
32527"appear above the other images and start animating it to fill the stage."
32528msgstr ""
32529"27~36번째 줄: 이 부분은 그림의 현재 위치를 저장하고, 이벤트를 받도록 설정하며, 다른 그림 위로 나타나 스테이지를 채"
32530"우는 움직임을 시작하는 부분입니다."
32531
32532#. (itstool) path: item/p
32533#: C/photo-wall.c.page:381
32534msgid "Line 39: Here we restore the easing state to what was set before we changed it in line 16."
32535msgstr "39번째 줄: 이 부분에서는 16번째 줄에서 바꾸기 전의 움직임 처리 상태로 복원합니다."
32536
32537#. (itstool) path: item/p
32538#: C/photo-wall.c.page:382
32539msgid "Line 42: Here we toggle the <code>is_focused</code> flag to the current state."
32540msgstr "42번째 줄: 여기서 <code>is_focused</code> 값을 현재 상태 값으로 바꿉니다."
32541
32542#. (itstool) path: item/p
32543#: C/photo-wall.c.page:383
32544msgid ""
32545"As mentioned previously, the <code>ClutterActor</code>s with higher <code>depth</code> values receive events but "
32546"can allow <code>ClutterActor</code>s below them to also receive events. Returning <code>TRUE</code> will stop "
32547"events from being passed down, while <code>FALSE</code> will pass events down."
32548msgstr ""
32549"앞에서 말씀드린대로, 좀 더 큰 <code>depth</code> 값이 들어간 <code>ClutterActor</code>에서 이벤트를 받는데 "
32550"<code>ClutterActor</code>의 아래에 있는 <code>ClutterActor</code>도 이벤트를 받을 수 있습니다. <code>TRUE</code>를 "
32551"반환하면 이벤트를 전달해 내려가는 과정을 멈추며, <code>FALSE</code>를 반환하면 이벤트를 계속 하부로 전달해내려갑니"
32552"다."
32553
32554#. (itstool) path: note/p
32555#: C/photo-wall.c.page:385
32556msgid "Remember, however, that to receive events the <code>ClutterActor</code>s must be set <code>reactive</code>."
32557msgstr "허나, <code>ClutterActor</code> 이벤트를 받으려면 <code>reactive</code>를 설정해야합니다."
32558
32559#. (itstool) path: section/p
32560#: C/photo-wall.c.page:393
32561msgid ""
32562"All of the code should now be ready to go. All you need now is some pictures to load. By default, the pictures are "
32563"loaded from a <file>berlin_images</file> directory. If you want, you can change the <code>#define IMAGE_DIR_PATH</"
32564"code> line near the top to refer to your photo directory, or create a <file>berlin_images</file> directory by "
32565"clicking <guiseq><gui>Project</gui><gui>New Directory...</gui></guiseq> and creating a <file>berlin_images</file> "
32566"directory as a subdirectory of the <file>photo-wall</file> directory. Make sure to put at least twelve images in "
32567"the directory!"
32568msgstr ""
32569"모든 코드 준비가 끝났습니다. 이제 그림을 불러오는 일이 필요합니다. 기본적으로 그림은 <file>berlin_images</file> 디"
32570"렉터리에서 불러옵니다. 원한다면 사진 디렉터리 또는 <guiseq><gui>프로젝트</gui><gui>새 디렉터리…</gui></guiseq>를 누"
32571"른 후 <file>photo-wall</file> 디렉터리의 하위 디렉터리로 <file>berlin_images</file> 디렉터리를 만든 후 참조하도록 "
32572"상단 근처의 <code>#define IMAGE_DIR_PATH</code> 줄을 바꿀 수 있습니다. 디렉터리에 그림을 최소한 12개 넣었는지 확인"
32573"하십시오."
32574
32575#. (itstool) path: section/p
32576#: C/photo-wall.c.page:395
32577msgid ""
32578"When you have done that, click <guiseq><gui>Build</gui><gui>Build Project</gui></guiseq> to build everything "
32579"again, then <guiseq><gui>Run</gui><gui>Execute</gui></guiseq> to start the application."
32580msgstr ""
32581"다 끝났으면 <guiseq><gui>빌드</gui><gui>프로젝트 빌드</gui></guiseq>를 눌러 모두 다시 빌드하고, <guiseq><gui>실행</"
32582"gui><gui>실행</gui></guiseq>을 눌러 프로그램을 시작하십시오."
32583
32584#. (itstool) path: section/p
32585#: C/photo-wall.c.page:396
32586msgid ""
32587"If you haven't already done so, choose the <file>Debug/src/photo-wall</file> application in the dialog that "
32588"appears. Finally, hit <gui>Run</gui> and enjoy!"
32589msgstr ""
32590"아직 마무리가 안됐다면 나타나는 대화상자에서 <file>Debug/src/photo-wall</file> 프로그램을 선택하십시오. 마지막으로 "
32591"<gui>실행</gui>을 치고 즐기시죠!"
32592
32593#. (itstool) path: section/p
32594#: C/photo-wall.c.page:401
32595msgid ""
32596"If you run into problems with the tutorial, compare your code with this <link href=\"photo-wall/photo-wall.c"
32597"\">reference code</link>."
32598msgstr ""
32599"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"photo-wall/photo-wall.c\">참조 코드</link>와 여러분"
32600"의 코드를 비교해보십시오."
32601
32602#. (itstool) path: info/title
32603#: C/progressbar.c.page:8
32604msgctxt "text"
32605msgid "ProgressBar (C)"
32606msgstr "ProgressBar(C)"
32607
32608#. (itstool) path: info/desc
32609#: C/progressbar.c.page:19 C/progressbar.vala.page:18
32610msgid "A widget which indicates progress visually"
32611msgstr "진행 과정을 눈에 보이게 나타내는 위젯"
32612
32613#. (itstool) path: page/title
32614#: C/progressbar.c.page:22 C/progressbar.js.page:20 C/progressbar.py.page:22 C/progressbar.vala.page:21
32615msgid "ProgressBar"
32616msgstr "ProgressBar"
32617
32618#. (itstool) path: page/media
32619#. This is a reference to an external file such as an image or video. When
32620#. the file changes, the md5 hash will change to let you know you need to
32621#. update your localized copy. The msgstr is not used at all. Set it to
32622#. whatever you like once you have updated your copy of the file.
32623#: C/progressbar.c.page:24 C/progressbar.vala.page:22
32624msgctxt "_"
32625msgid "external ref='media/progressbar_fill.ogv' md5='287763d1d3f4a328212ea2243910f5e4'"
32626msgstr ""
32627
32628#. (itstool) path: page/p
32629#: C/progressbar.c.page:25 C/progressbar.vala.page:23
32630msgid "This ProgressBar \"fills in\" by a fraction of the bar until it is full."
32631msgstr "ProgressBar는 막대 칸이 찰 때까지 막대 비율 값을 \"채워 넣습니다\"."
32632
32633#. (itstool) path: page/code
32634#: C/progressbar.c.page:27
32635#, no-wrap
32636msgid ""
32637"\n"
32638"#include &lt;gtk/gtk.h&gt;\n"
32639"\n"
32640"\n"
32641"static gboolean\n"
32642"fill (gpointer   user_data)\n"
32643"{\n"
32644"  GtkWidget *progress_bar = user_data;\n"
32645"\n"
32646"  /*Get the current progress*/\n"
32647"  gdouble fraction;\n"
32648"  fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));\n"
32649"\n"
32650"  /*Increase the bar by 10% each time this function is called*/\n"
32651"  fraction += 0.1;\n"
32652"\n"
32653"  /*Fill in the bar with the new fraction*/\n"
32654"  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);\n"
32655"\n"
32656"  /*Ensures that the fraction stays below 1.0*/\n"
32657"  if (fraction &lt; 1.0) \n"
32658"    return TRUE;\n"
32659"  \n"
32660"  return FALSE;\n"
32661"}\n"
32662"\n"
32663"\n"
32664"\n"
32665"static void\n"
32666"activate (GtkApplication *app,\n"
32667"          gpointer        user_data)\n"
32668"{\n"
32669"  GtkWidget *window;\n"
32670"  GtkWidget *progress_bar;\n"
32671"\n"
32672"  gdouble fraction = 0.0;\n"
32673"\n"
32674"  /*Create a window with a title, and a default size*/\n"
32675"  window = gtk_application_window_new (app);\n"
32676"  gtk_window_set_title (GTK_WINDOW (window), \"ProgressBar Example\");\n"
32677"  gtk_window_set_default_size (GTK_WINDOW (window), 220, 20);\n"
32678" \n"
32679"  /*Create a progressbar and add it to the window*/\n"
32680"  progress_bar = gtk_progress_bar_new ();\n"
32681"  gtk_container_add (GTK_CONTAINER (window), progress_bar);\n"
32682"\n"
32683"  /*Fill in the given fraction of the bar. Has to be between 0.0-1.0 inclusive*/\n"
32684"  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);\n"
32685"\n"
32686"  /*Use the created fill function every 500 milliseconds*/\n"
32687"  g_timeout_add (500, fill, GTK_PROGRESS_BAR (progress_bar));\n"
32688" \n"
32689"  gtk_widget_show_all (window);\n"
32690"}\n"
32691" \n"
32692"\n"
32693"\n"
32694"int\n"
32695"main (int argc, char **argv)\n"
32696"{\n"
32697"  GtkApplication *app;\n"
32698"  int status;\n"
32699" \n"
32700"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
32701"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
32702"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
32703"  g_object_unref (app);\n"
32704" \n"
32705"  return status;\n"
32706"}\n"
32707msgstr ""
32708"\n"
32709"#include &lt;gtk/gtk.h&gt;\n"
32710"\n"
32711"\n"
32712"static gboolean\n"
32713"fill (gpointer   user_data)\n"
32714"{\n"
32715"  GtkWidget *progress_bar = user_data;\n"
32716"\n"
32717"  /*Get the current progress*/\n"
32718"  gdouble fraction;\n"
32719"  fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));\n"
32720"\n"
32721"  /*Increase the bar by 10% each time this function is called*/\n"
32722"  fraction += 0.1;\n"
32723"\n"
32724"  /*Fill in the bar with the new fraction*/\n"
32725"  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);\n"
32726"\n"
32727"  /*Ensures that the fraction stays below 1.0*/\n"
32728"  if (fraction &lt; 1.0) \n"
32729"    return TRUE;\n"
32730"  \n"
32731"  return FALSE;\n"
32732"}\n"
32733"\n"
32734"\n"
32735"\n"
32736"static void\n"
32737"activate (GtkApplication *app,\n"
32738"          gpointer        user_data)\n"
32739"{\n"
32740"  GtkWidget *window;\n"
32741"  GtkWidget *progress_bar;\n"
32742"\n"
32743"  gdouble fraction = 0.0;\n"
32744"\n"
32745"  /*Create a window with a title, and a default size*/\n"
32746"  window = gtk_application_window_new (app);\n"
32747"  gtk_window_set_title (GTK_WINDOW (window), \"ProgressBar Example\");\n"
32748"  gtk_window_set_default_size (GTK_WINDOW (window), 220, 20);\n"
32749" \n"
32750"  /*Create a progressbar and add it to the window*/\n"
32751"  progress_bar = gtk_progress_bar_new ();\n"
32752"  gtk_container_add (GTK_CONTAINER (window), progress_bar);\n"
32753"\n"
32754"  /*Fill in the given fraction of the bar. Has to be between 0.0-1.0 inclusive*/\n"
32755"  gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);\n"
32756"\n"
32757"  /*Use the created fill function every 500 milliseconds*/\n"
32758"  g_timeout_add (500, fill, GTK_PROGRESS_BAR (progress_bar));\n"
32759" \n"
32760"  gtk_widget_show_all (window);\n"
32761"}\n"
32762" \n"
32763"\n"
32764"\n"
32765"int\n"
32766"main (int argc, char **argv)\n"
32767"{\n"
32768"  GtkApplication *app;\n"
32769"  int status;\n"
32770" \n"
32771"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
32772"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
32773"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
32774"  g_object_unref (app);\n"
32775" \n"
32776"  return status;\n"
32777"}\n"
32778
32779#. (itstool) path: item/p
32780#: C/progressbar.c.page:36
32781msgid ""
32782"<link href=\"http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add\">G_Timeout</link>"
32783msgstr ""
32784"<link href=\"http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-timeout-add\">G_Timeout</link>"
32785
32786#. (itstool) path: info/title
32787#: C/progressbar.js.page:7
32788msgctxt "text"
32789msgid "ProgressBar (JavaScript)"
32790msgstr "ProgressBar (JavaScript)"
32791
32792#. (itstool) path: info/desc
32793#: C/progressbar.js.page:17
32794msgid "A bar which animates to indicate progress"
32795msgstr "진행 상황을 움직임으로 나타내는 표시줄입니다"
32796
32797#. (itstool) path: page/media
32798#. This is a reference to an external file such as an image or video. When
32799#. the file changes, the md5 hash will change to let you know you need to
32800#. update your localized copy. The msgstr is not used at all. Set it to
32801#. whatever you like once you have updated your copy of the file.
32802#: C/progressbar.js.page:21 C/progressbar.py.page:23
32803msgctxt "_"
32804msgid "external ref='media/progressbar.ogv' md5='36deab3dd4b5be968828fa2ef416d612'"
32805msgstr ""
32806
32807#. (itstool) path: div/p
32808#: C/progressbar.js.page:25 C/progressbar.py.page:27
32809msgid "Pressing any key stops and starts this ProgressBar."
32810msgstr "아무 키나 눌러서 ProgressBar 동작을 멈추거나 시작합니다."
32811
32812#. (itstool) path: page/p
32813#: C/progressbar.js.page:32 C/progressbar.py.page:34
32814msgid "This ProgressBar is stopped and started by pressing any key."
32815msgstr "이 ProgressBar는 어떤 키든 눌렀을 때 동작을 멈추거나 시작합니다."
32816
32817#. (itstool) path: page/code
32818#: C/progressbar.js.page:34
32819#, no-wrap
32820msgid ""
32821"#!/usr/bin/gjs\n"
32822"\n"
32823"imports.gi.versions.Gtk = '3.0';\n"
32824"\n"
32825"const Gio = imports.gi.Gio;\n"
32826"const GLib = imports.gi.GLib;\n"
32827"const Gtk = imports.gi.Gtk;\n"
32828"\n"
32829"class ProgressBarExample {\n"
32830"\n"
32831"    // Create the application itself\n"
32832"    constructor() {\n"
32833"        this.application = new Gtk.Application({\n"
32834"            application_id: 'org.example.jsprogressbar',\n"
32835"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
32836"        });\n"
32837"\n"
32838"        // Connect 'activate' and 'startup' signals to the callback functions\n"
32839"        this.application.connect('activate', this._onActivate.bind(this));\n"
32840"        this.application.connect('startup', this._onStartup.bind(this));\n"
32841"    }\n"
32842"\n"
32843"    // Callback function for 'activate' signal presents windows when active\n"
32844"    _onActivate() {\n"
32845"        this._window.present();\n"
32846"    }\n"
32847"\n"
32848"    // Callback function for 'startup' signal builds the UI\n"
32849"    _onStartup() {\n"
32850"        this._buildUI();\n"
32851"    }\n"
32852"\n"
32853"    // Build the application's UI\n"
32854"    _buildUI() {\n"
32855"\n"
32856"        // Create the application window\n"
32857"            this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
32858"                                                       window_position: Gtk.WindowPosition.CENTER,\n"
32859"                                                       default_height: 20,\n"
32860"                                                       default_width: 220,\n"
32861"                                                       title: \"ProgressBar Example\"});\n"
32862"\n"
32863"        // Create the progress bar\n"
32864"        this.progressBar = new Gtk.ProgressBar ();\n"
32865"        this._window.add(this.progressBar);\n"
32866"\n"
32867"        // Start the function that pulses the bar every 100 milliseconds\n"
32868"        this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
32869"                                         this._barPulse.bind(this));\n"
32870"\n"
32871"        // Connect a keypress event to the function that toggles the bar to start or stop pulsing\n"
32872"        this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
32873"\n"
32874"            // Show the window and all child widgets\n"
32875"            this._window.show_all();\n"
32876"    }\n"
32877"\n"
32878"    // Pulse the progressbar (unless it has been disabled by a keypress)\n"
32879"    _barPulse() {\n"
32880"        this.progressBar.pulse();\n"
32881"        return true;\n"
32882"    }\n"
32883"\n"
32884"    // Start or stop the progressbar when a key is pressed\n"
32885"    _onKeyPress() {\n"
32886"        if (this.sourceID == 0)\n"
32887"            this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
32888"                                             this._barPulse.bind(this));\n"
32889"        else {\n"
32890"            GLib.source_remove(this.sourceID);\n"
32891"            this.sourceID = 0;\n"
32892"        }\n"
32893"    }\n"
32894"\n"
32895"};\n"
32896"\n"
32897"// Run the application\n"
32898"let app = new ProgressBarExample ();\n"
32899"app.application.run (ARGV);\n"
32900msgstr ""
32901"#!/usr/bin/gjs\n"
32902"\n"
32903"imports.gi.versions.Gtk = '3.0';\n"
32904"\n"
32905"const Gio = imports.gi.Gio;\n"
32906"const GLib = imports.gi.GLib;\n"
32907"const Gtk = imports.gi.Gtk;\n"
32908"\n"
32909"class ProgressBarExample {\n"
32910"\n"
32911"    // Create the application itself\n"
32912"    constructor() {\n"
32913"        this.application = new Gtk.Application({\n"
32914"            application_id: 'org.example.jsprogressbar',\n"
32915"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
32916"        });\n"
32917"\n"
32918"        // Connect 'activate' and 'startup' signals to the callback functions\n"
32919"        this.application.connect('activate', this._onActivate.bind(this));\n"
32920"        this.application.connect('startup', this._onStartup.bind(this));\n"
32921"    }\n"
32922"\n"
32923"    // Callback function for 'activate' signal presents windows when active\n"
32924"    _onActivate() {\n"
32925"        this._window.present();\n"
32926"    }\n"
32927"\n"
32928"    // Callback function for 'startup' signal builds the UI\n"
32929"    _onStartup() {\n"
32930"        this._buildUI();\n"
32931"    }\n"
32932"\n"
32933"    // Build the application's UI\n"
32934"    _buildUI() {\n"
32935"\n"
32936"        // Create the application window\n"
32937"            this._window = new Gtk.ApplicationWindow({ application: this.application,\n"
32938"                                                       window_position: Gtk.WindowPosition.CENTER,\n"
32939"                                                       default_height: 20,\n"
32940"                                                       default_width: 220,\n"
32941"                                                       title: \"ProgressBar Example\"});\n"
32942"\n"
32943"        // Create the progress bar\n"
32944"        this.progressBar = new Gtk.ProgressBar ();\n"
32945"        this._window.add(this.progressBar);\n"
32946"\n"
32947"        // Start the function that pulses the bar every 100 milliseconds\n"
32948"        this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
32949"                                         this._barPulse.bind(this));\n"
32950"\n"
32951"        // Connect a keypress event to the function that toggles the bar to start or stop pulsing\n"
32952"        this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
32953"\n"
32954"            // Show the window and all child widgets\n"
32955"            this._window.show_all();\n"
32956"    }\n"
32957"\n"
32958"    // Pulse the progressbar (unless it has been disabled by a keypress)\n"
32959"    _barPulse() {\n"
32960"        this.progressBar.pulse();\n"
32961"        return true;\n"
32962"    }\n"
32963"\n"
32964"    // Start or stop the progressbar when a key is pressed\n"
32965"    _onKeyPress() {\n"
32966"        if (this.sourceID == 0)\n"
32967"            this.sourceID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100,\n"
32968"                                             this._barPulse.bind(this));\n"
32969"        else {\n"
32970"            GLib.source_remove(this.sourceID);\n"
32971"            this.sourceID = 0;\n"
32972"        }\n"
32973"    }\n"
32974"\n"
32975"};\n"
32976"\n"
32977"// Run the application\n"
32978"let app = new ProgressBarExample ();\n"
32979"app.application.run (ARGV);\n"
32980
32981#. (itstool) path: item/p
32982#: C/progressbar.js.page:39
32983msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/GLib.html\">GLib</link>"
32984msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/GLib.html\">GLib</link>"
32985
32986#. (itstool) path: info/title
32987#: C/progressbar.py.page:8
32988msgctxt "text"
32989msgid "ProgressBar (Python)"
32990msgstr "ProgressBar (Python)"
32991
32992#. (itstool) path: info/desc
32993#: C/progressbar.py.page:19
32994msgid "A widget which indicates progress visually."
32995msgstr "진행 상황을 눈으로 알 수 있게 나타냅니다."
32996
32997#. (itstool) path: section/code
32998#: C/progressbar.py.page:41
32999#, no-wrap
33000msgid ""
33001"from gi.repository import GLib\n"
33002"from gi.repository import Gtk\n"
33003"import sys\n"
33004"\n"
33005"\n"
33006"class MyWindow(Gtk.ApplicationWindow):\n"
33007"    # a window\n"
33008"\n"
33009"    def __init__(self, app):\n"
33010"        Gtk.Window.__init__(self, title=\"ProgressBar Example\", application=app)\n"
33011"        self.set_default_size(220, 20)\n"
33012"\n"
33013"        # a progressbar\n"
33014"        self.progress_bar = Gtk.ProgressBar()\n"
33015"        # add the progressbar to the window\n"
33016"        self.add(self.progress_bar)\n"
33017"\n"
33018"        # the method self.pulse is called each 100 milliseconds\n"
33019"        # and self.source_id is set to be the ID of the event source\n"
33020"        # (i.e. the bar changes position every 100 milliseconds)\n"
33021"        self.source_id = GLib.timeout_add(100, self.pulse)\n"
33022"\n"
33023"    # event handler\n"
33024"    # any signal from the keyboard controls if the progressbar stops/starts\n"
33025"    def do_key_press_event(self, event):\n"
33026"        # if the progressbar has been stopped (therefore source_id == 0 - see\n"
33027"        # \"else\" below), turn it back on\n"
33028"        if (self.source_id == 0):\n"
33029"            self.source_id = GLib.timeout_add(100, self.pulse)\n"
33030"        # if the bar is moving, remove the source with the ID of source_id\n"
33031"        # from the main context (stop the bar) and set the source_id to 0\n"
33032"        else:\n"
33033"            GLib.source_remove(self.source_id)\n"
33034"            self.source_id = 0\n"
33035"        # stop the signal emission\n"
33036"        return True\n"
33037"\n"
33038"    # source function\n"
33039"    # the progressbar is in \"activity mode\" when this method is called\n"
33040"    def pulse(self):\n"
33041"        self.progress_bar.pulse()\n"
33042"        # call the function again\n"
33043"        return True\n"
33044"\n"
33045"\n"
33046"class MyApplication(Gtk.Application):\n"
33047"\n"
33048"    def __init__(self):\n"
33049"        Gtk.Application.__init__(self)\n"
33050"\n"
33051"    def do_activate(self):\n"
33052"        win = MyWindow(self)\n"
33053"        win.show_all()\n"
33054"\n"
33055"    def do_startup(self):\n"
33056"        Gtk.Application.do_startup(self)\n"
33057"\n"
33058"app = MyApplication()\n"
33059"exit_status = app.run(sys.argv)\n"
33060"sys.exit(exit_status)\n"
33061msgstr ""
33062"from gi.repository import GLib\n"
33063"from gi.repository import Gtk\n"
33064"import sys\n"
33065"\n"
33066"\n"
33067"class MyWindow(Gtk.ApplicationWindow):\n"
33068"    # a window\n"
33069"\n"
33070"    def __init__(self, app):\n"
33071"        Gtk.Window.__init__(self, title=\"ProgressBar Example\", application=app)\n"
33072"        self.set_default_size(220, 20)\n"
33073"\n"
33074"        # a progressbar\n"
33075"        self.progress_bar = Gtk.ProgressBar()\n"
33076"        # add the progressbar to the window\n"
33077"        self.add(self.progress_bar)\n"
33078"\n"
33079"        # the method self.pulse is called each 100 milliseconds\n"
33080"        # and self.source_id is set to be the ID of the event source\n"
33081"        # (i.e. the bar changes position every 100 milliseconds)\n"
33082"        self.source_id = GLib.timeout_add(100, self.pulse)\n"
33083"\n"
33084"    # event handler\n"
33085"    # any signal from the keyboard controls if the progressbar stops/starts\n"
33086"    def do_key_press_event(self, event):\n"
33087"        # if the progressbar has been stopped (therefore source_id == 0 - see\n"
33088"        # \"else\" below), turn it back on\n"
33089"        if (self.source_id == 0):\n"
33090"            self.source_id = GLib.timeout_add(100, self.pulse)\n"
33091"        # if the bar is moving, remove the source with the ID of source_id\n"
33092"        # from the main context (stop the bar) and set the source_id to 0\n"
33093"        else:\n"
33094"            GLib.source_remove(self.source_id)\n"
33095"            self.source_id = 0\n"
33096"        # stop the signal emission\n"
33097"        return True\n"
33098"\n"
33099"    # source function\n"
33100"    # the progressbar is in \"activity mode\" when this method is called\n"
33101"    def pulse(self):\n"
33102"        self.progress_bar.pulse()\n"
33103"        # call the function again\n"
33104"        return True\n"
33105"\n"
33106"\n"
33107"class MyApplication(Gtk.Application):\n"
33108"\n"
33109"    def __init__(self):\n"
33110"        Gtk.Application.__init__(self)\n"
33111"\n"
33112"    def do_activate(self):\n"
33113"        win = MyWindow(self)\n"
33114"        win.show_all()\n"
33115"\n"
33116"    def do_startup(self):\n"
33117"        Gtk.Application.do_startup(self)\n"
33118"\n"
33119"app = MyApplication()\n"
33120"exit_status = app.run(sys.argv)\n"
33121"sys.exit(exit_status)\n"
33122
33123#. (itstool) path: section/title
33124#: C/progressbar.py.page:46
33125msgid "Useful methods for a ProgressBar widget"
33126msgstr "ProgressBar 위젯에 쓸만한 메서드"
33127
33128#. (itstool) path: item/p
33129#: C/progressbar.py.page:48
33130msgid ""
33131"Instead of <code>pulse()</code>, that makes the bar go back and forth, if we want the ProgressBar to \"fill in\" a "
33132"fraction (a <code>float</code> between <code>0.0</code> and <code>1.0</code> included) of the bar that has been "
33133"completed, use <code>set_fraction(fraction)</code>."
33134msgstr ""
33135"표시줄을 앞뒤로 왔다갔다 하게 하는 <code>pulse()</code> 대신, ProgressBar를 표시줄 비율(<code>0.0</code>과 "
33136"<code>1.0</code> 값도 해당하는 사이 <code>float</code> 값)만큼 완료 의미로 \"채워 넣는\"다면, "
33137"<code>set_fraction(fraction)</code>을 사용하십시오."
33138
33139#. (itstool) path: item/p
33140#: C/progressbar.py.page:49
33141msgid ""
33142"To set a text and show it (superimposed over the bar) use <code>set_text(<var>\"text\"</var>)</code> and "
33143"<code>set_show_text(True)</code>. If a text is not set and <code>set_show_text(True)</code> the text will be the "
33144"percentage of the work that has been completed."
33145msgstr ""
33146"텍스트를 설정하고 보여주려면 (표시줄에 겹쳐 나타남) <code>set_text(<var>\"text\"</var>)</code>와 "
33147"<code>set_show_text(True)</code>를 사용하십시오. 텍스트를 설정하지 않았고 <code>set_show_text(True)</code> 함수를 "
33148"호출하면 나타나는 텍스트는 작업 완료 백분율입니다."
33149
33150#. (itstool) path: item/p
33151#: C/progressbar.py.page:57
33152msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkProgressBar.html\">GtkProgressBar</link>"
33153msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkProgressBar.html\">GtkProgressBar</link>"
33154
33155#. (itstool) path: item/p
33156#: C/progressbar.py.page:58
33157msgid ""
33158"<link href=\"http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html\">GLib - The Main Event Loop</"
33159"link>"
33160msgstr ""
33161"<link href=\"http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html\">GLib - 메인 이벤트 루프</link>"
33162
33163#. (itstool) path: item/p
33164#: C/progressbar.py.page:59
33165msgid "<link href=\"http://developer.gnome.org/gdk/stable/gdk-Keyboard-Handling\">Gdk - Key Values</link>"
33166msgstr "<link href=\"http://developer.gnome.org/gdk/stable/gdk-Keyboard-Handling\">Gdk - 키 값</link>"
33167
33168#. (itstool) path: info/title
33169#: C/progressbar.vala.page:8
33170msgctxt "text"
33171msgid "ProgressBar (Vala)"
33172msgstr "ProgressBar (Vala)"
33173
33174#. (itstool) path: page/code
33175#: C/progressbar.vala.page:25
33176#, no-wrap
33177msgid ""
33178"public class MyApplication : Gtk.Application {\n"
33179"\n"
33180"\tGtk.ProgressBar progress_bar;\n"
33181"\n"
33182"\tprotected override void activate () {\n"
33183"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
33184"\t\twindow.set_title (\"ProgressBar Example\");\n"
33185"\t\twindow.set_default_size (220, 20);\n"
33186"\n"
33187"\t\tprogress_bar = new Gtk.ProgressBar ();\n"
33188"\t\twindow.add (progress_bar);\n"
33189"\t\twindow.show_all ();\n"
33190"\n"
33191"\t\tdouble fraction = 0.0;\n"
33192"\t\tprogress_bar.set_fraction (fraction);\n"
33193"\t\tGLib.Timeout.add (500, fill);\n"
33194"\t}\n"
33195"\n"
33196"\tbool fill () {\n"
33197"\t\tdouble fraction = progress_bar.get_fraction (); //get current progress\n"
33198"\t\tfraction += 0.1; //increase by 10% each time this function is called\n"
33199"\n"
33200"\t\tprogress_bar.set_fraction (fraction);\n"
33201"\n"
33202"\t\t/* This function is only called by GLib.Timeout.add while it returns true; */\n"
33203"\t\tif (fraction &lt; 1.0)\n"
33204"\t\t\treturn true;\n"
33205"\t\treturn false;\n"
33206"\t}\n"
33207"}\n"
33208"\n"
33209"public int main (string[] args) {\n"
33210"\tvar progress_bar_application = new MyApplication ();\n"
33211"\tint status =  progress_bar_application.run (args);\n"
33212"\treturn status;\n"
33213"}\n"
33214msgstr ""
33215"public class MyApplication : Gtk.Application {\n"
33216"\n"
33217"\tGtk.ProgressBar progress_bar;\n"
33218"\n"
33219"\tprotected override void activate () {\n"
33220"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
33221"\t\twindow.set_title (\"ProgressBar Example\");\n"
33222"\t\twindow.set_default_size (220, 20);\n"
33223"\n"
33224"\t\tprogress_bar = new Gtk.ProgressBar ();\n"
33225"\t\twindow.add (progress_bar);\n"
33226"\t\twindow.show_all ();\n"
33227"\n"
33228"\t\tdouble fraction = 0.0;\n"
33229"\t\tprogress_bar.set_fraction (fraction);\n"
33230"\t\tGLib.Timeout.add (500, fill);\n"
33231"\t}\n"
33232"\n"
33233"\tbool fill () {\n"
33234"\t\tdouble fraction = progress_bar.get_fraction (); //get current progress\n"
33235"\t\tfraction += 0.1; //increase by 10% each time this function is called\n"
33236"\n"
33237"\t\tprogress_bar.set_fraction (fraction);\n"
33238"\n"
33239"\t\t/* This function is only called by GLib.Timeout.add while it returns true; */\n"
33240"\t\tif (fraction &lt; 1.0)\n"
33241"\t\t\treturn true;\n"
33242"\t\treturn false;\n"
33243"\t}\n"
33244"}\n"
33245"\n"
33246"public int main (string[] args) {\n"
33247"\tvar progress_bar_application = new MyApplication ();\n"
33248"\tint status =  progress_bar_application.run (args);\n"
33249"\treturn status;\n"
33250"}\n"
33251
33252#. (itstool) path: item/p
33253#: C/progressbar.vala.page:30
33254msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ProgressBar.html\">Gtk.ProgressBar</link>"
33255msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ProgressBar.html\">Gtk.ProgressBar</link>"
33256
33257#. (itstool) path: item/p
33258#: C/progressbar.vala.page:31
33259msgid "<link href=\"http://www.valadoc.org/glib-2.0/GLib.Timeout.html\">GLib.Timeout</link>"
33260msgstr "<link href=\"http://www.valadoc.org/glib-2.0/GLib.Timeout.html\">GLib.Timeout</link>"
33261
33262#. (itstool) path: info/title
33263#: C/properties.py.page:9
33264msgctxt "text"
33265msgid "Properties (Python)"
33266msgstr "속성(Python)"
33267
33268#. (itstool) path: info/desc
33269#: C/properties.py.page:14
33270msgid "An explanation of properties, getters and setters."
33271msgstr "속성, 게터함수, 세터함수를 설명합니다."
33272
33273#. (itstool) path: page/title
33274#: C/properties.py.page:27
33275msgid "Properties"
33276msgstr "속성"
33277
33278#. (itstool) path: section/p
33279#: C/properties.py.page:34
33280msgid ""
33281"<em>Properties</em> describe the configuration and state of widgets. Each widget has its own particular set of "
33282"properties. For example, a widget such as a button has the property <code>label</code> which contains the text of "
33283"the widget. You can specify the name and value of any number of properties as keyword arguments when creating an "
33284"instance of a widget. For example, to create a label with the text “Hello World”, an angle of 25 degrees, and "
33285"aligned to the right, you can use:"
33286msgstr ""
33287"<em>속성</em>은 설정과 위젯 상태를 설명합니다. 각 위젯에는 몇가지 특별한 속성 모음이 있습니다. 예를 들어 단추 같은 "
33288"위젯에는 위젯 텍스트를 넣을 수 있는 <code>label</code> 속성이 있습니다. 위젯 인스턴스를 만들 때 키워드 인자로 여러"
33289"가지 프로퍼티의 이름과 값을 지정할 수 있습니다. 예를 들어, “Hello world” 레이블을 25도 기울여서 오른쪽 정렬 상태로 "
33290"만들려면:"
33291
33292#. (itstool) path: section/code
33293#: C/properties.py.page:41
33294#, no-wrap
33295msgid ""
33296"\n"
33297"label = Gtk.Label(label=\"Hello World\", angle=25, halign=Gtk.Align.END)"
33298msgstr ""
33299"\n"
33300"label = Gtk.Label(label=\"Hello World\", angle=25, halign=Gtk.Align.END)"
33301
33302#. (itstool) path: section/p
33303#: C/properties.py.page:44
33304msgid "Alternatively, you can define these properties separately by using the method associated with it."
33305msgstr "대신, 관련 메서드를 사용하여 속성을 따로 설정할 수 있습니다."
33306
33307#. (itstool) path: section/code
33308#: C/properties.py.page:45
33309#, no-wrap
33310msgid ""
33311"\n"
33312"label = Gtk.Label()\n"
33313"label.set_label(\"Hello World\")\n"
33314"label.set_angle(25)\n"
33315"label.set_halign(Gtk.Align.END)"
33316msgstr ""
33317"\n"
33318"label = Gtk.Label()\n"
33319"label.set_label(\"Hello World\")\n"
33320"label.set_angle(25)\n"
33321"label.set_halign(Gtk.Align.END)"
33322
33323#. (itstool) path: section/p
33324#: C/properties.py.page:51
33325msgid ""
33326"Once you have created such a label, you can get the text of the label with <code>label.get_label()</code>, and "
33327"analogously for the other properties."
33328msgstr ""
33329"레이블 같은걸 만들고 나면 <code>label.get_label()</code> 함수로 텍스트를 가져올 수 있으며, 다른 속성에 대해서도 비"
33330"슷합니다."
33331
33332#. (itstool) path: section/p
33333#: C/properties.py.page:53
33334msgid ""
33335"Instead of using getters and setters you can also get and set the properties with <code>get_property(<var>\"prop-"
33336"name\"</var>)</code> and <code>set_property(<var>\"prop-name\"</var>, <var>value</var>)</code>, respectively."
33337msgstr ""
33338"게터, 세터 함수를 사용하는 대신 <code>get_property(<var>\"prop-name\"</var>)</code>함수와 <code>set_property(<var>"
33339"\"prop-name\"</var>, <var>value</var>)</code>함수를 각각 사용하여 속성 값을 가져오고 설정할 수 있습니다."
33340
33341#. (itstool) path: section/p
33342#: C/properties.py.page:59
33343msgid ""
33344"<link href=\"http://python-gtk-3-tutorial.readthedocs.org/en/latest/basics.html\">Basics - Properties</link> in "
33345"Python GTK+ 3 Tutorial"
33346msgstr ""
33347"파이썬 GTK+ 3 따라하기 지침서의 <link href=\"http://python-gtk-3-tutorial.readthedocs.org/en/latest/basics.html\">"
33348"속성 기본</link>"
33349
33350#. (itstool) path: info/title
33351#: C/py.page:7
33352msgctxt "link"
33353msgid "Python"
33354msgstr "파이썬"
33355
33356#. (itstool) path: page/title
33357#: C/py.page:21
33358msgid "Tutorials, code samples and platform demos in Python"
33359msgstr "파이썬용 따라하기 지침서, 코드 예제, 플랫폼 데모"
33360
33361#. (itstool) path: section/title
33362#. (itstool) path: page/title
33363#: C/py.page:26 C/tutorial.py.page:31
33364msgid "Tutorial for beginners"
33365msgstr "초보자용 따라하기 지침서"
33366
33367#. (itstool) path: info/title
33368#: C/radiobutton.c.page:8
33369msgctxt "text"
33370msgid "RadioButton (C)"
33371msgstr "RadioButton (C)"
33372
33373#. (itstool) path: info/desc
33374#: C/radiobutton.c.page:20
33375msgid "A choice from multiple checkbuttons"
33376msgstr "여러 확인 단추를 선택합니다"
33377
33378#. (itstool) path: page/title
33379#: C/radiobutton.c.page:23 C/radiobutton.js.page:21 C/radiobutton.py.page:23 C/radiobutton.vala.page:24
33380msgid "RadioButton"
33381msgstr "RadioButton"
33382
33383#. (itstool) path: page/media
33384#. This is a reference to an external file such as an image or video. When
33385#. the file changes, the md5 hash will change to let you know you need to
33386#. update your localized copy. The msgstr is not used at all. Set it to
33387#. whatever you like once you have updated your copy of the file.
33388#: C/radiobutton.c.page:25 C/radiobutton.py.page:24 C/radiobutton.vala.page:25
33389msgctxt "_"
33390msgid "external ref='media/radiobutton.png' md5='d115460280d8e41493dd98054b5822a5'"
33391msgstr ""
33392
33393#. (itstool) path: page/p
33394#: C/radiobutton.c.page:26
33395msgid "These radiobuttons report their activity in the terminal."
33396msgstr "이 RadioButton은 터미널의 활동을 알려줍니다."
33397
33398#. (itstool) path: page/code
33399#: C/radiobutton.c.page:28
33400#, no-wrap
33401msgid ""
33402"\n"
33403"#include &lt;gtk/gtk.h&gt;\n"
33404"\n"
33405"\n"
33406"\n"
33407"/*Signal handler for the \"toggled\" signal of the RadioButton*/\n"
33408"static void\n"
33409"button_toggled_cb (GtkWidget *button,\n"
33410"                   gpointer   user_data)\n"
33411"{\n"
33412"  char *b_state;\n"
33413"  const char *button_label;\n"
33414"\n"
33415"  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))\n"
33416"          b_state = \"on\";\n"
33417"  else {\n"
33418"          b_state = \"off\";\n"
33419"          g_print (\"\\n\");\n"
33420"  }\n"
33421"\n"
33422"  button_label = gtk_button_get_label (GTK_BUTTON (button));\n"
33423"\n"
33424"  g_print (\"%s was turned %s\\n\", button_label, b_state);\n"
33425"}\n"
33426"\n"
33427"\n"
33428"\n"
33429"static void\n"
33430"activate (GtkApplication *app,\n"
33431"          gpointer        user_data)\n"
33432"{\n"
33433"  GtkWidget *grid;\n"
33434"  GtkWidget *window;\n"
33435"\n"
33436"  GtkWidget *button1;\n"
33437"  GtkWidget *button2;\n"
33438"  GtkWidget *button3;\n"
33439"\n"
33440"  /*Create a window with a set title and default size.\n"
33441"  Also, set a border width for the amount of space to leave\n"
33442"  inside the window*/\n"
33443"  window = gtk_application_window_new (app);\n"
33444"  gtk_window_set_title (GTK_WINDOW (window), \"RadioButton Example\");\n"
33445"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 100);\n"
33446"  gtk_container_set_border_width (GTK_CONTAINER(window), 20);\n"
33447"\n"
33448"\n"
33449"  /*Create an initial radio button*/\n"
33450"  button1 = gtk_radio_button_new_with_label (NULL, \"Button 1\");\n"
33451"\n"
33452"  /*Create a second radio button, and add it to the same group as Button 1*/\n"
33453"  button2 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (button1), \n"
33454"                                                         \"Button 2\");\n"
33455"\n"
33456"  /*Create a third button, and add it to the same group as Button 1*/\n"
33457"  button3 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (button1), \n"
33458"                                                         \"Button 3\");\n"
33459"\n"
33460"\n"
33461"  /*Create a grid, attach the buttons, and position them accordingly*/\n"
33462"  grid = gtk_grid_new ();\n"
33463"  gtk_grid_attach (GTK_GRID (grid), button1, 0, 0, 1, 1);\n"
33464"  gtk_grid_attach (GTK_GRID (grid), button2, 0, 1, 1, 1);\n"
33465"  gtk_grid_attach (GTK_GRID (grid), button3, 0, 2, 1, 1);\n"
33466"\n"
33467"  /*Be sure to set the initial state of each button*/\n"
33468"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button2), TRUE);\n"
33469"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button1), FALSE);\n"
33470"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button3), FALSE);\n"
33471"\n"
33472"  /*Connect the signal handlers (aka Callback functions) to the buttons*/\n"
33473"  g_signal_connect (GTK_TOGGLE_BUTTON (button1), \"toggled\", \n"
33474"                    G_CALLBACK (button_toggled_cb), window);\n"
33475"  g_signal_connect (GTK_TOGGLE_BUTTON (button2), \"toggled\", \n"
33476"                    G_CALLBACK (button_toggled_cb), window);\n"
33477"  g_signal_connect (GTK_TOGGLE_BUTTON (button3), \"toggled\", \n"
33478"                    G_CALLBACK (button_toggled_cb), window);\n"
33479"\n"
33480"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
33481"\n"
33482"  gtk_widget_show_all (window);\n"
33483"}\n"
33484"\n"
33485"\n"
33486"\n"
33487"int\n"
33488"main (int argc, char **argv)\n"
33489"{\n"
33490"  GtkApplication *app;\n"
33491"  int status;\n"
33492"\n"
33493"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
33494"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
33495"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
33496"  g_object_unref (app);\n"
33497"\n"
33498"  return status;\n"
33499"}\n"
33500msgstr ""
33501"\n"
33502"#include &lt;gtk/gtk.h&gt;\n"
33503"\n"
33504"\n"
33505"\n"
33506"/*Signal handler for the \"toggled\" signal of the RadioButton*/\n"
33507"static void\n"
33508"button_toggled_cb (GtkWidget *button,\n"
33509"                   gpointer   user_data)\n"
33510"{\n"
33511"  char *b_state;\n"
33512"  const char *button_label;\n"
33513"\n"
33514"  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))\n"
33515"          b_state = \"on\";\n"
33516"  else {\n"
33517"          b_state = \"off\";\n"
33518"          g_print (\"\\n\");\n"
33519"  }\n"
33520"\n"
33521"  button_label = gtk_button_get_label (GTK_BUTTON (button));\n"
33522"\n"
33523"  g_print (\"%s was turned %s\\n\", button_label, b_state);\n"
33524"}\n"
33525"\n"
33526"\n"
33527"\n"
33528"static void\n"
33529"activate (GtkApplication *app,\n"
33530"          gpointer        user_data)\n"
33531"{\n"
33532"  GtkWidget *grid;\n"
33533"  GtkWidget *window;\n"
33534"\n"
33535"  GtkWidget *button1;\n"
33536"  GtkWidget *button2;\n"
33537"  GtkWidget *button3;\n"
33538"\n"
33539"  /*Create a window with a set title and default size.\n"
33540"  Also, set a border width for the amount of space to leave\n"
33541"  inside the window*/\n"
33542"  window = gtk_application_window_new (app);\n"
33543"  gtk_window_set_title (GTK_WINDOW (window), \"RadioButton Example\");\n"
33544"  gtk_window_set_default_size (GTK_WINDOW (window), 250, 100);\n"
33545"  gtk_container_set_border_width (GTK_CONTAINER(window), 20);\n"
33546"\n"
33547"\n"
33548"  /*Create an initial radio button*/\n"
33549"  button1 = gtk_radio_button_new_with_label (NULL, \"Button 1\");\n"
33550"\n"
33551"  /*Create a second radio button, and add it to the same group as Button 1*/\n"
33552"  button2 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (button1), \n"
33553"                                                         \"Button 2\");\n"
33554"\n"
33555"  /*Create a third button, and add it to the same group as Button 1*/\n"
33556"  button3 = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (button1), \n"
33557"                                                         \"Button 3\");\n"
33558"\n"
33559"\n"
33560"  /*Create a grid, attach the buttons, and position them accordingly*/\n"
33561"  grid = gtk_grid_new ();\n"
33562"  gtk_grid_attach (GTK_GRID (grid), button1, 0, 0, 1, 1);\n"
33563"  gtk_grid_attach (GTK_GRID (grid), button2, 0, 1, 1, 1);\n"
33564"  gtk_grid_attach (GTK_GRID (grid), button3, 0, 2, 1, 1);\n"
33565"\n"
33566"  /*Be sure to set the initial state of each button*/\n"
33567"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button2), TRUE);\n"
33568"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button1), FALSE);\n"
33569"  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button3), FALSE);\n"
33570"\n"
33571"  /*Connect the signal handlers (aka Callback functions) to the buttons*/\n"
33572"  g_signal_connect (GTK_TOGGLE_BUTTON (button1), \"toggled\", \n"
33573"                    G_CALLBACK (button_toggled_cb), window);\n"
33574"  g_signal_connect (GTK_TOGGLE_BUTTON (button2), \"toggled\", \n"
33575"                    G_CALLBACK (button_toggled_cb), window);\n"
33576"  g_signal_connect (GTK_TOGGLE_BUTTON (button3), \"toggled\", \n"
33577"                    G_CALLBACK (button_toggled_cb), window);\n"
33578"\n"
33579"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
33580"\n"
33581"  gtk_widget_show_all (window);\n"
33582"}\n"
33583"\n"
33584"\n"
33585"\n"
33586"int\n"
33587"main (int argc, char **argv)\n"
33588"{\n"
33589"  GtkApplication *app;\n"
33590"  int status;\n"
33591"\n"
33592"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
33593"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
33594"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
33595"  g_object_unref (app);\n"
33596"\n"
33597"  return status;\n"
33598"}\n"
33599
33600#. (itstool) path: item/p
33601#: C/radiobutton.c.page:38 C/switch.c.page:36
33602msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkSwitch.html\">GtkSwitch</link>"
33603msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkSwitch.html\">GtkSwitch</link>"
33604
33605#. (itstool) path: info/title
33606#: C/radiobutton.js.page:8
33607msgctxt "text"
33608msgid "RadioButton (JavaScript)"
33609msgstr "RadioButton (JavaScript)"
33610
33611#. (itstool) path: info/desc
33612#: C/radiobutton.js.page:18
33613msgid "Only one can be selected at a time"
33614msgstr "한번에 하나만 선택할 수 있습니다"
33615
33616#. (itstool) path: page/media
33617#. This is a reference to an external file such as an image or video. When
33618#. the file changes, the md5 hash will change to let you know you need to
33619#. update your localized copy. The msgstr is not used at all. Set it to
33620#. whatever you like once you have updated your copy of the file.
33621#: C/radiobutton.js.page:22
33622msgctxt "_"
33623msgid "external ref='media/radiobuttontravel.png' md5='0c5f01ee160bb42716ccf5dccbd080c0'"
33624msgstr ""
33625
33626#. (itstool) path: page/p
33627#: C/radiobutton.js.page:23
33628msgid ""
33629"RadioButtons are named after old-style car radios, which had buttons for switching between channel presets. "
33630"Because the radio could only be tuned to one station at a time, only one button could be pressed in at a time; if "
33631"you pressed a new one, the one that was already pressed in would pop back out. That's how these buttons work, too."
33632msgstr ""
33633"RadioButton 이름은 미리 설정해둔 채널을 전환할 때 사용하는 단추의 모양새 동작에 착안하여 구식 자동차 라디오에서 왔"
33634"습니다. 라디오 채널 설정은 한번에 하나만 할 수 있기 때문에, 오직 하나의 단추만 눌립니다. 새 단추를 누르면 먼저 눌려"
33635"있던 단추는 도로 튀어나옵니다. 이게 바로 라디오 단추가 동작하는 방식입니다."
33636
33637#. (itstool) path: page/p
33638#: C/radiobutton.js.page:24
33639msgid ""
33640"Each RadioButton needs a text label and a group. Only one button in a group can be selected at a time. You don't "
33641"name each group; you just set new RadioButtons to be part of the same group as an existing one. If you create a "
33642"new one outside of a group, it automatically creates a new group for it to be part of."
33643msgstr ""
33644"각 라디오 단추는 텍스트 레이블을 넣고 그룹으로 묶어야합니다. 그룹에서는 한번에 하나의 단추만 선택할 수 있습니다. "
33645"각 그룹에 이름을 달 수는 없습니다. 새 RadioButton은 기존의 단추와 마찬가지로 동일한 그룹의 일부로 설정합니다. 그룹"
33646"의 밖에 새 단추를 넣으면, 이 단추는 자동으로 새 그룹의 일부가 됩니다."
33647
33648#. (itstool) path: section/code
33649#: C/radiobutton.js.page:41
33650#, no-wrap
33651msgid ""
33652"\n"
33653"const RadioButtonExample = new Lang.Class({\n"
33654"    Name: 'RadioButton Example',\n"
33655"\n"
33656"    // Create the application itself\n"
33657"    _init: function() {\n"
33658"        this.application = new Gtk.Application({\n"
33659"            application_id: 'org.example.jsradiobutton',\n"
33660"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
33661"        });\n"
33662"\n"
33663"    // Connect 'activate' and 'startup' signals to the callback functions\n"
33664"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
33665"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
33666"    },\n"
33667"\n"
33668"    // Callback function for 'activate' signal presents window when active\n"
33669"    _onActivate: function() {\n"
33670"        this._window.present();\n"
33671"    },\n"
33672"\n"
33673"    // Callback function for 'startup' signal builds the UI\n"
33674"    _onStartup: function() {\n"
33675"        this._buildUI ();\n"
33676"    },\n"
33677msgstr ""
33678"\n"
33679"const RadioButtonExample = new Lang.Class({\n"
33680"    Name: 'RadioButton Example',\n"
33681"\n"
33682"    // Create the application itself\n"
33683"    _init: function() {\n"
33684"        this.application = new Gtk.Application({\n"
33685"            application_id: 'org.example.jsradiobutton',\n"
33686"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
33687"        });\n"
33688"\n"
33689"    // Connect 'activate' and 'startup' signals to the callback functions\n"
33690"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
33691"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
33692"    },\n"
33693"\n"
33694"    // Callback function for 'activate' signal presents window when active\n"
33695"    _onActivate: function() {\n"
33696"        this._window.present();\n"
33697"    },\n"
33698"\n"
33699"    // Callback function for 'startup' signal builds the UI\n"
33700"    _onStartup: function() {\n"
33701"        this._buildUI ();\n"
33702"    },\n"
33703
33704#. (itstool) path: section/p
33705#: C/radiobutton.js.page:67 C/togglebutton.js.page:67
33706msgid ""
33707"All the code for this sample goes in the RadioButtonExample class. The above code creates a <link href=\"http://"
33708"www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to "
33709"go in."
33710msgstr ""
33711"이 예제의 모든 코드는 RadioButtonExample 클래스에 들어갑니다. 위 코드는 위젯과 창이 들어가는 <link href=\"http://"
33712"www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만듭니다."
33713
33714#. (itstool) path: section/code
33715#: C/radiobutton.js.page:68
33716#, no-wrap
33717msgid ""
33718"\n"
33719"    // Build the application's UI\n"
33720"    _buildUI: function() {\n"
33721"\n"
33722"        // Create the application window\n"
33723"        this._window = new Gtk.ApplicationWindow({\n"
33724"            application: this.application,\n"
33725"            window_position: Gtk.WindowPosition.CENTER,\n"
33726"            border_width: 20,\n"
33727"            title: \"Travel Planning\"});\n"
33728msgstr ""
33729"\n"
33730"    // Build the application's UI\n"
33731"    _buildUI: function() {\n"
33732"\n"
33733"        // Create the application window\n"
33734"        this._window = new Gtk.ApplicationWindow({\n"
33735"            application: this.application,\n"
33736"            window_position: Gtk.WindowPosition.CENTER,\n"
33737"            border_width: 20,\n"
33738"            title: \"Travel Planning\"});\n"
33739
33740#. (itstool) path: section/title
33741#: C/radiobutton.js.page:83
33742msgid "Creating the radiobuttons"
33743msgstr "RadioButton 만들기"
33744
33745#. (itstool) path: section/code
33746#: C/radiobutton.js.page:84
33747#, no-wrap
33748msgid ""
33749"\n"
33750"        // Create a label for the first group of buttons\n"
33751"        this._placeLabel = new Gtk.Label ({label: \"Where would you like to travel to?\"});\n"
33752msgstr ""
33753"\n"
33754"        // Create a label for the first group of buttons\n"
33755"        this._placeLabel = new Gtk.Label ({label: \"Where would you like to travel to?\"});\n"
33756
33757#. (itstool) path: section/p
33758#: C/radiobutton.js.page:89
33759msgid ""
33760"We use a <link xref=\"label.js\">Gtk.Label</link> to set each group of RadioButtons apart. Nothing will stop you "
33761"from putting RadioButtons from all different groups wherever you want, so if you want people to know which ones go "
33762"together you need to organize things accordingly."
33763msgstr ""
33764"그룹에 있는 각 RadioButton 부분 부분마다 <link xref=\"label.js\">Gtk.Label</link>을 설정 용도로 사용합니다. 원하는 "
33765"어디든 모든 다른 그룹에 RadioButton을 넣지 못하게 하진 않습니다. 따라서 사용자가 어떤 단추를 한 묶음으로 두었는지 "
33766"알 수 있게 하려면 묶음별로 정리해야합니다."
33767
33768#. (itstool) path: section/code
33769#: C/radiobutton.js.page:91
33770#, no-wrap
33771msgid ""
33772"\n"
33773"        // Create three radio buttons three different ways\n"
33774"        this._place1 = new Gtk.RadioButton ({label: \"The Beach\"});\n"
33775"\n"
33776"        this._place2 = Gtk.RadioButton.new_from_widget (this._place1);\n"
33777"        this._place2.set_label (\"The Moon\");\n"
33778"\n"
33779"        this._place3 = Gtk.RadioButton.new_with_label_from_widget (this._place1, \"Antarctica\");\n"
33780"        // this._place3.set_active (true);\n"
33781msgstr ""
33782"\n"
33783"        // Create three radio buttons three different ways\n"
33784"        this._place1 = new Gtk.RadioButton ({label: \"The Beach\"});\n"
33785"\n"
33786"        this._place2 = Gtk.RadioButton.new_from_widget (this._place1);\n"
33787"        this._place2.set_label (\"The Moon\");\n"
33788"\n"
33789"        this._place3 = Gtk.RadioButton.new_with_label_from_widget (this._place1, \"Antarctica\");\n"
33790"        // this._place3.set_active (true);\n"
33791
33792#. (itstool) path: section/p
33793#: C/radiobutton.js.page:102
33794msgid ""
33795"Here are three different ways to create RadioButtons. The first is the usual way, where we create a new Gtk."
33796"RadioButton and assign its properties at the same time. The second and third use functions which automatically "
33797"handle some of the properties; new_from_widget takes a single argument, the RadioButton that you want to put this "
33798"new one in the same group as. Meanwhile, new_with_label_from_widget takes that and the RadioButton's label at the "
33799"same time."
33800msgstr ""
33801"RadioButton을 만드는 방법은 세가지가 있습니다. 첫번째는 Gtk.RadioButton을 새로 만들고 속성을 동시에 지정하는 일반적"
33802"인 방법, 두번째와 세번째는 일부 속성 값을 자동으로 처리하는 함수를 사용하는 방법입니다. new_from_widget은 동일한 그"
33803"룹에 새 단추를 넣으려고 할 때 넣을 RadioButton 단일 인자를 취하지만, new_with_label_from_widget은 RadioButton 레이"
33804"블을 함께 취합니다."
33805
33806#. (itstool) path: section/p
33807#: C/radiobutton.js.page:103
33808msgid ""
33809"The first RadioButton in a group is the one that's selected by default. Try uncommenting the last line in this "
33810"sample code to see how you can set a different one to be the default selection."
33811msgstr ""
33812"그룹의 처음 RadioButton은 기본으로 선택하는 항목입니다. 이 예제 코드의 마지막 줄 주석 표시를 제거해보셔서 다른 항목"
33813"을 어떻게 기본으로 선택할 수 있는지 확인해보십시오."
33814
33815#. (itstool) path: section/code
33816#: C/radiobutton.js.page:105
33817#, no-wrap
33818msgid ""
33819"\n"
33820"        // Create a label for the second group of buttons\n"
33821"        this._thingLabel = new Gtk.Label ({label: \"And what would you like to bring?\" });\n"
33822"\n"
33823"        // Create three more radio buttons\n"
33824"        this._thing1 = new Gtk.RadioButton ({label: \"Penguins\" });\n"
33825"        this._thing2 = new Gtk.RadioButton ({label: \"Sunscreen\", group: this._thing1 });\n"
33826"        this._thing3 = new Gtk.RadioButton ({label: \"A spacesuit\", group: this._thing1 });\n"
33827msgstr ""
33828"\n"
33829"        // Create a label for the second group of buttons\n"
33830"        this._thingLabel = new Gtk.Label ({label: \"And what would you like to bring?\" });\n"
33831"\n"
33832"        // Create three more radio buttons\n"
33833"        this._thing1 = new Gtk.RadioButton ({label: \"Penguins\" });\n"
33834"        this._thing2 = new Gtk.RadioButton ({label: \"Sunscreen\", group: this._thing1 });\n"
33835"        this._thing3 = new Gtk.RadioButton ({label: \"A spacesuit\", group: this._thing1 });\n"
33836
33837#. (itstool) path: section/p
33838#: C/radiobutton.js.page:114
33839msgid "Here we create the label for the second group of buttons, and then create them all the same way."
33840msgstr "여기서 그룹의 두번째 단추에 레이블을 만들어넣고, 나머지 단추에 대해서도 동일한 방식으로 만듭니다."
33841
33842#. (itstool) path: section/title
33843#: C/radiobutton.js.page:118 C/textview.js.page:132
33844msgid "Creating the rest of the user interface"
33845msgstr "사용자 인터페이스 나머지 부분 만들기"
33846
33847#. (itstool) path: section/code
33848#: C/radiobutton.js.page:120
33849#, no-wrap
33850msgid ""
33851"\n"
33852"        // Create a stock OK button\n"
33853"        this._okButton = new Gtk.Button ({\n"
33854"            label: 'gtk-ok',\n"
33855"            use_stock: 'true',\n"
33856"            halign: Gtk.Align.END });\n"
33857"\n"
33858"        // Connect the button to the function which handles clicking it\n"
33859"        this._okButton.connect ('clicked', Lang.bind (this, this._okClicked));\n"
33860msgstr ""
33861"\n"
33862"        // Create a stock OK button\n"
33863"        this._okButton = new Gtk.Button ({\n"
33864"            label: 'gtk-ok',\n"
33865"            use_stock: 'true',\n"
33866"            halign: Gtk.Align.END });\n"
33867"\n"
33868"        // Connect the button to the function which handles clicking it\n"
33869"        this._okButton.connect ('clicked', Lang.bind (this, this._okClicked));\n"
33870
33871#. (itstool) path: section/p
33872#: C/radiobutton.js.page:130
33873msgid ""
33874"This code creates a <link xref=\"button.js\">Gtk.Button</link> and binds it to a function which will show people a "
33875"silly message when they click OK, depending on which RadioButtons were selected."
33876msgstr ""
33877"이 코드는 <link xref=\"button.js\">Gtk.Button</link>을 만들고 함수에 바인딩하여, 사용자가 확인을 누르면 어떤 "
33878"RadioButton을 선택했느냐에 따라 유치한 메시지를 보여줍니다."
33879
33880#. (itstool) path: section/p
33881#: C/radiobutton.js.page:131
33882msgid ""
33883"To make sure the button's \"OK\" label shows up properly in every language that GNOME is translated into, remember "
33884"to use one of Gtk's <link href=\"https://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html\">stock button types</"
33885"link>."
33886msgstr ""
33887"단추의 \"확인\" 레이블을 그놈에서 번역한대로 각 언어로 올바르게 나타나게 하려면, GTK <link href=\"https://"
33888"developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html\">스톡 단추 형식</link> 활용 방식을 기억에서 되살려보십시오."
33889
33890#. (itstool) path: section/code
33891#: C/radiobutton.js.page:133
33892#, no-wrap
33893msgid ""
33894"\n"
33895"        // Create a grid to put the \"place\" items in\n"
33896"        this._places = new Gtk.Grid ();\n"
33897"\n"
33898"        // Attach the \"place\" items to the grid\n"
33899"        this._places.attach (this._placeLabel, 0, 0, 1, 1);\n"
33900"        this._places.attach (this._place1, 0, 1, 1, 1);\n"
33901"        this._places.attach (this._place2, 0, 2, 1, 1);\n"
33902"        this._places.attach (this._place3, 0, 3, 1, 1);\n"
33903"\n"
33904"        // Create a grid to put the \"thing\" items in\n"
33905"        this._things = new Gtk.Grid ({ margin_top: 50 });\n"
33906"\n"
33907"        // Attach the \"thing\" items to the grid\n"
33908"        this._things.attach (this._thingLabel, 0, 0, 1, 1);\n"
33909"        this._things.attach (this._thing1, 0, 1, 1, 1);\n"
33910"        this._things.attach (this._thing2, 0, 2, 1, 1);\n"
33911"        this._things.attach (this._thing3, 0, 3, 1, 1);\n"
33912"\n"
33913"        // Create a grid to put everything in\n"
33914"        this._grid = new Gtk.Grid ({\n"
33915"            halign: Gtk.Align.CENTER,\n"
33916"            valign: Gtk.Align.CENTER,\n"
33917"            margin_left: 40,\n"
33918"            margin_right: 50 });\n"
33919"\n"
33920"        // Attach everything to the grid\n"
33921"        this._grid.attach (this._places, 0, 0, 1, 1);\n"
33922"        this._grid.attach (this._things, 0, 1, 1, 1);\n"
33923"        this._grid.attach (this._okButton, 0, 2, 1, 1);\n"
33924"\n"
33925"        // Add the grid to the window\n"
33926"        this._window.add (this._grid);\n"
33927msgstr ""
33928"\n"
33929"        // Create a grid to put the \"place\" items in\n"
33930"        this._places = new Gtk.Grid ();\n"
33931"\n"
33932"        // Attach the \"place\" items to the grid\n"
33933"        this._places.attach (this._placeLabel, 0, 0, 1, 1);\n"
33934"        this._places.attach (this._place1, 0, 1, 1, 1);\n"
33935"        this._places.attach (this._place2, 0, 2, 1, 1);\n"
33936"        this._places.attach (this._place3, 0, 3, 1, 1);\n"
33937"\n"
33938"        // Create a grid to put the \"thing\" items in\n"
33939"        this._things = new Gtk.Grid ({ margin_top: 50 });\n"
33940"\n"
33941"        // Attach the \"thing\" items to the grid\n"
33942"        this._things.attach (this._thingLabel, 0, 0, 1, 1);\n"
33943"        this._things.attach (this._thing1, 0, 1, 1, 1);\n"
33944"        this._things.attach (this._thing2, 0, 2, 1, 1);\n"
33945"        this._things.attach (this._thing3, 0, 3, 1, 1);\n"
33946"\n"
33947"        // Create a grid to put everything in\n"
33948"        this._grid = new Gtk.Grid ({\n"
33949"            halign: Gtk.Align.CENTER,\n"
33950"            valign: Gtk.Align.CENTER,\n"
33951"            margin_left: 40,\n"
33952"            margin_right: 50 });\n"
33953"\n"
33954"        // Attach everything to the grid\n"
33955"        this._grid.attach (this._places, 0, 0, 1, 1);\n"
33956"        this._grid.attach (this._things, 0, 1, 1, 1);\n"
33957"        this._grid.attach (this._okButton, 0, 2, 1, 1);\n"
33958"\n"
33959"        // Add the grid to the window\n"
33960"        this._window.add (this._grid);\n"
33961
33962#. (itstool) path: section/p
33963#: C/radiobutton.js.page:167
33964msgid ""
33965"We use a separate <link xref=\"grid.js\">Gtk.Grid</link> to organize each group of radio buttons. This way we can "
33966"change the layout with less fuss later on. The second Grid has a margin on top, to visually separate the two sets "
33967"of choices."
33968msgstr ""
33969"라디오 단추를 각 그룹으로 묶는 용도로 <link xref=\"grid.js\">Gtk.Grid</link> 를 따로 사용합니다. 이 방식대로라면 나"
33970"중에 덜 난리나는 방식으로 배치를 바꿀 수 있습니다. 두번째 그리드는 상단에 여백을 두었는데 두 선택 그룹을 눈으로 보"
33971"기에 따로 나뉘어 보기에 한 부분입니다."
33972
33973#. (itstool) path: section/p
33974#: C/radiobutton.js.page:168
33975msgid ""
33976"After we've organized them, we put them into a third, master Grid, along with the OK button. Then we attach that "
33977"to the window."
33978msgstr ""
33979"이렇게 정돈한 다음에는 세번째로 마스터 그리드를 넣고, 그 안에 확인 단추를 넣습니다. 이 과정이 끝나면 마스터 그리드"
33980"를 창에 넣습니다."
33981
33982#. (itstool) path: section/code
33983#: C/radiobutton.js.page:170
33984#, no-wrap
33985msgid ""
33986"\n"
33987"        // Show the window and all child widgets\n"
33988"        this._window.show_all();\n"
33989"    },\n"
33990msgstr ""
33991"\n"
33992"        // Show the window and all child widgets\n"
33993"        this._window.show_all();\n"
33994"    },\n"
33995
33996#. (itstool) path: section/p
33997#: C/radiobutton.js.page:176
33998msgid "Finally, we tell the window and everything inside it to become visible when the application is run."
33999msgstr "마지막으로 프로그램을 실행할 때 창과 창에 있는 모든 요소를 나타내라고 하겠습니다."
34000
34001#. (itstool) path: section/code
34002#: C/radiobutton.js.page:182
34003#, no-wrap
34004msgid ""
34005"\n"
34006"    _okClicked: function () {\n"
34007"\n"
34008"        // Create a popup that shows a silly message\n"
34009"        this._travel = new Gtk.MessageDialog ({\n"
34010"            transient_for: this._window,\n"
34011"            modal: true,\n"
34012"            message_type: Gtk.MessageType.OTHER,\n"
34013"            buttons: Gtk.ButtonsType.OK,\n"
34014"            text: this._messageText() });\n"
34015"\n"
34016"        // Show the popup\n"
34017"        this._travel.show();\n"
34018"\n"
34019"        // Bind the OK button to the function that closes the popup\n"
34020"        this._travel.connect (\"response\", Lang.bind (this, this._clearTravelPopUp));\n"
34021"\n"
34022"    },\n"
34023msgstr ""
34024"\n"
34025"    _okClicked: function () {\n"
34026"\n"
34027"        // Create a popup that shows a silly message\n"
34028"        this._travel = new Gtk.MessageDialog ({\n"
34029"            transient_for: this._window,\n"
34030"            modal: true,\n"
34031"            message_type: Gtk.MessageType.OTHER,\n"
34032"            buttons: Gtk.ButtonsType.OK,\n"
34033"            text: this._messageText() });\n"
34034"\n"
34035"        // Show the popup\n"
34036"        this._travel.show();\n"
34037"\n"
34038"        // Bind the OK button to the function that closes the popup\n"
34039"        this._travel.connect (\"response\", Lang.bind (this, this._clearTravelPopUp));\n"
34040"\n"
34041"    },\n"
34042
34043#. (itstool) path: section/p
34044#: C/radiobutton.js.page:201
34045msgid ""
34046"When you click OK, a <link xref=\"messagedialog.js\">Gtk.MessageDialog</link> appears. This function creates and "
34047"displays the popup window, then binds its OK button to a function that closes it. What text appears in the popup "
34048"depends on the _messageText() function, which returns a different value depending on which set of options you "
34049"chose."
34050msgstr ""
34051"확인을 누르면 <link xref=\"messagedialog.js\">Gtk.MessageDialog</link>가 나타납니다. 이 함수는 팝업 창을 만들어 띄"
34052"운 후 창을 닫는 확인 단추에 함수를 연결합니다. 여러분이 선택한 옵션 설정에 따라 다른 값을 반환하는 _messageText() "
34053"함수에서 반환하는 값에 따라 팝업 창에 나타나는 텍스트가 달라집니다."
34054
34055#. (itstool) path: section/code
34056#: C/radiobutton.js.page:203
34057#, no-wrap
34058msgid ""
34059"\n"
34060"    _messageText: function() {\n"
34061"\n"
34062"        // Create a silly message for the popup depending on what you selected\n"
34063"        var stringMessage = \"\";\n"
34064"\n"
34065"        if (this._place1.get_active()) {\n"
34066"\n"
34067"            if (this._thing1.get_active())\n"
34068"                stringMessage = \"Penguins love the beach, too!\";\n"
34069"\n"
34070"            else if (this._thing2.get_active())\n"
34071"                stringMessage = \"Make sure to put on that sunscreen!\";\n"
34072"\n"
34073"            else stringMessage = \"Are you going to the beach in space?\";\n"
34074"\n"
34075"        }\n"
34076"\n"
34077"        else if (this._place2.get_active()) {\n"
34078"\n"
34079"            if (this._thing1.get_active())\n"
34080"                stringMessage = \"The penguins will take over the moon!\";\n"
34081"\n"
34082"            else if (this._thing2.get_active())\n"
34083"                stringMessage = \"A lack of sunscreen will be the least of your problems!\";\n"
34084"\n"
34085"            else stringMessage = \"You'll probably want a spaceship, too!\";\n"
34086"        }\n"
34087"\n"
34088"        else if (this._place3.get_active()) {\n"
34089"\n"
34090"            if (this._thing1.get_active())\n"
34091"                stringMessage = \"The penguins will be happy to be back home!\";\n"
34092"\n"
34093"            else if (this._thing2.get_active())\n"
34094"                stringMessage = \"Antarctic sunbathing may be hazardous to your health!\";\n"
34095"\n"
34096"            else stringMessage = \"Try bringing a parka instead!\";\n"
34097"        }\n"
34098"\n"
34099"        return stringMessage;\n"
34100"\n"
34101"    },\n"
34102msgstr ""
34103"\n"
34104"    _messageText: function() {\n"
34105"\n"
34106"        // Create a silly message for the popup depending on what you selected\n"
34107"        var stringMessage = \"\";\n"
34108"\n"
34109"        if (this._place1.get_active()) {\n"
34110"\n"
34111"            if (this._thing1.get_active())\n"
34112"                stringMessage = \"Penguins love the beach, too!\";\n"
34113"\n"
34114"            else if (this._thing2.get_active())\n"
34115"                stringMessage = \"Make sure to put on that sunscreen!\";\n"
34116"\n"
34117"            else stringMessage = \"Are you going to the beach in space?\";\n"
34118"\n"
34119"        }\n"
34120"\n"
34121"        else if (this._place2.get_active()) {\n"
34122"\n"
34123"            if (this._thing1.get_active())\n"
34124"                stringMessage = \"The penguins will take over the moon!\";\n"
34125"\n"
34126"            else if (this._thing2.get_active())\n"
34127"                stringMessage = \"A lack of sunscreen will be the least of your problems!\";\n"
34128"\n"
34129"            else stringMessage = \"You'll probably want a spaceship, too!\";\n"
34130"        }\n"
34131"\n"
34132"        else if (this._place3.get_active()) {\n"
34133"\n"
34134"            if (this._thing1.get_active())\n"
34135"                stringMessage = \"The penguins will be happy to be back home!\";\n"
34136"\n"
34137"            else if (this._thing2.get_active())\n"
34138"                stringMessage = \"Antarctic sunbathing may be hazardous to your health!\";\n"
34139"\n"
34140"            else stringMessage = \"Try bringing a parka instead!\";\n"
34141"        }\n"
34142"\n"
34143"        return stringMessage;\n"
34144"\n"
34145"    },\n"
34146
34147#. (itstool) path: section/p
34148#: C/radiobutton.js.page:247
34149msgid ""
34150"The get_active() method is how we can tell which RadioButton's pressed in. This function returns a different silly "
34151"message depending on which set of buttons was pressed. Its return value is used as the MessageDialog's text "
34152"property."
34153msgstr ""
34154"get_active() 메서드는 지금 눌린 RadioButton이 뭔지 알아볼 수 있는 수단입니다. 이 함수에는 어떤 단추를 눌렀느냐에 따"
34155"라 각기 다른 유치한 메시지를 반환합니다. 반환 값은 MessageDialog의 텍스트 속성 값으로 활용합니다."
34156
34157#. (itstool) path: section/code
34158#: C/radiobutton.js.page:249
34159#, no-wrap
34160msgid ""
34161"\n"
34162"    _clearTravelPopUp: function () {\n"
34163"\n"
34164"        this._travel.destroy();\n"
34165"\n"
34166"    }\n"
34167"\n"
34168"});\n"
34169msgstr ""
34170"\n"
34171"    _clearTravelPopUp: function () {\n"
34172"\n"
34173"        this._travel.destroy();\n"
34174"\n"
34175"    }\n"
34176"\n"
34177"});\n"
34178
34179#. (itstool) path: section/p
34180#: C/radiobutton.js.page:258
34181msgid "This function is called when the MessageDialog's OK button is pressed. It simply makes the popup go away."
34182msgstr "이 함수는 MessageDialog의 확인 단추를 누를 때 호출합니다."
34183
34184#. (itstool) path: section/code
34185#: C/radiobutton.js.page:260
34186#, no-wrap
34187msgid ""
34188"\n"
34189"// Run the application\n"
34190"let app = new RadioButtonExample ();\n"
34191"app.application.run (ARGV);\n"
34192msgstr ""
34193"\n"
34194"// Run the application\n"
34195"let app = new RadioButtonExample ();\n"
34196"app.application.run (ARGV);\n"
34197
34198#. (itstool) path: section/p
34199#: C/radiobutton.js.page:265 C/togglebutton.js.page:144
34200msgid "Finally, we create a new instance of the finished RadioButtonExample class, and set the application running."
34201msgstr "마지막으로, 마무리 지은 RadioButtonExample 클래스의 새 인스턴스를 만들고 프로그램 실행을 설정하겠습니다."
34202
34203#. (itstool) path: section/code
34204#: C/radiobutton.js.page:270
34205#, no-wrap
34206msgid ""
34207"#!/usr/bin/gjs\n"
34208"\n"
34209"imports.gi.versions.Gtk = '3.0';\n"
34210"\n"
34211"const Gio = imports.gi.Gio;\n"
34212"const Gtk = imports.gi.Gtk;\n"
34213"\n"
34214"class RadioButtonExample {\n"
34215"\n"
34216"    // Create the application itself\n"
34217"    constructor() {\n"
34218"        this.application = new Gtk.Application({\n"
34219"            application_id: 'org.example.jsradiobutton',\n"
34220"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
34221"        });\n"
34222"\n"
34223"        // Connect 'activate' and 'startup' signals to the callback functions\n"
34224"        this.application.connect('activate', this._onActivate.bind(this));\n"
34225"        this.application.connect('startup', this._onStartup.bind(this));\n"
34226"    }\n"
34227"\n"
34228"    // Callback function for 'activate' signal presents window when active\n"
34229"    _onActivate() {\n"
34230"        this._window.present();\n"
34231"    }\n"
34232"\n"
34233"    // Callback function for 'startup' signal builds the UI\n"
34234"    _onStartup() {\n"
34235"        this._buildUI();\n"
34236"    }\n"
34237"\n"
34238"    // Build the application's UI\n"
34239"    _buildUI() {\n"
34240"\n"
34241"        // Create the application window\n"
34242"        this._window = new Gtk.ApplicationWindow({\n"
34243"            application: this.application,\n"
34244"            window_position: Gtk.WindowPosition.CENTER,\n"
34245"            border_width: 20,\n"
34246"            title: \"Travel Planning\"});\n"
34247"\n"
34248"        // Create a label for the first group of buttons\n"
34249"        this._placeLabel = new Gtk.Label ({label: \"Where would you like to travel to?\"});\n"
34250"\n"
34251"        // Create three radio buttons three different ways\n"
34252"        this._place1 = new Gtk.RadioButton ({label: \"The Beach\"});\n"
34253"\n"
34254"        this._place2 = Gtk.RadioButton.new_from_widget (this._place1);\n"
34255"        this._place2.set_label (\"The Moon\");\n"
34256"\n"
34257"        this._place3 = Gtk.RadioButton.new_with_label_from_widget (this._place1, \"Antarctica\");\n"
34258"        // this._place3.set_active (true);\n"
34259"\n"
34260"        // Create a label for the second group of buttons\n"
34261"        this._thingLabel = new Gtk.Label ({label: \"And what would you like to bring?\" });\n"
34262"\n"
34263"        // Create three more radio buttons\n"
34264"        this._thing1 = new Gtk.RadioButton ({label: \"Penguins\" });\n"
34265"        this._thing2 = new Gtk.RadioButton ({label: \"Sunscreen\", group: this._thing1 });\n"
34266"        this._thing3 = new Gtk.RadioButton ({label: \"A spacesuit\", group: this._thing1 });\n"
34267"\n"
34268"        // Create a stock OK button\n"
34269"        this._okButton = new Gtk.Button ({\n"
34270"            label: 'gtk-ok',\n"
34271"            use_stock: 'true',\n"
34272"            halign: Gtk.Align.END });\n"
34273"\n"
34274"        // Connect the button to the function which handles clicking it\n"
34275"        this._okButton.connect ('clicked', this._okClicked.bind(this));\n"
34276"\n"
34277"        // Create a grid to put the \"place\" items in\n"
34278"        this._places = new Gtk.Grid ();\n"
34279"\n"
34280"        // Attach the \"place\" items to the grid\n"
34281"        this._places.attach (this._placeLabel, 0, 0, 1, 1);\n"
34282"        this._places.attach (this._place1, 0, 1, 1, 1);\n"
34283"        this._places.attach (this._place2, 0, 2, 1, 1);\n"
34284"        this._places.attach (this._place3, 0, 3, 1, 1);\n"
34285"\n"
34286"        // Create a grid to put the \"thing\" items in\n"
34287"        this._things = new Gtk.Grid ({ margin_top: 50 });\n"
34288"\n"
34289"        // Attach the \"thing\" items to the grid\n"
34290"        this._things.attach (this._thingLabel, 0, 0, 1, 1);\n"
34291"        this._things.attach (this._thing1, 0, 1, 1, 1);\n"
34292"        this._things.attach (this._thing2, 0, 2, 1, 1);\n"
34293"        this._things.attach (this._thing3, 0, 3, 1, 1);\n"
34294"\n"
34295"        // Create a grid to put everything in\n"
34296"        this._grid = new Gtk.Grid ({\n"
34297"            halign: Gtk.Align.CENTER,\n"
34298"            valign: Gtk.Align.CENTER,\n"
34299"            margin_left: 40,\n"
34300"            margin_right: 50 });\n"
34301"\n"
34302"        // Attach everything to the grid\n"
34303"        this._grid.attach (this._places, 0, 0, 1, 1);\n"
34304"        this._grid.attach (this._things, 0, 1, 1, 1);\n"
34305"        this._grid.attach (this._okButton, 0, 2, 1, 1);\n"
34306"\n"
34307"        // Add the grid to the window\n"
34308"        this._window.add (this._grid);\n"
34309"\n"
34310"        // Show the window and all child widgets\n"
34311"        this._window.show_all();\n"
34312"    }\n"
34313"\n"
34314"    _okClicked() {\n"
34315"\n"
34316"        // Create a popup that shows a silly message\n"
34317"        this._travel = new Gtk.MessageDialog ({\n"
34318"            transient_for: this._window,\n"
34319"            modal: true,\n"
34320"            message_type: Gtk.MessageType.OTHER,\n"
34321"            buttons: Gtk.ButtonsType.OK,\n"
34322"            text: this._messageText() });\n"
34323"\n"
34324"        // Show the popup\n"
34325"        this._travel.show();\n"
34326"\n"
34327"        // Bind the OK button to the function that closes the popup\n"
34328"        this._travel.connect (\"response\", this._clearTravelPopUp.bind(this));\n"
34329"\n"
34330"    }\n"
34331"\n"
34332"    _messageText() {\n"
34333"\n"
34334"        // Create a silly message for the popup depending on what you selected\n"
34335"        var stringMessage = \"\";\n"
34336"\n"
34337"        if (this._place1.get_active()) {\n"
34338"\n"
34339"            if (this._thing1.get_active())\n"
34340"                stringMessage = \"Penguins love the beach, too!\";\n"
34341"\n"
34342"            else if (this._thing2.get_active())\n"
34343"                stringMessage = \"Make sure to put on that sunscreen!\";\n"
34344"\n"
34345"            else stringMessage = \"Are you going to the beach in space?\";\n"
34346"\n"
34347"        }\n"
34348"\n"
34349"        else if (this._place2.get_active()) {\n"
34350"\n"
34351"            if (this._thing1.get_active())\n"
34352"                stringMessage = \"The penguins will take over the moon!\";\n"
34353"\n"
34354"            else if (this._thing2.get_active())\n"
34355"                stringMessage = \"A lack of sunscreen will be the least of your problems!\";\n"
34356"\n"
34357"            else stringMessage = \"You'll probably want a spaceship, too!\";\n"
34358"        }\n"
34359"\n"
34360"        else if (this._place3.get_active()) {\n"
34361"\n"
34362"            if (this._thing1.get_active())\n"
34363"                stringMessage = \"The penguins will be happy to be back home!\";\n"
34364"\n"
34365"            else if (this._thing2.get_active())\n"
34366"                stringMessage = \"Antarctic sunbathing may be hazardous to your health!\";\n"
34367"\n"
34368"            else stringMessage = \"Try bringing a parka instead!\";\n"
34369"        }\n"
34370"\n"
34371"        return stringMessage;\n"
34372"\n"
34373"    }\n"
34374"\n"
34375"    _clearTravelPopUp() {\n"
34376"        this._travel.destroy();\n"
34377"    }\n"
34378"};\n"
34379"\n"
34380"// Run the application\n"
34381"let app = new RadioButtonExample ();\n"
34382"app.application.run (ARGV);\n"
34383msgstr ""
34384"#!/usr/bin/gjs\n"
34385"\n"
34386"imports.gi.versions.Gtk = '3.0';\n"
34387"\n"
34388"const Gio = imports.gi.Gio;\n"
34389"const Gtk = imports.gi.Gtk;\n"
34390"\n"
34391"class RadioButtonExample {\n"
34392"\n"
34393"    // Create the application itself\n"
34394"    constructor() {\n"
34395"        this.application = new Gtk.Application({\n"
34396"            application_id: 'org.example.jsradiobutton',\n"
34397"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
34398"        });\n"
34399"\n"
34400"        // Connect 'activate' and 'startup' signals to the callback functions\n"
34401"        this.application.connect('activate', this._onActivate.bind(this));\n"
34402"        this.application.connect('startup', this._onStartup.bind(this));\n"
34403"    }\n"
34404"\n"
34405"    // Callback function for 'activate' signal presents window when active\n"
34406"    _onActivate() {\n"
34407"        this._window.present();\n"
34408"    }\n"
34409"\n"
34410"    // Callback function for 'startup' signal builds the UI\n"
34411"    _onStartup() {\n"
34412"        this._buildUI();\n"
34413"    }\n"
34414"\n"
34415"    // Build the application's UI\n"
34416"    _buildUI() {\n"
34417"\n"
34418"        // Create the application window\n"
34419"        this._window = new Gtk.ApplicationWindow({\n"
34420"            application: this.application,\n"
34421"            window_position: Gtk.WindowPosition.CENTER,\n"
34422"            border_width: 20,\n"
34423"            title: \"Travel Planning\"});\n"
34424"\n"
34425"        // Create a label for the first group of buttons\n"
34426"        this._placeLabel = new Gtk.Label ({label: \"Where would you like to travel to?\"});\n"
34427"\n"
34428"        // Create three radio buttons three different ways\n"
34429"        this._place1 = new Gtk.RadioButton ({label: \"The Beach\"});\n"
34430"\n"
34431"        this._place2 = Gtk.RadioButton.new_from_widget (this._place1);\n"
34432"        this._place2.set_label (\"The Moon\");\n"
34433"\n"
34434"        this._place3 = Gtk.RadioButton.new_with_label_from_widget (this._place1, \"Antarctica\");\n"
34435"        // this._place3.set_active (true);\n"
34436"\n"
34437"        // Create a label for the second group of buttons\n"
34438"        this._thingLabel = new Gtk.Label ({label: \"And what would you like to bring?\" });\n"
34439"\n"
34440"        // Create three more radio buttons\n"
34441"        this._thing1 = new Gtk.RadioButton ({label: \"Penguins\" });\n"
34442"        this._thing2 = new Gtk.RadioButton ({label: \"Sunscreen\", group: this._thing1 });\n"
34443"        this._thing3 = new Gtk.RadioButton ({label: \"A spacesuit\", group: this._thing1 });\n"
34444"\n"
34445"        // Create a stock OK button\n"
34446"        this._okButton = new Gtk.Button ({\n"
34447"            label: 'gtk-ok',\n"
34448"            use_stock: 'true',\n"
34449"            halign: Gtk.Align.END });\n"
34450"\n"
34451"        // Connect the button to the function which handles clicking it\n"
34452"        this._okButton.connect ('clicked', this._okClicked.bind(this));\n"
34453"\n"
34454"        // Create a grid to put the \"place\" items in\n"
34455"        this._places = new Gtk.Grid ();\n"
34456"\n"
34457"        // Attach the \"place\" items to the grid\n"
34458"        this._places.attach (this._placeLabel, 0, 0, 1, 1);\n"
34459"        this._places.attach (this._place1, 0, 1, 1, 1);\n"
34460"        this._places.attach (this._place2, 0, 2, 1, 1);\n"
34461"        this._places.attach (this._place3, 0, 3, 1, 1);\n"
34462"\n"
34463"        // Create a grid to put the \"thing\" items in\n"
34464"        this._things = new Gtk.Grid ({ margin_top: 50 });\n"
34465"\n"
34466"        // Attach the \"thing\" items to the grid\n"
34467"        this._things.attach (this._thingLabel, 0, 0, 1, 1);\n"
34468"        this._things.attach (this._thing1, 0, 1, 1, 1);\n"
34469"        this._things.attach (this._thing2, 0, 2, 1, 1);\n"
34470"        this._things.attach (this._thing3, 0, 3, 1, 1);\n"
34471"\n"
34472"        // Create a grid to put everything in\n"
34473"        this._grid = new Gtk.Grid ({\n"
34474"            halign: Gtk.Align.CENTER,\n"
34475"            valign: Gtk.Align.CENTER,\n"
34476"            margin_left: 40,\n"
34477"            margin_right: 50 });\n"
34478"\n"
34479"        // Attach everything to the grid\n"
34480"        this._grid.attach (this._places, 0, 0, 1, 1);\n"
34481"        this._grid.attach (this._things, 0, 1, 1, 1);\n"
34482"        this._grid.attach (this._okButton, 0, 2, 1, 1);\n"
34483"\n"
34484"        // Add the grid to the window\n"
34485"        this._window.add (this._grid);\n"
34486"\n"
34487"        // Show the window and all child widgets\n"
34488"        this._window.show_all();\n"
34489"    }\n"
34490"\n"
34491"    _okClicked() {\n"
34492"\n"
34493"        // Create a popup that shows a silly message\n"
34494"        this._travel = new Gtk.MessageDialog ({\n"
34495"            transient_for: this._window,\n"
34496"            modal: true,\n"
34497"            message_type: Gtk.MessageType.OTHER,\n"
34498"            buttons: Gtk.ButtonsType.OK,\n"
34499"            text: this._messageText() });\n"
34500"\n"
34501"        // Show the popup\n"
34502"        this._travel.show();\n"
34503"\n"
34504"        // Bind the OK button to the function that closes the popup\n"
34505"        this._travel.connect (\"response\", this._clearTravelPopUp.bind(this));\n"
34506"\n"
34507"    }\n"
34508"\n"
34509"    _messageText() {\n"
34510"\n"
34511"        // Create a silly message for the popup depending on what you selected\n"
34512"        var stringMessage = \"\";\n"
34513"\n"
34514"        if (this._place1.get_active()) {\n"
34515"\n"
34516"            if (this._thing1.get_active())\n"
34517"                stringMessage = \"Penguins love the beach, too!\";\n"
34518"\n"
34519"            else if (this._thing2.get_active())\n"
34520"                stringMessage = \"Make sure to put on that sunscreen!\";\n"
34521"\n"
34522"            else stringMessage = \"Are you going to the beach in space?\";\n"
34523"\n"
34524"        }\n"
34525"\n"
34526"        else if (this._place2.get_active()) {\n"
34527"\n"
34528"            if (this._thing1.get_active())\n"
34529"                stringMessage = \"The penguins will take over the moon!\";\n"
34530"\n"
34531"            else if (this._thing2.get_active())\n"
34532"                stringMessage = \"A lack of sunscreen will be the least of your problems!\";\n"
34533"\n"
34534"            else stringMessage = \"You'll probably want a spaceship, too!\";\n"
34535"        }\n"
34536"\n"
34537"        else if (this._place3.get_active()) {\n"
34538"\n"
34539"            if (this._thing1.get_active())\n"
34540"                stringMessage = \"The penguins will be happy to be back home!\";\n"
34541"\n"
34542"            else if (this._thing2.get_active())\n"
34543"                stringMessage = \"Antarctic sunbathing may be hazardous to your health!\";\n"
34544"\n"
34545"            else stringMessage = \"Try bringing a parka instead!\";\n"
34546"        }\n"
34547"\n"
34548"        return stringMessage;\n"
34549"\n"
34550"    }\n"
34551"\n"
34552"    _clearTravelPopUp() {\n"
34553"        this._travel.destroy();\n"
34554"    }\n"
34555"};\n"
34556"\n"
34557"// Run the application\n"
34558"let app = new RadioButtonExample ();\n"
34559"app.application.run (ARGV);\n"
34560
34561#. (itstool) path: item/p
34562#: C/radiobutton.js.page:278 C/statusbar.js.page:225 C/textview.js.page:252
34563msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Button.html\">Gtk.Button</link>"
34564msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Button.html\">Gtk.Button</link>"
34565
34566#. (itstool) path: item/p
34567#: C/radiobutton.js.page:279 C/scale.js.page:213 C/spinbutton.js.page:204 C/switch.js.page:270 C/textview.js.page:253
34568#: C/togglebutton.js.page:157
34569msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Grid.html\">Gtk.Grid</link>"
34570msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Grid.html\">Gtk.Grid</link>"
34571
34572#. (itstool) path: item/p
34573#: C/radiobutton.js.page:280 C/scale.js.page:214 C/spinbutton.js.page:205 C/switch.js.page:272 C/textview.js.page:254
34574msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Label.html\">Gtk.Label</link>"
34575msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Label.html\">Gtk.Label</link>"
34576
34577#. (itstool) path: item/p
34578#: C/radiobutton.js.page:281 C/textview.js.page:255
34579msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.RadioButton.html\">Gtk.RadioButton</link>"
34580msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.RadioButton.html\">Gtk.RadioButton</link>"
34581
34582#. (itstool) path: info/title
34583#: C/radiobutton.py.page:8
34584msgctxt "text"
34585msgid "RadioButton (Python)"
34586msgstr "RadioButton (Python)"
34587
34588#. (itstool) path: info/desc
34589#: C/radiobutton.py.page:20
34590msgid "Mutually exclusive buttons."
34591msgstr "상호 배타적 관계의 단추입니다."
34592
34593#. (itstool) path: page/p
34594#: C/radiobutton.py.page:25
34595msgid "Three RadioButtons. You can see in the terminal if they are turned off or on."
34596msgstr "RadioButton이 세개가 있습니다. 터미널에서 켜고 끈 단추를 볼 수 있습니다."
34597
34598#. (itstool) path: section/code
34599#: C/radiobutton.py.page:31
34600#, no-wrap
34601msgid ""
34602"from gi.repository import Gtk\n"
34603"import sys\n"
34604"\n"
34605"\n"
34606"class MyWindow(Gtk.ApplicationWindow):\n"
34607"\n"
34608"    def __init__(self, app):\n"
34609"        Gtk.Window.__init__(self, title=\"RadioButton Example\", application=app)\n"
34610"        self.set_default_size(250, 100)\n"
34611"        self.set_border_width(20)\n"
34612"\n"
34613"        # a new radiobutton with a label\n"
34614"        button1 = Gtk.RadioButton(label=\"Button 1\")\n"
34615"        # connect the signal \"toggled\" emitted by the radiobutton\n"
34616"        # with the callback function toggled_cb\n"
34617"        button1.connect(\"toggled\", self.toggled_cb)\n"
34618"\n"
34619"        # another radiobutton, in the same group as button1\n"
34620"        button2 = Gtk.RadioButton.new_from_widget(button1)\n"
34621"        # with label \"Button 2\"\n"
34622"        button2.set_label(\"Button 2\")\n"
34623"        # connect the signal \"toggled\" emitted by the radiobutton\n"
34624"        # with the callback function toggled_cb\n"
34625"        button2.connect(\"toggled\", self.toggled_cb)\n"
34626"        # set button2 not active by default\n"
34627"        button2.set_active(False)\n"
34628"\n"
34629"        # another radiobutton, in the same group as button1,\n"
34630"        # with label \"Button 3\"\n"
34631"        button3 = Gtk.RadioButton.new_with_label_from_widget(\n"
34632"            button1, \"Button 3\")\n"
34633"        # connect the signal \"toggled\" emitted by the radiobutton\n"
34634"        # with the callback function toggled_cb\n"
34635"        button3.connect(\"toggled\", self.toggled_cb)\n"
34636"        # set button3 not active by default\n"
34637"        button3.set_active(False)\n"
34638"\n"
34639"        # a grid to place the buttons\n"
34640"        grid = Gtk.Grid.new()\n"
34641"        grid.attach(button1, 0, 0, 1, 1)\n"
34642"        grid.attach(button2, 0, 1, 1, 1)\n"
34643"        grid.attach(button3, 0, 2, 1, 1)\n"
34644"        # add the grid to the window\n"
34645"        self.add(grid)\n"
34646"\n"
34647"    # callback function\n"
34648"    def toggled_cb(self, button):\n"
34649"        # a string to describe the state of the button\n"
34650"        state = \"unknown\"\n"
34651"        # whenever the button is turned on, state is on\n"
34652"        if button.get_active():\n"
34653"            state = \"on\"\n"
34654"        # else state is off\n"
34655"        else:\n"
34656"            state = \"off\"\n"
34657"        # whenever the function is called (a button is turned on or off)\n"
34658"        # print on the terminal which button was turned on/off\n"
34659"        print(button.get_label() + \" was turned \" + state)\n"
34660"\n"
34661"\n"
34662"class MyApplication(Gtk.Application):\n"
34663"\n"
34664"    def __init__(self):\n"
34665"        Gtk.Application.__init__(self)\n"
34666"\n"
34667"    def do_activate(self):\n"
34668"        win = MyWindow(self)\n"
34669"        win.show_all()\n"
34670"\n"
34671"    def do_startup(self):\n"
34672"        Gtk.Application.do_startup(self)\n"
34673"\n"
34674"app = MyApplication()\n"
34675"exit_status = app.run(sys.argv)\n"
34676"sys.exit(exit_status)\n"
34677msgstr ""
34678"from gi.repository import Gtk\n"
34679"import sys\n"
34680"\n"
34681"\n"
34682"class MyWindow(Gtk.ApplicationWindow):\n"
34683"\n"
34684"    def __init__(self, app):\n"
34685"        Gtk.Window.__init__(self, title=\"RadioButton Example\", application=app)\n"
34686"        self.set_default_size(250, 100)\n"
34687"        self.set_border_width(20)\n"
34688"\n"
34689"        # a new radiobutton with a label\n"
34690"        button1 = Gtk.RadioButton(label=\"Button 1\")\n"
34691"        # connect the signal \"toggled\" emitted by the radiobutton\n"
34692"        # with the callback function toggled_cb\n"
34693"        button1.connect(\"toggled\", self.toggled_cb)\n"
34694"\n"
34695"        # another radiobutton, in the same group as button1\n"
34696"        button2 = Gtk.RadioButton.new_from_widget(button1)\n"
34697"        # with label \"Button 2\"\n"
34698"        button2.set_label(\"Button 2\")\n"
34699"        # connect the signal \"toggled\" emitted by the radiobutton\n"
34700"        # with the callback function toggled_cb\n"
34701"        button2.connect(\"toggled\", self.toggled_cb)\n"
34702"        # set button2 not active by default\n"
34703"        button2.set_active(False)\n"
34704"\n"
34705"        # another radiobutton, in the same group as button1,\n"
34706"        # with label \"Button 3\"\n"
34707"        button3 = Gtk.RadioButton.new_with_label_from_widget(\n"
34708"            button1, \"Button 3\")\n"
34709"        # connect the signal \"toggled\" emitted by the radiobutton\n"
34710"        # with the callback function toggled_cb\n"
34711"        button3.connect(\"toggled\", self.toggled_cb)\n"
34712"        # set button3 not active by default\n"
34713"        button3.set_active(False)\n"
34714"\n"
34715"        # a grid to place the buttons\n"
34716"        grid = Gtk.Grid.new()\n"
34717"        grid.attach(button1, 0, 0, 1, 1)\n"
34718"        grid.attach(button2, 0, 1, 1, 1)\n"
34719"        grid.attach(button3, 0, 2, 1, 1)\n"
34720"        # add the grid to the window\n"
34721"        self.add(grid)\n"
34722"\n"
34723"    # callback function\n"
34724"    def toggled_cb(self, button):\n"
34725"        # a string to describe the state of the button\n"
34726"        state = \"unknown\"\n"
34727"        # whenever the button is turned on, state is on\n"
34728"        if button.get_active():\n"
34729"            state = \"on\"\n"
34730"        # else state is off\n"
34731"        else:\n"
34732"            state = \"off\"\n"
34733"        # whenever the function is called (a button is turned on or off)\n"
34734"        # print on the terminal which button was turned on/off\n"
34735"        print(button.get_label() + \" was turned \" + state)\n"
34736"\n"
34737"\n"
34738"class MyApplication(Gtk.Application):\n"
34739"\n"
34740"    def __init__(self):\n"
34741"        Gtk.Application.__init__(self)\n"
34742"\n"
34743"    def do_activate(self):\n"
34744"        win = MyWindow(self)\n"
34745"        win.show_all()\n"
34746"\n"
34747"    def do_startup(self):\n"
34748"        Gtk.Application.do_startup(self)\n"
34749"\n"
34750"app = MyApplication()\n"
34751"exit_status = app.run(sys.argv)\n"
34752"sys.exit(exit_status)\n"
34753
34754#. (itstool) path: section/title
34755#: C/radiobutton.py.page:35
34756msgid "Useful methods for a RadioButton widget"
34757msgstr "RadioButton 위젯에 쓸만한 메서드"
34758
34759#. (itstool) path: section/p
34760#: C/radiobutton.py.page:36
34761msgid ""
34762"In line 16 the signal <code>\"toggled\"</code> is connected to the callback function <code>toggled_cb()</code> "
34763"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
34764"\"signals-callbacks.py\"/> for a more detailed explanation."
34765msgstr ""
34766"16번째 줄에서 <code>\"toggled\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
34767"function</var>)</code> 함수로  <code>toggled_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
34768"\"signals-callbacks.py\"/>를 참조하십시오."
34769
34770#. (itstool) path: section/p
34771#: C/radiobutton.py.page:38
34772msgid ""
34773"As seen in <link xref=\"properties.py\"/>, instead of <code>button1 = Gtk.RadioButton(label=\"Button 1\")</code> "
34774"we could create the button and label it with"
34775msgstr ""
34776"<link xref=\"properties.py\"/>에서 보신 바와 같이 <code>, button1 = Gtk.RadioButton(label=\"Button 1\")</code> 대"
34777"신 다음 코드로 단추와 레이블을 만들 수 있습니다"
34778
34779#. (itstool) path: section/code
34780#: C/radiobutton.py.page:39
34781#, no-wrap
34782msgid ""
34783"\n"
34784"button1 = Gtk.RadioButton()\n"
34785"button1.set_label(\"Button 1\")."
34786msgstr ""
34787"\n"
34788"button1 = Gtk.RadioButton()\n"
34789"button1.set_label(\"Button 1\")."
34790
34791#. (itstool) path: section/p
34792#: C/radiobutton.py.page:42
34793msgid ""
34794"Yet another way to create a new RadioButton with a label is <code>button1 = Gtk.RadioButton.new_with_label(None, "
34795"\"Button 1\")</code> (the first argument is the group of the radiobuttons, which we can get with "
34796"<code>get_group()</code>, the second argument is the label)."
34797msgstr ""
34798"레이블을 붙여서 새 RadioButton을 만드는 또 다른 방법은 <code>button1 = Gtk.RadioButton.new_with_label(None, "
34799"\"Button 1\")</code>(처음 인자는 <code>get_group()</code>으로 가져올 수 있는 라디오 단추의 그룹, 두번째 인자는 레이"
34800"블입니다) 코드를 활용하는 방법입니다."
34801
34802#. (itstool) path: item/p
34803#: C/radiobutton.py.page:51
34804msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkRadioButton.html\">GtkRadioButton</link>"
34805msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkRadioButton.html\">GtkRadioButton</link>"
34806
34807#. (itstool) path: info/title
34808#: C/radiobutton.vala.page:8
34809msgctxt "text"
34810msgid "RadioButton (Vala)"
34811msgstr "RadioButton (Vala)"
34812
34813#. (itstool) path: info/desc
34814#: C/radiobutton.vala.page:21
34815msgid "A choice from multiple CheckButtons."
34816msgstr "여러 CheckButton으로 선택합니다."
34817
34818#. (itstool) path: page/p
34819#: C/radiobutton.vala.page:26
34820msgid "These RadioButtons report their activity in the terminal."
34821msgstr "이 RadioButton은 터미널에 해당 활동을 알립니다."
34822
34823#. (itstool) path: page/code
34824#: C/radiobutton.vala.page:28
34825#, no-wrap
34826msgid ""
34827"public class MyWindow : Gtk.ApplicationWindow {\n"
34828"\tinternal MyWindow (MyApplication app) {\n"
34829"\t\tObject (application: app, title: \"RadioButton Example\");\n"
34830"\n"
34831"\t\tthis.border_width = 20;\n"
34832"\t\tthis.set_default_size (250, 100);\n"
34833"\n"
34834"\t\t/* We demonstrate 3 different RadioButton creation methods */\n"
34835"\n"
34836"\t\t//Create a Radio Button\n"
34837"\t\tvar button1 = new Gtk.RadioButton (null);\n"
34838"\t\tbutton1.set_label (\"Button 1\");\n"
34839"\n"
34840"\t\t//Create a RadioButton with a label, and add it to the same group as button1.\n"
34841"\t\tvar button2 = new Gtk.RadioButton.with_label (button1.get_group(),\"Button 2\");\n"
34842"\n"
34843"\t\t//Create a RadioButton with a label, adding it to button1's group.\n"
34844"\t\tvar button3 = new Gtk.RadioButton.with_label_from_widget (button1, \"Button 3\");\n"
34845"\n"
34846"\t\t//Attach the buttons to a grid.\n"
34847"\t\tvar grid = new Gtk.Grid ();\n"
34848"\t\tgrid.attach (button1, 0, 0, 1, 1);\n"
34849"\t\tgrid.attach (button2, 0, 1, 1, 1);\n"
34850"\t\tgrid.attach (button3, 0, 2, 1, 1);\n"
34851"\n"
34852"\t\t//Add the button to the window.\n"
34853"\t\tthis.add (grid);\n"
34854"\n"
34855"\t\t//Connect the signal handlers (aka. callback functions) to the buttons.\n"
34856"\t\tbutton1.toggled.connect (button_toggled_cb);\n"
34857"\t\tbutton2.toggled.connect (button_toggled_cb);\n"
34858"\t\tbutton3.toggled.connect (button_toggled_cb);\n"
34859"\t}\n"
34860"\n"
34861"\tvoid button_toggled_cb (Gtk.ToggleButton button)\n"
34862"\t{\n"
34863"\t\tvar state = \"unknown\";\n"
34864"\n"
34865"\t\tif (button.get_active ())\n"
34866"\t\t\tstate = \"on\";\n"
34867"\t\telse {\n"
34868"\t\t\tstate = \"off\";\n"
34869"\t\t\tprint (\"\\n\");\n"
34870"\t\t}\n"
34871"\t\tprint (button.get_label() + \" was turned \" + state + \"\\n\");\n"
34872"\t}\n"
34873"}\n"
34874"\n"
34875"public class MyApplication : Gtk.Application {\n"
34876"\tprotected override void activate () {\n"
34877"\n"
34878"\t\t//Show all of the things.\n"
34879"\t\tnew MyWindow (this).show_all ();\n"
34880"\t}\n"
34881"\n"
34882"\tinternal MyApplication () {\n"
34883"\t\tObject (application_id: \"org.example.MyApplication\");\n"
34884"\t}\n"
34885"}\n"
34886"\n"
34887"public int main (string[] args) {\n"
34888"\treturn new MyApplication ().run (args);\n"
34889"}\n"
34890msgstr ""
34891"public class MyWindow : Gtk.ApplicationWindow {\n"
34892"\tinternal MyWindow (MyApplication app) {\n"
34893"\t\tObject (application: app, title: \"RadioButton Example\");\n"
34894"\n"
34895"\t\tthis.border_width = 20;\n"
34896"\t\tthis.set_default_size (250, 100);\n"
34897"\n"
34898"\t\t/* We demonstrate 3 different RadioButton creation methods */\n"
34899"\n"
34900"\t\t//Create a Radio Button\n"
34901"\t\tvar button1 = new Gtk.RadioButton (null);\n"
34902"\t\tbutton1.set_label (\"Button 1\");\n"
34903"\n"
34904"\t\t//Create a RadioButton with a label, and add it to the same group as button1.\n"
34905"\t\tvar button2 = new Gtk.RadioButton.with_label (button1.get_group(),\"Button 2\");\n"
34906"\n"
34907"\t\t//Create a RadioButton with a label, adding it to button1's group.\n"
34908"\t\tvar button3 = new Gtk.RadioButton.with_label_from_widget (button1, \"Button 3\");\n"
34909"\n"
34910"\t\t//Attach the buttons to a grid.\n"
34911"\t\tvar grid = new Gtk.Grid ();\n"
34912"\t\tgrid.attach (button1, 0, 0, 1, 1);\n"
34913"\t\tgrid.attach (button2, 0, 1, 1, 1);\n"
34914"\t\tgrid.attach (button3, 0, 2, 1, 1);\n"
34915"\n"
34916"\t\t//Add the button to the window.\n"
34917"\t\tthis.add (grid);\n"
34918"\n"
34919"\t\t//Connect the signal handlers (aka. callback functions) to the buttons.\n"
34920"\t\tbutton1.toggled.connect (button_toggled_cb);\n"
34921"\t\tbutton2.toggled.connect (button_toggled_cb);\n"
34922"\t\tbutton3.toggled.connect (button_toggled_cb);\n"
34923"\t}\n"
34924"\n"
34925"\tvoid button_toggled_cb (Gtk.ToggleButton button)\n"
34926"\t{\n"
34927"\t\tvar state = \"unknown\";\n"
34928"\n"
34929"\t\tif (button.get_active ())\n"
34930"\t\t\tstate = \"on\";\n"
34931"\t\telse {\n"
34932"\t\t\tstate = \"off\";\n"
34933"\t\t\tprint (\"\\n\");\n"
34934"\t\t}\n"
34935"\t\tprint (button.get_label() + \" was turned \" + state + \"\\n\");\n"
34936"\t}\n"
34937"}\n"
34938"\n"
34939"public class MyApplication : Gtk.Application {\n"
34940"\tprotected override void activate () {\n"
34941"\n"
34942"\t\t//Show all of the things.\n"
34943"\t\tnew MyWindow (this).show_all ();\n"
34944"\t}\n"
34945"\n"
34946"\tinternal MyApplication () {\n"
34947"\t\tObject (application_id: \"org.example.MyApplication\");\n"
34948"\t}\n"
34949"}\n"
34950"\n"
34951"public int main (string[] args) {\n"
34952"\treturn new MyApplication ().run (args);\n"
34953"}\n"
34954
34955#. (itstool) path: item/p
34956#: C/radiobutton.vala.page:33
34957msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.RadioButton.html\">Gtk.RadioButton</link>"
34958msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.RadioButton.html\">Gtk.RadioButton</link>"
34959
34960#. (itstool) path: info/title
34961#: C/record-collection.js.page:8
34962msgctxt "text"
34963msgid "Record collection (JavaScript)"
34964msgstr "레코드 수집(JavaScript)"
34965
34966#. (itstool) path: info/desc
34967#: C/record-collection.js.page:11
34968msgid "Create a small database application for ordering your music collection"
34969msgstr "음악 모음을 정렬하는 간단한 데이터베이스 프로그램을 만듭니다"
34970
34971#. (itstool) path: page/title
34972#: C/record-collection.js.page:29
34973msgid "Record collection"
34974msgstr "레코드 수집"
34975
34976#. (itstool) path: item/p
34977#: C/record-collection.js.page:34
34978msgid "How to connect to a database using libgda"
34979msgstr "libgda로 데이터베이스 연결하기"
34980
34981#. (itstool) path: item/p
34982#: C/record-collection.js.page:35
34983msgid "How to insert and browse records in a database table"
34984msgstr "데이터베이스 테이블로의 레코드 삽입 및 테이블 탐색"
34985
34986#. (itstool) path: section/p
34987#: C/record-collection.js.page:41
34988msgid ""
34989"This demo uses the Javascript language. We are going to demonstrate how to connect and use a database from a GTK "
34990"program, by using the GDA (GNOME Data Access) library. Thus you also need this library installed."
34991msgstr ""
34992"이 시연 프로그램에서는 Javascript 언어를 활용합니다. GTK 프로그램에서 GDA(그놈 데이터 액세스) 라이브러리로 데이터베"
34993"이스를 연결하고 활용하는 방법을 보여드리겠습니다. 고로, 이 라이브러리도 설치해야합니다."
34994
34995#. (itstool) path: section/p
34996#: C/record-collection.js.page:44
34997msgid ""
34998"GNOME Data Access (GDA) is library whose purpose is to provide universal access to different kinds and types of "
34999"data sources. This goes from traditional relational database systems, to any imaginable kind of data source such "
35000"as a mail server, a LDAP directory, etc. For more information, and for a full API and documentation, visit the "
35001"<link href=\"http://library.gnome.org/devel/libgda/stable/\">GDA website</link>."
35002msgstr ""
35003"그놈 데이터 액세스(GDA)는 다양한 종류와 형식의 데이터 공급원에 통합 방식으로 접근하는 수단을 제공합니다. 전통적인 "
35004"관계형 데이터베이스 시스템에서 시작하여 메일 서버, LDAP 디렉터리 등과 같은 상상할 수 있는 데이터 공급원을 다룹니"
35005"다. 더 많은 내용, 전체 API, 문서를 확인해보시려면  <link href=\"http://library.gnome.org/devel/libgda/stable/"
35006"\">GDA 웹사이트</link>를 방문해보십시오."
35007
35008#. (itstool) path: section/p
35009#: C/record-collection.js.page:47
35010msgid ""
35011"Although a big part of the code is related to user interface (GUI), we are going to focus our tutorial on the "
35012"database parts (we might mention other parts we think are relevant though). To know more about Javascript programs "
35013"in GNOME, see the <link xref=\"image-viewer.js\">Image Viewer program</link> tutorial."
35014msgstr ""
35015"비록 코드 상당 부분이 사용자 인터페이스(GUI)와 관련 있지만, 데이터베이스 부분의 따라하기 지침에 역점을 두었습니다"
35016"(아마도 관련이 있는 다른 부분에도 언급할지도 모릅니다). 그놈 Javascript 프로그래밍을 더 알아보려면 <link xref="
35017"\"image-viewer.js\">그림 보기 프로그램</link> 따라하기 지침 부분을 참고하십시오."
35018
35019#. (itstool) path: item/p
35020#: C/record-collection.js.page:60
35021msgid ""
35022"Choose <gui>Generic Javascript</gui> from the <gui>JS</gui> tab, click <gui>Forward</gui>, and fill-out your "
35023"details on the next few pages. Use <file>record-collection</file> as project name and directory."
35024msgstr ""
35025"<gui>JS</gui> 탭에서 <gui>일반 Javascript</gui>를 선택하고, <gui>앞으로</gui>을 누른 다음, 나타난 페이지에서 몇가"
35026"지 자세한 내용을 입력하십시오. 프로젝트 이름과 디렉터리에 <file>record-collection</file>을 입력하십시오."
35027
35028#. (itstool) path: item/p
35029#: C/record-collection.js.page:63
35030msgid ""
35031"Click <gui>Finished</gui> and the project will be created for you. Open <file>src/main.js</file> from the "
35032"<gui>Project</gui> or <gui>File</gui> tabs. It contains very basic example code."
35033msgstr ""
35034"<gui>마침</gui>을 누르면 프로젝트를 만들어줍니다. <gui>프로젝트</gui>나 <gui>파일</gui>탭에서 <file>src/main.js</"
35035"file> 파일을 여십시오. 매우 기본적인 예제 코드가 있습니다."
35036
35037#. (itstool) path: section/title
35038#: C/record-collection.js.page:69
35039msgid "Program Structure"
35040msgstr "프로그램 구조"
35041
35042#. (itstool) path: section/media
35043#. This is a reference to an external file such as an image or video. When
35044#. the file changes, the md5 hash will change to let you know you need to
35045#. update your localized copy. The msgstr is not used at all. Set it to
35046#. whatever you like once you have updated your copy of the file.
35047#: C/record-collection.js.page:70
35048msgctxt "_"
35049msgid "external ref='media/record-collection.png' md5='2d645997687ed5aacd36aafafc16e072'"
35050msgstr ""
35051
35052#. (itstool) path: section/p
35053#: C/record-collection.js.page:71
35054msgid ""
35055"This demo is a simple GTK application (with a single window) capable of inserting records into a database table as "
35056"well as browsing all records of the table. The table has two fields: <code>id</code>, an integer, and <code>name</"
35057"code>, a varchar. The first section (on the top) of the application allows you to insert a record into the table. "
35058"The last section (bottom) allows you to see all the records of that table. Its content is refreshed every time a "
35059"new record is inserted and on the application startup."
35060msgstr ""
35061"이 시연 프로그램은 데이터베이스 테이브의 모든 레코드를 탐색할 뿐만 아니라 레코드를 넣는 기능도 있는 간단한(단일 "
35062"창)  GTK 프로그램입니다. 테이블에는 정수형 값을 넣는 <code>id</code> 필드와 가변 문자열(varchar) 형식의 "
35063"<code>name</code> 필드가 있습니다. 프로그램의 (상단) 처음 섹션에서는 테이블에 레코드를 넣을 수 있습니다. 프로그램"
35064"의 마지막 섹션(바닥)에서는 테이블의 모든 레코드를 살펴볼 수 있습니다. 이 내용은 새 레코드를 넣을때와 프로그램을 시"
35065"작할 때마다 새로 고쳐서 보여줍니다."
35066
35067#. (itstool) path: section/title
35068#: C/record-collection.js.page:76
35069msgid "Starting the fun"
35070msgstr "재미로 시작하기"
35071
35072#. (itstool) path: section/p
35073#: C/record-collection.js.page:77
35074msgid "Let's start by examining the skeleton of the program:"
35075msgstr "프로그램 뼈대 검토를 우선 시작하겠습니다:"
35076
35077#. (itstool) path: section/code
35078#: C/record-collection.js.page:78
35079#, no-wrap
35080msgid ""
35081"\n"
35082"const GLib = imports.gi.GLib;\n"
35083"const Gtk = imports.gi.Gtk;\n"
35084"const Gda = imports.gi.Gda;\n"
35085"const Lang = imports.lang;\n"
35086"\n"
35087"function Demo () {\n"
35088"  this._init ();\n"
35089"}\n"
35090"\n"
35091"Demo.prototype = {\n"
35092"\n"
35093"  _init: function () {\n"
35094"    this.setupWindow ();\n"
35095"    this.setupDatabase ();\n"
35096"    this.selectData ();\n"
35097"  }\n"
35098"}\n"
35099"\n"
35100"Gtk.init (null, null);\n"
35101"\n"
35102"var demo = new Demo ();\n"
35103"\n"
35104"Gtk.main ();"
35105msgstr ""
35106"\n"
35107"const GLib = imports.gi.GLib;\n"
35108"const Gtk = imports.gi.Gtk;\n"
35109"const Gda = imports.gi.Gda;\n"
35110"const Lang = imports.lang;\n"
35111"\n"
35112"function Demo () {\n"
35113"  this._init ();\n"
35114"}\n"
35115"\n"
35116"Demo.prototype = {\n"
35117"\n"
35118"  _init: function () {\n"
35119"    this.setupWindow ();\n"
35120"    this.setupDatabase ();\n"
35121"    this.selectData ();\n"
35122"  }\n"
35123"}\n"
35124"\n"
35125"Gtk.init (null, null);\n"
35126"\n"
35127"var demo = new Demo ();\n"
35128"\n"
35129"Gtk.main ();"
35130
35131#. (itstool) path: item/p
35132#: C/record-collection.js.page:103
35133msgid ""
35134"Lines 1‒4: Initial imports. Pay special attention to line 3, which tells Javascript to import the GDA library, our "
35135"focus in this tutorial."
35136msgstr ""
35137"1~4번째 줄: 초기 임포팅입니다. JavaScript로 GDA 라이브러리를 가져오는 이 따라하기 지침의 핵심부분인 세번째 줄에 특"
35138"히 주목하십시오."
35139
35140#. (itstool) path: item/p
35141#: C/record-collection.js.page:104
35142msgid ""
35143"Lines 6‒17: Define our <code>Demo</code> class. Pay special attention to lines 13‒15, where we call 3 methods "
35144"which will do the whole job. They will be detailed below."
35145msgstr ""
35146"6~17번째 줄: <code>Demo</code> 클래스를 정의합니다. 전체 작업을 담당하는 메서드 3개를 호출하는 13~15번째 줄에 주목"
35147"하십시오. 자세한 내용은 아래에서 설명하겠습니다."
35148
35149#. (itstool) path: item/p
35150#: C/record-collection.js.page:105
35151msgid "Lines 19‒23: Start the application."
35152msgstr "19~23번째 줄: 프로그램을 시작합니다."
35153
35154#. (itstool) path: section/title
35155#: C/record-collection.js.page:110
35156msgid "Designing the application"
35157msgstr "프로그램 설계"
35158
35159#. (itstool) path: section/p
35160#: C/record-collection.js.page:111
35161msgid ""
35162"Let's take a look at the <code>setupWindow</code> method. It is responsible for creating the User Interface (UI). "
35163"As UI is not our focus, we will explain only the relevant parts."
35164msgstr ""
35165"<code>setupWindow</code> 메서드를 살펴보겠습니다. 이 메서드는 사용자 인터페이스(UI)를 만드는 역할을 합니다. UI는 중"
35166"요한 부분이 아니니 관련 부분만 설명하겠습니다."
35167
35168#. (itstool) path: section/code
35169#: C/record-collection.js.page:112
35170#, no-wrap
35171msgid ""
35172"\n"
35173"  setupWindow: function () {\n"
35174"    this.window = new Gtk.Window ({title: \"Data Access Demo\", height_request: 350});\n"
35175"    this.window.connect (\"delete-event\", function () {\n"
35176"      Gtk.main_quit();\n"
35177"      return true;\n"
35178"      });\n"
35179"\n"
35180"    // main box\n"
35181"    var main_box = new Gtk.Box ({orientation: Gtk.Orientation.VERTICAL, spacing: 5});\n"
35182"    this.window.add (main_box);\n"
35183"\n"
35184"    // first label\n"
35185"    var info1 = new Gtk.Label ({label: \"&lt;b&gt;Insert a record&lt;/b&gt;\", xalign: 0, use_markup: true});\n"
35186"    main_box.pack_start (info1, false, false, 5);\n"
35187"\n"
35188"    // \"insert a record\" horizontal box\n"
35189"    var insert_box = new Gtk.Box ({orientation: Gtk.Orientation.HORIZONTAL, spacing: 5});\n"
35190"    main_box.pack_start (insert_box, false, false, 5);\n"
35191"\n"
35192"    // ID field\n"
35193"    insert_box.pack_start (new Gtk.Label ({label: \"ID:\"}), false, false, 5);\n"
35194"    this.id_entry = new Gtk.Entry ();\n"
35195"    insert_box.pack_start (this.id_entry, false, false, 5);\n"
35196"\n"
35197"    // Name field\n"
35198"    insert_box.pack_start (new Gtk.Label ({label: \"Name:\"}), false, false, 5);\n"
35199"    this.name_entry = new Gtk.Entry ({activates_default: true});\n"
35200"    insert_box.pack_start (this.name_entry, true, true, 5);\n"
35201"\n"
35202"    // Insert button\n"
35203"    var insert_button = new Gtk.Button ({label: \"Insert\", can_default: true});\n"
35204"    insert_button.connect (\"clicked\", Lang.bind (this, this._insertClicked));\n"
35205"    insert_box.pack_start (insert_button, false, false, 5);\n"
35206"    insert_button.grab_default ();\n"
35207"\n"
35208"    // Browse textview\n"
35209"    var info2 = new Gtk.Label ({label: \"&lt;b&gt;Browse the table&lt;/b&gt;\", xalign: 0, use_markup: true});\n"
35210"    main_box.pack_start (info2, false, false, 5);\n"
35211"    this.text = new Gtk.TextView ({editable: false});\n"
35212"    var sw = new Gtk.ScrolledWindow ({shadow_type:Gtk.ShadowType.IN});\n"
35213"    sw.add (this.text);\n"
35214"    main_box.pack_start (sw, true, true, 5);\n"
35215"\n"
35216"    this.count_label = new Gtk.Label ({label: \"\", xalign: 0, use_markup: true});\n"
35217"    main_box.pack_start (this.count_label, false, false, 0);\n"
35218"\n"
35219"    this.window.show_all ();\n"
35220"  },"
35221msgstr ""
35222"\n"
35223"  setupWindow: function () {\n"
35224"    this.window = new Gtk.Window ({title: \"Data Access Demo\", height_request: 350});\n"
35225"    this.window.connect (\"delete-event\", function () {\n"
35226"      Gtk.main_quit();\n"
35227"      return true;\n"
35228"      });\n"
35229"\n"
35230"    // main box\n"
35231"    var main_box = new Gtk.Box ({orientation: Gtk.Orientation.VERTICAL, spacing: 5});\n"
35232"    this.window.add (main_box);\n"
35233"\n"
35234"    // first label\n"
35235"    var info1 = new Gtk.Label ({label: \"&lt;b&gt;Insert a record&lt;/b&gt;\", xalign: 0, use_markup: true});\n"
35236"    main_box.pack_start (info1, false, false, 5);\n"
35237"\n"
35238"    // \"insert a record\" horizontal box\n"
35239"    var insert_box = new Gtk.Box ({orientation: Gtk.Orientation.HORIZONTAL, spacing: 5});\n"
35240"    main_box.pack_start (insert_box, false, false, 5);\n"
35241"\n"
35242"    // ID field\n"
35243"    insert_box.pack_start (new Gtk.Label ({label: \"ID:\"}), false, false, 5);\n"
35244"    this.id_entry = new Gtk.Entry ();\n"
35245"    insert_box.pack_start (this.id_entry, false, false, 5);\n"
35246"\n"
35247"    // Name field\n"
35248"    insert_box.pack_start (new Gtk.Label ({label: \"Name:\"}), false, false, 5);\n"
35249"    this.name_entry = new Gtk.Entry ({activates_default: true});\n"
35250"    insert_box.pack_start (this.name_entry, true, true, 5);\n"
35251"\n"
35252"    // Insert button\n"
35253"    var insert_button = new Gtk.Button ({label: \"Insert\", can_default: true});\n"
35254"    insert_button.connect (\"clicked\", Lang.bind (this, this._insertClicked));\n"
35255"    insert_box.pack_start (insert_button, false, false, 5);\n"
35256"    insert_button.grab_default ();\n"
35257"\n"
35258"    // Browse textview\n"
35259"    var info2 = new Gtk.Label ({label: \"&lt;b&gt;Browse the table&lt;/b&gt;\", xalign: 0, use_markup: true});\n"
35260"    main_box.pack_start (info2, false, false, 5);\n"
35261"    this.text = new Gtk.TextView ({editable: false});\n"
35262"    var sw = new Gtk.ScrolledWindow ({shadow_type:Gtk.ShadowType.IN});\n"
35263"    sw.add (this.text);\n"
35264"    main_box.pack_start (sw, true, true, 5);\n"
35265"\n"
35266"    this.count_label = new Gtk.Label ({label: \"\", xalign: 0, use_markup: true});\n"
35267"    main_box.pack_start (this.count_label, false, false, 0);\n"
35268"\n"
35269"    this.window.show_all ();\n"
35270"  },"
35271
35272#. (itstool) path: item/p
35273#: C/record-collection.js.page:162
35274msgid ""
35275"Lines 22 and 27: Create the 2 entries (for the two fields) in which users will type something to get inserted in "
35276"the database."
35277msgstr "22번째, 27번째 줄: 어떤 사용자가 데이터베이스에 들어간 내용을 입력하는 항목 2개(필드 2개)를 만듭니다."
35278
35279#. (itstool) path: item/p
35280#: C/record-collection.js.page:163
35281msgid ""
35282"Lines 31‒34: Create the Insert button. We connect its <code>clicked</code> signal to the <code>_insertClicked</"
35283"code> private method of the class. This method is detailed below."
35284msgstr ""
35285"31~34번째 줄: 삽입 단추를 만듭니다. <code>clicked</code> 시그널을 클래스의 <code>_insertClicked</code> private 메서"
35286"드에 연결했습니다. 이 메서드는 아래에서 자세히 설명하겠습니다."
35287
35288#. (itstool) path: item/p
35289#: C/record-collection.js.page:164
35290msgid "Line 39: Create the widget (<code>TextView</code>) where we will show the contents of the table."
35291msgstr "39번째 줄: 테이블의 내용을 보여줄 위젯(<code>TextView</code>)을 만듭니다."
35292
35293#. (itstool) path: item/p
35294#: C/record-collection.js.page:165
35295msgid ""
35296"Line 44: Create the label where we will show the number of records in the table. Initially it's empty, it will be "
35297"updated later."
35298msgstr "44번째 줄: 테이블의 여러 레코드를 보여줄 레이블을 만듭니다. 초기에는 비어있습니다만, 나중에 업데이트합니다."
35299
35300#. (itstool) path: section/title
35301#: C/record-collection.js.page:170
35302msgid "Connecting to and initializing the database"
35303msgstr "데이터베이스 연결 및 초기화"
35304
35305#. (itstool) path: section/p
35306#: C/record-collection.js.page:171
35307msgid "The code which makes the connection to the database is in the <code>setupDatabase</code> method below:"
35308msgstr "<code>setupDatabase</code> 메서드에서 데이터베이스를 연결하는 코드는 아래와 같습니다:"
35309
35310#. (itstool) path: section/code
35311#: C/record-collection.js.page:174
35312#, no-wrap
35313msgid ""
35314"\n"
35315"  setupDatabase: function () {\n"
35316"    this.connection = new Gda.Connection ({provider: Gda.Config.get_provider(\"SQLite\"),\n"
35317"                                          cnc_string:\"DB_DIR=\" + GLib.get_home_dir () + \";DB_NAME=gnome_demo\"});\n"
35318"    this.connection.open ();\n"
35319"\n"
35320"    try {\n"
35321"      var dm = this.connection.execute_select_command (\"select * from demo\");\n"
35322"    } catch (e) {\n"
35323"      this.connection.execute_non_select_command (\"create table demo (id integer, name varchar(100))\");\n"
35324"    }\n"
35325"  },"
35326msgstr ""
35327"\n"
35328"  setupDatabase: function () {\n"
35329"    this.connection = new Gda.Connection ({provider: Gda.Config.get_provider(\"SQLite\"),\n"
35330"                                          cnc_string:\"DB_DIR=\" + GLib.get_home_dir () + \";DB_NAME=gnome_demo\"});\n"
35331"    this.connection.open ();\n"
35332"\n"
35333"    try {\n"
35334"      var dm = this.connection.execute_select_command (\"select * from demo\");\n"
35335"    } catch (e) {\n"
35336"      this.connection.execute_non_select_command (\"create table demo (id integer, name varchar(100))\");\n"
35337"    }\n"
35338"  },"
35339
35340#. (itstool) path: item/p
35341#: C/record-collection.js.page:188
35342msgid ""
35343"Lines 2‒3: Create the GDA's <code>Connection</code> object. We must supply to its constructor some properties:"
35344msgstr "2~3번쨰 줄: GDA의 <code>Connection</code> 객체를 만듭니다. 생성자에 속성 몇가지를 넣어야합니다:"
35345
35346#. (itstool) path: item/p
35347#: C/record-collection.js.page:191
35348msgid ""
35349"<code>provider</code>: One of GDA's supported providers. GDA supports SQLite, MySQL, PostgreSQL, Oracle and many "
35350"others. For demo purposes we will use a SQLite database, as it comes installed by default in most distributions "
35351"and it is simple to use (it just uses a file as a database)."
35352msgstr ""
35353"<code>provider</code>: GDA에서 지원하는 프로파이더 중 하나입니다. GDA에서는 SQLite, MySQL, PostSQL, Oracle 등 수많"
35354"은 데이터베이스 엔진을 지원합니다. 시연 목적으로, 대부분의 배포판에서 기본적으로 SQLite를 설치하며 쓰기 쉽기 때문에"
35355"(파일을 데이터베이스로 활용) SQLite 데이터베이스를 사용하겠습니다."
35356
35357#. (itstool) path: item/p
35358#: C/record-collection.js.page:194
35359msgid ""
35360"<code>cnc_string</code>: The connection string. It may change from provider to provider. The syntax for SQLite is: "
35361"<code>DB_DIR=<var>PATH</var>;DB_NAME=<var>FILENAME</var></code>. In this demo we are accessing a database called "
35362"gnome_demo in the user home dir (note the call to GLib's <code>get_home_dir</code> function)."
35363msgstr ""
35364"<code>cnc_string</code>: 연결 문자열. 프로바이더를 바꿉니다. SQLite용 문법은 <code>DB_DIR=<var>PATH</var>;"
35365"DB_NAME=<var>FILENAME</var></code> 입니다. 시연 프로그램에서는 사용자 주 디렉터리(GLib의 <code>get_home_dir</code> "
35366"함수 호출 참고)에 둔 gnome_demo 데이터베이스에 접근하겠습니다."
35367
35368#. (itstool) path: note/p
35369#: C/record-collection.js.page:198
35370msgid ""
35371"If the provider is not supported by GDA, or if the connection string is missing some element, line 2 will raise an "
35372"exception. So, in real life we should handle it with JavaScript's statement <code>try</code>...<code>catch</code>."
35373msgstr ""
35374"GDA에서 지원하지 않는 프로바이더가 있고, 연결 문자열에 어떤 구성 요소가 빠지면, 2번째 줄에 예외가 일어납니다. 따라"
35375"서 실제로 JavaScript의 구문 <code>try</code>...<code>catch</code>로 처리해야합니다."
35376
35377#. (itstool) path: item/p
35378#: C/record-collection.js.page:202
35379msgid ""
35380"Line 4: Open the connection. In the SQLite provider, if the database does not exist, it will be created in this "
35381"step."
35382msgstr "4번째 줄: 연결합니다. SQLite 프로바이더에서 데이터베이스가 없으면 이 단계에서 만듭니다."
35383
35384#. (itstool) path: item/p
35385#: C/record-collection.js.page:204
35386msgid ""
35387"Lines 6‒10: Try to do a simple select to check if the table exists (line 7). If it does not exist (because the "
35388"database was just created), this command will raise an exception, which is handled by the <code>try</code>..."
35389"<code>catch</code> block. If it is the case, we run the create table statement (line 9)."
35390msgstr ""
35391"6~10번째 줄: 테이블이 있는지(7번째 줄) 간단하게 SELECT 문을 시도해봅니다. (데이터베이스를 방금 만들어서)테이블이 없"
35392"으면, 이 명령에서 <code>try</code>...<code>catch</code> 블록에서 처리할 예외가 나타납니다. 이 경우 CREATE TABLE 구"
35393"문을 실행합니다(9번째 줄)."
35394
35395#. (itstool) path: item/p
35396#: C/record-collection.js.page:205
35397msgid ""
35398"In order to run the SQL commands above we are using the GDA connection methods <code>execute_select_command</code> "
35399"and <code>execute_non_select_command</code>. They are simple to use, and just require two arguments: The "
35400"<code>Connection</code> object and the SQL command to be parsed."
35401msgstr ""
35402"GDA 연결용 <code>execute_select_command</code> 메서드와 <code>execute_non_select_command</code> 메서드로 위 SQL 명"
35403"령을 실행합니다. 사용법은 단순하며  <code>Connection</code> 객체와 해석할 SQL 명령을 두 매개변수 값으로 활용하므로 "
35404"단순합니다."
35405
35406#. (itstool) path: section/p
35407#: C/record-collection.js.page:209
35408msgid "At this point we have the database set up, and are ready to use it."
35409msgstr "이 시점에 데이터베이스를 설정했고 사용할 준비가 끝났습니다."
35410
35411#. (itstool) path: section/title
35412#: C/record-collection.js.page:213
35413msgid "Selecting"
35414msgstr "선택"
35415
35416#. (itstool) path: section/p
35417#: C/record-collection.js.page:214
35418msgid ""
35419"After connecting to the database, our demo's constructor calls the <code>selectData</code> method. It is "
35420"responsible for getting all the records in the table and showing them on the <code>TextView</code> widget. Let's "
35421"take a look at it:"
35422msgstr ""
35423"데이터베이스를 연결하고 나면, 데모 생성자에서 <code>selectData</code> 메서드를 호출합니다. 이 메서드는 테이블의 모"
35424"든 레코드를 가져와서 <code>TextView</code> 위젯에 나타냅니다. 이제 살펴보도록 하겠습니다:"
35425
35426#. (itstool) path: section/code
35427#: C/record-collection.js.page:217
35428#, no-wrap
35429msgid ""
35430"\n"
35431"  selectData: function () {\n"
35432"    var dm = this.connection.execute_select_command  (\"select * from demo order by 1, 2\");\n"
35433"    var iter = dm.create_iter ();\n"
35434"\n"
35435"    var text = \"\";\n"
35436"\n"
35437"    while (iter.move_next ()) {\n"
35438"      var id_field = Gda.value_stringify (iter.get_value_at (0));\n"
35439"      var name_field = Gda.value_stringify (iter.get_value_at (1));\n"
35440"\n"
35441"      text += id_field + \"\\t=&gt;\\t\" + name_field + '\\n';\n"
35442"    }\n"
35443"\n"
35444"    this.text.buffer.text = text;\n"
35445"    this.count_label.label = \"&lt;i&gt;\" + dm.get_n_rows () + \" record(s)&lt;/i&gt;\";\n"
35446"  },"
35447msgstr ""
35448"\n"
35449"  selectData: function () {\n"
35450"    var dm = this.connection.execute_select_command  (\"select * from demo order by 1, 2\");\n"
35451"    var iter = dm.create_iter ();\n"
35452"\n"
35453"    var text = \"\";\n"
35454"\n"
35455"    while (iter.move_next ()) {\n"
35456"      var id_field = Gda.value_stringify (iter.get_value_at (0));\n"
35457"      var name_field = Gda.value_stringify (iter.get_value_at (1));\n"
35458"\n"
35459"      text += id_field + \"\\t=&gt;\\t\" + name_field + '\\n';\n"
35460"    }\n"
35461"\n"
35462"    this.text.buffer.text = text;\n"
35463"    this.count_label.label = \"&lt;i&gt;\" + dm.get_n_rows () + \" record(s)&lt;/i&gt;\";\n"
35464"  },"
35465
35466#. (itstool) path: item/p
35467#: C/record-collection.js.page:235
35468msgid ""
35469"Line 2: The <code>SELECT</code> command. We are using the GDA connection's <code>execute_select_command</code> "
35470"method for that. It returns a <code>DataModel</code> object, which is later used to retrieve the rows."
35471msgstr ""
35472"2번째 줄: <code>SELECT</code> 명령. GDA 연결의 <code>execute_select_command</code> 메서드를 이 목적으로 활용합니"
35473"다. 나중에 레코드 행을 가져올 때 사용할 <code>DataModel</code>을 반환합니다."
35474
35475#. (itstool) path: item/p
35476#: C/record-collection.js.page:236
35477msgid ""
35478"Line 3: Create an <code>Iter</code> object, which is used to iterate over the <code>DataModel</code>'s records."
35479msgstr "3번째 줄: <code>DataModel</code>의 여러 레코드를 순회할 때 활용할 <code>Iter</code> 객체를 만듭니다."
35480
35481#. (itstool) path: item/p
35482#: C/record-collection.js.page:237
35483msgid ""
35484"Line 7: Loop through all the records, fetching them with the help of the <code>Iter</code> object. At this point, "
35485"the <code>iter</code> variable contains the actual, retrieved data. Its <code>move_next</code> method returns "
35486"<code>false</code> when it reaches the last record."
35487msgstr ""
35488"7번째 줄: 레코드 전체를 반복문으로 돌고 <code>Iter</code> 객체의 도움으로 가져옵니다. 여기서 <code>iter</code> 변수"
35489"에는 실제로 가져온 데이터가 들어갑니다. <code>move_next</code> 메서드에서 마지막 레코드에 도달하면 <code>false</"
35490"code>를 반환합니다."
35491
35492#. (itstool) path: item/p
35493#: C/record-collection.js.page:239
35494msgid "Lines 8‒9: We do two things in each line:"
35495msgstr "8~9번째 줄: 다음 두가지 동작을 각 줄 별로 행합니다:"
35496
35497#. (itstool) path: item/p
35498#: C/record-collection.js.page:241
35499msgid ""
35500"Use <code>Iter</code>'s method <code>get_value_at</code>, which requires only one argument: the column number to "
35501"retrieve, starting at 0. As our <code>SELECT</code> command returns only two columns, we are retrieving columns 0 "
35502"and 1."
35503msgstr ""
35504"하나의 인자만 필요한 <code>Iter</code>의 <code>get_value_at</code> 메서드를 활용합니다. 이 인자에는 가져올 열 번호"
35505"가 들어가며 0번 부터 시작합니다. <code>SELECT</code> 명령에서 열 두개만 반환하므로 0번과 1번 열만 가져옵니다."
35506
35507#. (itstool) path: item/p
35508#: C/record-collection.js.page:242
35509msgid ""
35510"The method <code>get_value_at</code> returns the field in GLib's <code>GValue</code> format. A simple way to "
35511"convert this format to a string is by using GDA's global function <code>value_stringify</code>. That's what we are "
35512"doing here, and we store the results in the variables <code>id_field</code> and <code>name_field</code>."
35513msgstr ""
35514"<code>get_value_at</code> 메서드에서 GLib의 <code>GValue</code> 형식 필드를 반환합니다. 이 형식을 문자열로 변환하"
35515"는 가장 쉬운 방법은 GDA의 전역 함수 <code>value_stringify</code>를 사용하면 됩니다. 이게 여기서 우리가 처리하려는 "
35516"일이며,  <code>id_field</code>, <code>name_field</code> 변수에 결과를 저장합니다."
35517
35518#. (itstool) path: item/p
35519#: C/record-collection.js.page:245
35520msgid ""
35521"Line 11: Concatenate the two fields to make one text line, separated by <code>\"=&gt;\"</code>, and store it in "
35522"the <code>text</code> variable."
35523msgstr ""
35524"11번째 줄: 두 필드 문자열을 하나로 합치며, 사이에 <code>\"=&gt;\"</code> 문자열을 넣고 <code>text</code>변수에 저장"
35525"합니다."
35526
35527#. (itstool) path: item/p
35528#: C/record-collection.js.page:246
35529msgid ""
35530"Line 14: After the loop is finished, we have all the records formatted in the <code>text</code> variable. In this "
35531"line we just set the contents of the <code>TextView</code> with that variable."
35532msgstr ""
35533"14번째 줄: 반복문 실행이 끝나면 <code>text</code> 변수에 형식을 갖추어 저장한 모든 레코드를 확보합니다. 이 줄에서"
35534"는 해당 변수를 <code>TextView</code> 의 내용으로 설정합니다."
35535
35536#. (itstool) path: item/p
35537#: C/record-collection.js.page:247
35538msgid ""
35539"Line 15: Display the number of records in the table, making use of the <code>DataModel</code>'s <code>get_n_rows</"
35540"code> method."
35541msgstr ""
35542"15번째 줄: <code>DataModel</code>의 <code>get_n_rows</code> 메서드를 활용하여 테이블의 수많은 레코드를 표시합니다."
35543
35544#. (itstool) path: section/title
35545#: C/record-collection.js.page:252
35546msgid "Inserting"
35547msgstr "삽입"
35548
35549#. (itstool) path: section/p
35550#: C/record-collection.js.page:253
35551msgid ""
35552"OK, we know how to connect to a database and how to select rows from a table. Now it's time to do an <code>INSERT</"
35553"code> on the table. Do you remember above, in the method <code>setupWindow</code> we connected the <gui>Insert</"
35554"gui> button's <code>clicked</code> signal to the method <code>_insertClicked</code>? Let's see the implementation "
35555"of this method."
35556msgstr ""
35557"좋습니다. 데이터베이스에 연결하고 테이블에서 행을 선택하는 방법을 알았습니다. 이제 테이블에 대해 <code>INSERT</"
35558"code> 구문을 수행할 시간입니다. <code>setupWindow</code> 메서드에서 <gui>Insert</gui> 단추의  <code>clicked</code> "
35559"시그널을 <code>_insertClicked</code> 메서드에 연결한 부분을 기억하시죠? 이 메서드의 구현부를 살펴보겠습니다."
35560
35561#. (itstool) path: section/code
35562#: C/record-collection.js.page:256
35563#, no-wrap
35564msgid ""
35565"\n"
35566"  _insertClicked: function () {\n"
35567"    if (!this._validateFields ())\n"
35568"      return;\n"
35569"\n"
35570"    // Gda.execute_non_select_command (this.connection,\n"
35571"    //   \"insert into demo values ('\" + this.id_entry.text + \"', '\" + this.name_entry.text + \"')\");\n"
35572"\n"
35573"    var b = new Gda.SqlBuilder ({stmt_type:Gda.SqlStatementType.INSERT});\n"
35574"    b.set_table (\"demo\");\n"
35575"    b.add_field_value_as_gvalue (\"id\", this.id_entry.text);\n"
35576"    b.add_field_value_as_gvalue (\"name\", this.name_entry.text);\n"
35577"    var stmt = b.get_statement ();\n"
35578"    this.connection.statement_execute_non_select (stmt, null);\n"
35579"\n"
35580"    this._clearFields ();\n"
35581"    this.selectData ();\n"
35582"  },"
35583msgstr ""
35584"\n"
35585"  _insertClicked: function () {\n"
35586"    if (!this._validateFields ())\n"
35587"      return;\n"
35588"\n"
35589"    // Gda.execute_non_select_command (this.connection,\n"
35590"    //   \"insert into demo values ('\" + this.id_entry.text + \"', '\" + this.name_entry.text + \"')\");\n"
35591"\n"
35592"    var b = new Gda.SqlBuilder ({stmt_type:Gda.SqlStatementType.INSERT});\n"
35593"    b.set_table (\"demo\");\n"
35594"    b.add_field_value_as_gvalue (\"id\", this.id_entry.text);\n"
35595"    b.add_field_value_as_gvalue (\"name\", this.name_entry.text);\n"
35596"    var stmt = b.get_statement ();\n"
35597"    this.connection.statement_execute_non_select (stmt, null);\n"
35598"\n"
35599"    this._clearFields ();\n"
35600"    this.selectData ();\n"
35601"  },"
35602
35603#. (itstool) path: section/p
35604#: C/record-collection.js.page:274
35605msgid ""
35606"We have learned how to use the GDA connection's methods <code>execute_select_command</code> and "
35607"<code>execute_non_select_command</code> to quickly execute SQL commands on the database. GDA allows one to build a "
35608"SQL statement indirectly, by using its <code>SqlBuilder</code> object. What are the benefits of this? GDA will "
35609"generate the SQL statement dynamically, and it will be valid for the connection provider used (it will use the "
35610"same SQL dialect the provider uses). Let's study the code:"
35611msgstr ""
35612"GDA 연결의 메서드 <code>execute_select_command</code>, <code>execute_non_select_command</code>를 활용하여 데이터베"
35613"이스에서 SQL 명령을 빠르게 실행하는 방법을 알았습니다. GDA 에서는 <code>SqlBuilder</code> 객체로 SQL 구문을 간접적"
35614"으로 만듭니다. 어떤 장점이 있을까요? GDA에서는 SQL 구문을 동적으로 만들어, 활용하는 연결 제공자에서 올바른 구문으"
35615"로 간주합니다(프로바이더에서 사용하는 동일한 SQL 변형 문법도 할용합니다). 코드를 살펴보겠습니다:"
35616
35617#. (itstool) path: item/p
35618#: C/record-collection.js.page:278
35619msgid ""
35620"Lines 2‒3: Check if the user filled all the fields. The code for the private method <code>_validateFields</code> "
35621"is really simple and you can read it in the full demo source code."
35622msgstr ""
35623"2~3번쨰 줄: 사용자가 모든 필드를 채웠는지 확인합니다. 자체 메서드 <code>_validateFields</code>의 코드는 정말 단순하"
35624"며 전체 시연 소스코드에서 알아볼 수 있습니다."
35625
35626#. (itstool) path: item/p
35627#: C/record-collection.js.page:279
35628msgid ""
35629"Line 5: The faster way of doing the <code>INSERT</code>. It's commented out as we want to show how to use the "
35630"<code>SqlBuilder</code> object to build a SQL statement portable across databases."
35631msgstr ""
35632"5번째 줄: <code>INSERT</code> 구문을 실행하는 빠른 방법입니다. 전 데이터베이스에 걸쳐 어디든 이식할 수 있는 SQL 구"
35633"문을 만드는 <code>SqlBuilder</code> 활용법을 보고 싶으면 이 부분 주석을 제거하시면 됩니다."
35634
35635#. (itstool) path: item/p
35636#: C/record-collection.js.page:280
35637msgid ""
35638"Line 7: Create the <code>SqlBuilder</code> object. We must pass the type of statement we are going to build. It "
35639"can be <code>SELECT</code>, <code>UPDATE</code>, <code>INSERT</code> or <code>DELETE</code>."
35640msgstr ""
35641"7번째 줄:  <code>SqlBuilder</code> 객체를 만듭니다. 빌드할 구문 형식을 넘겨야합니다. <code>SELECT</code>, "
35642"<code>UPDATE</code>, <code>INSERT</code>, <code>DELETE</code> 중 하나입니다."
35643
35644#. (itstool) path: item/p
35645#: C/record-collection.js.page:281
35646msgid ""
35647"Line 8: Set the name of the table on which the built statement will operate (it will generate <code>INSERT INTO "
35648"demo</code>)"
35649msgstr "8번째 줄: 만들어둔 구문을 수행할 테이블 이름을 설정합니다(<code>INSERT INTO demo</code> 구문을 만듬)"
35650
35651#. (itstool) path: item/p
35652#: C/record-collection.js.page:282
35653msgid ""
35654"Lines 9‒10: Set the fields and its values that will be part of the statement. The first argument is the field name "
35655"(as in the table). The second one is the value for that field."
35656msgstr ""
35657"9~10번째 줄: 구문의 일부로 필드 이름과 값을 설정합니다. 첫번째 인자는 필드 이름(테이블에 있는 그대로), 두번째 인자"
35658"는 필드의 값입니다."
35659
35660#. (itstool) path: item/p
35661#: C/record-collection.js.page:283
35662msgid "Line 11: Get the dynamically generated <code>Statement</code> object, which represents a SQL statement."
35663msgstr "11번째 줄: 동적으로 만든 SQL 구문 <code>Statement</code> 객체를 가져옵니다."
35664
35665#. (itstool) path: item/p
35666#: C/record-collection.js.page:284
35667msgid "Line 12: Finally, execute the SQL statement (<code>INSERT</code>)."
35668msgstr "12번째 줄: 마지막으로 SQL 구문(<code>INSERT</code>)을 실행합니다."
35669
35670#. (itstool) path: item/p
35671#: C/record-collection.js.page:285
35672msgid ""
35673"Line 14: Clear the id and name fields on the screen. The code for the private method <code>_clearFields</code> is "
35674"really simple and you can read it in the full demo source code."
35675msgstr ""
35676"14번째 줄: 화면의 id와 name 필드를 지웁니다. private 메서드 <code>_clearFields</code>의 코드는 정말 단순하며 전체 "
35677"시연 소스 코드에서 확인해볼 수 있습니다."
35678
35679#. (itstool) path: item/p
35680#: C/record-collection.js.page:286
35681msgid "Line 15: Refresh the view on the screen by doing another <code>SELECT</code>."
35682msgstr "15번쨰 줄: 다른 <code>SELECT</code> 구문을 실행하며 화면의 뷰를 새로 고칩니다."
35683
35684#. (itstool) path: note/p
35685#: C/record-collection.js.page:288
35686msgid ""
35687"You can also make use of parameters while building the statement. By using the <code>SqlBuilder</code> objects and "
35688"parameters you are less subject to attacks like SQL injection. Check the <link href=\"http://library.gnome.org/"
35689"devel/libgda/stable/\">GDA documentation</link> for more information about parameters."
35690msgstr ""
35691"구문을 만들 때 매개변수를 사용할 수도 있습니다.  <code>SqlBuilder</code> 객체와 매개변수를 활용하여 SQL 인젝션 같"
35692"은 공격을 덜 받을 수 있습니다. 매개변수에 대한 자세한 정보는 <link href=\"http://library.gnome.org/devel/libgda/"
35693"stable/\">GDA 문서</link>를 참고하십시오."
35694
35695#. (itstool) path: section/p
35696#: C/record-collection.js.page:293
35697msgid ""
35698"All of the code you need should now be in place, so try running the code. You now have a database for your record "
35699"collection!"
35700msgstr ""
35701"필요한 모든 코드를 제자리에 넣었으니 코드를 실행해보겠습니다. 제대로 동작할겝니다. 이렇게 하여 레코드 수집용 데이터"
35702"베이스를 만들었습니다!"
35703
35704#. (itstool) path: section/p
35705#: C/record-collection.js.page:298
35706msgid ""
35707"If you run into problems with the tutorial, compare your code with this <link href=\"record-collection/record-"
35708"collection.js\">reference code</link>."
35709msgstr ""
35710"지침서를 따라하는 실행하는 과정에 문제가 있다면, <link href=\"record-collection/record-collection.js\">참조 코드</"
35711"link>와 여러분의 코드를 비교해보십시오."
35712
35713#. (itstool) path: page/title
35714#: C/response-type.page:17
35715msgid "enum ResponseType"
35716msgstr "enum ResponseType"
35717
35718#. (itstool) path: item/title
35719#: C/response-type.page:21
35720msgid "ResponseType.NONE = -1"
35721msgstr "ResponseType.NONE = -1"
35722
35723#. (itstool) path: item/p
35724#: C/response-type.page:22
35725msgid "Returned if an action widget has no response id, or if the dialog gets programmatically hidden or destroyed"
35726msgstr "동작 위젯에 응답 ID가 없거나 대화상자가 프로그램 진행상 숨겨졌거나 해체됐을 경우 반환합니다"
35727
35728#. (itstool) path: item/title
35729#: C/response-type.page:25
35730msgid "ResponseType.REJECT = -2"
35731msgstr "ResponseType.REJECT = -2"
35732
35733#. (itstool) path: item/p
35734#: C/response-type.page:26 C/response-type.page:30
35735msgid "Generic response id, not used by GTK+ dialogs"
35736msgstr "GTK+ 대화 상자에서 사용하지 않는 일반 응답 ID"
35737
35738#. (itstool) path: item/title
35739#: C/response-type.page:29
35740msgid "ResponseType.ACCEPT = -3"
35741msgstr "ResponseType.ACCEPT = -3"
35742
35743#. (itstool) path: item/title
35744#: C/response-type.page:33
35745msgid "ResponseType.DELETE_EVENT = -4"
35746msgstr "ResponseType.DELETE_EVENT = -4"
35747
35748#. (itstool) path: item/p
35749#: C/response-type.page:34
35750msgid "Returned if the dialog is deleted"
35751msgstr "대화 상자를 삭제했을 경우 반환합니다"
35752
35753#. (itstool) path: item/title
35754#: C/response-type.page:37
35755msgid "ResponseType.OK = -5"
35756msgstr "ResponseType.OK = -5"
35757
35758#. (itstool) path: item/p
35759#: C/response-type.page:38
35760msgid "Returned by OK buttons in GTK+ dialogs"
35761msgstr "GTK+ 대화 상자에서 확인 단추를 누르면 반환합니다"
35762
35763#. (itstool) path: item/title
35764#: C/response-type.page:41
35765msgid "ResponseType.CANCEL = -6"
35766msgstr "ResponseType.CANCEL = -6"
35767
35768#. (itstool) path: item/p
35769#: C/response-type.page:42
35770msgid "Returned by Cancel buttons in GTK+ dialogs"
35771msgstr "GTK+ 대화 상자에서 취소를 누르면 반환합니다"
35772
35773#. (itstool) path: item/title
35774#: C/response-type.page:45
35775msgid "ResponseType.CLOSE = -7"
35776msgstr "ResponseType.CLOSE = -7"
35777
35778#. (itstool) path: item/p
35779#: C/response-type.page:46
35780msgid "Returned by Close buttons in GTK+ dialogs"
35781msgstr "GTK+ 대화 상자에서 닫기를 누르면 반환합니다"
35782
35783#. (itstool) path: item/title
35784#: C/response-type.page:49
35785msgid "ResponseType.YES = -8"
35786msgstr "ResponseType.YES = -8"
35787
35788#. (itstool) path: item/p
35789#: C/response-type.page:50
35790msgid "Returned by Yes buttons in GTK+ dialogs"
35791msgstr "GTK+ 대화 상자에서 예를 누르면 반환합니다"
35792
35793#. (itstool) path: item/title
35794#: C/response-type.page:53
35795msgid "ResponseType.NO = -9"
35796msgstr "ResponseType.NO = -9"
35797
35798#. (itstool) path: item/p
35799#: C/response-type.page:54
35800msgid "Returned by No buttons in GTK+ dialogs"
35801msgstr "GTK+ 대화 상자에서 아니요를 누르면 반환합니다"
35802
35803#. (itstool) path: item/title
35804#: C/response-type.page:57
35805msgid "ResponseType.APPLY = -10"
35806msgstr "ResponseType.APPLY = -10"
35807
35808#. (itstool) path: item/p
35809#: C/response-type.page:58
35810msgid "Returned by Apply buttons in GTK+ dialogs"
35811msgstr "GTK+ 대화 상자에서 적용을 누르면 반환합니다"
35812
35813#. (itstool) path: item/title
35814#: C/response-type.page:61
35815msgid "ResponseType.HELP = -11"
35816msgstr "ResponseType.HELP = -11"
35817
35818#. (itstool) path: item/p
35819#: C/response-type.page:62
35820msgid "Returned by Help buttons in GTK+ dialogs"
35821msgstr "GTK+ 대화 상자에서 도움말을 누르면 반환합니다"
35822
35823#. (itstool) path: info/title
35824#: C/scale.c.page:8
35825msgctxt "text"
35826msgid "Scale (C)"
35827msgstr "Scale (C)"
35828
35829#. (itstool) path: info/desc
35830#: C/scale.c.page:20 C/scale.py.page:20 C/scale.vala.page:20
35831msgid "A slider widget for selecting a value from a range"
35832msgstr "일정 범위 내에서 값을 선택하는 슬라이더 위젯"
35833
35834#. (itstool) path: page/title
35835#: C/scale.c.page:23 C/scale.js.page:21 C/scale.py.page:23 C/scale.vala.page:23
35836msgid "Scale"
35837msgstr "Scale"
35838
35839#. (itstool) path: page/media
35840#. This is a reference to an external file such as an image or video. When
35841#. the file changes, the md5 hash will change to let you know you need to
35842#. update your localized copy. The msgstr is not used at all. Set it to
35843#. whatever you like once you have updated your copy of the file.
35844#: C/scale.c.page:25
35845msgctxt "_"
35846msgid "external ref='media/scale2.png' md5='ae2ba0a6675f3d9cdcd961cdf32f1a5c'"
35847msgstr ""
35848
35849#. (itstool) path: page/p
35850#: C/scale.c.page:26 C/scale.py.page:25 C/scale.vala.page:25
35851msgid "Slide the scales!"
35852msgstr "Scale 손잡이를 잡고 끌어봅시다!"
35853
35854#. (itstool) path: page/code
35855#: C/scale.c.page:28
35856#, no-wrap
35857#| msgid ""
35858#| "\n"
35859#| "#include &lt;gtk/gtk.h&gt;\n"
35860#| "\n"
35861#| "\n"
35862#| "\n"
35863#| "/* This is the callback function. \n"
35864#| " * It is a handler function which reacts to the signal. \n"
35865#| " * In this case, it will notify the user the value of their scale as a label.\n"
35866#| " */\n"
35867#| "static void\n"
35868#| "hscale_moved (GtkRange *range,\n"
35869#| "              gpointer  user_data)\n"
35870#| "{\n"
35871#| "   GtkWidget *label = user_data;\n"
35872#| "\n"
35873#| "   /* Get the value of the range, and convert it into a string which will be\n"
35874#| "    * used as a new label for the horizontal scale.\n"
35875#| "    * %.0f - stands for a double that will have 0 decimal places.\n"
35876#| "    */\n"
35877#| "   gdouble pos = gtk_range_get_value (range);\n"
35878#| "   /* Note: Using g_strdup_printf returns a string that must be freed. \n"
35879#| "    * (In which is done below)\n"
35880#| "    */\n"
35881#| "   gchar *str = g_strdup_printf (\"Horizontal scale is %.0f\", pos);\n"
35882#| "   gtk_label_set_text (GTK_LABEL (label), str);\n"
35883#| "\n"
35884#| "   g_free(str);\n"
35885#| "}\n"
35886#| "\n"
35887#| "\n"
35888#| "\n"
35889#| "/* This is the second callback function. It is a handler function which \n"
35890#| " * reacts to the signal. It does the same thing as the function above, except with\n"
35891#| " * the vertical scale.\n"
35892#| " */\n"
35893#| "vscale_moved (GtkRange *range,\n"
35894#| "              gpointer  user_data)\n"
35895#| "{\n"
35896#| "   GtkWidget *label = user_data;\n"
35897#| "   \n"
35898#| "   gdouble pos = gtk_range_get_value (range);\n"
35899#| "   /* %.1f - stands for a double that will have 1 decimal place */\n"
35900#| "   gchar *str = g_strdup_printf (\"Vertical scale is %.1f\", pos);\n"
35901#| "   gtk_label_set_text (GTK_LABEL (label), str);\n"
35902#| "\n"
35903#| "   \n"
35904#| "   g_free (str);\n"
35905#| "}\n"
35906#| "\n"
35907#| "\n"
35908#| "\n"
35909#| "static void\n"
35910#| "activate (GtkApplication *app,\n"
35911#| "          gpointer        user_data)\n"
35912#| "{\n"
35913#| "  /* Declare variables */\n"
35914#| "  GtkWidget *window;\n"
35915#| "  GtkWidget *h_scale;\n"
35916#| "  GtkWidget *v_scale;\n"
35917#| "  GtkWidget *hlabel;\n"
35918#| "  GtkWidget *vlabel;\n"
35919#| "  GtkWidget *grid;\n"
35920#| "\n"
35921#| "  /* The Adjustment object represents a value \n"
35922#| "   * which has an associated lower and upper bound.\n"
35923#| "   */\n"
35924#| "  GtkAdjustment *hadjustment;\n"
35925#| "  GtkAdjustment *vadjustment;\n"
35926#| "\n"
35927#| "  /* Create a window with a title and a default size */\n"
35928#| "  window = gtk_application_window_new (app);\n"
35929#| "  gtk_window_set_title (GTK_WINDOW (window), \"Scale Example\");\n"
35930#| "  gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);\n"
35931#| "  gtk_container_set_border_width (GTK_CONTAINER (window), 5);\n"
35932#| "\n"
35933#| "  /* Two labels to be shown in the window */\n"
35934#| "  hlabel = gtk_label_new (\"Move the scale handle...\");\n"
35935#| "  vlabel = gtk_label_new (\"Move the scale handle...\");\n"
35936#| "\n"
35937#| "   \n"
35938#| "  /* gtk_adjustment_new takes six parameters, three of which \n"
35939#| "   * may be difficult to understand:\n"
35940#| "   * step increment- move the handle with the arrow keys on your keyboard to see.\n"
35941#| "   * page increment - move the handle by clicking away from it \n"
35942#| "   * on the scale to see.\n"
35943#| "   * page size - not used here.\n"
35944#| "   */\n"
35945#| "  hadjustment = gtk_adjustment_new (0, 0, 100, 5, 10, 0);\n"
35946#| "  vadjustment = gtk_adjustment_new (50, 0, 100, 5, 10, 0); \n"
35947#| "\n"
35948#| "  /* Create the Horizontal scale, making sure the \n"
35949#| "   * digits used have no decimals.\n"
35950#| "   */\n"
35951#| "  h_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);\n"
35952#| "  gtk_scale_set_digits (GTK_SCALE (h_scale), 0); \n"
35953#| "\n"
35954#| "  /* Allow it to expand horizontally (if there's space), and \n"
35955#| "   * set the vertical alignment\n"
35956#| "   */\n"
35957#| "  gtk_widget_set_hexpand (h_scale, TRUE);\n"
35958#| "  gtk_widget_set_valign (h_scale, GTK_ALIGN_START);\n"
35959#| "  \n"
35960#| "  /* Connecting the \"value-changed\" signal for the horizontal scale \n"
35961#| "   * to the appropriate callback function. \n"
35962#| "   * take note that GtkRange is part of GtkScale's Object Hierarchy.\n"
35963#| "   */\n"
35964#| "  g_signal_connect (h_scale, \n"
35965#| "                    \"value-changed\", \n"
35966#| "                    G_CALLBACK (hscale_moved), \n"
35967#| "                    hlabel);\n"
35968#| "\n"
35969#| "\n"
35970#| "\n"
35971#| "  /* Create the Vertical scale. This time, we will see what happens \n"
35972#| "   * when the digits arent initially set.\n"
35973#| "   */\n"
35974#| "  v_scale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, vadjustment);\n"
35975#| "  gtk_widget_set_vexpand (v_scale, TRUE);\n"
35976#| "\n"
35977#| "  /* Connecting the \"value-changed\" signal for the vertical scale to \n"
35978#| "   * the appropriate callback function.\n"
35979#| "   */\n"
35980#| "  g_signal_connect (v_scale, \n"
35981#| "                    \"value-changed\", \n"
35982#| "                    G_CALLBACK (vscale_moved), \n"
35983#| "                    vlabel);\n"
35984#| "\n"
35985#| "  /* Create a grid and arrange everything accordingly */\n"
35986#| "  grid = gtk_grid_new ();\n"
35987#| "  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);\n"
35988#| "  gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);\n"
35989#| "  gtk_grid_attach (GTK_GRID (grid), h_scale, 0, 0, 1, 1);\n"
35990#| "  gtk_grid_attach (GTK_GRID (grid), v_scale, 1, 0, 1, 1);\n"
35991#| "  gtk_grid_attach (GTK_GRID (grid), hlabel, 0, 1, 1, 1);\n"
35992#| "  gtk_grid_attach (GTK_GRID (grid), vlabel, 1, 1, 1, 1);\n"
35993#| "  \n"
35994#| "\n"
35995#| "  gtk_container_add (GTK_CONTAINER (window), grid);\n"
35996#| "\n"
35997#| "  gtk_widget_show_all (window);\n"
35998#| "}\n"
35999#| "\n"
36000#| "\n"
36001#| "\n"
36002#| "int\n"
36003#| "main (int argc, char **argv)\n"
36004#| "{\n"
36005#| "  GtkApplication *app;\n"
36006#| "  int status;\n"
36007#| "\n"
36008#| "  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
36009#| "  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
36010#| "  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
36011#| "  g_object_unref (app);\n"
36012#| "\n"
36013#| "  return status;\n"
36014#| "}\n"
36015msgid ""
36016"\n"
36017"#include &lt;gtk/gtk.h&gt;\n"
36018"\n"
36019"\n"
36020"\n"
36021"/* This is the callback function. \n"
36022" * It is a handler function which reacts to the signal. \n"
36023" * In this case, it will notify the user the value of their scale as a label.\n"
36024" */\n"
36025"static void\n"
36026"hscale_moved (GtkRange *range,\n"
36027"              gpointer  user_data)\n"
36028"{\n"
36029"   GtkWidget *label = user_data;\n"
36030"\n"
36031"   /* Get the value of the range, and convert it into a string which will be\n"
36032"    * used as a new label for the horizontal scale.\n"
36033"    * %.0f - stands for a double that will have 0 decimal places.\n"
36034"    */\n"
36035"   gdouble pos = gtk_range_get_value (range);\n"
36036"   /* Note: Using g_strdup_printf returns a string that must be freed. \n"
36037"    * (In which is done below)\n"
36038"    */\n"
36039"   gchar *str = g_strdup_printf (\"Horizontal scale is %.0f\", pos);\n"
36040"   gtk_label_set_text (GTK_LABEL (label), str);\n"
36041"\n"
36042"   g_free(str);\n"
36043"}\n"
36044"\n"
36045"\n"
36046"\n"
36047"/* This is the second callback function. It is a handler function which \n"
36048" * reacts to the signal. It does the same thing as the function above, except with\n"
36049" * the vertical scale.\n"
36050" */\n"
36051"vscale_moved (GtkRange *range,\n"
36052"              gpointer  user_data)\n"
36053"{\n"
36054"   GtkWidget *label = user_data;\n"
36055"   \n"
36056"   gdouble pos = gtk_range_get_value (range);\n"
36057"   /* %.1f - stands for a double that will have 1 decimal place */\n"
36058"   gchar *str = g_strdup_printf (\"Vertical scale is %.1f\", pos);\n"
36059"   gtk_label_set_text (GTK_LABEL (label), str);\n"
36060"\n"
36061"   \n"
36062"   g_free (str);\n"
36063"}\n"
36064"\n"
36065"\n"
36066"\n"
36067"static void\n"
36068"activate (GtkApplication *app,\n"
36069"          gpointer        user_data)\n"
36070"{\n"
36071"  /* Declare variables */\n"
36072"  GtkWidget *window;\n"
36073"  GtkWidget *h_scale;\n"
36074"  GtkWidget *v_scale;\n"
36075"  GtkWidget *hlabel;\n"
36076"  GtkWidget *vlabel;\n"
36077"  GtkWidget *grid;\n"
36078"\n"
36079"  /* The Adjustment object represents a value \n"
36080"   * which has an associated lower and upper bound.\n"
36081"   */\n"
36082"  GtkAdjustment *hadjustment;\n"
36083"  GtkAdjustment *vadjustment;\n"
36084"\n"
36085"  /* Create a window with a title and a default size */\n"
36086"  window = gtk_application_window_new (app);\n"
36087"  gtk_window_set_title (GTK_WINDOW (window), \"Scale Example\");\n"
36088"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);\n"
36089"  gtk_container_set_border_width (GTK_CONTAINER (window), 5);\n"
36090"\n"
36091"  /* Two labels to be shown in the window */\n"
36092"  hlabel = gtk_label_new (\"Move the scale handle...\");\n"
36093"  vlabel = gtk_label_new (\"Move the scale handle...\");\n"
36094"\n"
36095"   \n"
36096"  /* gtk_adjustment_new takes six parameters, three of which \n"
36097"   * may be difficult to understand:\n"
36098"   * step increment- move the handle with the arrow keys on your keyboard to see.\n"
36099"   * page increment - move the handle by clicking away from it \n"
36100"   * on the scale to see.\n"
36101"   * page size - not used here.\n"
36102"   */\n"
36103"  hadjustment = gtk_adjustment_new (0, 0, 100, 5, 10, 0);\n"
36104"  vadjustment = gtk_adjustment_new (50, 0, 100, 5, 10, 0); \n"
36105"\n"
36106"  /* Create the Horizontal scale, making sure the \n"
36107"   * digits used have no decimals.\n"
36108"   */\n"
36109"  h_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);\n"
36110"  gtk_scale_set_digits (GTK_SCALE (h_scale), 0); \n"
36111"\n"
36112"  /* Allow it to expand horizontally (if there's space), and \n"
36113"   * set the vertical alignment\n"
36114"   */\n"
36115"  gtk_widget_set_hexpand (h_scale, TRUE);\n"
36116"  gtk_widget_set_valign (h_scale, GTK_ALIGN_START);\n"
36117"  \n"
36118"  /* Connecting the \"value-changed\" signal for the horizontal scale \n"
36119"   * to the appropriate callback function. \n"
36120"   * take note that GtkRange is part of GtkScale's Object Hierarchy.\n"
36121"   */\n"
36122"  g_signal_connect (h_scale, \n"
36123"                    \"value-changed\", \n"
36124"                    G_CALLBACK (hscale_moved), \n"
36125"                    hlabel);\n"
36126"\n"
36127"\n"
36128"\n"
36129"  /* Create the Vertical scale. This time, we will see what happens \n"
36130"   * when the digits aren't initially set.\n"
36131"   */\n"
36132"  v_scale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, vadjustment);\n"
36133"  gtk_widget_set_vexpand (v_scale, TRUE);\n"
36134"\n"
36135"  /* Connecting the \"value-changed\" signal for the vertical scale to \n"
36136"   * the appropriate callback function.\n"
36137"   */\n"
36138"  g_signal_connect (v_scale, \n"
36139"                    \"value-changed\", \n"
36140"                    G_CALLBACK (vscale_moved), \n"
36141"                    vlabel);\n"
36142"\n"
36143"  /* Create a grid and arrange everything accordingly */\n"
36144"  grid = gtk_grid_new ();\n"
36145"  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);\n"
36146"  gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);\n"
36147"  gtk_grid_attach (GTK_GRID (grid), h_scale, 0, 0, 1, 1);\n"
36148"  gtk_grid_attach (GTK_GRID (grid), v_scale, 1, 0, 1, 1);\n"
36149"  gtk_grid_attach (GTK_GRID (grid), hlabel, 0, 1, 1, 1);\n"
36150"  gtk_grid_attach (GTK_GRID (grid), vlabel, 1, 1, 1, 1);\n"
36151"  \n"
36152"\n"
36153"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
36154"\n"
36155"  gtk_widget_show_all (window);\n"
36156"}\n"
36157"\n"
36158"\n"
36159"\n"
36160"int\n"
36161"main (int argc, char **argv)\n"
36162"{\n"
36163"  GtkApplication *app;\n"
36164"  int status;\n"
36165"\n"
36166"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
36167"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
36168"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
36169"  g_object_unref (app);\n"
36170"\n"
36171"  return status;\n"
36172"}\n"
36173msgstr ""
36174"\n"
36175"#include &lt;gtk/gtk.h&gt;\n"
36176"\n"
36177"\n"
36178"\n"
36179"/* This is the callback function. \n"
36180" * It is a handler function which reacts to the signal. \n"
36181" * In this case, it will notify the user the value of their scale as a label.\n"
36182" */\n"
36183"static void\n"
36184"hscale_moved (GtkRange *range,\n"
36185"              gpointer  user_data)\n"
36186"{\n"
36187"   GtkWidget *label = user_data;\n"
36188"\n"
36189"   /* Get the value of the range, and convert it into a string which will be\n"
36190"    * used as a new label for the horizontal scale.\n"
36191"    * %.0f - stands for a double that will have 0 decimal places.\n"
36192"    */\n"
36193"   gdouble pos = gtk_range_get_value (range);\n"
36194"   /* Note: Using g_strdup_printf returns a string that must be freed. \n"
36195"    * (In which is done below)\n"
36196"    */\n"
36197"   gchar *str = g_strdup_printf (\"Horizontal scale is %.0f\", pos);\n"
36198"   gtk_label_set_text (GTK_LABEL (label), str);\n"
36199"\n"
36200"   g_free(str);\n"
36201"}\n"
36202"\n"
36203"\n"
36204"\n"
36205"/* This is the second callback function. It is a handler function which \n"
36206" * reacts to the signal. It does the same thing as the function above, except with\n"
36207" * the vertical scale.\n"
36208" */\n"
36209"vscale_moved (GtkRange *range,\n"
36210"              gpointer  user_data)\n"
36211"{\n"
36212"   GtkWidget *label = user_data;\n"
36213"   \n"
36214"   gdouble pos = gtk_range_get_value (range);\n"
36215"   /* %.1f - stands for a double that will have 1 decimal place */\n"
36216"   gchar *str = g_strdup_printf (\"Vertical scale is %.1f\", pos);\n"
36217"   gtk_label_set_text (GTK_LABEL (label), str);\n"
36218"\n"
36219"   \n"
36220"   g_free (str);\n"
36221"}\n"
36222"\n"
36223"\n"
36224"\n"
36225"static void\n"
36226"activate (GtkApplication *app,\n"
36227"          gpointer        user_data)\n"
36228"{\n"
36229"  /* Declare variables */\n"
36230"  GtkWidget *window;\n"
36231"  GtkWidget *h_scale;\n"
36232"  GtkWidget *v_scale;\n"
36233"  GtkWidget *hlabel;\n"
36234"  GtkWidget *vlabel;\n"
36235"  GtkWidget *grid;\n"
36236"\n"
36237"  /* The Adjustment object represents a value \n"
36238"   * which has an associated lower and upper bound.\n"
36239"   */\n"
36240"  GtkAdjustment *hadjustment;\n"
36241"  GtkAdjustment *vadjustment;\n"
36242"\n"
36243"  /* Create a window with a title and a default size */\n"
36244"  window = gtk_application_window_new (app);\n"
36245"  gtk_window_set_title (GTK_WINDOW (window), \"Scale Example\");\n"
36246"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);\n"
36247"  gtk_container_set_border_width (GTK_CONTAINER (window), 5);\n"
36248"\n"
36249"  /* Two labels to be shown in the window */\n"
36250"  hlabel = gtk_label_new (\"Move the scale handle...\");\n"
36251"  vlabel = gtk_label_new (\"Move the scale handle...\");\n"
36252"\n"
36253"   \n"
36254"  /* gtk_adjustment_new takes six parameters, three of which \n"
36255"   * may be difficult to understand:\n"
36256"   * step increment- move the handle with the arrow keys on your keyboard to see.\n"
36257"   * page increment - move the handle by clicking away from it \n"
36258"   * on the scale to see.\n"
36259"   * page size - not used here.\n"
36260"   */\n"
36261"  hadjustment = gtk_adjustment_new (0, 0, 100, 5, 10, 0);\n"
36262"  vadjustment = gtk_adjustment_new (50, 0, 100, 5, 10, 0); \n"
36263"\n"
36264"  /* Create the Horizontal scale, making sure the \n"
36265"   * digits used have no decimals.\n"
36266"   */\n"
36267"  h_scale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);\n"
36268"  gtk_scale_set_digits (GTK_SCALE (h_scale), 0); \n"
36269"\n"
36270"  /* Allow it to expand horizontally (if there's space), and \n"
36271"   * set the vertical alignment\n"
36272"   */\n"
36273"  gtk_widget_set_hexpand (h_scale, TRUE);\n"
36274"  gtk_widget_set_valign (h_scale, GTK_ALIGN_START);\n"
36275"  \n"
36276"  /* Connecting the \"value-changed\" signal for the horizontal scale \n"
36277"   * to the appropriate callback function. \n"
36278"   * take note that GtkRange is part of GtkScale's Object Hierarchy.\n"
36279"   */\n"
36280"  g_signal_connect (h_scale, \n"
36281"                    \"value-changed\", \n"
36282"                    G_CALLBACK (hscale_moved), \n"
36283"                    hlabel);\n"
36284"\n"
36285"\n"
36286"\n"
36287"  /* Create the Vertical scale. This time, we will see what happens \n"
36288"   * when the digits aren't initially set.\n"
36289"   */\n"
36290"  v_scale = gtk_scale_new (GTK_ORIENTATION_VERTICAL, vadjustment);\n"
36291"  gtk_widget_set_vexpand (v_scale, TRUE);\n"
36292"\n"
36293"  /* Connecting the \"value-changed\" signal for the vertical scale to \n"
36294"   * the appropriate callback function.\n"
36295"   */\n"
36296"  g_signal_connect (v_scale, \n"
36297"                    \"value-changed\", \n"
36298"                    G_CALLBACK (vscale_moved), \n"
36299"                    vlabel);\n"
36300"\n"
36301"  /* Create a grid and arrange everything accordingly */\n"
36302"  grid = gtk_grid_new ();\n"
36303"  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);\n"
36304"  gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);\n"
36305"  gtk_grid_attach (GTK_GRID (grid), h_scale, 0, 0, 1, 1);\n"
36306"  gtk_grid_attach (GTK_GRID (grid), v_scale, 1, 0, 1, 1);\n"
36307"  gtk_grid_attach (GTK_GRID (grid), hlabel, 0, 1, 1, 1);\n"
36308"  gtk_grid_attach (GTK_GRID (grid), vlabel, 1, 1, 1, 1);\n"
36309"  \n"
36310"\n"
36311"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
36312"\n"
36313"  gtk_widget_show_all (window);\n"
36314"}\n"
36315"\n"
36316"\n"
36317"\n"
36318"int\n"
36319"main (int argc, char **argv)\n"
36320"{\n"
36321"  GtkApplication *app;\n"
36322"  int status;\n"
36323"\n"
36324"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
36325"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
36326"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
36327"  g_object_unref (app);\n"
36328"\n"
36329"  return status;\n"
36330"}\n"
36331
36332#. (itstool) path: item/p
36333#: C/scale.c.page:36
36334msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkScale.html\">GtkScale</link>"
36335msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkScale.html\">GtkScale</link>"
36336
36337#. (itstool) path: item/p
36338#: C/scale.c.page:37
36339msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkRange.html\">GtkRange</link>"
36340msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkRange.html\">GtkRange</link>"
36341
36342#. (itstool) path: item/p
36343#: C/scale.c.page:38 C/spinbutton.c.page:39
36344msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkAdjustment.html\">GtkAdjustment</link>"
36345msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkAdjustment.html\">GtkAdjustment</link>"
36346
36347#. (itstool) path: item/p
36348#: C/scale.c.page:39
36349msgid ""
36350"<link href=\"http://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup-printf\">String "
36351"Utility Functions</link>"
36352msgstr ""
36353"<link href=\"http://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup-printf\">문자열 유"
36354"틸리티 함수</link>"
36355
36356#. (itstool) path: info/title
36357#: C/scale.js.page:8
36358msgctxt "text"
36359msgid "Scale (JavaScript)"
36360msgstr "Scale (JavaScript)"
36361
36362#. (itstool) path: info/desc
36363#: C/scale.js.page:18
36364msgid "A slider which corresponds to a numerical value"
36365msgstr "숫자 값을 설정하는 슬라이더"
36366
36367#. (itstool) path: page/media
36368#. This is a reference to an external file such as an image or video. When
36369#. the file changes, the md5 hash will change to let you know you need to
36370#. update your localized copy. The msgstr is not used at all. Set it to
36371#. whatever you like once you have updated your copy of the file.
36372#: C/scale.js.page:22
36373msgctxt "_"
36374msgid "external ref='media/scalepenguins.png' md5='2dbe6a833fec86fde71a5ddb421e2cd5'"
36375msgstr ""
36376
36377#. (itstool) path: page/p
36378#: C/scale.js.page:23
36379msgid ""
36380"A Scale is a horizontal or vertical slider, that represents a value inside a numerical range. When you create a "
36381"new Scale, you set what its default position is, what the numbers at the top and bottom of the range are, and "
36382"things like how much it moves up or down when you click on the Scale to either side of the knob. To keep from "
36383"having to type all that in every time you create a new Scale, you can create an object called an Adjustment which "
36384"keeps track of all that, then tell each new Scale to use that Adjustment."
36385msgstr ""
36386"Scale은 숫자값 범위 내의 값을 나타내는 수평 수직 방향의 슬라이더입니다. 새 Scale을 만들 때 기본 위치, 최소 최대 "
36387"값, Scale의 손잡이를 양 끝에서 눌렀을 때 얼마나 옮길지를 설정합니다. 새 Scale을 만들 때마다 언제든 형식을 지키도"
36388"록  Scale 값을 기억하는 Adjustment 객체를 만들고 새 Scale에 Adjustment를 사용하게 할 수 있습니다."
36389
36390#. (itstool) path: page/p
36391#: C/scale.js.page:24
36392msgid ""
36393"This scale is a simple widget that lets you adjust the size of an iceberg that penguins live on. The number of "
36394"penguins on the iceberg is the product of the values of the two sliders. Try playing with them and seeing what "
36395"happens."
36396msgstr ""
36397"이 Scale은 펭귄이 살 빙산의 크기를 조절하는 간단한 위젯입니다. 빙산 위에 사는 수많은 펭귄은 슬라이더 두개의 값으로 "
36398"만듭니다. 다루어보시고 어떤 일이 일어나는지 확인해보시죠."
36399
36400#. (itstool) path: section/code
36401#: C/scale.js.page:41
36402#, no-wrap
36403msgid ""
36404"\n"
36405"const ScaleExample = new Lang.Class({\n"
36406"    Name: 'Scale Example',\n"
36407"\n"
36408"    // Create the application itself\n"
36409"    _init: function() {\n"
36410"        this.application = new Gtk.Application({\n"
36411"            application_id: 'org.example.jsscale'\n"
36412"        });\n"
36413"\n"
36414"    // Connect 'activate' and 'startup' signals to the callback functions\n"
36415"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
36416"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
36417"    },\n"
36418"\n"
36419"    // Callback function for 'activate' signal presents window when active\n"
36420"    _onActivate: function() {\n"
36421"        this._window.present();\n"
36422"    },\n"
36423"\n"
36424"    // Callback function for 'startup' signal builds the UI\n"
36425"    _onStartup: function() {\n"
36426"        this._buildUI ();\n"
36427"    },\n"
36428msgstr ""
36429"\n"
36430"const ScaleExample = new Lang.Class({\n"
36431"    Name: 'Scale Example',\n"
36432"\n"
36433"    // Create the application itself\n"
36434"    _init: function() {\n"
36435"        this.application = new Gtk.Application({\n"
36436"            application_id: 'org.example.jsscale'\n"
36437"        });\n"
36438"\n"
36439"    // Connect 'activate' and 'startup' signals to the callback functions\n"
36440"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
36441"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
36442"    },\n"
36443"\n"
36444"    // Callback function for 'activate' signal presents window when active\n"
36445"    _onActivate: function() {\n"
36446"        this._window.present();\n"
36447"    },\n"
36448"\n"
36449"    // Callback function for 'startup' signal builds the UI\n"
36450"    _onStartup: function() {\n"
36451"        this._buildUI ();\n"
36452"    },\n"
36453
36454#. (itstool) path: section/p
36455#: C/scale.js.page:66
36456msgid ""
36457"All the code for this sample goes in the ScaleExample class. The above code creates a <link href=\"http://www."
36458"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to go "
36459"in."
36460msgstr ""
36461"이 예제의 모든 코드는 ScaleExample 클래스에 있습니다. 위 코드는 위젯과 창을 넣을 <link href=\"http://www.roojs.com/"
36462"seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만듭니다."
36463
36464#. (itstool) path: section/code
36465#: C/scale.js.page:67
36466#, no-wrap
36467msgid ""
36468"\n"
36469"    // Build the application's UI\n"
36470"    _buildUI: function() {\n"
36471"\n"
36472"        // Create the application window\n"
36473"        this._window = new Gtk.ApplicationWindow({\n"
36474"            application: this.application,\n"
36475"            window_position: Gtk.WindowPosition.CENTER,\n"
36476"            border_width: 20,\n"
36477"            title: \"Birds on a Floe\"});\n"
36478msgstr ""
36479"\n"
36480"    // Build the application's UI\n"
36481"    _buildUI: function() {\n"
36482"\n"
36483"        // Create the application window\n"
36484"        this._window = new Gtk.ApplicationWindow({\n"
36485"            application: this.application,\n"
36486"            window_position: Gtk.WindowPosition.CENTER,\n"
36487"            border_width: 20,\n"
36488"            title: \"Birds on a Floe\"});\n"
36489
36490#. (itstool) path: section/title
36491#: C/scale.js.page:82
36492msgid "Creating the scales"
36493msgstr "Scale 만들기"
36494
36495#. (itstool) path: section/code
36496#: C/scale.js.page:83
36497#, no-wrap
36498msgid ""
36499"\n"
36500"        // Create the horizontal scale\n"
36501"        this._hScale = Gtk.Scale.new_with_range (Gtk.Orientation.HORIZONTAL, 0.0, 100.0, 5.0);\n"
36502"        this._hScale.set_valign (Gtk.Align.START);\n"
36503"        this._hScale.set_value (50);\n"
36504"        this._hScale.set_digits (0);\n"
36505"        // this._hScale.set_draw_value (false);\n"
36506msgstr ""
36507"\n"
36508"        // Create the horizontal scale\n"
36509"        this._hScale = Gtk.Scale.new_with_range (Gtk.Orientation.HORIZONTAL, 0.0, 100.0, 5.0);\n"
36510"        this._hScale.set_valign (Gtk.Align.START);\n"
36511"        this._hScale.set_value (50);\n"
36512"        this._hScale.set_digits (0);\n"
36513"        // this._hScale.set_draw_value (false);\n"
36514
36515#. (itstool) path: section/p
36516#: C/scale.js.page:92
36517msgid ""
36518"The new_with_range method is one way to create a new Scale widget. The parameters it takes are a <link href="
36519"\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Orientation.html\">Gtk.Orientation</link>, the minimum value, "
36520"the maximum value, and the increment for a single step. After that we use the Scale's methods to set its starting "
36521"value, and how many decimal places it runs to. We also set its vertical alignment in this case, to control where "
36522"it appears in the window."
36523msgstr ""
36524"new_with_range 메서드는 새 Scale 위젯을 만드는 수단입니다. 매개변수에는 <link href=\"http://www.roojs.org/seed/"
36525"gir-1.2-gtk-3.0/gjs/Gtk.Orientation.html\">Gtk.Orientation</link>, 최소값, 최대 값, 증가 단계 값이 들어갑니다. 그 "
36526"다음 Scale 메서드를 활용하여 시작 값과, 10진 값을 얼마나 둘지를 설정합니다. 또한 창에 나타내는 모양새를 수직으로 두"
36527"게끔 설정하기도 합니다."
36528
36529#. (itstool) path: section/p
36530#: C/scale.js.page:93
36531msgid ""
36532"We can use the set_draw_value method to tell it whether or not to show the number next to the sliding scale. It's "
36533"commented out in this example."
36534msgstr ""
36535"슬라이딩 눈금에 숫자를 표시할 지 여부를 set_draw_value 메서드를 활용하여 설정할 수 있습니다. 이 예제에서는 주석 처"
36536"리했습니다."
36537
36538#. (itstool) path: section/code
36539#: C/scale.js.page:95
36540#, no-wrap
36541msgid ""
36542"\n"
36543"        // Create a master adjustment to use for the vertical (or any other) scale\n"
36544"        this._adjustment = new Gtk.Adjustment ({\n"
36545"            value: 95,\n"
36546"            lower: 0,\n"
36547"            upper: 100,\n"
36548"            step_increment: 5,\n"
36549"            page_increment: 10 });\n"
36550msgstr ""
36551"\n"
36552"        // Create a master adjustment to use for the vertical (or any other) scale\n"
36553"        this._adjustment = new Gtk.Adjustment ({\n"
36554"            value: 95,\n"
36555"            lower: 0,\n"
36556"            upper: 100,\n"
36557"            step_increment: 5,\n"
36558"            page_increment: 10 });\n"
36559
36560#. (itstool) path: section/p
36561#: C/scale.js.page:105
36562msgid ""
36563"An Adjustment is an object we can use to simplify things when creating a new Scale. The Adjustment's \"value\" "
36564"property is what the Scale's default value is, while \"upper\" and \"lower\" make the high and low ends of the "
36565"numerical range. Meanwhile, the increment values show how much the slider moves when you do things like click on "
36566"it."
36567msgstr ""
36568"Adjustment는 새 Scale을 만들 때 간단하게 활용할 수 있는 객체입니다. Adjustments의 \"value\" 속성은 Scale 기본 값, "
36569"\"upper\"는 최대, \"lower\"는 최소 값을 나타냅니다. 한편 증가값은 Slider를 클릭했을 때 옮겨갈 단계 값을 보여줍니다."
36570
36571#. (itstool) path: section/code
36572#: C/scale.js.page:107
36573#, no-wrap
36574msgid ""
36575"\n"
36576"        // Create a vertical scale using the adjustment we just made\n"
36577"        this._vScale = new Gtk.Scale ({\n"
36578"            orientation: Gtk.Orientation.VERTICAL,\n"
36579"            adjustment: this._adjustment,\n"
36580"            digits: 0,\n"
36581"            // draw_value: false,\n"
36582"            margin_left: 10 });\n"
36583msgstr ""
36584"\n"
36585"        // Create a vertical scale using the adjustment we just made\n"
36586"        this._vScale = new Gtk.Scale ({\n"
36587"            orientation: Gtk.Orientation.VERTICAL,\n"
36588"            adjustment: this._adjustment,\n"
36589"            digits: 0,\n"
36590"            // draw_value: false,\n"
36591"            margin_left: 10 });\n"
36592
36593#. (itstool) path: section/p
36594#: C/scale.js.page:117
36595msgid ""
36596"Here we create a new Scale object using _adjustment as its \"adjustment\" property. This is a great shortcut. We "
36597"still have to tell it to round off the decimal place, though. Note that the draw_value property is commented out; "
36598"this is how you tell it not to show the number next to the Scale when you're creating one this way."
36599msgstr ""
36600"여기서 우리는 _adjustment를 \"adjustment\" 속성으로 활용하여 새 Scale 객체를 만들었습니다. 굉장한 편의 수단입니다. "
36601"여전히 소숫점 영역을 반올림 해야 하긴 하지만요. 참고로 draw_value 속성은 주석처리했습니다. 이런 방식으로 Scale을 만"
36602"들 때 Scale에 숫자를 표시하지 않는 방편이기 때문입니다."
36603
36604#. (itstool) path: section/code
36605#: C/scale.js.page:119
36606#, no-wrap
36607msgid ""
36608"\n"
36609"        // Create the label that shows the product of the two values\n"
36610"        this._product = (this._hScale.get_value() * this._vScale.get_value());\n"
36611"        this._label = new Gtk.Label ({\n"
36612"            label: (String(this._product) + \" penguins on the iceberg.\"),\n"
36613"            height_request: 200,\n"
36614"            width_request: 200,\n"
36615"            wrap: true});\n"
36616"\n"
36617"        // Connect the two scales to functions which recalculate the label\n"
36618"        this._hScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
36619"        this._vScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
36620msgstr ""
36621"\n"
36622"        // Create the label that shows the product of the two values\n"
36623"        this._product = (this._hScale.get_value() * this._vScale.get_value());\n"
36624"        this._label = new Gtk.Label ({\n"
36625"            label: (String(this._product) + \" penguins on the iceberg.\"),\n"
36626"            height_request: 200,\n"
36627"            width_request: 200,\n"
36628"            wrap: true});\n"
36629"\n"
36630"        // Connect the two scales to functions which recalculate the label\n"
36631"        this._hScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
36632"        this._vScale.connect (\"value-changed\", Lang.bind (this, this._recalc));\n"
36633
36634#. (itstool) path: section/p
36635#: C/scale.js.page:133
36636msgid ""
36637"We can use the get_value method to find out the numerical value a Scale is set at. We can then do whatever we want "
36638"with it, including multiply the two Scales' values together and have a <link xref=\"label.js\">Label</link> show "
36639"us the product. We set the label's text to wrap around, because we're having it display a silly message too."
36640msgstr ""
36641"Scale에 설정한 숫자 값을 가져올 때 get_value 메서드를 사용할 수 있습니다. 그 다음 Scale 두 개의 값을 곱한 값을 "
36642"<link xref=\"label.js\">Label</link>에 보여주는 등 우리가 원하는 어떤 것이든 할 수 있습니다. 레이블의 텍스트는 줄"
36643"을 바꿀 수 있는데, 줄을 바꾸지 않으면 말도 안되는 메시지를 화면에 보여주기 떄문입니다."
36644
36645#. (itstool) path: section/p
36646#: C/scale.js.page:134
36647msgid ""
36648"After we create the Label, we connect the two Scales' \"value-changed\" signals to _recalc, a function that will "
36649"recalculate the number of penguins on the iceberg and come up with a new message."
36650msgstr ""
36651"Label을 만들고 나면 Scale의 \"value-changed\" 시그널을 빙산의 펭귄 수를 다시 계산해서 새 메시지로 띄우는 _recalc  "
36652"함수에 연결하겠습니다."
36653
36654#. (itstool) path: section/code
36655#: C/scale.js.page:136
36656#, no-wrap
36657msgid ""
36658"\n"
36659"        // Create a grid to arrange things in\n"
36660"        this._UIGrid = new Gtk.Grid ({\n"
36661"            halign: Gtk.Align.CENTER,\n"
36662"            valign: Gtk.Align.CENTER,\n"
36663"            margin_top: 20,\n"
36664"            margin_left: 20});\n"
36665"\n"
36666"        // Attach everything to the grid\n"
36667"        this._UIGrid.attach (this._label, 0, 0, 1, 1);\n"
36668"        this._UIGrid.attach (this._hScale, 0, 1, 1, 1);\n"
36669"        this._UIGrid.attach (this._vScale, 1, 0, 1, 1);\n"
36670msgstr ""
36671"\n"
36672"        // Create a grid to arrange things in\n"
36673"        this._UIGrid = new Gtk.Grid ({\n"
36674"            halign: Gtk.Align.CENTER,\n"
36675"            valign: Gtk.Align.CENTER,\n"
36676"            margin_top: 20,\n"
36677"            margin_left: 20});\n"
36678"\n"
36679"        // Attach everything to the grid\n"
36680"        this._UIGrid.attach (this._label, 0, 0, 1, 1);\n"
36681"        this._UIGrid.attach (this._hScale, 0, 1, 1, 1);\n"
36682"        this._UIGrid.attach (this._vScale, 1, 0, 1, 1);\n"
36683
36684#. (itstool) path: section/p
36685#: C/scale.js.page:149
36686msgid ""
36687"Here we create a <link xref=\"grid.js\">Grid</link> to put everything in, then attach all our widgets to it. Note "
36688"that here and on some of the widgets themselves we're using margins to keep things neatly spaced."
36689msgstr ""
36690"여기서 모든 위젯을 넣을 <link xref=\"grid.js\">Grid</link>를 만들고 Grid에 다 넣겠습니다. 참고로 여기 그리고 일부 "
36691"위젯 자체에 여백을 주어 정돈된 느낌을 주는 공간을 확보합니다."
36692
36693#. (itstool) path: section/code
36694#: C/scale.js.page:150
36695#, no-wrap
36696msgid ""
36697"\n"
36698"        // Add the grid to the window\n"
36699"        this._window.add (this._UIGrid);\n"
36700"\n"
36701"        // Show the window and all child widgets\n"
36702"        this._window.show_all();\n"
36703"    },\n"
36704msgstr ""
36705"\n"
36706"        // Add the grid to the window\n"
36707"        this._window.add (this._UIGrid);\n"
36708"\n"
36709"        // Show the window and all child widgets\n"
36710"        this._window.show_all();\n"
36711"    },\n"
36712
36713#. (itstool) path: section/p
36714#: C/scale.js.page:158
36715msgid "Finally, we add the Grid to the window, then tell the window to show itself and all the widgets inside of it."
36716msgstr "마지막으로 Grid를 창에 추가하고 창 자체와 그 안에 있는 모든 위젯을 화면에 나타내게 하겠습니다."
36717
36718#. (itstool) path: section/title
36719#: C/scale.js.page:162
36720msgid "Function which handles the scales' values changing"
36721msgstr "Scale 값을 바꾸는 함수"
36722
36723#. (itstool) path: section/code
36724#: C/scale.js.page:164
36725#, no-wrap
36726msgid ""
36727"\n"
36728"    _recalc: function() {\n"
36729"\n"
36730"        // Figure out what the product of the two scales' values is\n"
36731"        var product = (this._hScale.get_value() * this._vScale.get_value());\n"
36732"\n"
36733"        // Create a blank comment line in case there isn't a silly comment to make\n"
36734"        var comment = \"\";\n"
36735"\n"
36736"        // Make a silly comment based on the number of penguins\n"
36737"        if (product &gt; 9000) {\n"
36738"            comment = \"It's over 9000!\";\n"
36739"        }\n"
36740"        else if (product &lt; 1000 &amp;&amp; product &gt; 0) {\n"
36741"            comment = \"They're getting lonely.\";\n"
36742"        }\n"
36743"        else if (product == 0) {\n"
36744"            comment = \"They're all gone ...\";\n"
36745"        }\n"
36746"        else comment = \"\";\n"
36747"\n"
36748"        // Set ._label's new text\n"
36749"        this._label.set_label (String (product) + \" penguins on the iceberg. \" + comment);\n"
36750"\n"
36751"    }\n"
36752"\n"
36753"});\n"
36754msgstr ""
36755"\n"
36756"    _recalc: function() {\n"
36757"\n"
36758"        // Figure out what the product of the two scales' values is\n"
36759"        var product = (this._hScale.get_value() * this._vScale.get_value());\n"
36760"\n"
36761"        // Create a blank comment line in case there isn't a silly comment to make\n"
36762"        var comment = \"\";\n"
36763"\n"
36764"        // Make a silly comment based on the number of penguins\n"
36765"        if (product &gt; 9000) {\n"
36766"            comment = \"It's over 9000!\";\n"
36767"        }\n"
36768"        else if (product &lt; 1000 &amp;&amp; product &gt; 0) {\n"
36769"            comment = \"They're getting lonely.\";\n"
36770"        }\n"
36771"        else if (product == 0) {\n"
36772"            comment = \"They're all gone ...\";\n"
36773"        }\n"
36774"        else comment = \"\";\n"
36775"\n"
36776"        // Set ._label's new text\n"
36777"        this._label.set_label (String (product) + \" penguins on the iceberg. \" + comment);\n"
36778"\n"
36779"    }\n"
36780"\n"
36781"});\n"
36782
36783#. (itstool) path: section/p
36784#: C/scale.js.page:192
36785msgid ""
36786"Remember, we can get a Scale's value using its get_value method. Here we simply recalculate what the product of "
36787"the two values is after one of the Scales is moved, add in a silly message depending on how many penguins are "
36788"left, and change the wording on _label to show the new number and message."
36789msgstr ""
36790"기억하실지 모르겠지만, Scale 값을 get_value 메서드로 가져올 수 있습니다. 여기서는, 간단하게 Scale을 움직인 다음 두 "
36791"Scale의 값을 다시 계산하고 펭귄이 몇마리가 남는지 어설픈 메시지를 추가한 다음, 동작 중인 _label을 바꿔 새 숫자가 들"
36792"어간 메시지를 보여주겠습니다."
36793
36794#. (itstool) path: section/code
36795#: C/scale.js.page:194
36796#, no-wrap
36797msgid ""
36798"\n"
36799"// Run the application\n"
36800"let app = new ScaleExample ();\n"
36801"app.application.run (ARGV);\n"
36802msgstr ""
36803"\n"
36804"// Run the application\n"
36805"let app = new ScaleExample ();\n"
36806"app.application.run (ARGV);\n"
36807
36808#. (itstool) path: section/p
36809#: C/scale.js.page:199
36810msgid "Finally, we create a new instance of the finished ScaleExample class, and set the application running."
36811msgstr "마지막으로, 마무리한 ScaleExample 클래스의 새 인스턴스를 만들고 프로그램을 실행하도록 설정하겠습니다."
36812
36813#. (itstool) path: section/code
36814#: C/scale.js.page:204
36815#, no-wrap
36816msgid ""
36817"#!/usr/bin/gjs\n"
36818"\n"
36819"imports.gi.versions.Gtk = '3.0';\n"
36820"\n"
36821"const Gio = imports.gi.Gio;\n"
36822"const Gtk = imports.gi.Gtk;\n"
36823"\n"
36824"class ScaleExample {\n"
36825"\n"
36826"    // Create the application itself\n"
36827"    constructor() {\n"
36828"        this.application = new Gtk.Application({\n"
36829"            application_id: 'org.example.jsscale'\n"
36830"        });\n"
36831"\n"
36832"        // Connect 'activate' and 'startup' signals to the callback functions\n"
36833"        this.application.connect('activate', this._onActivate.bind(this));\n"
36834"        this.application.connect('startup', this._onStartup.bind(this));\n"
36835"    }\n"
36836"\n"
36837"    // Callback function for 'activate' signal presents window when active\n"
36838"    _onActivate() {\n"
36839"        this._window.present();\n"
36840"    }\n"
36841"\n"
36842"    // Callback function for 'startup' signal builds the UI\n"
36843"    _onStartup() {\n"
36844"        this._buildUI();\n"
36845"    }\n"
36846"\n"
36847"    // Build the application's UI\n"
36848"    _buildUI() {\n"
36849"\n"
36850"        // Create the application window\n"
36851"        this._window = new Gtk.ApplicationWindow({\n"
36852"            application: this.application,\n"
36853"            window_position: Gtk.WindowPosition.CENTER,\n"
36854"            border_width: 20,\n"
36855"            title: \"Birds on a Floe\"});\n"
36856"\n"
36857"        // Create the horizontal scale\n"
36858"        this._hScale = Gtk.Scale.new_with_range (Gtk.Orientation.HORIZONTAL, 0.0, 100.0, 5.0);\n"
36859"        this._hScale.set_valign (Gtk.Align.START);\n"
36860"        this._hScale.set_value (50);\n"
36861"        this._hScale.set_digits (0);\n"
36862"        // this._hScale.set_draw_value (false);\n"
36863"\n"
36864"        // Create a master adjustment to use for the vertical (or any other) scale\n"
36865"        this._adjustment = new Gtk.Adjustment ({\n"
36866"            value: 95,\n"
36867"            lower: 0,\n"
36868"            upper: 100,\n"
36869"            step_increment: 5,\n"
36870"            page_increment: 10 });\n"
36871"\n"
36872"        // Create a vertical scale using the adjustment we just made\n"
36873"        this._vScale = new Gtk.Scale ({\n"
36874"            orientation: Gtk.Orientation.VERTICAL,\n"
36875"            adjustment: this._adjustment,\n"
36876"            digits: 0,\n"
36877"            // draw_value: false,\n"
36878"            margin_left: 10 });\n"
36879"\n"
36880"        // Create the label that shows the product of the two values\n"
36881"        this._product = (this._hScale.get_value() * this._vScale.get_value());\n"
36882"        this._label = new Gtk.Label ({\n"
36883"            label: (String(this._product) + \" penguins on the iceberg.\"),\n"
36884"            height_request: 200,\n"
36885"            width_request: 200,\n"
36886"            wrap: true});\n"
36887"\n"
36888"        // Connect the two scales to functions which recalculate the label\n"
36889"        this._hScale.connect (\"value-changed\", this._recalc.bind(this));\n"
36890"        this._vScale.connect (\"value-changed\", this._recalc.bind(this));\n"
36891"\n"
36892"        // Create a grid to arrange things in\n"
36893"        this._UIGrid = new Gtk.Grid ({\n"
36894"            halign: Gtk.Align.CENTER,\n"
36895"            valign: Gtk.Align.CENTER,\n"
36896"            margin_top: 20,\n"
36897"            margin_left: 20});\n"
36898"\n"
36899"        // Attach everything to the grid\n"
36900"        this._UIGrid.attach (this._label, 0, 0, 1, 1);\n"
36901"        this._UIGrid.attach (this._hScale, 0, 1, 1, 1);\n"
36902"        this._UIGrid.attach (this._vScale, 1, 0, 1, 1);\n"
36903"\n"
36904"        // Add the grid to the window\n"
36905"        this._window.add (this._UIGrid);\n"
36906"\n"
36907"        // Show the window and all child widgets\n"
36908"        this._window.show_all();\n"
36909"    }\n"
36910"\n"
36911"    _recalc() {\n"
36912"\n"
36913"        // Figure out what the product of the two scales' values is\n"
36914"        var product = (this._hScale.get_value() * this._vScale.get_value());\n"
36915"\n"
36916"        // Create a blank comment line in case there isn't a silly comment to make\n"
36917"        var comment = \"\";\n"
36918"\n"
36919"        // Make a silly comment based on the number of penguins\n"
36920"        if (product &gt; 9000) {\n"
36921"            comment = \"It's over 9000!\";\n"
36922"        }\n"
36923"        else if (product &lt; 1000 &amp;&amp; product &gt; 0) {\n"
36924"            comment = \"They're getting lonely.\";\n"
36925"        }\n"
36926"        else if (product == 0) {\n"
36927"            comment = \"They're all gone ...\";\n"
36928"        }\n"
36929"        else comment = \"\";\n"
36930"\n"
36931"        // Set ._label's new text\n"
36932"        this._label.set_label (String (product) + \" penguins on the iceberg. \" + comment);\n"
36933"    }\n"
36934"};\n"
36935"\n"
36936"// Run the application\n"
36937"let app = new ScaleExample ();\n"
36938"app.application.run (ARGV);\n"
36939msgstr ""
36940"#!/usr/bin/gjs\n"
36941"\n"
36942"imports.gi.versions.Gtk = '3.0';\n"
36943"\n"
36944"const Gio = imports.gi.Gio;\n"
36945"const Gtk = imports.gi.Gtk;\n"
36946"\n"
36947"class ScaleExample {\n"
36948"\n"
36949"    // Create the application itself\n"
36950"    constructor() {\n"
36951"        this.application = new Gtk.Application({\n"
36952"            application_id: 'org.example.jsscale'\n"
36953"        });\n"
36954"\n"
36955"        // Connect 'activate' and 'startup' signals to the callback functions\n"
36956"        this.application.connect('activate', this._onActivate.bind(this));\n"
36957"        this.application.connect('startup', this._onStartup.bind(this));\n"
36958"    }\n"
36959"\n"
36960"    // Callback function for 'activate' signal presents window when active\n"
36961"    _onActivate() {\n"
36962"        this._window.present();\n"
36963"    }\n"
36964"\n"
36965"    // Callback function for 'startup' signal builds the UI\n"
36966"    _onStartup() {\n"
36967"        this._buildUI();\n"
36968"    }\n"
36969"\n"
36970"    // Build the application's UI\n"
36971"    _buildUI() {\n"
36972"\n"
36973"        // Create the application window\n"
36974"        this._window = new Gtk.ApplicationWindow({\n"
36975"            application: this.application,\n"
36976"            window_position: Gtk.WindowPosition.CENTER,\n"
36977"            border_width: 20,\n"
36978"            title: \"Birds on a Floe\"});\n"
36979"\n"
36980"        // Create the horizontal scale\n"
36981"        this._hScale = Gtk.Scale.new_with_range (Gtk.Orientation.HORIZONTAL, 0.0, 100.0, 5.0);\n"
36982"        this._hScale.set_valign (Gtk.Align.START);\n"
36983"        this._hScale.set_value (50);\n"
36984"        this._hScale.set_digits (0);\n"
36985"        // this._hScale.set_draw_value (false);\n"
36986"\n"
36987"        // Create a master adjustment to use for the vertical (or any other) scale\n"
36988"        this._adjustment = new Gtk.Adjustment ({\n"
36989"            value: 95,\n"
36990"            lower: 0,\n"
36991"            upper: 100,\n"
36992"            step_increment: 5,\n"
36993"            page_increment: 10 });\n"
36994"\n"
36995"        // Create a vertical scale using the adjustment we just made\n"
36996"        this._vScale = new Gtk.Scale ({\n"
36997"            orientation: Gtk.Orientation.VERTICAL,\n"
36998"            adjustment: this._adjustment,\n"
36999"            digits: 0,\n"
37000"            // draw_value: false,\n"
37001"            margin_left: 10 });\n"
37002"\n"
37003"        // Create the label that shows the product of the two values\n"
37004"        this._product = (this._hScale.get_value() * this._vScale.get_value());\n"
37005"        this._label = new Gtk.Label ({\n"
37006"            label: (String(this._product) + \" penguins on the iceberg.\"),\n"
37007"            height_request: 200,\n"
37008"            width_request: 200,\n"
37009"            wrap: true});\n"
37010"\n"
37011"        // Connect the two scales to functions which recalculate the label\n"
37012"        this._hScale.connect (\"value-changed\", this._recalc.bind(this));\n"
37013"        this._vScale.connect (\"value-changed\", this._recalc.bind(this));\n"
37014"\n"
37015"        // Create a grid to arrange things in\n"
37016"        this._UIGrid = new Gtk.Grid ({\n"
37017"            halign: Gtk.Align.CENTER,\n"
37018"            valign: Gtk.Align.CENTER,\n"
37019"            margin_top: 20,\n"
37020"            margin_left: 20});\n"
37021"\n"
37022"        // Attach everything to the grid\n"
37023"        this._UIGrid.attach (this._label, 0, 0, 1, 1);\n"
37024"        this._UIGrid.attach (this._hScale, 0, 1, 1, 1);\n"
37025"        this._UIGrid.attach (this._vScale, 1, 0, 1, 1);\n"
37026"\n"
37027"        // Add the grid to the window\n"
37028"        this._window.add (this._UIGrid);\n"
37029"\n"
37030"        // Show the window and all child widgets\n"
37031"        this._window.show_all();\n"
37032"    }\n"
37033"\n"
37034"    _recalc() {\n"
37035"\n"
37036"        // Figure out what the product of the two scales' values is\n"
37037"        var product = (this._hScale.get_value() * this._vScale.get_value());\n"
37038"\n"
37039"        // Create a blank comment line in case there isn't a silly comment to make\n"
37040"        var comment = \"\";\n"
37041"\n"
37042"        // Make a silly comment based on the number of penguins\n"
37043"        if (product &gt; 9000) {\n"
37044"            comment = \"It's over 9000!\";\n"
37045"        }\n"
37046"        else if (product &lt; 1000 &amp;&amp; product &gt; 0) {\n"
37047"            comment = \"They're getting lonely.\";\n"
37048"        }\n"
37049"        else if (product == 0) {\n"
37050"            comment = \"They're all gone ...\";\n"
37051"        }\n"
37052"        else comment = \"\";\n"
37053"\n"
37054"        // Set ._label's new text\n"
37055"        this._label.set_label (String (product) + \" penguins on the iceberg. \" + comment);\n"
37056"    }\n"
37057"};\n"
37058"\n"
37059"// Run the application\n"
37060"let app = new ScaleExample ();\n"
37061"app.application.run (ARGV);\n"
37062
37063#. (itstool) path: item/p
37064#: C/scale.js.page:210 C/spinbutton.js.page:201
37065msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Adjustment.html\">Gtk.Adjustment</link>"
37066msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Adjustment.html\">Gtk.Adjustment</link>"
37067
37068#. (itstool) path: item/p
37069#: C/scale.js.page:215
37070msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Scale.html\">Gtk.Scale</link>"
37071msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Scale.html\">Gtk.Scale</link>"
37072
37073#. (itstool) path: info/title
37074#: C/scale.py.page:8
37075msgctxt "text"
37076msgid "Scale (Python)"
37077msgstr "Scale (Python)"
37078
37079#. (itstool) path: page/media
37080#. This is a reference to an external file such as an image or video. When
37081#. the file changes, the md5 hash will change to let you know you need to
37082#. update your localized copy. The msgstr is not used at all. Set it to
37083#. whatever you like once you have updated your copy of the file.
37084#: C/scale.py.page:24 C/scale.vala.page:24
37085msgctxt "_"
37086msgid "external ref='media/scale.png' md5='462c52a53b773cb9e8c62c646bf88452'"
37087msgstr ""
37088
37089#. (itstool) path: section/code
37090#: C/scale.py.page:31
37091#, no-wrap
37092msgid ""
37093"from gi.repository import Gtk\n"
37094"import sys\n"
37095"\n"
37096"\n"
37097"class MyWindow(Gtk.ApplicationWindow):\n"
37098"\n"
37099"    def __init__(self, app):\n"
37100"        Gtk.Window.__init__(self, title=\"Scale Example\", application=app)\n"
37101"        self.set_default_size(400, 300)\n"
37102"        self.set_border_width(5)\n"
37103"\n"
37104"        # two adjustments (initial value, min value, max value,\n"
37105"        # step increment - press cursor keys to see!,\n"
37106"        # page increment - click around the handle to see!,\n"
37107"        # page size - not used here)\n"
37108"        ad1 = Gtk.Adjustment(0, 0, 100, 5, 10, 0)\n"
37109"        ad2 = Gtk.Adjustment(50, 0, 100, 5, 10, 0)\n"
37110"\n"
37111"        # an horizontal scale\n"
37112"        self.h_scale = Gtk.Scale(\n"
37113"            orientation=Gtk.Orientation.HORIZONTAL, adjustment=ad1)\n"
37114"        # of integers (no digits)\n"
37115"        self.h_scale.set_digits(0)\n"
37116"        # that can expand horizontally if there is space in the grid (see\n"
37117"        # below)\n"
37118"        self.h_scale.set_hexpand(True)\n"
37119"        # that is aligned at the top of the space allowed in the grid (see\n"
37120"        # below)\n"
37121"        self.h_scale.set_valign(Gtk.Align.START)\n"
37122"\n"
37123"        # we connect the signal \"value-changed\" emitted by the scale with the callback\n"
37124"        # function scale_moved\n"
37125"        self.h_scale.connect(\"value-changed\", self.scale_moved)\n"
37126"\n"
37127"        # a vertical scale\n"
37128"        self.v_scale = Gtk.Scale(\n"
37129"            orientation=Gtk.Orientation.VERTICAL, adjustment=ad2)\n"
37130"        # that can expand vertically if there is space in the grid (see below)\n"
37131"        self.v_scale.set_vexpand(True)\n"
37132"\n"
37133"        # we connect the signal \"value-changed\" emitted by the scale with the callback\n"
37134"        # function scale_moved\n"
37135"        self.v_scale.connect(\"value-changed\", self.scale_moved)\n"
37136"\n"
37137"        # a label\n"
37138"        self.label = Gtk.Label()\n"
37139"        self.label.set_text(\"Move the scale handles...\")\n"
37140"\n"
37141"        # a grid to attach the widgets\n"
37142"        grid = Gtk.Grid()\n"
37143"        grid.set_column_spacing(10)\n"
37144"        grid.set_column_homogeneous(True)\n"
37145"        grid.attach(self.h_scale, 0, 0, 1, 1)\n"
37146"        grid.attach_next_to(\n"
37147"            self.v_scale, self.h_scale, Gtk.PositionType.RIGHT, 1, 1)\n"
37148"        grid.attach(self.label, 0, 1, 2, 1)\n"
37149"\n"
37150"        self.add(grid)\n"
37151"\n"
37152"    # any signal from the scales is signaled to the label the text of which is\n"
37153"    # changed\n"
37154"    def scale_moved(self, event):\n"
37155"        self.label.set_text(\"Horizontal scale is \" + str(int(self.h_scale.get_value())) +\n"
37156"                            \"; vertical scale is \" + str(self.v_scale.get_value()) + \".\")\n"
37157"\n"
37158"\n"
37159"class MyApplication(Gtk.Application):\n"
37160"\n"
37161"    def __init__(self):\n"
37162"        Gtk.Application.__init__(self)\n"
37163"\n"
37164"    def do_activate(self):\n"
37165"        win = MyWindow(self)\n"
37166"        win.show_all()\n"
37167"\n"
37168"    def do_startup(self):\n"
37169"        Gtk.Application.do_startup(self)\n"
37170"\n"
37171"app = MyApplication()\n"
37172"exit_status = app.run(sys.argv)\n"
37173"sys.exit(exit_status)\n"
37174msgstr ""
37175"from gi.repository import Gtk\n"
37176"import sys\n"
37177"\n"
37178"\n"
37179"class MyWindow(Gtk.ApplicationWindow):\n"
37180"\n"
37181"    def __init__(self, app):\n"
37182"        Gtk.Window.__init__(self, title=\"Scale Example\", application=app)\n"
37183"        self.set_default_size(400, 300)\n"
37184"        self.set_border_width(5)\n"
37185"\n"
37186"        # two adjustments (initial value, min value, max value,\n"
37187"        # step increment - press cursor keys to see!,\n"
37188"        # page increment - click around the handle to see!,\n"
37189"        # page size - not used here)\n"
37190"        ad1 = Gtk.Adjustment(0, 0, 100, 5, 10, 0)\n"
37191"        ad2 = Gtk.Adjustment(50, 0, 100, 5, 10, 0)\n"
37192"\n"
37193"        # an horizontal scale\n"
37194"        self.h_scale = Gtk.Scale(\n"
37195"            orientation=Gtk.Orientation.HORIZONTAL, adjustment=ad1)\n"
37196"        # of integers (no digits)\n"
37197"        self.h_scale.set_digits(0)\n"
37198"        # that can expand horizontally if there is space in the grid (see\n"
37199"        # below)\n"
37200"        self.h_scale.set_hexpand(True)\n"
37201"        # that is aligned at the top of the space allowed in the grid (see\n"
37202"        # below)\n"
37203"        self.h_scale.set_valign(Gtk.Align.START)\n"
37204"\n"
37205"        # we connect the signal \"value-changed\" emitted by the scale with the callback\n"
37206"        # function scale_moved\n"
37207"        self.h_scale.connect(\"value-changed\", self.scale_moved)\n"
37208"\n"
37209"        # a vertical scale\n"
37210"        self.v_scale = Gtk.Scale(\n"
37211"            orientation=Gtk.Orientation.VERTICAL, adjustment=ad2)\n"
37212"        # that can expand vertically if there is space in the grid (see below)\n"
37213"        self.v_scale.set_vexpand(True)\n"
37214"\n"
37215"        # we connect the signal \"value-changed\" emitted by the scale with the callback\n"
37216"        # function scale_moved\n"
37217"        self.v_scale.connect(\"value-changed\", self.scale_moved)\n"
37218"\n"
37219"        # a label\n"
37220"        self.label = Gtk.Label()\n"
37221"        self.label.set_text(\"Move the scale handles...\")\n"
37222"\n"
37223"        # a grid to attach the widgets\n"
37224"        grid = Gtk.Grid()\n"
37225"        grid.set_column_spacing(10)\n"
37226"        grid.set_column_homogeneous(True)\n"
37227"        grid.attach(self.h_scale, 0, 0, 1, 1)\n"
37228"        grid.attach_next_to(\n"
37229"            self.v_scale, self.h_scale, Gtk.PositionType.RIGHT, 1, 1)\n"
37230"        grid.attach(self.label, 0, 1, 2, 1)\n"
37231"\n"
37232"        self.add(grid)\n"
37233"\n"
37234"    # any signal from the scales is signaled to the label the text of which is\n"
37235"    # changed\n"
37236"    def scale_moved(self, event):\n"
37237"        self.label.set_text(\"Horizontal scale is \" + str(int(self.h_scale.get_value())) +\n"
37238"                            \"; vertical scale is \" + str(self.v_scale.get_value()) + \".\")\n"
37239"\n"
37240"\n"
37241"class MyApplication(Gtk.Application):\n"
37242"\n"
37243"    def __init__(self):\n"
37244"        Gtk.Application.__init__(self)\n"
37245"\n"
37246"    def do_activate(self):\n"
37247"        win = MyWindow(self)\n"
37248"        win.show_all()\n"
37249"\n"
37250"    def do_startup(self):\n"
37251"        Gtk.Application.do_startup(self)\n"
37252"\n"
37253"app = MyApplication()\n"
37254"exit_status = app.run(sys.argv)\n"
37255"sys.exit(exit_status)\n"
37256
37257#. (itstool) path: section/title
37258#: C/scale.py.page:35
37259msgid "Useful methods for a Scale widget"
37260msgstr "Scale 위젯에 쓸만한 메서드"
37261
37262#. (itstool) path: section/p
37263#: C/scale.py.page:36
37264msgid ""
37265"A Gtk.Adjustment is needed to construct the Gtk.Scale. This is the representation of a value with a lower and "
37266"upper bound, together with step and page increments, and a page size, and it is constructed as <code>Gtk."
37267"Adjustment(value, lower, upper, step_increment, page_increment, page_size)</code> where the fields are of type "
37268"<code>float</code>; <code>step_increment</code> is the increment/decrement that is obtained by using the cursor "
37269"keys, <code>page_increment</code> the one that is obtained clicking on the scale itself. Note that "
37270"<code>page_size</code> is not used in this case, it should be set to <code>0</code>."
37271msgstr ""
37272"Gtk.AdjustmentGtk.Scale을 만들떄 필요합니다. 상한 값, 하한 값, 단계 및 페이지 증가 값을 저장하며, <code>Gtk."
37273"Adjustment(value, lower, upper, step_increment, page_increment, page_size)</code>로 구성합니다. 여기서 각 값은 "
37274"<code>float</code>형식입니다. <code>step_increment</code>는 커서 키를 활용할 때 가져올 증가 감소 값이며, "
37275"<code>page_increment</code>는 Scale 자체를 눌렀을 떄 가져올 값입니다. 참고로 지금과 같은 경우는 <code>page_size</"
37276"code> 값을 활용하지 않으므로 <code>0</code> 값으로 설정해야합니다."
37277
37278#. (itstool) path: section/p
37279#: C/scale.py.page:37
37280msgid ""
37281"In line 28 the signal <code>\"value-changed\"</code> is connected to the callback function <code>scale_moved()</"
37282"code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link "
37283"xref=\"signals-callbacks.py\"/> for a more detailed explanation."
37284msgstr ""
37285"28번째 줄에서 <code>\"value-changed\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, "
37286"<var>callback function</var>)</code> 함수로  <code>scale_moved()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 "
37287"<link xref=\"signals-callbacks.py\"/>를 참조하십시오."
37288
37289#. (itstool) path: item/p
37290#: C/scale.py.page:39
37291msgid ""
37292"<code>get_value()</code> retrieves the current value of the scale; <code>set_value(value)</code> sets it (if the "
37293"<code>value</code>, of type <code>float</code>, is outside the minimum or maximum range, it will be clamped to fit "
37294"inside them). These are methods of the class Gtk.Range."
37295msgstr ""
37296"<code>get_value()</code> 함수는 Scale의 현재 값을 가져옵니다. <code>set_value(value)</code> 함수는 Scale 값을 설정"
37297"합니다(<code>float</code> 형식의 <code>value</code> 값이 최소 최대 값 범위를 벗어나면, 범위내 값으로 바뀝니다). 이 "
37298"메서드는 Gtk.Range 클래스에 있습니다."
37299
37300#. (itstool) path: item/p
37301#: C/scale.py.page:40
37302msgid "Use <code>set_draw_value(False)</code> to avoid displaying the current value as a string next to the slider."
37303msgstr "슬라이더 옆에 현재 값을 나타나지 않게 하려면 <code>set_draw_value(False)</code> 함수를 사용하십시오."
37304
37305#. (itstool) path: item/p
37306#: C/scale.py.page:41
37307msgid "To highlight the part of the scale between the origin and the current value:"
37308msgstr "초기 값과 현재 값 사이의 Scale 부분을 강조하려면:"
37309
37310#. (itstool) path: item/code
37311#: C/scale.py.page:42
37312#, no-wrap
37313msgid ""
37314"\n"
37315"self.h_scale.set_restrict_to_fill_level(False)\n"
37316"self.h_scale.set_fill_level(self.h_scale.get_value())\n"
37317"self.h_scale.set_show_fill_level(True)"
37318msgstr ""
37319"\n"
37320"self.h_scale.set_restrict_to_fill_level(False)\n"
37321"self.h_scale.set_fill_level(self.h_scale.get_value())\n"
37322"self.h_scale.set_show_fill_level(True)"
37323
37324#. (itstool) path: item/p
37325#: C/scale.py.page:46
37326msgid ""
37327"in the callback function of the \"value-changed\" signal, so to have the new filling every time the value is "
37328"changed. These are methods of the class Gtk.Range."
37329msgstr ""
37330"\"value-changed\" 시그널의 콜백 함수에서는 값이 바뀔 때마다 새로 채워넣습니다. 이 메서드는 Gtk.Range 클래스에 있습"
37331"니다."
37332
37333#. (itstool) path: item/p
37334#: C/scale.py.page:48
37335msgid ""
37336"<code>add_mark(value, position, markup)</code> adds a mark at the <code>value</code> (<code>float</code> or "
37337"<code>int</code> if that is the precision of the scale), in <code>position</code> (<code>Gtk.PositionType.LEFT, "
37338"Gtk.PositionType.RIGHT, Gtk.PositionType.TOP, Gtk.PositionType.BOTTOM</code>) with text <code>Null</code> or "
37339"<code>markup</code> in the Pango Markup Language. To clear marks, <code>clear_marks()</code>."
37340msgstr ""
37341"<code>add_mark(value, position, markup)</code> 함수는 <code>value</code> 값 위치에, <code>position</code> 방향"
37342"(<code>Gtk.PositionType.LEFT, Gtk.PositionType.RIGHT, Gtk.PositionType.TOP, Gtk.PositionType.BOTTOM</code>)으로,  "
37343"<code>Null</code> 또는 팡고 마크업 언어인 <code>markup</code> 값 텍스트를 붙여 표시를 추가합니다(Scale에서 허용하"
37344"는 값일 경우 <code>float</code>형 또는 <code>int</code>형). 마크를 지우려면 <code>clear_marks()</code> 함수를 사용"
37345"하십시오."
37346
37347#. (itstool) path: item/p
37348#: C/scale.py.page:49
37349msgid "<code>set_digits(digits)</code> sets the precision of the scale at <code>digits</code> digits."
37350msgstr "<code>set_digits(digits)</code> 함수는 Scale 정밀도 자리수를 <code>digits</code> 자리로 설정합니다."
37351
37352#. (itstool) path: item/p
37353#: C/scale.py.page:57
37354msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkScale.html\">GtkScale</link>"
37355msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkScale.html\">GtkScale</link>"
37356
37357#. (itstool) path: item/p
37358#: C/scale.py.page:58 C/spinbutton.py.page:50
37359msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkAdjustment.html\">GtkAdjustment</link>"
37360msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkAdjustment.html\">GtkAdjustment</link>"
37361
37362#. (itstool) path: item/p
37363#: C/scale.py.page:59 C/scrolledwindow.js.page:37 C/scrolledwindow.py.page:46 C/textview.py.page:100
37364msgid ""
37365"<link href=\"http://developer.gnome.org/gtk3/unstable/gtk3-Standard-Enumerations.html\">Standard Enumerations</"
37366"link>"
37367msgstr ""
37368"<link href=\"http://developer.gnome.org/gtk3/unstable/gtk3-Standard-Enumerations.html\">표준 서수형 값 목록</link>"
37369
37370#. (itstool) path: info/title
37371#: C/scale.vala.page:8
37372msgctxt "text"
37373msgid "Scale (Vala)"
37374msgstr "Scale (Vala)"
37375
37376#. (itstool) path: page/code
37377#: C/scale.vala.page:27
37378#, no-wrap
37379msgid ""
37380"/* This is the application. */\n"
37381"public class MyApplication : Gtk.Application {\n"
37382"\tGtk.Scale h_scale;\n"
37383"\tGtk.Scale v_scale;\n"
37384"\tGtk.Label label;\n"
37385"\n"
37386"\t/* Override the 'activate' signal of GLib.Application. */\n"
37387"\tprotected override void activate () {\n"
37388"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
37389"\t\twindow.title = \"Scale Example\";\n"
37390"\t\twindow.set_default_size (400, 300);\n"
37391"\t\twindow.set_border_width (5);\n"
37392"\n"
37393"\t\th_scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0.0, 100.0, 5.0);\n"
37394"\t\th_scale.set_digits (0); //number of decimal places displayed\n"
37395"\t\th_scale.set_valign (Gtk.Align.START); //horizontal alignment\n"
37396"\n"
37397"\t\tvar adjustment = new Gtk.Adjustment (42.0, 0.0, 100.0, 5.0, 10.0, 0.0);\n"
37398"\t\tv_scale = new Gtk.Scale (Gtk.Orientation.VERTICAL, adjustment);\n"
37399"\t\tv_scale.set_vexpand(true);\n"
37400"\n"
37401"\t\tlabel = new Gtk.Label (\"Move the scale handles...\");\n"
37402"\n"
37403"\t\tvar grid = new Gtk.Grid ();\n"
37404"\t\tgrid.set_column_spacing (10); //amount of space between columns\n"
37405"\t\tgrid.set_column_homogeneous (true); //all columns same width\n"
37406"\t\tgrid.attach (h_scale, 0, 0, 1, 1);\n"
37407"\t\tgrid.attach_next_to (v_scale, h_scale, Gtk.PositionType.RIGHT, 1, 1);\n"
37408"\t\tgrid.attach (label, 0, 1, 2, 1);\n"
37409"\n"
37410"\t\th_scale.value_changed.connect (scale_moved);\n"
37411"\t\tv_scale.value_changed.connect (scale_moved);\n"
37412"\n"
37413"\t\twindow.add (grid);\n"
37414"\t\twindow.show_all ();\n"
37415"\t}\n"
37416"\n"
37417"\t/* Callback function for \"value-changed\" signal.\n"
37418"\t * The parameter refers to the scale which emitted the signal.\n"
37419"\t * Since we are accessing the values of not one, but two scales,\n"
37420"\t * we made the ranges instance variables, and ignore the\n"
37421"\t * parameter.\n"
37422"\t */\n"
37423"\tvoid scale_moved (Gtk.Range range) {\n"
37424"\t\tlabel.set_text (\"Horizontal scale is %.1f; vertical scale is %.1f.\".printf (h_scale.get_value (), v_scale.get_value ()));\n"
37425"\t}\n"
37426"}\n"
37427"\n"
37428"/* main creates and runs the application. */\n"
37429"public int main (string[] args) {\n"
37430"\treturn new MyApplication ().run (args);\n"
37431"}\n"
37432msgstr ""
37433"/* This is the application. */\n"
37434"public class MyApplication : Gtk.Application {\n"
37435"\tGtk.Scale h_scale;\n"
37436"\tGtk.Scale v_scale;\n"
37437"\tGtk.Label label;\n"
37438"\n"
37439"\t/* Override the 'activate' signal of GLib.Application. */\n"
37440"\tprotected override void activate () {\n"
37441"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
37442"\t\twindow.title = \"Scale Example\";\n"
37443"\t\twindow.set_default_size (400, 300);\n"
37444"\t\twindow.set_border_width (5);\n"
37445"\n"
37446"\t\th_scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0.0, 100.0, 5.0);\n"
37447"\t\th_scale.set_digits (0); //number of decimal places displayed\n"
37448"\t\th_scale.set_valign (Gtk.Align.START); //horizontal alignment\n"
37449"\n"
37450"\t\tvar adjustment = new Gtk.Adjustment (42.0, 0.0, 100.0, 5.0, 10.0, 0.0);\n"
37451"\t\tv_scale = new Gtk.Scale (Gtk.Orientation.VERTICAL, adjustment);\n"
37452"\t\tv_scale.set_vexpand(true);\n"
37453"\n"
37454"\t\tlabel = new Gtk.Label (\"Move the scale handles...\");\n"
37455"\n"
37456"\t\tvar grid = new Gtk.Grid ();\n"
37457"\t\tgrid.set_column_spacing (10); //amount of space between columns\n"
37458"\t\tgrid.set_column_homogeneous (true); //all columns same width\n"
37459"\t\tgrid.attach (h_scale, 0, 0, 1, 1);\n"
37460"\t\tgrid.attach_next_to (v_scale, h_scale, Gtk.PositionType.RIGHT, 1, 1);\n"
37461"\t\tgrid.attach (label, 0, 1, 2, 1);\n"
37462"\n"
37463"\t\th_scale.value_changed.connect (scale_moved);\n"
37464"\t\tv_scale.value_changed.connect (scale_moved);\n"
37465"\n"
37466"\t\twindow.add (grid);\n"
37467"\t\twindow.show_all ();\n"
37468"\t}\n"
37469"\n"
37470"\t/* Callback function for \"value-changed\" signal.\n"
37471"\t * The parameter refers to the scale which emitted the signal.\n"
37472"\t * Since we are accessing the values of not one, but two scales,\n"
37473"\t * we made the ranges instance variables, and ignore the\n"
37474"\t * parameter.\n"
37475"\t */\n"
37476"\tvoid scale_moved (Gtk.Range range) {\n"
37477"\t\tlabel.set_text (\"Horizontal scale is %.1f; vertical scale is %.1f.\".printf (h_scale.get_value (), v_scale.get_value ()));\n"
37478"\t}\n"
37479"}\n"
37480"\n"
37481"/* main creates and runs the application. */\n"
37482"public int main (string[] args) {\n"
37483"\treturn new MyApplication ().run (args);\n"
37484"}\n"
37485
37486#. (itstool) path: item/p
37487#: C/scale.vala.page:32
37488msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Scale.html\">Gtk.Scale</link>"
37489msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Scale.html\">Gtk.Scale</link>"
37490
37491#. (itstool) path: item/p
37492#: C/scale.vala.page:33
37493msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Adjustment.html\">Gtk.Adjustment</link>"
37494msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Adjustment.html\">Gtk.Adjustment</link>"
37495
37496#. (itstool) path: item/p
37497#: C/scale.vala.page:34
37498msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.PositionType.html\">Gtk.PositionType</link>"
37499msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.PositionType.html\">Gtk.PositionType</link>"
37500
37501#. (itstool) path: item/p
37502#: C/scale.vala.page:35
37503msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Orientation.html\">Gtk.Orientation</link>"
37504msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Orientation.html\">Gtk.Orientation</link>"
37505
37506#. (itstool) path: info/title
37507#: C/scrolledwindow.c.page:8
37508msgctxt "text"
37509msgid "ScrolledWindow (C)"
37510msgstr "ScrolledWindow (C)"
37511
37512#. (itstool) path: info/desc
37513#: C/scrolledwindow.c.page:20 C/scrolledwindow.js.page:18 C/scrolledwindow.py.page:19 C/scrolledwindow.vala.page:19
37514msgid "Adds scrollbars to its child widget"
37515msgstr "스크롤 표시줄을 하위 위젯에 추가합니다"
37516
37517#. (itstool) path: page/title
37518#: C/scrolledwindow.c.page:23 C/scrolledwindow.js.page:21 C/scrolledwindow.py.page:22 C/scrolledwindow.vala.page:22
37519msgid "ScrolledWindow"
37520msgstr "ScrolledWindow"
37521
37522#. (itstool) path: page/media
37523#. This is a reference to an external file such as an image or video. When
37524#. the file changes, the md5 hash will change to let you know you need to
37525#. update your localized copy. The msgstr is not used at all. Set it to
37526#. whatever you like once you have updated your copy of the file.
37527#: C/scrolledwindow.c.page:25 C/scrolledwindow.js.page:22 C/scrolledwindow.py.page:23 C/scrolledwindow.vala.page:23
37528msgctxt "_"
37529msgid "external ref='media/scrolledwindow.png' md5='697bb3205d5c4fb0b4ea8db435843157'"
37530msgstr ""
37531
37532#. (itstool) path: page/p
37533#: C/scrolledwindow.c.page:26 C/scrolledwindow.js.page:23 C/scrolledwindow.py.page:24 C/scrolledwindow.vala.page:24
37534msgid "An image in a scrolled window."
37535msgstr "스크롤 창에 이미지를 나타냅니다."
37536
37537#. (itstool) path: page/code
37538#: C/scrolledwindow.c.page:28
37539#, no-wrap
37540msgid ""
37541"\n"
37542"#include &lt;gtk/gtk.h&gt;\n"
37543"\n"
37544"\n"
37545"\n"
37546"static void\n"
37547"activate (GtkApplication *app,\n"
37548"          gpointer        user_data)\n"
37549"{\n"
37550"  /* Declare variables */\n"
37551"  GtkWidget *window;\n"
37552"  GtkWidget *scrolled_window;\n"
37553"  GtkWidget *image;\n"
37554"\n"
37555"  /* Create a window with a title, and a default size */\n"
37556"  window = gtk_application_window_new (app);\n"
37557"  gtk_window_set_title (GTK_WINDOW (window), \"ScrolledWindow Example\");\n"
37558"  gtk_window_set_default_size (GTK_WINDOW (window), 220, 200);\n"
37559"\n"
37560"  /* Create the scrolled window. Usually NULL is passed for both parameters so\n"
37561"   * that it creates the horizontal/vertical adjustments automatically. Setting\n"
37562"   * the scrollbar policy to automatic allows the scrollbars to only show up\n"
37563"   * when needed.\n"
37564"   */\n"
37565"  scrolled_window = gtk_scrolled_window_new (NULL, NULL);\n"
37566"  /* Set the border width */\n"
37567"  gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 10);\n"
37568"  /* Extract our desired image from a file that we have */\n"
37569"  image = gtk_image_new_from_file (\"gnome-image.png\");\n"
37570"  /* And add it to the scrolled window */\n"
37571"  gtk_container_add (GTK_CONTAINER (scrolled_window), image);\n"
37572"  /* Set the policy of the horizontal and vertical scrollbars to automatic.\n"
37573"   * What this means is that the scrollbars are only present if needed.\n"
37574"   */\n"
37575"  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),\n"
37576"                                  GTK_POLICY_AUTOMATIC,\n"
37577"                                  GTK_POLICY_AUTOMATIC);\n"
37578"\n"
37579"  gtk_container_add (GTK_CONTAINER (window), scrolled_window);\n"
37580"\n"
37581"  gtk_widget_show_all (window);\n"
37582"}\n"
37583"\n"
37584"\n"
37585"\n"
37586"int\n"
37587"main (int argc, char **argv)\n"
37588"{\n"
37589"  GtkApplication *app;\n"
37590"  int status;\n"
37591"\n"
37592"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
37593"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
37594"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
37595"  g_object_unref (app);\n"
37596"\n"
37597"  return status;\n"
37598"}\n"
37599msgstr ""
37600"\n"
37601"#include &lt;gtk/gtk.h&gt;\n"
37602"\n"
37603"\n"
37604"\n"
37605"static void\n"
37606"activate (GtkApplication *app,\n"
37607"          gpointer        user_data)\n"
37608"{\n"
37609"  /* Declare variables */\n"
37610"  GtkWidget *window;\n"
37611"  GtkWidget *scrolled_window;\n"
37612"  GtkWidget *image;\n"
37613"\n"
37614"  /* Create a window with a title, and a default size */\n"
37615"  window = gtk_application_window_new (app);\n"
37616"  gtk_window_set_title (GTK_WINDOW (window), \"ScrolledWindow Example\");\n"
37617"  gtk_window_set_default_size (GTK_WINDOW (window), 220, 200);\n"
37618"\n"
37619"  /* Create the scrolled window. Usually NULL is passed for both parameters so\n"
37620"   * that it creates the horizontal/vertical adjustments automatically. Setting\n"
37621"   * the scrollbar policy to automatic allows the scrollbars to only show up\n"
37622"   * when needed.\n"
37623"   */\n"
37624"  scrolled_window = gtk_scrolled_window_new (NULL, NULL);\n"
37625"  /* Set the border width */\n"
37626"  gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 10);\n"
37627"  /* Extract our desired image from a file that we have */\n"
37628"  image = gtk_image_new_from_file (\"gnome-image.png\");\n"
37629"  /* And add it to the scrolled window */\n"
37630"  gtk_container_add (GTK_CONTAINER (scrolled_window), image);\n"
37631"  /* Set the policy of the horizontal and vertical scrollbars to automatic.\n"
37632"   * What this means is that the scrollbars are only present if needed.\n"
37633"   */\n"
37634"  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),\n"
37635"                                  GTK_POLICY_AUTOMATIC,\n"
37636"                                  GTK_POLICY_AUTOMATIC);\n"
37637"\n"
37638"  gtk_container_add (GTK_CONTAINER (window), scrolled_window);\n"
37639"\n"
37640"  gtk_widget_show_all (window);\n"
37641"}\n"
37642"\n"
37643"\n"
37644"\n"
37645"int\n"
37646"main (int argc, char **argv)\n"
37647"{\n"
37648"  GtkApplication *app;\n"
37649"  int status;\n"
37650"\n"
37651"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
37652"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
37653"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
37654"  g_object_unref (app);\n"
37655"\n"
37656"  return status;\n"
37657"}\n"
37658
37659#. (itstool) path: item/p
37660#: C/scrolledwindow.c.page:37
37661msgid ""
37662"<link href=\"http://developer.gnome.org/gtk/stable/gtk3-Standard-Enumerations.html#GtkPolicyType\">GtkPolicyType</"
37663"link>"
37664msgstr ""
37665"<link href=\"http://developer.gnome.org/gtk/stable/gtk3-Standard-Enumerations.html#GtkPolicyType\">GtkPolicyType</"
37666"link>"
37667
37668#. (itstool) path: info/title
37669#: C/scrolledwindow.js.page:8
37670msgctxt "text"
37671msgid "ScrolledWindow (JavaScript)"
37672msgstr "ScrolledWindow (JavaScript)"
37673
37674#. (itstool) path: section/code
37675#: C/scrolledwindow.js.page:29
37676#, no-wrap
37677msgid ""
37678"#!/usr/bin/gjs\n"
37679"\n"
37680"imports.gi.versions.Gtk = '3.0';\n"
37681"\n"
37682"const GObject = imports.gi.GObject;\n"
37683"const Gtk = imports.gi.Gtk;\n"
37684"\n"
37685"class ScrolledWindowExample {\n"
37686"\n"
37687"    // Create the application itself\n"
37688"    constructor() {\n"
37689"        this.application = new Gtk.Application({\n"
37690"            application_id: 'org.example.jscrolledwindow'\n"
37691"        });\n"
37692"\n"
37693"        // Connect 'activate' and 'startup' signals to the callback functions\n"
37694"        this.application.connect('activate', this._onActivate.bind(this));\n"
37695"        this.application.connect('startup', this._onStartup.bind(this));\n"
37696"    }\n"
37697"\n"
37698"    // Callback function for 'activate' signal presents windows when active\n"
37699"    _onActivate() {\n"
37700"        this.window.present();\n"
37701"    }\n"
37702"\n"
37703"    // Callback function for 'startup' signal builds the UI\n"
37704"    _onStartup() {\n"
37705"        this._buildUI();\n"
37706"    }\n"
37707"\n"
37708"    // Build the application's UI\n"
37709"    _buildUI() {\n"
37710"        // Create the application window\n"
37711"        this.window = new Gtk.ApplicationWindow({\n"
37712"            application: this.application,\n"
37713"            window_position: Gtk.WindowPosition.CENTER,\n"
37714"            title: \"ScrolledWindow Example\",\n"
37715"            default_width: 200,\n"
37716"            default_height: 200,\n"
37717"            border_width: 10\n"
37718"        });\n"
37719"        // the scrolledwindow\n"
37720"        this.scrolledWindow = new Gtk.ScrolledWindow();\n"
37721"        this.scrolledWindow.set_border_width(10);\n"
37722"        // there is always the scrollbar (otherwise: AUTOMATIC - only if needed - or NEVER)\n"
37723"        this.scrolledWindow.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS);\n"
37724"        // an image - slightly larger than the window\n"
37725"        this.image = new Gtk.Image();\n"
37726"        this.image.set_from_file(\"gnome-image.png\");\n"
37727"\n"
37728"        // add the image to the scrolledwindow\n"
37729"        this.scrolledWindow.add_with_viewport(this.image);\n"
37730"\n"
37731"        // add the scrolledwindow to the window\n"
37732"        this.window.add(this.scrolledWindow);\n"
37733"        this.window.show_all();\n"
37734"    }\n"
37735"};\n"
37736"\n"
37737"// Run the application\n"
37738"let app = new ScrolledWindowExample();\n"
37739"app.application.run (ARGV);\n"
37740msgstr ""
37741"#!/usr/bin/gjs\n"
37742"\n"
37743"imports.gi.versions.Gtk = '3.0';\n"
37744"\n"
37745"const GObject = imports.gi.GObject;\n"
37746"const Gtk = imports.gi.Gtk;\n"
37747"\n"
37748"class ScrolledWindowExample {\n"
37749"\n"
37750"    // Create the application itself\n"
37751"    constructor() {\n"
37752"        this.application = new Gtk.Application({\n"
37753"            application_id: 'org.example.jscrolledwindow'\n"
37754"        });\n"
37755"\n"
37756"        // Connect 'activate' and 'startup' signals to the callback functions\n"
37757"        this.application.connect('activate', this._onActivate.bind(this));\n"
37758"        this.application.connect('startup', this._onStartup.bind(this));\n"
37759"    }\n"
37760"\n"
37761"    // Callback function for 'activate' signal presents windows when active\n"
37762"    _onActivate() {\n"
37763"        this.window.present();\n"
37764"    }\n"
37765"\n"
37766"    // Callback function for 'startup' signal builds the UI\n"
37767"    _onStartup() {\n"
37768"        this._buildUI();\n"
37769"    }\n"
37770"\n"
37771"    // Build the application's UI\n"
37772"    _buildUI() {\n"
37773"        // Create the application window\n"
37774"        this.window = new Gtk.ApplicationWindow({\n"
37775"            application: this.application,\n"
37776"            window_position: Gtk.WindowPosition.CENTER,\n"
37777"            title: \"ScrolledWindow Example\",\n"
37778"            default_width: 200,\n"
37779"            default_height: 200,\n"
37780"            border_width: 10\n"
37781"        });\n"
37782"        // the scrolledwindow\n"
37783"        this.scrolledWindow = new Gtk.ScrolledWindow();\n"
37784"        this.scrolledWindow.set_border_width(10);\n"
37785"        // there is always the scrollbar (otherwise: AUTOMATIC - only if needed - or NEVER)\n"
37786"        this.scrolledWindow.set_policy(Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS);\n"
37787"        // an image - slightly larger than the window\n"
37788"        this.image = new Gtk.Image();\n"
37789"        this.image.set_from_file(\"gnome-image.png\");\n"
37790"\n"
37791"        // add the image to the scrolledwindow\n"
37792"        this.scrolledWindow.add_with_viewport(this.image);\n"
37793"\n"
37794"        // add the scrolledwindow to the window\n"
37795"        this.window.add(this.scrolledWindow);\n"
37796"        this.window.show_all();\n"
37797"    }\n"
37798"};\n"
37799"\n"
37800"// Run the application\n"
37801"let app = new ScrolledWindowExample();\n"
37802"app.application.run (ARGV);\n"
37803
37804#. (itstool) path: item/p
37805#: C/scrolledwindow.js.page:36
37806msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ScrolledWindow.html\">GtkScrolledWindow</link>"
37807msgstr ""
37808"<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.ScrolledWindow.html\">GtkScrolledWindow</link>"
37809
37810#. (itstool) path: info/title
37811#: C/scrolledwindow.py.page:8
37812msgctxt "text"
37813msgid "ScrolledWindow (Python)"
37814msgstr "ScrolledWindow (Python)"
37815
37816#. (itstool) path: section/code
37817#: C/scrolledwindow.py.page:30
37818#, no-wrap
37819msgid ""
37820"from gi.repository import Gtk\n"
37821"import sys\n"
37822"\n"
37823"\n"
37824"class MyWindow(Gtk.ApplicationWindow):\n"
37825"\n"
37826"    def __init__(self, app):\n"
37827"        Gtk.Window.__init__(\n"
37828"            self, title=\"ScrolledWindow Example\", application=app)\n"
37829"        self.set_default_size(200, 200)\n"
37830"\n"
37831"        # the scrolledwindow\n"
37832"        scrolled_window = Gtk.ScrolledWindow()\n"
37833"        scrolled_window.set_border_width(10)\n"
37834"        # there is always the scrollbar (otherwise: AUTOMATIC - only if needed\n"
37835"        # - or NEVER)\n"
37836"        scrolled_window.set_policy(\n"
37837"            Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS)\n"
37838"\n"
37839"        # an image - slightly larger than the window...\n"
37840"        image = Gtk.Image()\n"
37841"        image.set_from_file(\"gnome-image.png\")\n"
37842"\n"
37843"        # add the image to the scrolledwindow\n"
37844"        scrolled_window.add_with_viewport(image)\n"
37845"\n"
37846"        # add the scrolledwindow to the window\n"
37847"        self.add(scrolled_window)\n"
37848"\n"
37849"\n"
37850"class MyApplication(Gtk.Application):\n"
37851"\n"
37852"    def __init__(self):\n"
37853"        Gtk.Application.__init__(self)\n"
37854"\n"
37855"    def do_activate(self):\n"
37856"        win = MyWindow(self)\n"
37857"        win.show_all()\n"
37858"\n"
37859"    def do_startup(self):\n"
37860"        Gtk.Application.do_startup(self)\n"
37861"\n"
37862"app = MyApplication()\n"
37863"exit_status = app.run(sys.argv)\n"
37864"sys.exit(exit_status)\n"
37865msgstr ""
37866"from gi.repository import Gtk\n"
37867"import sys\n"
37868"\n"
37869"\n"
37870"class MyWindow(Gtk.ApplicationWindow):\n"
37871"\n"
37872"    def __init__(self, app):\n"
37873"        Gtk.Window.__init__(\n"
37874"            self, title=\"ScrolledWindow Example\", application=app)\n"
37875"        self.set_default_size(200, 200)\n"
37876"\n"
37877"        # the scrolledwindow\n"
37878"        scrolled_window = Gtk.ScrolledWindow()\n"
37879"        scrolled_window.set_border_width(10)\n"
37880"        # there is always the scrollbar (otherwise: AUTOMATIC - only if needed\n"
37881"        # - or NEVER)\n"
37882"        scrolled_window.set_policy(\n"
37883"            Gtk.PolicyType.ALWAYS, Gtk.PolicyType.ALWAYS)\n"
37884"\n"
37885"        # an image - slightly larger than the window...\n"
37886"        image = Gtk.Image()\n"
37887"        image.set_from_file(\"gnome-image.png\")\n"
37888"\n"
37889"        # add the image to the scrolledwindow\n"
37890"        scrolled_window.add_with_viewport(image)\n"
37891"\n"
37892"        # add the scrolledwindow to the window\n"
37893"        self.add(scrolled_window)\n"
37894"\n"
37895"\n"
37896"class MyApplication(Gtk.Application):\n"
37897"\n"
37898"    def __init__(self):\n"
37899"        Gtk.Application.__init__(self)\n"
37900"\n"
37901"    def do_activate(self):\n"
37902"        win = MyWindow(self)\n"
37903"        win.show_all()\n"
37904"\n"
37905"    def do_startup(self):\n"
37906"        Gtk.Application.do_startup(self)\n"
37907"\n"
37908"app = MyApplication()\n"
37909"exit_status = app.run(sys.argv)\n"
37910"sys.exit(exit_status)\n"
37911
37912#. (itstool) path: section/title
37913#: C/scrolledwindow.py.page:33
37914msgid "Useful methods for a ScrolledWindow widget"
37915msgstr "ScrolledWindow 위젯에 쓸만한 메서드"
37916
37917#. (itstool) path: item/p
37918#: C/scrolledwindow.py.page:35
37919msgid ""
37920"<code>set_policy(hscrollbar_policy, vscrollbar_policy)</code> where each of the arguments is one of <code>Gtk."
37921"Policy.AUTOMATIC, Gtk.Policy.ALWAYS, Gtk.Policy.NEVER</code> regulates whether the horizontal and vertical "
37922"scrollbars should appear: with <code>AUTOMATIC</code> they appear only if needed, <code>ALWAYS</code> and "
37923"<code>NEVER</code> are self-explanatory."
37924msgstr ""
37925"<code>set_policy(hscrollbar_policy, vscrollbar_policy)</code> 함수에서 각 인자에는 수평 수직 방향으로 스크롤 표시줄"
37926"을 나타낼지 여부를 정규화 한 <code>Gtk.Policy.AUTOMATIC, Gtk.Policy.ALWAYS, Gtk.Policy.NEVER</code> 값 중 하나가 들"
37927"어갑니다. <code>AUTOMATIC</code> 값을 넣으면 필요할 경우 나타내며, <code>ALWAYS</code>, <code>NEVER</code>는 값에"
37928"서 설명하는 의미와 같습니다."
37929
37930#. (itstool) path: item/p
37931#: C/scrolledwindow.py.page:36
37932msgid ""
37933"<code>add_with_viewport(widget)</code> is used to add the Gtk.Widget <code>widget</code> without native scrolling "
37934"capabilities inside the window."
37935msgstr ""
37936"<code>add_with_viewport(widget)</code> 함수는 창에 자체 스크롤 기능을 넣지 않고 Gtk.Widget <code>widget</code>을 추"
37937"가하는데 사용합니다."
37938
37939#. (itstool) path: item/p
37940#: C/scrolledwindow.py.page:37
37941msgid ""
37942"<code>set_placement(window_placement)</code> sets the placement of the contents with respect to the scrollbars for "
37943"the scrolled window. The options for the argument are <code>Gtk.CornerType.TOP_LEFT</code> (default: the "
37944"scrollbars are on the bottom and on the right of the window), <code>Gtk.CornerType.TOP_RIGHT, Gtk.CornerType."
37945"BOTTOM_LEFT, Gtk.CornerType.BOTTOM_RIGHT</code>."
37946msgstr ""
37947"<code>set_placement(window_placement)</code> 함수는 스크롤 창에서 스크롤 표시줄을 나타낼 컨텐트 위치를 설정합니다. "
37948"인자 옵션은 <code>Gtk.CornerType.TOP_LEFT</code> (기본값: 스크롤 표시줄을 창 하단과 우측에 나타냄), <code>Gtk."
37949"CornerType.TOP_RIGHT, Gtk.CornerType.BOTTOM_LEFT, Gtk.CornerType.BOTTOM_RIGHT</code>가 있습니다."
37950
37951#. (itstool) path: item/p
37952#: C/scrolledwindow.py.page:38
37953msgid ""
37954"<code>set_hadjustment(adjustment)</code> and <code>set_vadjustment(adjustment)</code> set the Gtk.Adjustment "
37955"<code>adjustment</code>. This is the representation of a value with a lower and upper bound, together with step "
37956"and page increments, and a page size, and it is constructed as <code>Gtk.Adjustment(value, lower, upper, "
37957"step_increment, page_increment, page_size)</code> where the fields are of type <code>float</code>. (Note that "
37958"<code>step_increment</code> is not used in this case, it can be set to <code>0</code>.)"
37959msgstr ""
37960"<code>set_hadjustment(adjustment)</code> 함수와 <code>set_vadjustment(adjustment)</code> 함수는 각각 Gtk."
37961"Adjustment <code>adjustment</code>를 설정합니다. 상한 값, 하한 값, 단계/페이지 증가 값, 페이지 크기를 나타내며, "
37962"<code>Gtk.Adjustment(value, lower, upper, step_increment, page_increment, page_size)</code>로 만듭니다. 여기서 각 "
37963"필드 값은 <code>float</code> 형식입니다. (참고로 지금 같은 경우는 <code>step_increment</code>를 사용하지 않으므로 "
37964"<code>0</code> 값으로 설정합니다)."
37965
37966#. (itstool) path: item/p
37967#: C/scrolledwindow.py.page:45 C/textview.py.page:99
37968msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkScrolledWindow.html\">GtkScrolledWindow</link>"
37969msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkScrolledWindow.html\">GtkScrolledWindow</link>"
37970
37971#. (itstool) path: info/title
37972#: C/scrolledwindow.vala.page:8
37973msgctxt "text"
37974msgid "ScrolledWindow (Vala)"
37975msgstr "ScrolledWindow (Vala)"
37976
37977#. (itstool) path: page/code
37978#: C/scrolledwindow.vala.page:26
37979#, no-wrap
37980msgid ""
37981"/* This is the application. */\n"
37982"public class MyApplication : Gtk.Application {\n"
37983"\t/* Override the 'activate' signal of GLib.Application. */\n"
37984"\tprotected override void activate () {\n"
37985"\t\t/* Create the window of this application. */\n"
37986"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
37987"\t\twindow.title = \"ScrolledWindow Example\";\n"
37988"\t\twindow.set_default_size (200, 200);\n"
37989"\n"
37990"\t\tvar scrolled_window = new Gtk.ScrolledWindow (null, null);\n"
37991"\t\tscrolled_window.set_border_width (10);\n"
37992"\t\tscrolled_window.add_with_viewport (new Gtk.Image.from_file (\"gnome-image.png\"));\n"
37993"\t\tscrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n"
37994"\n"
37995"\t\twindow.add (scrolled_window);\n"
37996"\t\twindow.show_all ();\n"
37997"\t}\n"
37998"}\n"
37999"\n"
38000"/* main creates and runs the application. */\n"
38001"public int main (string[] args) {\n"
38002"\treturn new MyApplication ().run (args);\n"
38003"}\n"
38004msgstr ""
38005"/* This is the application. */\n"
38006"public class MyApplication : Gtk.Application {\n"
38007"\t/* Override the 'activate' signal of GLib.Application. */\n"
38008"\tprotected override void activate () {\n"
38009"\t\t/* Create the window of this application. */\n"
38010"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
38011"\t\twindow.title = \"ScrolledWindow Example\";\n"
38012"\t\twindow.set_default_size (200, 200);\n"
38013"\n"
38014"\t\tvar scrolled_window = new Gtk.ScrolledWindow (null, null);\n"
38015"\t\tscrolled_window.set_border_width (10);\n"
38016"\t\tscrolled_window.add_with_viewport (new Gtk.Image.from_file (\"gnome-image.png\"));\n"
38017"\t\tscrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n"
38018"\n"
38019"\t\twindow.add (scrolled_window);\n"
38020"\t\twindow.show_all ();\n"
38021"\t}\n"
38022"}\n"
38023"\n"
38024"/* main creates and runs the application. */\n"
38025"public int main (string[] args) {\n"
38026"\treturn new MyApplication ().run (args);\n"
38027"}\n"
38028
38029#. (itstool) path: item/p
38030#: C/scrolledwindow.vala.page:31 C/textview.vala.page:37
38031msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ScrolledWindow.html\">Gtk.ScrolledWindow</link>"
38032msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ScrolledWindow.html\">Gtk.ScrolledWindow</link>"
38033
38034#. (itstool) path: item/p
38035#: C/scrolledwindow.vala.page:32 C/textview.vala.page:39
38036msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.PolicyType.html\">Gtk.PolicyType</link>"
38037msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.PolicyType.html\">Gtk.PolicyType</link>"
38038
38039#. (itstool) path: info/title
38040#: C/separator.c.page:8
38041msgctxt "text"
38042msgid "Separator (C)"
38043msgstr "구분선(C)"
38044
38045#. (itstool) path: info/desc
38046#: C/separator.c.page:19 C/separator.py.page:20 C/separator.vala.page:21
38047msgid "A separator widget"
38048msgstr "구분선 위젯"
38049
38050#. (itstool) path: page/title
38051#: C/separator.c.page:22 C/separator.py.page:23 C/separator.vala.page:24
38052msgid "Separator"
38053msgstr "구분선"
38054
38055#. (itstool) path: page/media
38056#. This is a reference to an external file such as an image or video. When
38057#. the file changes, the md5 hash will change to let you know you need to
38058#. update your localized copy. The msgstr is not used at all. Set it to
38059#. whatever you like once you have updated your copy of the file.
38060#: C/separator.c.page:24 C/separator.py.page:25 C/separator.vala.page:26
38061msgctxt "_"
38062msgid "external ref='media/separator.png' md5='8769b27662ce5c77f99e9ce33751a21a'"
38063msgstr ""
38064
38065#. (itstool) path: page/p
38066#: C/separator.c.page:25 C/separator.py.page:26 C/separator.vala.page:27
38067msgid "A horizontal and a vertical separator divide some labels."
38068msgstr "몇가지 레이블을 나누는 수평, 수직 구분선입니다."
38069
38070#. (itstool) path: section/code
38071#: C/separator.c.page:31
38072#, no-wrap
38073msgid ""
38074"#include &lt;gtk/gtk.h&gt;\n"
38075"\n"
38076"static void\n"
38077"activate (GtkApplication *app,\n"
38078"          gpointer        user_data)\n"
38079"{\n"
38080"  GtkWidget *grid;\n"
38081"  GtkWidget *window;\n"
38082"  GtkWidget *label1;\n"
38083"  GtkWidget *label2;\n"
38084"  GtkWidget *label3;\n"
38085"  GtkWidget *hseparator;\n"
38086"  GtkWidget *vseparator;\n"
38087"\n"
38088"  window = gtk_application_window_new (app);\n"
38089"  gtk_window_set_title (GTK_WINDOW (window), \"Separator Example\");\n"
38090"\n"
38091"  label1 = gtk_label_new (\"Below, a horizontal separator.\");\n"
38092"  label2 = gtk_label_new (\"On the right, a vertical separator.\");\n"
38093"  label3 = gtk_label_new (\"On the left, a vertical separator.\");\n"
38094"\n"
38095"  vseparator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);\n"
38096"  hseparator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);\n"
38097"\n"
38098"  grid = gtk_grid_new ();\n"
38099"\n"
38100"  gtk_grid_attach (GTK_GRID (grid), label1, 0, 0, 3, 1);\n"
38101"  gtk_grid_attach (GTK_GRID (grid), hseparator, 0, 1, 3, 1);\n"
38102"  gtk_grid_attach (GTK_GRID (grid), label2, 0, 2, 1, 1);\n"
38103"  gtk_grid_attach (GTK_GRID (grid), vseparator, 1, 2, 1, 1);\n"
38104"  gtk_grid_attach (GTK_GRID (grid), label3, 2, 2, 1, 1);\n"
38105"\n"
38106"  gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);\n"
38107"\n"
38108"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
38109"\n"
38110"  gtk_widget_show_all (window);\n"
38111"}\n"
38112"\n"
38113"int\n"
38114"main (int argc, char **argv)\n"
38115"{\n"
38116"  GtkApplication *app;\n"
38117"  int status;\n"
38118"\n"
38119"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
38120"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
38121"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
38122"  g_object_unref (app);\n"
38123"  return status;\n"
38124"}\n"
38125msgstr ""
38126"#include &lt;gtk/gtk.h&gt;\n"
38127"\n"
38128"static void\n"
38129"activate (GtkApplication *app,\n"
38130"          gpointer        user_data)\n"
38131"{\n"
38132"  GtkWidget *grid;\n"
38133"  GtkWidget *window;\n"
38134"  GtkWidget *label1;\n"
38135"  GtkWidget *label2;\n"
38136"  GtkWidget *label3;\n"
38137"  GtkWidget *hseparator;\n"
38138"  GtkWidget *vseparator;\n"
38139"\n"
38140"  window = gtk_application_window_new (app);\n"
38141"  gtk_window_set_title (GTK_WINDOW (window), \"Separator Example\");\n"
38142"\n"
38143"  label1 = gtk_label_new (\"Below, a horizontal separator.\");\n"
38144"  label2 = gtk_label_new (\"On the right, a vertical separator.\");\n"
38145"  label3 = gtk_label_new (\"On the left, a vertical separator.\");\n"
38146"\n"
38147"  vseparator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);\n"
38148"  hseparator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);\n"
38149"\n"
38150"  grid = gtk_grid_new ();\n"
38151"\n"
38152"  gtk_grid_attach (GTK_GRID (grid), label1, 0, 0, 3, 1);\n"
38153"  gtk_grid_attach (GTK_GRID (grid), hseparator, 0, 1, 3, 1);\n"
38154"  gtk_grid_attach (GTK_GRID (grid), label2, 0, 2, 1, 1);\n"
38155"  gtk_grid_attach (GTK_GRID (grid), vseparator, 1, 2, 1, 1);\n"
38156"  gtk_grid_attach (GTK_GRID (grid), label3, 2, 2, 1, 1);\n"
38157"\n"
38158"  gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);\n"
38159"\n"
38160"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
38161"\n"
38162"  gtk_widget_show_all (window);\n"
38163"}\n"
38164"\n"
38165"int\n"
38166"main (int argc, char **argv)\n"
38167"{\n"
38168"  GtkApplication *app;\n"
38169"  int status;\n"
38170"\n"
38171"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
38172"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
38173"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
38174"  g_object_unref (app);\n"
38175"  return status;\n"
38176"}\n"
38177
38178#. (itstool) path: section/title
38179#: C/separator.c.page:35 C/separator.py.page:36 C/separator.vala.page:37
38180msgid "API Reference"
38181msgstr "API 참고"
38182
38183#. (itstool) path: item/p
38184#: C/separator.c.page:39 C/separator.py.page:40
38185msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSeparator.html\">GtkSeparator</link>"
38186msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSeparator.html\">GtkSeparator</link>"
38187
38188#. (itstool) path: info/title
38189#: C/separator.py.page:8
38190msgctxt "text"
38191msgid "Separator (Python)"
38192msgstr "구분선(Python)"
38193
38194#. (itstool) path: section/code
38195#: C/separator.py.page:32
38196#, no-wrap
38197msgid ""
38198"from gi.repository import Gtk\n"
38199"import sys\n"
38200"\n"
38201"\n"
38202"class MyWindow(Gtk.ApplicationWindow):\n"
38203"\n"
38204"    def __init__(self, app):\n"
38205"        Gtk.Window.__init__(self, title=\"Separator Example\", application=app)\n"
38206"\n"
38207"        # three labels\n"
38208"        label1 = Gtk.Label()\n"
38209"        label1.set_text(\"Below, a horizontal separator.\")\n"
38210"\n"
38211"        label2 = Gtk.Label()\n"
38212"        label2.set_text(\"On the right, a vertical separator.\")\n"
38213"\n"
38214"        label3 = Gtk.Label()\n"
38215"        label3.set_text(\"On the left, a vertical separator.\")\n"
38216"\n"
38217"        # a horizontal separator\n"
38218"        hseparator = Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL)\n"
38219"        # a vertical separator\n"
38220"        vseparator = Gtk.Separator(orientation=Gtk.Orientation.VERTICAL)\n"
38221"\n"
38222"        # a grid to attach labels and separators\n"
38223"        grid = Gtk.Grid()\n"
38224"        grid.attach(label1, 0, 0, 3, 1)\n"
38225"        grid.attach(hseparator, 0, 1, 3, 1)\n"
38226"        grid.attach(label2, 0, 2, 1, 1)\n"
38227"        grid.attach(vseparator, 1, 2, 1, 1)\n"
38228"        grid.attach(label3, 2, 2, 1, 1)\n"
38229"        grid.set_column_homogeneous(True)\n"
38230"        # add the grid to the window\n"
38231"        self.add(grid)\n"
38232"\n"
38233"\n"
38234"class MyApplication(Gtk.Application):\n"
38235"\n"
38236"    def __init__(self):\n"
38237"        Gtk.Application.__init__(self)\n"
38238"\n"
38239"    def do_activate(self):\n"
38240"        win = MyWindow(self)\n"
38241"        win.show_all()\n"
38242"\n"
38243"app = MyApplication()\n"
38244"exit_status = app.run(sys.argv)\n"
38245"sys.exit(exit_status)\n"
38246msgstr ""
38247"from gi.repository import Gtk\n"
38248"import sys\n"
38249"\n"
38250"\n"
38251"class MyWindow(Gtk.ApplicationWindow):\n"
38252"\n"
38253"    def __init__(self, app):\n"
38254"        Gtk.Window.__init__(self, title=\"Separator Example\", application=app)\n"
38255"\n"
38256"        # three labels\n"
38257"        label1 = Gtk.Label()\n"
38258"        label1.set_text(\"Below, a horizontal separator.\")\n"
38259"\n"
38260"        label2 = Gtk.Label()\n"
38261"        label2.set_text(\"On the right, a vertical separator.\")\n"
38262"\n"
38263"        label3 = Gtk.Label()\n"
38264"        label3.set_text(\"On the left, a vertical separator.\")\n"
38265"\n"
38266"        # a horizontal separator\n"
38267"        hseparator = Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL)\n"
38268"        # a vertical separator\n"
38269"        vseparator = Gtk.Separator(orientation=Gtk.Orientation.VERTICAL)\n"
38270"\n"
38271"        # a grid to attach labels and separators\n"
38272"        grid = Gtk.Grid()\n"
38273"        grid.attach(label1, 0, 0, 3, 1)\n"
38274"        grid.attach(hseparator, 0, 1, 3, 1)\n"
38275"        grid.attach(label2, 0, 2, 1, 1)\n"
38276"        grid.attach(vseparator, 1, 2, 1, 1)\n"
38277"        grid.attach(label3, 2, 2, 1, 1)\n"
38278"        grid.set_column_homogeneous(True)\n"
38279"        # add the grid to the window\n"
38280"        self.add(grid)\n"
38281"\n"
38282"\n"
38283"class MyApplication(Gtk.Application):\n"
38284"\n"
38285"    def __init__(self):\n"
38286"        Gtk.Application.__init__(self)\n"
38287"\n"
38288"    def do_activate(self):\n"
38289"        win = MyWindow(self)\n"
38290"        win.show_all()\n"
38291"\n"
38292"app = MyApplication()\n"
38293"exit_status = app.run(sys.argv)\n"
38294"sys.exit(exit_status)\n"
38295
38296#. (itstool) path: info/title
38297#: C/separator.vala.page:8
38298msgctxt "text"
38299msgid "Separator (Vala)"
38300msgstr "구분선(Vala)"
38301
38302#. (itstool) path: section/code
38303#: C/separator.vala.page:33
38304#, no-wrap
38305msgid ""
38306"/* This is the application. */\n"
38307"public class Application : Gtk.Application {\n"
38308"\n"
38309"\tpublic Application () {\n"
38310"\t\tObject (application_id: \"org.example.window\");\n"
38311"\t}\n"
38312"\n"
38313"\t/* Override the 'activate' signal of GLib.Application,\n"
38314"\t * which is inherited by Gtk.Application. */\n"
38315"\tpublic override void activate () {\n"
38316"\n"
38317"\t\tvar window = new Gtk.Window ();\n"
38318"\t\twindow.title = \"Separator Example\";\n"
38319"\n"
38320"\t\tvar label1 = new Gtk.Label (\"Below, a horizontal separator.\");\n"
38321"\t\tvar label2 = new Gtk.Label (\"On the right, a vertical separator.\");\n"
38322"\t\tvar label3 = new Gtk.Label (\"On the left, a vertical separator.\");\n"
38323"\n"
38324"\t\tvar hseparator = new Gtk.Separator (Gtk.Orientation.HORIZONTAL);\n"
38325"\t\tvar vseparator = new Gtk.Separator (Gtk.Orientation.VERTICAL);\n"
38326"\n"
38327"\t\tvar grid = new Gtk.Grid();\n"
38328"\n"
38329"\t\tgrid.attach (label1, 0, 0, 3, 1);\n"
38330"\t\tgrid.attach (hseparator, 0, 1, 3, 1);\n"
38331"\t\tgrid.attach (label2, 0, 2, 1, 1);\n"
38332"\t\tgrid.attach (vseparator, 1, 2, 1, 1);\n"
38333"\t\tgrid.attach (label3, 2, 2, 1, 1);\n"
38334"\n"
38335"\t\tgrid.set_column_homogeneous(true);\n"
38336"\n"
38337"\t\twindow.add (grid);\n"
38338"\t\tthis.add_window (window);\n"
38339"\n"
38340"\t\twindow.show_all ();\n"
38341"\t}\n"
38342"}\n"
38343"\n"
38344"/* The main function creates the application and runs it.*/\n"
38345"int main (string[] args) {\n"
38346"\tvar app = new Application ();\n"
38347"\treturn app.run (args);\n"
38348"}\n"
38349msgstr ""
38350"/* This is the application. */\n"
38351"public class Application : Gtk.Application {\n"
38352"\n"
38353"\tpublic Application () {\n"
38354"\t\tObject (application_id: \"org.example.window\");\n"
38355"\t}\n"
38356"\n"
38357"\t/* Override the 'activate' signal of GLib.Application,\n"
38358"\t * which is inherited by Gtk.Application. */\n"
38359"\tpublic override void activate () {\n"
38360"\n"
38361"\t\tvar window = new Gtk.Window ();\n"
38362"\t\twindow.title = \"Separator Example\";\n"
38363"\n"
38364"\t\tvar label1 = new Gtk.Label (\"Below, a horizontal separator.\");\n"
38365"\t\tvar label2 = new Gtk.Label (\"On the right, a vertical separator.\");\n"
38366"\t\tvar label3 = new Gtk.Label (\"On the left, a vertical separator.\");\n"
38367"\n"
38368"\t\tvar hseparator = new Gtk.Separator (Gtk.Orientation.HORIZONTAL);\n"
38369"\t\tvar vseparator = new Gtk.Separator (Gtk.Orientation.VERTICAL);\n"
38370"\n"
38371"\t\tvar grid = new Gtk.Grid();\n"
38372"\n"
38373"\t\tgrid.attach (label1, 0, 0, 3, 1);\n"
38374"\t\tgrid.attach (hseparator, 0, 1, 3, 1);\n"
38375"\t\tgrid.attach (label2, 0, 2, 1, 1);\n"
38376"\t\tgrid.attach (vseparator, 1, 2, 1, 1);\n"
38377"\t\tgrid.attach (label3, 2, 2, 1, 1);\n"
38378"\n"
38379"\t\tgrid.set_column_homogeneous(true);\n"
38380"\n"
38381"\t\twindow.add (grid);\n"
38382"\t\tthis.add_window (window);\n"
38383"\n"
38384"\t\twindow.show_all ();\n"
38385"\t}\n"
38386"}\n"
38387"\n"
38388"/* The main function creates the application and runs it.*/\n"
38389"int main (string[] args) {\n"
38390"\tvar app = new Application ();\n"
38391"\treturn app.run (args);\n"
38392"}\n"
38393
38394#. (itstool) path: item/p
38395#: C/separator.vala.page:41
38396msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.html\">GtkWindow</link>"
38397msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.html\">GtkWindow</link>"
38398
38399#. (itstool) path: item/p
38400#: C/separator.vala.page:42
38401msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Separator.html\">GtkSeparator</link>"
38402msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Separator.html\">GtkSeparator</link>"
38403
38404#. (itstool) path: item/p
38405#: C/separator.vala.page:43
38406msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Grid.html\">GtkGrid</link>"
38407msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Grid.html\">GtkGrid</link>"
38408
38409#. (itstool) path: item/p
38410#: C/separator.vala.page:44
38411msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Label.html\">GtkLabel</link>"
38412msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Label.html\">GtkLabel</link>"
38413
38414#. (itstool) path: page/title
38415#: C/set-up-gedit.js.page:19
38416msgid "Set up gedit for JavaScript development"
38417msgstr "JavaScript 개발용 지에디트 설정"
38418
38419#. (itstool) path: page/p
38420#: C/set-up-gedit.js.page:20
38421msgid ""
38422"This tutorial will show you how to set up <link href=\"http://projects.gnome.org/gedit/\">gedit</link>, GNOME's "
38423"basic text editor, so that it has a handful of extra features which are useful for writing JavaScript code."
38424msgstr ""
38425"이 따라하기 지침서는 그놈 기본 텍스트 편집기 <link href=\"http://projects.gnome.org/gedit/\">지에디트</link> 설정 "
38426"방법을 보여주어 JavaScript 코드 작성에 쓸만한 추가 기능을 활성화할 수 있게 합니다."
38427
38428#. (itstool) path: section/title
38429#: C/set-up-gedit.js.page:23
38430msgid "Making code clearer"
38431msgstr "코드를 명확하게 하기"
38432
38433#. (itstool) path: section/p
38434#: C/set-up-gedit.js.page:24
38435msgid ""
38436"Click on <gui>Edit</gui> in gedit's menu bar, then click on <gui>Preferences</gui>. You should see something like "
38437"this:"
38438msgstr ""
38439"지에디트 메뉴 표시줄에서 <gui>편집</gui>을 누르고 <gui>기본 설정</gui>을 누르십시오. 다음과 같은 화면을 볼 수 있습"
38440"니다:"
38441
38442#. (itstool) path: section/media
38443#. This is a reference to an external file such as an image or video. When
38444#. the file changes, the md5 hash will change to let you know you need to
38445#. update your localized copy. The msgstr is not used at all. Set it to
38446#. whatever you like once you have updated your copy of the file.
38447#: C/set-up-gedit.js.page:25
38448msgctxt "_"
38449msgid "external ref='media/geditview.png' md5='f1438295662d95f56fcd1d8200efaaf2'"
38450msgstr ""
38451
38452#. (itstool) path: section/p
38453#: C/set-up-gedit.js.page:26
38454msgid "Here are the options you want to make sure are turned on."
38455msgstr "활성화 여부를 확인할 옵션은 다음과 같습니다."
38456
38457#. (itstool) path: item/p
38458#: C/set-up-gedit.js.page:28
38459msgid ""
38460"<gui>Display line numbers</gui> will help you compare the code you type in with the original, and make it easier "
38461"to see which line is causing an error if there is a bug."
38462msgstr ""
38463"<gui>줄 번호 표시</gui> 옵션은 원래 여러분이 입력한 코드를 비교할 때 도움을 주며, 버그가 있을 경우 오류가 난 줄을 "
38464"쉽게 찾아볼 수 있습니다."
38465
38466#. (itstool) path: item/p
38467#: C/set-up-gedit.js.page:29
38468msgid ""
38469"<gui>Highlight current line</gui> makes it easier to see which line you're on, when you have to go back and forth "
38470"a lot."
38471msgstr ""
38472"<gui>현재 줄 강조</gui> 옵션은 줄 위아래로 왔다갔다 하고 있을 때 몇번째 줄을 편집하고 있는지 쉽게 살펴볼 수 있게 합"
38473"니다."
38474
38475#. (itstool) path: item/p
38476#: C/set-up-gedit.js.page:30
38477msgid "<gui>Highlight matching brackets</gui> helps you make sure you didn't leave out a bracket by accident."
38478msgstr "<gui>일치하는 대괄호 강조</gui> 옵션은 실수로 괄호를 빼먹었는지 확인할 수 있게 합니다."
38479
38480#. (itstool) path: section/title
38481#: C/set-up-gedit.js.page:35
38482msgid "Making editing easier"
38483msgstr "코드 편집을 쉽게 하기"
38484
38485#. (itstool) path: section/p
38486#: C/set-up-gedit.js.page:36
38487msgid ""
38488"In gedit's <gui>Preferences</gui> dialog, click on the <gui>Editor</gui> tab. You should see something like this:"
38489msgstr ""
38490"지에디트의 <gui>기본 설정</gui> 대화상자에서  <gui>편집기</gui> 탭을 누르십시오. 다음과 같은 화면을 볼 수 있습니다:"
38491
38492#. (itstool) path: section/media
38493#. This is a reference to an external file such as an image or video. When
38494#. the file changes, the md5 hash will change to let you know you need to
38495#. update your localized copy. The msgstr is not used at all. Set it to
38496#. whatever you like once you have updated your copy of the file.
38497#: C/set-up-gedit.js.page:37
38498msgctxt "_"
38499msgid "external ref='media/gediteditor.png' md5='50db1ee8f2c545744879ee9fba5b4b24'"
38500msgstr ""
38501
38502#. (itstool) path: section/p
38503#: C/set-up-gedit.js.page:38
38504msgid ""
38505"Here, you want to have <gui>Enable automatic indentation</gui> turned on. This means that when you hit <key>Enter</"
38506"key> the cursor stays indented as far as the last line was. This is extremely useful when writing JavaScript code, "
38507"since it uses indentation to make it clearer which parts do what."
38508msgstr ""
38509"<gui>자동 들여 쓰기 사용</gui>을 원하실지도 모르겠습니다. <key>Enter</key>키를 치면 마지막 줄을 들여쓴 만큼 커서를 "
38510"둡니다. 들여쓸 부분에 들여쓰기를 사용하여 코드를 더 알아보기 쉽게 하므로, JavaScript 코드를 작성할 때 상당히 쓸만합"
38511"니다."
38512
38513#. (itstool) path: note/p
38514#: C/set-up-gedit.js.page:39
38515msgid ""
38516"If you want to share code with other people who write GNOME JavaScript applications, you'll also want to set "
38517"<gui>Tab width</gui> to 4 and turn on <gui>Insert spaces instead of tabs</gui>."
38518msgstr ""
38519"그놈 JavaScript 프로그램을 작성하는 다른 사람과 코드를 공유하려 한다면, <gui>탭 간격</gui> 을 4로 설정하고 <gui>탭 "
38520"대신 공백 입력</gui>을 사용하십시오."
38521
38522#. (itstool) path: info/title
38523#: C/signals-callbacks.py.page:9
38524msgctxt "text"
38525msgid "Signals and callbacks (Python)"
38526msgstr "시그널과 콜백 함수(Python)"
38527
38528#. (itstool) path: info/desc
38529#: C/signals-callbacks.py.page:14
38530msgid "An explanation of signals and callbacks in GTK+."
38531msgstr "GTK+의 시그널과 콜백 함수를 설명합니다."
38532
38533#. (itstool) path: page/title
38534#: C/signals-callbacks.py.page:27
38535msgid "Signals and callbacks"
38536msgstr "시그널과 콜백 함수"
38537
38538#. (itstool) path: section/p
38539#: C/signals-callbacks.py.page:34
38540msgid ""
38541"Like most GUI toolkits, GTK+ uses an event-driven programming model. When the user is doing nothing, GTK+ sits in "
38542"the main loop and waits for input. If the user performs some action - say, a mouse click - then the main loop "
38543"\"wakes up\" and delivers an event to GTK+."
38544msgstr ""
38545"GUI 툴킷처럼 GTK+ 에도 이벤트 주도 프로그래밍 모델을 사용합니다. 사용자가 아무 동작도 취하지 않으면 GTK+는 메인 루"
38546"프상에 머무르며 입력을 기다립니다. 사용자가 어떤 동작을 취하면 - 마우스 클릭이라 칩시다 - 메인 루프가 \"깨어나고\" "
38547"GTK+에 이벤트를 전달합니다."
38548
38549#. (itstool) path: section/p
38550#: C/signals-callbacks.py.page:36
38551msgid ""
38552"When widgets receive an event, they frequently emit one or more signals. Signals notify your program that "
38553"\"something interesting happened\" by invoking functions you have connected to the signal. Such functions are "
38554"commonly known as callbacks. When your callbacks are invoked, you would typically take some action. After a "
38555"callback finishes, GTK+ will return to the main loop and await more user input."
38556msgstr ""
38557"위젯에서 이벤트를 받으면 하나 이상의 시그널을 내보냅니다. 시그널은 프로그램에 \"기다리고 있던 무슨 일이 일어났다"
38558"\"는 사실을 시그널에 연결한 함수를 실행하여 알립니다. 이런 함수는 보통 콜백이라고 합니다. 콜백 함수를 실행하면 보"
38559"통 어떤 동작을 취합니다. 콜백 함수 실행이 끝나면 GTK+에서 메인 루프로 돌아와서 다른 사용자의 입력을 기다립니다."
38560
38561#. (itstool) path: section/p
38562#: C/signals-callbacks.py.page:38
38563msgid ""
38564"A generic example is: <code>handler_id = widget.connect(\"event\", callback, data)</code>. <code>widget</code> is "
38565"an instance of a widget we created earlier. Next, the <code>event</code> we are interested in. Each widget has its "
38566"own particular events which can occur. For instance, if you have a Gtk.Button you usually want to connect to the "
38567"\"clicked\" event: this means that when the button is clicked, the signal is issued. Another example is the "
38568"<code>notify::property</code> signal: whenever a <link xref=\"properties.py\">property</link> is modified on a "
38569"GObject, instead of just emitting the <code>notify</code> signal, GObject associates as a detail to this signal "
38570"emission the name of the property modified. This allows clients who wish to be notified of changes to only one "
38571"property to filter most events before receiving them. Thirdly, the callback argument is the name of the callback "
38572"function, which contains the code which runs when signals of the specified type are issued. Finally, the optional "
38573"data argument includes any data which should be passed when the signal is issued."
38574msgstr ""
38575"일반적인 예를 들자면 <code>handler_id = widget.connect(\"event\", callback, data)</code> 코드가 있습니다. "
38576"<code>widget</code>는 우리가 앞서 만든 인스턴스입니다. 그 다음 <code>event</code>는 우리가 기다리는 부분입니다. 각 "
38577"위젯은 사용자의 동작으로 나타나는 자체 이벤트가 있습니다. 예를 들어 Gtk.Button에서 보통 여러분은 \"clicked\" 이벤트"
38578"에 연결하고 싶어합니다. 단추를 누르면 시그널이 나온단 얘깁니다. 다른 예를 들자면 <code>notify::property</code> 시그"
38579"널을 들 수 있습니다. GObject에서 언제든 <link xref=\"properties.py\">property</link>를 수정했든지간에 "
38580"<code>notify</code> 시그널을 내보내는 대신, GObject에서 수정한 속성 이름으로 더욱 자세한 상황을 시그널로 내보냅니"
38581"다. 이런 방식을 통해 여러 이벤트 중 오직 하나의 속성이 바뀐 사실에 대해서만 받을 수 있습니다. 세번째로 이 콜백 매개"
38582"변수는 콜백 함수의 인자 이름이며, 이 매개변수에는 지정 형식으로 시그널을 내보냈을때 실행할 코드가 들어있습니다. 마"
38583"지막으로, 추가 데이터 인자에는 시그널을 내보냈을 떄 전달해야 할 데이터가 들어갑니다."
38584
38585#. (itstool) path: section/p
38586#: C/signals-callbacks.py.page:40
38587msgid ""
38588"The function returns a number (the <code>handler_id</code>) that identifies this particular signal-callback pair. "
38589"This number is required to disconnect from a signal such that the callback function will not be called during any "
38590"future or currently ongoing emissions of the signal it has been connected to, as in <code>widget."
38591"disconnect(handler_id)</code>."
38592msgstr ""
38593"함수에서는 이 시그널-콜백 함수 쌍을 구분하는 번호(<code>handler_id</code>) 값을 반환합니다. 이 번호 값은 "
38594"<code>widget.disconnect(handler_id)</code> 처럼 시그널에서 앞으로 쓸 일이 없는 콜백 함수를 끊거나 시그널을 계속 내"
38595"보내는 상황일 경우 필요합니다."
38596
38597#. (itstool) path: section/p
38598#: C/signals-callbacks.py.page:47
38599msgid "<link href=\"http://developer.gnome.org/gobject/stable/signal.html\">Signals</link> in GObject documentation"
38600msgstr "GObject 문서의 <link href=\"http://developer.gnome.org/gobject/stable/signal.html\">시그널</link>"
38601
38602#. (itstool) path: section/p
38603#: C/signals-callbacks.py.page:48
38604msgid ""
38605"<link href=\"http://python-gtk-3-tutorial.readthedocs.org/en/latest/basics.html\">Basics - Main loop and Signals</"
38606"link> in Python GTK+ 3 Tutorial"
38607msgstr ""
38608"Python GTK+ 3 따라하기 지침의 <link href=\"http://python-gtk-3-tutorial.readthedocs.org/en/latest/basics.html\">메"
38609"인 루프와 시그널 기본</link>"
38610
38611#. (itstool) path: info/title
38612#: C/spinbutton.c.page:8
38613msgctxt "text"
38614msgid "SpinButton (C)"
38615msgstr "SpinButton (C)"
38616
38617#. (itstool) path: info/desc
38618#: C/spinbutton.c.page:21
38619msgid "Retrieve an integer or floating point number"
38620msgstr "정수 또는 소수를 가져옵니다"
38621
38622#. (itstool) path: page/title
38623#: C/spinbutton.c.page:24 C/spinbutton.js.page:24 C/spinbutton.py.page:23 C/spinbutton.vala.page:23
38624msgid "SpinButton"
38625msgstr "SpinButton"
38626
38627#. (itstool) path: page/media
38628#. This is a reference to an external file such as an image or video. When
38629#. the file changes, the md5 hash will change to let you know you need to
38630#. update your localized copy. The msgstr is not used at all. Set it to
38631#. whatever you like once you have updated your copy of the file.
38632#: C/spinbutton.c.page:26 C/spinbutton.py.page:24 C/spinbutton.vala.page:24
38633msgctxt "_"
38634msgid "external ref='media/spinbutton.png' md5='993cbb7d9bd271a329727a926195712a'"
38635msgstr ""
38636
38637#. (itstool) path: page/p
38638#: C/spinbutton.c.page:27 C/spinbutton.py.page:25 C/spinbutton.vala.page:25
38639msgid "Choose a number, by entering it or by clicking on the -/+ buttons!"
38640msgstr "숫자를 입력하거나 -/+ 단추를 눌러 입력 숫자를 선택합니다!"
38641
38642#. (itstool) path: page/code
38643#: C/spinbutton.c.page:29
38644#, no-wrap
38645msgid ""
38646"\n"
38647"#include &lt;gtk/gtk.h&gt;\n"
38648"\n"
38649"\n"
38650"\n"
38651"/* This is the callback function. \n"
38652" * It is a handler function which reacts to the signal. \n"
38653" * In this case, it will notify the user the value of their spinbutton \n"
38654" * as a label.\n"
38655" */\n"
38656"static void\n"
38657"spin_clicked (GtkSpinButton *spinbutton,\n"
38658"              gpointer       user_data)\n"
38659"{\n"
38660"   GtkWidget *label = user_data;\n"
38661"   gint value = gtk_spin_button_get_value_as_int (spinbutton);\n"
38662"\n"
38663"   /* %d - Is used when printing integers.\n"
38664"    * Note: Using g_strdup_printf returns a string that must be freed. \n"
38665"    * (In which is done below)\n"
38666"    */\n"
38667"   gchar *str = g_strdup_printf (\"The number you selected is %d.\", value);\n"
38668"   gtk_label_set_text (GTK_LABEL (label), str);\n"
38669"\n"
38670"   g_free(str);\n"
38671"}\n"
38672"\n"
38673"\n"
38674"\n"
38675"static void\n"
38676"activate (GtkApplication *app,\n"
38677"          gpointer        user_data)\n"
38678"{\n"
38679"  /* Declare variables */\n"
38680"  GtkWidget *window;\n"
38681"  GtkWidget *label;\n"
38682"  GtkWidget *grid;\n"
38683"  GtkWidget *spin_button;\n"
38684"  GtkAdjustment *adjustment;\n"
38685"\n"
38686"\n"
38687"  /* Create a window with a title, a border width, and a default size */\n"
38688"  window = gtk_application_window_new (app);\n"
38689"  gtk_window_set_title (GTK_WINDOW (window), \"SpinButton Example\");\n"
38690"  gtk_window_set_default_size (GTK_WINDOW (window), 210, 70);\n"
38691"  gtk_container_set_border_width (GTK_CONTAINER (window), 5);\n"
38692"\n"
38693"  /* Create a label to be shown in the window */\n"
38694"  label = gtk_label_new (\"Choose a number\");\n"
38695"\n"
38696"  /* Create an adjustment representing an adjustable bounded value */\n"
38697"  adjustment = gtk_adjustment_new (0, 0, 100, 1, 0, 0);\n"
38698"\n"
38699"\n"
38700"  /* Create a spin button that is to be as wide as possible */\n"
38701"  spin_button = gtk_spin_button_new (adjustment, 1, 0);\n"
38702"  gtk_widget_set_hexpand (spin_button, TRUE);\n"
38703"  \n"
38704"  /* Connecting the \"value-changed\" signal for the spinbutton \n"
38705"   * to the appropriate callback function. \n"
38706"   */\n"
38707"  g_signal_connect (spin_button, \n"
38708"                    \"value-changed\", \n"
38709"                    G_CALLBACK (spin_clicked), \n"
38710"                    label);\n"
38711"\n"
38712"\n"
38713"  /* Create a grid and arrange everything accordingly */\n"
38714"  grid = gtk_grid_new ();\n"
38715"  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);\n"
38716"  gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);\n"
38717"  gtk_grid_attach (GTK_GRID (grid), spin_button, 0, 0, 1, 1);\n"
38718"  gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);\n"
38719"  \n"
38720"\n"
38721"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
38722"\n"
38723"  gtk_widget_show_all (window);\n"
38724"}\n"
38725"\n"
38726"\n"
38727"\n"
38728"int\n"
38729"main (int argc, char **argv)\n"
38730"{\n"
38731"  GtkApplication *app;\n"
38732"  int status;\n"
38733"\n"
38734"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
38735"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
38736"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
38737"  g_object_unref (app);\n"
38738"\n"
38739"  return status;\n"
38740"}\n"
38741msgstr ""
38742"\n"
38743"#include &lt;gtk/gtk.h&gt;\n"
38744"\n"
38745"\n"
38746"\n"
38747"/* This is the callback function. \n"
38748" * It is a handler function which reacts to the signal. \n"
38749" * In this case, it will notify the user the value of their spinbutton \n"
38750" * as a label.\n"
38751" */\n"
38752"static void\n"
38753"spin_clicked (GtkSpinButton *spinbutton,\n"
38754"              gpointer       user_data)\n"
38755"{\n"
38756"   GtkWidget *label = user_data;\n"
38757"   gint value = gtk_spin_button_get_value_as_int (spinbutton);\n"
38758"\n"
38759"   /* %d - Is used when printing integers.\n"
38760"    * Note: Using g_strdup_printf returns a string that must be freed. \n"
38761"    * (In which is done below)\n"
38762"    */\n"
38763"   gchar *str = g_strdup_printf (\"The number you selected is %d.\", value);\n"
38764"   gtk_label_set_text (GTK_LABEL (label), str);\n"
38765"\n"
38766"   g_free(str);\n"
38767"}\n"
38768"\n"
38769"\n"
38770"\n"
38771"static void\n"
38772"activate (GtkApplication *app,\n"
38773"          gpointer        user_data)\n"
38774"{\n"
38775"  /* Declare variables */\n"
38776"  GtkWidget *window;\n"
38777"  GtkWidget *label;\n"
38778"  GtkWidget *grid;\n"
38779"  GtkWidget *spin_button;\n"
38780"  GtkAdjustment *adjustment;\n"
38781"\n"
38782"\n"
38783"  /* Create a window with a title, a border width, and a default size */\n"
38784"  window = gtk_application_window_new (app);\n"
38785"  gtk_window_set_title (GTK_WINDOW (window), \"SpinButton Example\");\n"
38786"  gtk_window_set_default_size (GTK_WINDOW (window), 210, 70);\n"
38787"  gtk_container_set_border_width (GTK_CONTAINER (window), 5);\n"
38788"\n"
38789"  /* Create a label to be shown in the window */\n"
38790"  label = gtk_label_new (\"Choose a number\");\n"
38791"\n"
38792"  /* Create an adjustment representing an adjustable bounded value */\n"
38793"  adjustment = gtk_adjustment_new (0, 0, 100, 1, 0, 0);\n"
38794"\n"
38795"\n"
38796"  /* Create a spin button that is to be as wide as possible */\n"
38797"  spin_button = gtk_spin_button_new (adjustment, 1, 0);\n"
38798"  gtk_widget_set_hexpand (spin_button, TRUE);\n"
38799"  \n"
38800"  /* Connecting the \"value-changed\" signal for the spinbutton \n"
38801"   * to the appropriate callback function. \n"
38802"   */\n"
38803"  g_signal_connect (spin_button, \n"
38804"                    \"value-changed\", \n"
38805"                    G_CALLBACK (spin_clicked), \n"
38806"                    label);\n"
38807"\n"
38808"\n"
38809"  /* Create a grid and arrange everything accordingly */\n"
38810"  grid = gtk_grid_new ();\n"
38811"  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);\n"
38812"  gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);\n"
38813"  gtk_grid_attach (GTK_GRID (grid), spin_button, 0, 0, 1, 1);\n"
38814"  gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);\n"
38815"  \n"
38816"\n"
38817"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
38818"\n"
38819"  gtk_widget_show_all (window);\n"
38820"}\n"
38821"\n"
38822"\n"
38823"\n"
38824"int\n"
38825"main (int argc, char **argv)\n"
38826"{\n"
38827"  GtkApplication *app;\n"
38828"  int status;\n"
38829"\n"
38830"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
38831"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
38832"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
38833"  g_object_unref (app);\n"
38834"\n"
38835"  return status;\n"
38836"}\n"
38837
38838#. (itstool) path: item/p
38839#: C/spinbutton.c.page:37
38840msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkSpinButton.html\">GtkSpinButton</link>"
38841msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkSpinButton.html\">GtkSpinButton</link>"
38842
38843#. (itstool) path: info/title
38844#: C/spinbutton.js.page:8
38845msgctxt "text"
38846msgid "SpinButton (JavaScript)"
38847msgstr "SpinButton (JavaScript)"
38848
38849#. (itstool) path: info/desc
38850#: C/spinbutton.js.page:21
38851msgid "A number entry field that has + and - buttons"
38852msgstr "+ 단추와 - 단추가 있는 숫자 항목 필드"
38853
38854#. (itstool) path: page/media
38855#. This is a reference to an external file such as an image or video. When
38856#. the file changes, the md5 hash will change to let you know you need to
38857#. update your localized copy. The msgstr is not used at all. Set it to
38858#. whatever you like once you have updated your copy of the file.
38859#: C/spinbutton.js.page:25
38860msgctxt "_"
38861msgid "external ref='media/spinbuttonkittens.png' md5='577cce8a902140aacbab73fe8a76a010'"
38862msgstr ""
38863
38864#. (itstool) path: page/p
38865#: C/spinbutton.js.page:26
38866msgid ""
38867"A SpinButton is not related to a <link xref=\"spinner.js\">Spinner</link>. It's a text entry field which only "
38868"accepts numbers, and which has plus and minus buttons to let you change the value without having to type anything "
38869"in."
38870msgstr ""
38871"SpinButton은 <link xref=\"spinner.js\">Spinner</link>와는 관련이 없습니다. 숫자 값만 받는 텍스트 항목 빌드이며, 더"
38872"하기 빼기 단추가 있어 직접 입력받지 않고도 숫자 값을 입력 받을 수 있습니다."
38873
38874#. (itstool) path: page/p
38875#: C/spinbutton.js.page:27
38876msgid ""
38877"It's best used when it's obvious that only a number can be entered into it. In this example, two SpinButtons are "
38878"used for the number of kittens and number of cans of tuna to give them."
38879msgstr ""
38880"숫자만 입력할 수 있다는게 명백하다면 최상의 용도입니다. 이 예제에서는 SpinButton 두개를 활용하여 고양이 수랑 참치"
38881"캔 수를 입력합니다."
38882
38883#. (itstool) path: section/code
38884#: C/spinbutton.js.page:44
38885#, no-wrap
38886msgid ""
38887"\n"
38888"const SpinButtonExample = new Lang.Class({\n"
38889"    Name: 'SpinButton Example',\n"
38890"\n"
38891"    // Create the application itself\n"
38892"    _init: function() {\n"
38893"        this.application = new Gtk.Application({\n"
38894"            application_id: 'org.example.jsspinbutton'\n"
38895"        });\n"
38896"\n"
38897"    // Connect 'activate' and 'startup' signals to the callback functions\n"
38898"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
38899"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
38900"    },\n"
38901"\n"
38902"    // Callback function for 'activate' signal presents window when active\n"
38903"    _onActivate: function() {\n"
38904"        this._window.present();\n"
38905"    },\n"
38906"\n"
38907"    // Callback function for 'startup' signal builds the UI\n"
38908"    _onStartup: function() {\n"
38909"        this._buildUI ();\n"
38910"    },\n"
38911msgstr ""
38912"\n"
38913"const SpinButtonExample = new Lang.Class({\n"
38914"    Name: 'SpinButton Example',\n"
38915"\n"
38916"    // Create the application itself\n"
38917"    _init: function() {\n"
38918"        this.application = new Gtk.Application({\n"
38919"            application_id: 'org.example.jsspinbutton'\n"
38920"        });\n"
38921"\n"
38922"    // Connect 'activate' and 'startup' signals to the callback functions\n"
38923"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
38924"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
38925"    },\n"
38926"\n"
38927"    // Callback function for 'activate' signal presents window when active\n"
38928"    _onActivate: function() {\n"
38929"        this._window.present();\n"
38930"    },\n"
38931"\n"
38932"    // Callback function for 'startup' signal builds the UI\n"
38933"    _onStartup: function() {\n"
38934"        this._buildUI ();\n"
38935"    },\n"
38936
38937#. (itstool) path: section/p
38938#: C/spinbutton.js.page:69
38939msgid ""
38940"All the code for this sample goes in the SpinButtonExample class. The above code creates a <link href=\"http://www."
38941"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to go "
38942"in."
38943msgstr ""
38944"이 예제의 모든 코드는 SpinButtonExample 클래스에 들어갑니다. 위 코드는 위젯과 창이 들어가는 <link href=\"http://"
38945"www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만듭니다."
38946
38947#. (itstool) path: section/code
38948#: C/spinbutton.js.page:70
38949#, no-wrap
38950msgid ""
38951"\n"
38952"    // Build the application's UI\n"
38953"    _buildUI: function() {\n"
38954"\n"
38955"        // Create the application window\n"
38956"        this._window = new Gtk.ApplicationWindow({\n"
38957"            application: this.application,\n"
38958"            window_position: Gtk.WindowPosition.CENTER,\n"
38959"            border_width: 20,\n"
38960"            title: \"Kitten Feeder\"});\n"
38961msgstr ""
38962"\n"
38963"    // Build the application's UI\n"
38964"    _buildUI: function() {\n"
38965"\n"
38966"        // Create the application window\n"
38967"        this._window = new Gtk.ApplicationWindow({\n"
38968"            application: this.application,\n"
38969"            window_position: Gtk.WindowPosition.CENTER,\n"
38970"            border_width: 20,\n"
38971"            title: \"Kitten Feeder\"});\n"
38972
38973#. (itstool) path: section/title
38974#: C/spinbutton.js.page:85
38975msgid "Creating the SpinButtons"
38976msgstr "SpinButton 만들기"
38977
38978#. (itstool) path: section/code
38979#: C/spinbutton.js.page:86
38980#, no-wrap
38981msgid ""
38982"\n"
38983"        // Create the first spinbutton using a function\n"
38984"        this._kittens = Gtk.SpinButton.new_with_range (1, 9001, 1);\n"
38985"        this._kittens.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
38986msgstr ""
38987"\n"
38988"        // Create the first spinbutton using a function\n"
38989"        this._kittens = Gtk.SpinButton.new_with_range (1, 9001, 1);\n"
38990"        this._kittens.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
38991
38992#. (itstool) path: section/p
38993#: C/spinbutton.js.page:92
38994msgid ""
38995"We can use the new_with_range function to create a new SpinButton quickly. Its first parameter is the SpinButton's "
38996"starting value, its second is the maximum value, and its third is how much to increment it when the plus or minus "
38997"buttons are pressed."
38998msgstr ""
38999"new_with_range 함수를 사용하여 새 SpinButton을 빨리 만들 수 있습니다. 첫번째 매개변수는 SpinButton의 시작 값, 두번"
39000"째는 최대 값, 세번째는 더하기 빼기 단추를 눌렀을 때 적용할 증가 감소 값입니다."
39001
39002#. (itstool) path: section/p
39003#: C/spinbutton.js.page:93
39004msgid ""
39005"After we create the first SpinButton, we connect its value-changed signal to a function which handles what happens "
39006"when the number inside either SpinButton changes."
39007msgstr ""
39008"첫 SpinButton을 만들고 나면, value-changed 시그널을 SpinButton의 숫지 값이 바뀌었을 때 처리할 함수에 연결하겠습니"
39009"다."
39010
39011#. (itstool) path: section/code
39012#: C/spinbutton.js.page:95
39013#, no-wrap
39014msgid ""
39015"\n"
39016"        // Create an adjustment to use for the second spinbutton\n"
39017"        this._adjustment = new Gtk.Adjustment ({\n"
39018"            value: 1,\n"
39019"            lower: 0,\n"
39020"            upper: 9001,\n"
39021"            step_increment: 1,\n"
39022"            page_increment: 10 });\n"
39023"\n"
39024"        // Create the second spinbutton\n"
39025"        this._tuna = new Gtk.SpinButton ({ adjustment: this._adjustment });\n"
39026"        this._tuna.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
39027"\n"
39028"        // this._tuna.set_digits (1);\n"
39029"        // this._tuna.set_wrap (true);\n"
39030msgstr ""
39031"\n"
39032"        // Create an adjustment to use for the second spinbutton\n"
39033"        this._adjustment = new Gtk.Adjustment ({\n"
39034"            value: 1,\n"
39035"            lower: 0,\n"
39036"            upper: 9001,\n"
39037"            step_increment: 1,\n"
39038"            page_increment: 10 });\n"
39039"\n"
39040"        // Create the second spinbutton\n"
39041"        this._tuna = new Gtk.SpinButton ({ adjustment: this._adjustment });\n"
39042"        this._tuna.connect (\"value-changed\", Lang.bind (this, this._newValue));\n"
39043"\n"
39044"        // this._tuna.set_digits (1);\n"
39045"        // this._tuna.set_wrap (true);\n"
39046
39047#. (itstool) path: section/p
39048#: C/spinbutton.js.page:112
39049msgid ""
39050"If you want more fine-grained control over a SpinButton, or want to create a bunch of SpinButtons which all use "
39051"the same parameters, you can create an object called an <link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/"
39052"Gtk.Adjustment.html\">Adjustment</link>. Then you can use that object as a new SpinButton's adjustment property, "
39053"and it sets all the values at once. Afterwards, you can change all the SpinButtons which use that adjustment by "
39054"changing the Adjustment object's properties."
39055msgstr ""
39056"SpinButton을 더 세밀하게 조절하려거나, 모든 SpinButtons에서 동일한 매개 변수를 활용하게 하려면 <link href=\"http://"
39057"www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Adjustment.html\">Adjustment</link> 객체를 만들 수 있습니다. 그 다음 "
39058"SpinButton의 adjustment 새 속성값으로 이 객체를 사용하며, 모든 값을 한번에 설정합니다. 이렇게 하면, Adjustment 객"
39059"체 속성 값을 바꾸어서 모든 SpinButton의 adjustment 속성 값을 바꿀 수 있습니다."
39060
39061#. (itstool) path: section/p
39062#: C/spinbutton.js.page:113
39063msgid ""
39064"The commented-out lines here show things you can do to customize your SpinButton. You can set the number of digits "
39065"which go after the decimal point, for example, or tell it to wrap the number around if it goes past the upper or "
39066"lower bounds that you set."
39067msgstr ""
39068"여기서 주석 표시를 날린 부분은 SpinButton의 속성을 개별적으로 설정할 수 있습니다. 예를 들면 소숫점 다음에 표시할 숫"
39069"자 갯수를 설정하거나, 여러분이 설정한 자릿수 범위 위아래를 벗어나면 숫자 값이 시작 값 내지는 끝 값으로 돌아가도록 "
39070"설정할 수 있습니다."
39071
39072#. (itstool) path: note/p
39073#: C/spinbutton.js.page:114
39074msgid "For the kitties' sake, please don't use set_digits to allow a decimal number of kittens."
39075msgstr "고양이 수 처리를 목적으로, 고양이 숫자 값을 받을 때 set_digits를 사용하지 마십시오."
39076
39077#. (itstool) path: section/title
39078#: C/spinbutton.js.page:118
39079msgid "Creating the rest of the UI"
39080msgstr "나머지 UI 만들기"
39081
39082#. (itstool) path: section/code
39083#: C/spinbutton.js.page:120
39084#, no-wrap
39085msgid ""
39086"\n"
39087"        // Create the text labels to go with the spinbuttons\n"
39088"        this._startLabel = new Gtk.Label ({ label: \"There are \" });\n"
39089"        this._kittenLabel = new Gtk.Label ({ label: \" kitten(s), and \"});\n"
39090"        this._tunaLabel = new Gtk.Label ({ label: \" can(s) of tuna.\"});\n"
39091"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()));\n"
39092"        this._lastLabel = new Gtk.Label ({\n"
39093"            label: \"That's \" + this.perKitten + \" can(s) of tuna per kitten.\" });\n"
39094msgstr ""
39095"\n"
39096"        // Create the text labels to go with the spinbuttons\n"
39097"        this._startLabel = new Gtk.Label ({ label: \"There are \" });\n"
39098"        this._kittenLabel = new Gtk.Label ({ label: \" kitten(s), and \"});\n"
39099"        this._tunaLabel = new Gtk.Label ({ label: \" can(s) of tuna.\"});\n"
39100"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()));\n"
39101"        this._lastLabel = new Gtk.Label ({\n"
39102"            label: \"That's \" + this.perKitten + \" can(s) of tuna per kitten.\" });\n"
39103
39104#. (itstool) path: section/p
39105#: C/spinbutton.js.page:129
39106msgid ""
39107"We create each <link xref=\"label.js\">Label</link> individually, and then string them together along with the "
39108"SpinButtons. The last label needs to show the number of cans of tuna per kitten, so it has a variable in the "
39109"middle, which corresponds to an equation that uses the SpinButtons' get_value functions to find out what they're "
39110"set at. JavaScript's Math function's floor method is used to round the number of cans of tuna per kitten down to "
39111"the nearest whole number."
39112msgstr ""
39113"각 <link xref=\"label.js\">Label</link>을 만들고 SpinButtons에 문자열을 넣겠습니다. 마지막 레이블에는 고양이 한마리"
39114"당 참치캔 갯수를 보여주어야 하므로, 각각의 SpinButton에 어떤 값을 설정했는지 가져오는 get_value 함수를 활용하여 공"
39115"식에 해당하는 변수를 둡니다. JavaScript의 Math 함수 중 floor 메서드는 고양이 한마리당 필요한 참치캔 갯수가 소수로 "
39116"나왔을 경우 소숫점 아래를 버릴때 씁니다."
39117
39118#. (itstool) path: section/code
39119#: C/spinbutton.js.page:131
39120#, no-wrap
39121msgid ""
39122"\n"
39123"        // Create a grid to put the spinbuttons and their labels in\n"
39124"        this._spinGrid = new Gtk.Grid ({\n"
39125"            halign: Gtk.Align.CENTER,\n"
39126"            valign: Gtk.Align.CENTER,\n"
39127"            margin_bottom: 20 });\n"
39128"\n"
39129"        // Attach everything to the grid\n"
39130"        this._spinGrid.attach (this._startLabel, 0, 0, 1, 1);\n"
39131"        this._spinGrid.attach (this._kittens, 1, 0, 1, 1);\n"
39132"        this._spinGrid.attach (this._kittenLabel, 2, 0, 1, 1);\n"
39133"        this._spinGrid.attach (this._tuna, 3, 0, 1, 1);\n"
39134"        this._spinGrid.attach (this._tunaLabel, 4, 0, 1, 1);\n"
39135"\n"
39136"        // Create a main grid to hold it and the last label\n"
39137"        this._mainGrid = new Gtk.Grid ({\n"
39138"            halign: Gtk.Align.CENTER,\n"
39139"            valign: Gtk.Align.CENTER });\n"
39140"\n"
39141"        // Attach the smaller grid and the last label to the main grid\n"
39142"        this._mainGrid.attach (this._spinGrid, 0, 0, 1, 1);\n"
39143"        this._mainGrid.attach (this._lastLabel, 0, 1, 1, 1);\n"
39144msgstr ""
39145"\n"
39146"        // Create a grid to put the spinbuttons and their labels in\n"
39147"        this._spinGrid = new Gtk.Grid ({\n"
39148"            halign: Gtk.Align.CENTER,\n"
39149"            valign: Gtk.Align.CENTER,\n"
39150"            margin_bottom: 20 });\n"
39151"\n"
39152"        // Attach everything to the grid\n"
39153"        this._spinGrid.attach (this._startLabel, 0, 0, 1, 1);\n"
39154"        this._spinGrid.attach (this._kittens, 1, 0, 1, 1);\n"
39155"        this._spinGrid.attach (this._kittenLabel, 2, 0, 1, 1);\n"
39156"        this._spinGrid.attach (this._tuna, 3, 0, 1, 1);\n"
39157"        this._spinGrid.attach (this._tunaLabel, 4, 0, 1, 1);\n"
39158"\n"
39159"        // Create a main grid to hold it and the last label\n"
39160"        this._mainGrid = new Gtk.Grid ({\n"
39161"            halign: Gtk.Align.CENTER,\n"
39162"            valign: Gtk.Align.CENTER });\n"
39163"\n"
39164"        // Attach the smaller grid and the last label to the main grid\n"
39165"        this._mainGrid.attach (this._spinGrid, 0, 0, 1, 1);\n"
39166"        this._mainGrid.attach (this._lastLabel, 0, 1, 1, 1);\n"
39167
39168#. (itstool) path: section/p
39169#: C/spinbutton.js.page:155
39170msgid ""
39171"Here we use <link xref=\"grid.js\">Grid</link> widgets to keep everything organized. One Grid holds the labels and "
39172"SpinButtons in order, while the next puts that Grid on top and the final Label on the bottom."
39173msgstr ""
39174"여기서 모든 위젯을 모아두려 <link xref=\"grid.js\">Grid</link> 위젯을 사용하겠습니다. 그리드 하나는 레이블과 "
39175"SpinButton를 순서대로 유지하며 그 다음 둘 내용은 그리스 상단에, 마지막으로 레이블은 하단에 둡니다."
39176
39177#. (itstool) path: section/p
39178#: C/spinbutton.js.page:156
39179msgid ""
39180"There isn't a wrong way to organize things in Grids, so long as you like how it turns out. In this case, the top "
39181"Grid has a margin on the bottom to keep it evenly spaced from the bottom Label, and the bottom Label is inside a "
39182"separate Grid so it will be centered relative to the Labels and SpinButtons on the top."
39183msgstr ""
39184"여러분이 바라는대로 결과가 나오는 동안 그리드에 무언가를 정돈해넣는 잘못된 방식은 없습니다. 이 경우 그리드 하단에 "
39185"여백이 있는데, 하단 레이블과 균등한 간격을 유지하고, 하단 레이블은 별도의 그리드에 두어, 상단의 레이블과 SpinButton"
39186"과 견주어 봤을 떄 상대적으로 가운데에 들어갑니다."
39187
39188#. (itstool) path: section/code
39189#: C/spinbutton.js.page:158
39190#, no-wrap
39191msgid ""
39192"\n"
39193"        // Add the main grid to the window\n"
39194"        this._window.add (this._mainGrid);\n"
39195"\n"
39196"        // Show the window and all child widgets\n"
39197"        this._window.show_all();\n"
39198"    },\n"
39199msgstr ""
39200"\n"
39201"        // Add the main grid to the window\n"
39202"        this._window.add (this._mainGrid);\n"
39203"\n"
39204"        // Show the window and all child widgets\n"
39205"        this._window.show_all();\n"
39206"    },\n"
39207
39208#. (itstool) path: section/p
39209#: C/spinbutton.js.page:166 C/switch.js.page:154
39210msgid ""
39211"Finally, we add the larger Grid to the window, then tell the window to show itself and all the widgets inside of "
39212"it."
39213msgstr ""
39214"마지막으로 창에 제일 큰 그리드를 추가하고, 창에서 창 자신과 그 안에 들어간 위젯을 모두 보여주도록 하겠습니다."
39215
39216#. (itstool) path: section/title
39217#: C/spinbutton.js.page:170
39218msgid "Function which handles the SpinButtons' numerical values being adjusted"
39219msgstr "SpinButton의 숫자 값 조절을 처리하는 함수"
39220
39221#. (itstool) path: section/code
39222#: C/spinbutton.js.page:172
39223#, no-wrap
39224msgid ""
39225"\n"
39226"    _newValue: function () {\n"
39227"\n"
39228"        // Update the label which shows how many cans there are per kitten\n"
39229"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()))\n"
39230"        this._lastLabel.set_label (\"That's \" + this.perKitten + \" can(s) of tuna per kitten.\");\n"
39231"\n"
39232"    }\n"
39233"\n"
39234"});\n"
39235msgstr ""
39236"\n"
39237"    _newValue: function () {\n"
39238"\n"
39239"        // Update the label which shows how many cans there are per kitten\n"
39240"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()))\n"
39241"        this._lastLabel.set_label (\"That's \" + this.perKitten + \" can(s) of tuna per kitten.\");\n"
39242"\n"
39243"    }\n"
39244"\n"
39245"});\n"
39246
39247#. (itstool) path: section/p
39248#: C/spinbutton.js.page:183
39249msgid ""
39250"Here we update the perKitten variable based on the SpinButtons' new values, and use the set_label property to "
39251"refresh what _lastLabel shows. Since both SpinButtons have their value-changed signal connected to this function, "
39252"every time either of the numbers changes this function will update the Label."
39253msgstr ""
39254"여기에서는 SpinButton의 새 값에 따라 perKitten 값을 업데이트하며, set_label 속성으로 _lastLabel에서 보여줄 내용을 "
39255"새로 고칩니다. 두 SpinButton에는 앞에 언급한 함수와 연결한 value-changed 시그널이 있기 때문에, 숫자가 바뀔 때마다 "
39256"이 함수를 통해 레이블의 내용을 새로 고칩니다."
39257
39258#. (itstool) path: section/code
39259#: C/spinbutton.js.page:185
39260#, no-wrap
39261msgid ""
39262"\n"
39263"// Run the application\n"
39264"let app = new SpinButtonExample ();\n"
39265"app.application.run (ARGV);\n"
39266msgstr ""
39267"\n"
39268"// Run the application\n"
39269"let app = new SpinButtonExample ();\n"
39270"app.application.run (ARGV);\n"
39271
39272#. (itstool) path: section/p
39273#: C/spinbutton.js.page:190
39274msgid "Finally, we create a new instance of the finished SpinButtonExample class, and set the application running."
39275msgstr "마지막으로 마무리한 SpinButtonExample 클래스의 새 인스턴스를 만들고 프로그램 실행을 설정합니다."
39276
39277#. (itstool) path: section/code
39278#: C/spinbutton.js.page:195
39279#, no-wrap
39280msgid ""
39281"#!/usr/bin/gjs\n"
39282"\n"
39283"imports.gi.versions.Gtk = '3.0';\n"
39284"\n"
39285"const Gio = imports.gi.Gio;\n"
39286"const Gtk = imports.gi.Gtk;\n"
39287"\n"
39288"class SpinButtonExample {\n"
39289"\n"
39290"    // Create the application itself\n"
39291"    constructor() {\n"
39292"        this.application = new Gtk.Application({\n"
39293"            application_id: 'org.example.jsspinbutton'\n"
39294"        });\n"
39295"\n"
39296"        // Connect 'activate' and 'startup' signals to the callback functions\n"
39297"        this.application.connect('activate', this._onActivate.bind(this));\n"
39298"        this.application.connect('startup', this._onStartup.bind(this));\n"
39299"    }\n"
39300"\n"
39301"    // Callback function for 'activate' signal presents window when active\n"
39302"    _onActivate() {\n"
39303"        this._window.present();\n"
39304"    }\n"
39305"\n"
39306"    // Callback function for 'startup' signal builds the UI\n"
39307"    _onStartup() {\n"
39308"        this._buildUI();\n"
39309"    }\n"
39310"\n"
39311"    // Build the application's UI\n"
39312"    _buildUI() {\n"
39313"\n"
39314"        // Create the application window\n"
39315"        this._window = new Gtk.ApplicationWindow({\n"
39316"            application: this.application,\n"
39317"            window_position: Gtk.WindowPosition.CENTER,\n"
39318"            border_width: 20,\n"
39319"            title: \"Kitten Feeder\"});\n"
39320"\n"
39321"        // Create the first spinbutton using a function\n"
39322"        this._kittens = Gtk.SpinButton.new_with_range (1, 9001, 1);\n"
39323"        this._kittens.connect (\"value-changed\", this._newValue.bind(this));\n"
39324"\n"
39325"        // Create an adjustment to use for the second spinbutton\n"
39326"        this._adjustment = new Gtk.Adjustment ({\n"
39327"            value: 1,\n"
39328"            lower: 0,\n"
39329"            upper: 9001,\n"
39330"            step_increment: 1,\n"
39331"            page_increment: 10 });\n"
39332"\n"
39333"        // Create the second spinbutton\n"
39334"        this._tuna = new Gtk.SpinButton ({ adjustment: this._adjustment });\n"
39335"        this._tuna.connect (\"value-changed\", this._newValue.bind(this));\n"
39336"\n"
39337"        // this._tuna.set_digits (1);\n"
39338"        // this._tuna.set_wrap (true);\n"
39339"\n"
39340"        // Create the text labels to go with the spinbuttons\n"
39341"        this._startLabel = new Gtk.Label ({ label: \"There are \" });\n"
39342"        this._kittenLabel = new Gtk.Label ({ label: \" kitten(s), and \"});\n"
39343"        this._tunaLabel = new Gtk.Label ({ label: \" can(s) of tuna.\"});\n"
39344"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()));\n"
39345"        this._lastLabel = new Gtk.Label ({\n"
39346"            label: \"That's \" + this.perKitten + \" can(s) of tuna per kitten.\" });\n"
39347"\n"
39348"        // Create a grid to put the spinbuttons and their labels in\n"
39349"        this._spinGrid = new Gtk.Grid ({\n"
39350"            halign: Gtk.Align.CENTER,\n"
39351"            valign: Gtk.Align.CENTER,\n"
39352"            margin_bottom: 20 });\n"
39353"\n"
39354"        // Attach everything to the grid\n"
39355"        this._spinGrid.attach (this._startLabel, 0, 0, 1, 1);\n"
39356"        this._spinGrid.attach (this._kittens, 1, 0, 1, 1);\n"
39357"        this._spinGrid.attach (this._kittenLabel, 2, 0, 1, 1);\n"
39358"        this._spinGrid.attach (this._tuna, 3, 0, 1, 1);\n"
39359"        this._spinGrid.attach (this._tunaLabel, 4, 0, 1, 1);\n"
39360"\n"
39361"        // Create a main grid to hold it and the last label\n"
39362"        this._mainGrid = new Gtk.Grid ({\n"
39363"            halign: Gtk.Align.CENTER,\n"
39364"            valign: Gtk.Align.CENTER });\n"
39365"\n"
39366"        // Attach the smaller grid and the last label to the main grid\n"
39367"        this._mainGrid.attach (this._spinGrid, 0, 0, 1, 1);\n"
39368"        this._mainGrid.attach (this._lastLabel, 0, 1, 1, 1);\n"
39369"\n"
39370"        // Add the main grid to the window\n"
39371"        this._window.add (this._mainGrid);\n"
39372"\n"
39373"        // Show the window and all child widgets\n"
39374"        this._window.show_all();\n"
39375"    }\n"
39376"\n"
39377"    _newValue() {\n"
39378"        // Update the label which shows how many cans there are per kitten\n"
39379"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()))\n"
39380"        this._lastLabel.set_label (\"That's \" + this.perKitten + \" can(s) of tuna per kitten.\");\n"
39381"    }\n"
39382"};\n"
39383"\n"
39384"// Run the application\n"
39385"let app = new SpinButtonExample ();\n"
39386"app.application.run (ARGV);\n"
39387msgstr ""
39388"#!/usr/bin/gjs\n"
39389"\n"
39390"imports.gi.versions.Gtk = '3.0';\n"
39391"\n"
39392"const Gio = imports.gi.Gio;\n"
39393"const Gtk = imports.gi.Gtk;\n"
39394"\n"
39395"class SpinButtonExample {\n"
39396"\n"
39397"    // Create the application itself\n"
39398"    constructor() {\n"
39399"        this.application = new Gtk.Application({\n"
39400"            application_id: 'org.example.jsspinbutton'\n"
39401"        });\n"
39402"\n"
39403"        // Connect 'activate' and 'startup' signals to the callback functions\n"
39404"        this.application.connect('activate', this._onActivate.bind(this));\n"
39405"        this.application.connect('startup', this._onStartup.bind(this));\n"
39406"    }\n"
39407"\n"
39408"    // Callback function for 'activate' signal presents window when active\n"
39409"    _onActivate() {\n"
39410"        this._window.present();\n"
39411"    }\n"
39412"\n"
39413"    // Callback function for 'startup' signal builds the UI\n"
39414"    _onStartup() {\n"
39415"        this._buildUI();\n"
39416"    }\n"
39417"\n"
39418"    // Build the application's UI\n"
39419"    _buildUI() {\n"
39420"\n"
39421"        // Create the application window\n"
39422"        this._window = new Gtk.ApplicationWindow({\n"
39423"            application: this.application,\n"
39424"            window_position: Gtk.WindowPosition.CENTER,\n"
39425"            border_width: 20,\n"
39426"            title: \"Kitten Feeder\"});\n"
39427"\n"
39428"        // Create the first spinbutton using a function\n"
39429"        this._kittens = Gtk.SpinButton.new_with_range (1, 9001, 1);\n"
39430"        this._kittens.connect (\"value-changed\", this._newValue.bind(this));\n"
39431"\n"
39432"        // Create an adjustment to use for the second spinbutton\n"
39433"        this._adjustment = new Gtk.Adjustment ({\n"
39434"            value: 1,\n"
39435"            lower: 0,\n"
39436"            upper: 9001,\n"
39437"            step_increment: 1,\n"
39438"            page_increment: 10 });\n"
39439"\n"
39440"        // Create the second spinbutton\n"
39441"        this._tuna = new Gtk.SpinButton ({ adjustment: this._adjustment });\n"
39442"        this._tuna.connect (\"value-changed\", this._newValue.bind(this));\n"
39443"\n"
39444"        // this._tuna.set_digits (1);\n"
39445"        // this._tuna.set_wrap (true);\n"
39446"\n"
39447"        // Create the text labels to go with the spinbuttons\n"
39448"        this._startLabel = new Gtk.Label ({ label: \"There are \" });\n"
39449"        this._kittenLabel = new Gtk.Label ({ label: \" kitten(s), and \"});\n"
39450"        this._tunaLabel = new Gtk.Label ({ label: \" can(s) of tuna.\"});\n"
39451"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()));\n"
39452"        this._lastLabel = new Gtk.Label ({\n"
39453"            label: \"That's \" + this.perKitten + \" can(s) of tuna per kitten.\" });\n"
39454"\n"
39455"        // Create a grid to put the spinbuttons and their labels in\n"
39456"        this._spinGrid = new Gtk.Grid ({\n"
39457"            halign: Gtk.Align.CENTER,\n"
39458"            valign: Gtk.Align.CENTER,\n"
39459"            margin_bottom: 20 });\n"
39460"\n"
39461"        // Attach everything to the grid\n"
39462"        this._spinGrid.attach (this._startLabel, 0, 0, 1, 1);\n"
39463"        this._spinGrid.attach (this._kittens, 1, 0, 1, 1);\n"
39464"        this._spinGrid.attach (this._kittenLabel, 2, 0, 1, 1);\n"
39465"        this._spinGrid.attach (this._tuna, 3, 0, 1, 1);\n"
39466"        this._spinGrid.attach (this._tunaLabel, 4, 0, 1, 1);\n"
39467"\n"
39468"        // Create a main grid to hold it and the last label\n"
39469"        this._mainGrid = new Gtk.Grid ({\n"
39470"            halign: Gtk.Align.CENTER,\n"
39471"            valign: Gtk.Align.CENTER });\n"
39472"\n"
39473"        // Attach the smaller grid and the last label to the main grid\n"
39474"        this._mainGrid.attach (this._spinGrid, 0, 0, 1, 1);\n"
39475"        this._mainGrid.attach (this._lastLabel, 0, 1, 1, 1);\n"
39476"\n"
39477"        // Add the main grid to the window\n"
39478"        this._window.add (this._mainGrid);\n"
39479"\n"
39480"        // Show the window and all child widgets\n"
39481"        this._window.show_all();\n"
39482"    }\n"
39483"\n"
39484"    _newValue() {\n"
39485"        // Update the label which shows how many cans there are per kitten\n"
39486"        this.perKitten = Math.floor((this._tuna.get_value() / this._kittens.get_value()))\n"
39487"        this._lastLabel.set_label (\"That's \" + this.perKitten + \" can(s) of tuna per kitten.\");\n"
39488"    }\n"
39489"};\n"
39490"\n"
39491"// Run the application\n"
39492"let app = new SpinButtonExample ();\n"
39493"app.application.run (ARGV);\n"
39494
39495#. (itstool) path: item/p
39496#: C/spinbutton.js.page:206
39497msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.SpinButton.html\">Gtk.SpinButton</link>"
39498msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.SpinButton.html\">Gtk.SpinButton</link>"
39499
39500#. (itstool) path: info/title
39501#: C/spinbutton.py.page:8
39502msgctxt "text"
39503msgid "SpinButton (Python)"
39504msgstr "SpinButton (Python)"
39505
39506#. (itstool) path: info/desc
39507#: C/spinbutton.py.page:20
39508msgid "Retrieve an integer or floating-point number from the user."
39509msgstr "사용자로 부터 정수나 소수 값을 받습니다."
39510
39511#. (itstool) path: section/code
39512#: C/spinbutton.py.page:31
39513#, no-wrap
39514msgid ""
39515"from gi.repository import Gtk\n"
39516"import sys\n"
39517"\n"
39518"\n"
39519"class MyWindow(Gtk.ApplicationWindow):\n"
39520"\n"
39521"    def __init__(self, app):\n"
39522"        Gtk.Window.__init__(self, title=\"SpinButton Example\", application=app)\n"
39523"        self.set_default_size(210, 70)\n"
39524"        self.set_border_width(5)\n"
39525"\n"
39526"        # an adjustment (initial value, min value, max value,\n"
39527"        # step increment - press cursor keys or +/- buttons to see!,\n"
39528"        # page increment - not used here,\n"
39529"        # page size - not used here)\n"
39530"        ad = Gtk.Adjustment(0, 0, 100, 1, 0, 0)\n"
39531"\n"
39532"        # a spin button for integers (digits=0)\n"
39533"        self.spin = Gtk.SpinButton(adjustment=ad, climb_rate=1, digits=0)\n"
39534"        # as wide as possible\n"
39535"        self.spin.set_hexpand(True)\n"
39536"\n"
39537"        # we connect the signal \"value-changed\" emitted by the spinbutton with the callback\n"
39538"        # function spin_selected\n"
39539"        self.spin.connect(\"value-changed\", self.spin_selected)\n"
39540"\n"
39541"        # a label\n"
39542"        self.label = Gtk.Label()\n"
39543"        self.label.set_text(\"Choose a number\")\n"
39544"\n"
39545"        # a grid to attach the widgets\n"
39546"        grid = Gtk.Grid()\n"
39547"        grid.attach(self.spin, 0, 0, 1, 1)\n"
39548"        grid.attach(self.label, 0, 1, 2, 1)\n"
39549"\n"
39550"        self.add(grid)\n"
39551"\n"
39552"    # callback function: the signal of the spinbutton is used to change the\n"
39553"    # text of the label\n"
39554"    def spin_selected(self, event):\n"
39555"        self.label.set_text(\n"
39556"            \"The number you selected is \" + str(self.spin.get_value_as_int()) + \".\")\n"
39557"\n"
39558"\n"
39559"class MyApplication(Gtk.Application):\n"
39560"\n"
39561"    def __init__(self):\n"
39562"        Gtk.Application.__init__(self)\n"
39563"\n"
39564"    def do_activate(self):\n"
39565"        win = MyWindow(self)\n"
39566"        win.show_all()\n"
39567"\n"
39568"    def do_startup(self):\n"
39569"        Gtk.Application.do_startup(self)\n"
39570"\n"
39571"app = MyApplication()\n"
39572"exit_status = app.run(sys.argv)\n"
39573"sys.exit(exit_status)\n"
39574msgstr ""
39575"from gi.repository import Gtk\n"
39576"import sys\n"
39577"\n"
39578"\n"
39579"class MyWindow(Gtk.ApplicationWindow):\n"
39580"\n"
39581"    def __init__(self, app):\n"
39582"        Gtk.Window.__init__(self, title=\"SpinButton Example\", application=app)\n"
39583"        self.set_default_size(210, 70)\n"
39584"        self.set_border_width(5)\n"
39585"\n"
39586"        # an adjustment (initial value, min value, max value,\n"
39587"        # step increment - press cursor keys or +/- buttons to see!,\n"
39588"        # page increment - not used here,\n"
39589"        # page size - not used here)\n"
39590"        ad = Gtk.Adjustment(0, 0, 100, 1, 0, 0)\n"
39591"\n"
39592"        # a spin button for integers (digits=0)\n"
39593"        self.spin = Gtk.SpinButton(adjustment=ad, climb_rate=1, digits=0)\n"
39594"        # as wide as possible\n"
39595"        self.spin.set_hexpand(True)\n"
39596"\n"
39597"        # we connect the signal \"value-changed\" emitted by the spinbutton with the callback\n"
39598"        # function spin_selected\n"
39599"        self.spin.connect(\"value-changed\", self.spin_selected)\n"
39600"\n"
39601"        # a label\n"
39602"        self.label = Gtk.Label()\n"
39603"        self.label.set_text(\"Choose a number\")\n"
39604"\n"
39605"        # a grid to attach the widgets\n"
39606"        grid = Gtk.Grid()\n"
39607"        grid.attach(self.spin, 0, 0, 1, 1)\n"
39608"        grid.attach(self.label, 0, 1, 2, 1)\n"
39609"\n"
39610"        self.add(grid)\n"
39611"\n"
39612"    # callback function: the signal of the spinbutton is used to change the\n"
39613"    # text of the label\n"
39614"    def spin_selected(self, event):\n"
39615"        self.label.set_text(\n"
39616"            \"The number you selected is \" + str(self.spin.get_value_as_int()) + \".\")\n"
39617"\n"
39618"\n"
39619"class MyApplication(Gtk.Application):\n"
39620"\n"
39621"    def __init__(self):\n"
39622"        Gtk.Application.__init__(self)\n"
39623"\n"
39624"    def do_activate(self):\n"
39625"        win = MyWindow(self)\n"
39626"        win.show_all()\n"
39627"\n"
39628"    def do_startup(self):\n"
39629"        Gtk.Application.do_startup(self)\n"
39630"\n"
39631"app = MyApplication()\n"
39632"exit_status = app.run(sys.argv)\n"
39633"sys.exit(exit_status)\n"
39634
39635#. (itstool) path: section/title
39636#: C/spinbutton.py.page:35
39637msgid "Useful methods for a SpinButton widget"
39638msgstr "SpinButton 위젯에 쓸만한 메서드"
39639
39640#. (itstool) path: section/p
39641#: C/spinbutton.py.page:36
39642msgid ""
39643"A Gtk.Adjustment is needed to construct the Gtk.SpinButton. This is the representation of a value with a lower and "
39644"upper bound, together with step and page increments, and a page size, and it is constructed as <code>Gtk."
39645"Adjustment(value, lower, upper, step_increment, page_increment, page_size)</code> where the fields are of type "
39646"<code>float</code>; <code>step_increment</code> is the increment/decrement that is obtained by using the cursor "
39647"keys or the buttons of the spinbutton. Note that <code>page_increment</code> and <code>page_size</code> are not "
39648"used in this case, and they should be set to <code>0</code>."
39649msgstr ""
39650"Gtk.AdjustmentGtk.SpinButton을 만들떄 씁니다. 이 객체는 상한값, 하한값, 단계값, 페이지 증가 값, 페이지 크기를 나"
39651"타내며 <code>Gtk.Adjustment(value, lower, upper, step_increment, page_increment, page_size)</code>  생성자로 만듭니"
39652"다. 여기서 필드 값은 <code>float</code>입니다. <code>step_increment</code> 은 커서 키를 사용할 떄 또는 SpinButton"
39653"의 증감 단추를 사용할 때 가져올 증가 감소 값입니다. 참고로,  <code>page_increment</code>와 <code>page_size</code>"
39654"는 이 상황에 활용하지 않으므로 <code>0</code> 값으로 설정해야합니다."
39655
39656#. (itstool) path: section/p
39657#: C/spinbutton.py.page:37
39658msgid ""
39659"In line 23 the signal <code>\"value-changed\"</code> is connected to the callback function <code>spin_selected()</"
39660"code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link "
39661"xref=\"signals-callbacks.py\"/> for a more detailed explanation."
39662msgstr ""
39663"23번째 줄에서 <code>\"value-changed\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, "
39664"<var>callback function</var>)</code> 함수로  <code>spin_selected()</code> 콜백 함수에 연결했습니다. 더 자세한 설명"
39665"은 <link xref=\"signals-callbacks.py\"/>를 참조하십시오."
39666
39667#. (itstool) path: item/p
39668#: C/spinbutton.py.page:39
39669msgid ""
39670"If you want the value of the spinbutton to wrap around when they exceed the maximum or the minimum, set "
39671"<code>set_wrap(True)</code>. The <code>\"wrapped\"</code> signal is emitted when this happens."
39672msgstr ""
39673"SpinButton 값이 최대 최소 값을 넘어설 경우 시작 값 내지는 끝 값으로 돌아가게 하려면 <code>set_wrap(True)</code> 함"
39674"수를 설정하십시오. 이 상황이 일어나면 <code>\"wrapped\"</code> 시그널을 내보냅니다."
39675
39676#. (itstool) path: item/p
39677#: C/spinbutton.py.page:40
39678msgid "<code>set_digits(digits)</code> sets the precision to be displayed by the spinbutton, up to 20 digits."
39679msgstr "<code>set_digits(digits)</code> 함수는 SpinButton에 나타낼 수 있는 자리수를 최대 20자리까지 설정합니다."
39680
39681#. (itstool) path: item/p
39682#: C/spinbutton.py.page:41
39683msgid "To get the value of the spinbutton as an integer, use <code>get_value_as_int()</code>."
39684msgstr "SpinButton에서 정수 값을 받으려면 <code>get_value_as_int()</code> 함수를 사용하십시오."
39685
39686#. (itstool) path: item/p
39687#: C/spinbutton.py.page:49
39688msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSpinButton.html\">GtkSpinButton</link>"
39689msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSpinButton.html\">GtkSpinButton</link>"
39690
39691#. (itstool) path: info/title
39692#: C/spinbutton.vala.page:8
39693msgctxt "text"
39694msgid "SpinButton (Vala)"
39695msgstr "SpinButton (Vala)"
39696
39697#. (itstool) path: info/desc
39698#: C/spinbutton.vala.page:20
39699msgid "Retrieve an integer or floating point number."
39700msgstr "정수값 또는 소수 값을 받습니다."
39701
39702#. (itstool) path: page/code
39703#: C/spinbutton.vala.page:27
39704#, no-wrap
39705msgid ""
39706"/* This is the application. */\n"
39707"public class MyApplication : Gtk.Application {\n"
39708"\tGtk.Label label;\n"
39709"\n"
39710"\t/* Override the 'activate' signal of GLib.Application. */\n"
39711"\tprotected override void activate () {\n"
39712"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
39713"\t\twindow.title = \"SpinButton Example\";\n"
39714"\t\twindow.set_default_size (210, 70);\n"
39715"\t\twindow.set_border_width (5);\n"
39716"\n"
39717"\t\tvar spinbutton = new Gtk.SpinButton.with_range (0, 100, 1);\n"
39718"\t\tspinbutton.set_hexpand (true);\n"
39719"\n"
39720"\t\tlabel = new Gtk.Label (\"Choose a number\");\n"
39721"\n"
39722"\t\tvar grid = new Gtk.Grid ();\n"
39723"\t\tgrid.attach (spinbutton, 0, 0, 1, 1);\n"
39724"\t\tgrid.attach (label, 0, 1, 1, 1);\n"
39725"\n"
39726"\t\tspinbutton.value_changed.connect (this.value_changed_cb);\n"
39727"\n"
39728"\t\twindow.add (grid);\n"
39729"\t\twindow.show_all ();\n"
39730"\t}\n"
39731"\n"
39732"\tvoid value_changed_cb (Gtk.SpinButton spin) {\n"
39733"\t\tlabel.set_text (\"The number you selected is %.0f.\".printf (spin.get_value()));\n"
39734"\t}\n"
39735"}\n"
39736"\n"
39737"/* main creates and runs the application. */\n"
39738"public int main (string[] args) {\n"
39739"\treturn new MyApplication ().run (args);\n"
39740"}\n"
39741msgstr ""
39742"/* This is the application. */\n"
39743"public class MyApplication : Gtk.Application {\n"
39744"\tGtk.Label label;\n"
39745"\n"
39746"\t/* Override the 'activate' signal of GLib.Application. */\n"
39747"\tprotected override void activate () {\n"
39748"\t\tvar window = new Gtk.ApplicationWindow (this);\n"
39749"\t\twindow.title = \"SpinButton Example\";\n"
39750"\t\twindow.set_default_size (210, 70);\n"
39751"\t\twindow.set_border_width (5);\n"
39752"\n"
39753"\t\tvar spinbutton = new Gtk.SpinButton.with_range (0, 100, 1);\n"
39754"\t\tspinbutton.set_hexpand (true);\n"
39755"\n"
39756"\t\tlabel = new Gtk.Label (\"Choose a number\");\n"
39757"\n"
39758"\t\tvar grid = new Gtk.Grid ();\n"
39759"\t\tgrid.attach (spinbutton, 0, 0, 1, 1);\n"
39760"\t\tgrid.attach (label, 0, 1, 1, 1);\n"
39761"\n"
39762"\t\tspinbutton.value_changed.connect (this.value_changed_cb);\n"
39763"\n"
39764"\t\twindow.add (grid);\n"
39765"\t\twindow.show_all ();\n"
39766"\t}\n"
39767"\n"
39768"\tvoid value_changed_cb (Gtk.SpinButton spin) {\n"
39769"\t\tlabel.set_text (\"The number you selected is %.0f.\".printf (spin.get_value()));\n"
39770"\t}\n"
39771"}\n"
39772"\n"
39773"/* main creates and runs the application. */\n"
39774"public int main (string[] args) {\n"
39775"\treturn new MyApplication ().run (args);\n"
39776"}\n"
39777
39778#. (itstool) path: item/p
39779#: C/spinbutton.vala.page:32
39780msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.SpinButton.html\">Gtk.SpinButton</link>"
39781msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.SpinButton.html\">Gtk.SpinButton</link>"
39782
39783#. (itstool) path: info/title
39784#: C/spinner.c.page:8
39785msgctxt "text"
39786msgid "Spinner (C)"
39787msgstr "Spinner (C)"
39788
39789#. (itstool) path: info/desc
39790#: C/spinner.c.page:19 C/spinner.js.page:18 C/spinner.py.page:19 C/spinner.vala.page:18
39791msgid "A spinner animation"
39792msgstr "스피너 애니메이션"
39793
39794#. (itstool) path: page/title
39795#: C/spinner.c.page:22 C/spinner.js.page:21 C/spinner.py.page:22 C/spinner.vala.page:21
39796msgid "Spinner"
39797msgstr "Spinner"
39798
39799#. (itstool) path: page/media
39800#. This is a reference to an external file such as an image or video. When
39801#. the file changes, the md5 hash will change to let you know you need to
39802#. update your localized copy. The msgstr is not used at all. Set it to
39803#. whatever you like once you have updated your copy of the file.
39804#: C/spinner.c.page:24 C/spinner.js.page:22 C/spinner.py.page:23 C/spinner.vala.page:22
39805msgctxt "_"
39806msgid "external ref='media/spinner.png' md5='d04f2d81f1d72c6c2f97e8729947dfed'"
39807msgstr ""
39808
39809#. (itstool) path: page/p
39810#: C/spinner.c.page:25 C/spinner.js.page:23 C/spinner.py.page:24 C/spinner.vala.page:23
39811msgid "This Spinner is stopped and started by pressing the spacebar."
39812msgstr "이 스피너는 스페이스바를 누르면 회전 동작을 멈추거나 시작합니다."
39813
39814#. (itstool) path: page/code
39815#: C/spinner.c.page:27
39816#, no-wrap
39817msgid ""
39818"\n"
39819"#include &lt;gtk/gtk.h&gt;\n"
39820" \n"
39821"\n"
39822"\n"
39823" /*Global variable used to indicate active state of the\n"
39824"spinner. TRUE = active, FALSE = not-active. This is because \n"
39825"there isn't a current function for C that does this for us*/\n"
39826"gboolean active;  \n"
39827" \n"
39828"\n"
39829"\n"
39830"/*This is the callback function. It is a handler function \n"
39831"which reacts to the signal. In this case, it will cause the \n"
39832"spinner to start and stop according to how many times the user \n"
39833"presses the spacebar.*/ \n"
39834"static gboolean\n"
39835"key_pressed_event (GtkWidget *widget,\n"
39836"                   GdkEvent  *event,\n"
39837"                   gpointer   user_data)\n"
39838"{\n"
39839"  GtkWidget *spinner = user_data;\n"
39840"  guint keyval;\n"
39841"  \n"
39842"  /*Extracts the keyval from an event. And stores it in the  variable \n"
39843"  \"keyval\" (we give the function the address). In this case, the \n"
39844"  event is GdkEventKey, a key press event*/\n"
39845"  gdk_event_get_keyval (event, &amp;keyval);  \n"
39846"\n"
39847"  /*Grabbing the boolean value from the spinner*/\n"
39848"  g_object_get (GTK_SPINNER (spinner), \"active\", &amp;active, NULL);\n"
39849"  \n"
39850"  if (keyval == GDK_KEY_space) {\n"
39851"     if (active) {\n"
39852"         gtk_spinner_stop (GTK_SPINNER (spinner));\n"
39853"     }\n"
39854"     else {\n"
39855"         gtk_spinner_start (GTK_SPINNER (spinner));\n"
39856"     } \n"
39857"  }\n"
39858"  \n"
39859"return TRUE;\n"
39860"}\n"
39861" \n"
39862"\n"
39863"\n"
39864"static void\n"
39865"activate (GtkApplication *app,\n"
39866"          gpointer        user_data)\n"
39867"{\n"
39868"  GtkWidget *window;\n"
39869"  GtkWidget *spinner;\n"
39870" \n"
39871"  /*Create a window with a title, border width and a default size*/\n"
39872"  window = gtk_application_window_new (app);\n"
39873" \n"
39874"  gtk_window_set_title (GTK_WINDOW (window), \"Spinner Example\");\n"
39875"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);\n"
39876"  gtk_container_set_border_width (GTK_CONTAINER(window), 30);\n"
39877" \n"
39878"  /*Create a spinner, with extra horizontal and vertical space*/\n"
39879"  spinner = gtk_spinner_new ();\n"
39880"  gtk_spinner_start (GTK_SPINNER (spinner));\n"
39881"  \n"
39882"  gtk_container_add (GTK_CONTAINER (window), spinner);\n"
39883" \n"
39884"  /*Connecting the key-press-event signal to the callback*/\n"
39885"  g_signal_connect (GTK_WINDOW (window), \"key-press-event\", \n"
39886"                    G_CALLBACK (key_pressed_event), spinner);\n"
39887" \n"
39888"  gtk_widget_show_all (window);\n"
39889"}\n"
39890" \n"
39891"\n"
39892"\n"
39893"\n"
39894"int\n"
39895"main (int argc, char **argv)\n"
39896"{\n"
39897"  GtkApplication *app;\n"
39898"  int status;\n"
39899" \n"
39900"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
39901"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
39902"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
39903"  g_object_unref (app);\n"
39904" \n"
39905"  return status;\n"
39906"}\n"
39907msgstr ""
39908"\n"
39909"#include &lt;gtk/gtk.h&gt;\n"
39910" \n"
39911"\n"
39912"\n"
39913" /*Global variable used to indicate active state of the\n"
39914"spinner. TRUE = active, FALSE = not-active. This is because \n"
39915"there isn't a current function for C that does this for us*/\n"
39916"gboolean active;  \n"
39917" \n"
39918"\n"
39919"\n"
39920"/*This is the callback function. It is a handler function \n"
39921"which reacts to the signal. In this case, it will cause the \n"
39922"spinner to start and stop according to how many times the user \n"
39923"presses the spacebar.*/ \n"
39924"static gboolean\n"
39925"key_pressed_event (GtkWidget *widget,\n"
39926"                   GdkEvent  *event,\n"
39927"                   gpointer   user_data)\n"
39928"{\n"
39929"  GtkWidget *spinner = user_data;\n"
39930"  guint keyval;\n"
39931"  \n"
39932"  /*Extracts the keyval from an event. And stores it in the  variable \n"
39933"  \"keyval\" (we give the function the address). In this case, the \n"
39934"  event is GdkEventKey, a key press event*/\n"
39935"  gdk_event_get_keyval (event, &amp;keyval);  \n"
39936"\n"
39937"  /*Grabbing the boolean value from the spinner*/\n"
39938"  g_object_get (GTK_SPINNER (spinner), \"active\", &amp;active, NULL);\n"
39939"  \n"
39940"  if (keyval == GDK_KEY_space) {\n"
39941"     if (active) {\n"
39942"         gtk_spinner_stop (GTK_SPINNER (spinner));\n"
39943"     }\n"
39944"     else {\n"
39945"         gtk_spinner_start (GTK_SPINNER (spinner));\n"
39946"     } \n"
39947"  }\n"
39948"  \n"
39949"return TRUE;\n"
39950"}\n"
39951" \n"
39952"\n"
39953"\n"
39954"static void\n"
39955"activate (GtkApplication *app,\n"
39956"          gpointer        user_data)\n"
39957"{\n"
39958"  GtkWidget *window;\n"
39959"  GtkWidget *spinner;\n"
39960" \n"
39961"  /*Create a window with a title, border width and a default size*/\n"
39962"  window = gtk_application_window_new (app);\n"
39963" \n"
39964"  gtk_window_set_title (GTK_WINDOW (window), \"Spinner Example\");\n"
39965"  gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);\n"
39966"  gtk_container_set_border_width (GTK_CONTAINER(window), 30);\n"
39967" \n"
39968"  /*Create a spinner, with extra horizontal and vertical space*/\n"
39969"  spinner = gtk_spinner_new ();\n"
39970"  gtk_spinner_start (GTK_SPINNER (spinner));\n"
39971"  \n"
39972"  gtk_container_add (GTK_CONTAINER (window), spinner);\n"
39973" \n"
39974"  /*Connecting the key-press-event signal to the callback*/\n"
39975"  g_signal_connect (GTK_WINDOW (window), \"key-press-event\", \n"
39976"                    G_CALLBACK (key_pressed_event), spinner);\n"
39977" \n"
39978"  gtk_widget_show_all (window);\n"
39979"}\n"
39980" \n"
39981"\n"
39982"\n"
39983"\n"
39984"int\n"
39985"main (int argc, char **argv)\n"
39986"{\n"
39987"  GtkApplication *app;\n"
39988"  int status;\n"
39989" \n"
39990"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
39991"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
39992"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
39993"  g_object_unref (app);\n"
39994" \n"
39995"  return status;\n"
39996"}\n"
39997
39998#. (itstool) path: item/p
39999#: C/spinner.c.page:35
40000msgid ""
40001"<link href=\"http://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-get\">GObject</"
40002"link>"
40003msgstr ""
40004"<link href=\"http://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-get\">GObject</"
40005"link>"
40006
40007#. (itstool) path: item/p
40008#: C/spinner.c.page:36 C/togglebutton.c.page:38
40009msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkSpinner.html\">GtkSpinner</link>"
40010msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkSpinner.html\">GtkSpinner</link>"
40011
40012#. (itstool) path: info/title
40013#: C/spinner.js.page:8
40014msgctxt "text"
40015msgid "Spinner (JavaScript)"
40016msgstr "Spinner (JavaScript)"
40017
40018#. (itstool) path: page/code
40019#: C/spinner.js.page:25
40020#, no-wrap
40021msgid ""
40022"#!/usr/bin/gjs\n"
40023"\n"
40024"imports.gi.versions.Gdk = '3.0';\n"
40025"imports.gi.versions.Gtk = '3.0';\n"
40026"\n"
40027"const Gio = imports.gi.Gio;\n"
40028"const GLib = imports.gi.GLib;\n"
40029"const Gtk = imports.gi.Gtk;\n"
40030"const Gdk = imports.gi.Gdk;\n"
40031"\n"
40032"class SpinnerExample {\n"
40033"\n"
40034"    // Create the application itself\n"
40035"    constructor() {\n"
40036"        this.application = new Gtk.Application({\n"
40037"            application_id: 'org.example.jsspinner',\n"
40038"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
40039"        });\n"
40040"\n"
40041"        // Connect 'activate' and 'startup' signals to the callback functions\n"
40042"        this.application.connect('activate', this._onActivate.bind(this));\n"
40043"        this.application.connect('startup', this._onStartup.bind(this));\n"
40044"    }\n"
40045"\n"
40046"    // Callback function for 'activate' signal presents windows when active\n"
40047"    _onActivate() {\n"
40048"        this._window.present();\n"
40049"    }\n"
40050"\n"
40051"    // Callback function for 'startup' signal builds the UI\n"
40052"    _onStartup() {\n"
40053"        this._buildUI();\n"
40054"    }\n"
40055"\n"
40056"    // Build the application's UI\n"
40057"    _buildUI() {\n"
40058"\n"
40059"        // Create the application window\n"
40060"        this._window = new Gtk.ApplicationWindow({\n"
40061"            application: this.application,\n"
40062"            window_position: Gtk.WindowPosition.CENTER,\n"
40063"            title: \"Spinner Example\",\n"
40064"            default_height: 200,\n"
40065"            default_width: 200,\n"
40066"            border_width: 30\n"
40067"        });\n"
40068"\n"
40069"        // Create a spinner which starts spinning automatically\n"
40070"        this._spinner = new Gtk.Spinner ({active: true});\n"
40071"        this._window.add (this._spinner);\n"
40072"\n"
40073"        // Connect a keypress event to the function that makes it start or stop spinning\n"
40074"        this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
40075"\n"
40076"        // Show the window and all child widgets\n"
40077"        this._window.show_all();\n"
40078"    }\n"
40079"\n"
40080"    _onKeyPress(widget, event) {\n"
40081"\n"
40082"        // Get the value of the key that was pressed\n"
40083"        let [, keyval] = event.get_keyval();\n"
40084"\n"
40085"        // If it was the spacebar, toggle the spinner to start or stop\n"
40086"        if (keyval == Gdk.KEY_space) {\n"
40087"            if (this._spinner.active == true)\n"
40088"                this._spinner.stop();\n"
40089"            else\n"
40090"                this._spinner.start();\n"
40091"        }\n"
40092"    }\n"
40093"};\n"
40094"\n"
40095"// Run the application\n"
40096"let app = new SpinnerExample ();\n"
40097"app.application.run (ARGV);\n"
40098msgstr ""
40099"#!/usr/bin/gjs\n"
40100"\n"
40101"imports.gi.versions.Gdk = '3.0';\n"
40102"imports.gi.versions.Gtk = '3.0';\n"
40103"\n"
40104"const Gio = imports.gi.Gio;\n"
40105"const GLib = imports.gi.GLib;\n"
40106"const Gtk = imports.gi.Gtk;\n"
40107"const Gdk = imports.gi.Gdk;\n"
40108"\n"
40109"class SpinnerExample {\n"
40110"\n"
40111"    // Create the application itself\n"
40112"    constructor() {\n"
40113"        this.application = new Gtk.Application({\n"
40114"            application_id: 'org.example.jsspinner',\n"
40115"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
40116"        });\n"
40117"\n"
40118"        // Connect 'activate' and 'startup' signals to the callback functions\n"
40119"        this.application.connect('activate', this._onActivate.bind(this));\n"
40120"        this.application.connect('startup', this._onStartup.bind(this));\n"
40121"    }\n"
40122"\n"
40123"    // Callback function for 'activate' signal presents windows when active\n"
40124"    _onActivate() {\n"
40125"        this._window.present();\n"
40126"    }\n"
40127"\n"
40128"    // Callback function for 'startup' signal builds the UI\n"
40129"    _onStartup() {\n"
40130"        this._buildUI();\n"
40131"    }\n"
40132"\n"
40133"    // Build the application's UI\n"
40134"    _buildUI() {\n"
40135"\n"
40136"        // Create the application window\n"
40137"        this._window = new Gtk.ApplicationWindow({\n"
40138"            application: this.application,\n"
40139"            window_position: Gtk.WindowPosition.CENTER,\n"
40140"            title: \"Spinner Example\",\n"
40141"            default_height: 200,\n"
40142"            default_width: 200,\n"
40143"            border_width: 30\n"
40144"        });\n"
40145"\n"
40146"        // Create a spinner which starts spinning automatically\n"
40147"        this._spinner = new Gtk.Spinner ({active: true});\n"
40148"        this._window.add (this._spinner);\n"
40149"\n"
40150"        // Connect a keypress event to the function that makes it start or stop spinning\n"
40151"        this._window.connect(\"key-press-event\", this._onKeyPress.bind(this));\n"
40152"\n"
40153"        // Show the window and all child widgets\n"
40154"        this._window.show_all();\n"
40155"    }\n"
40156"\n"
40157"    _onKeyPress(widget, event) {\n"
40158"\n"
40159"        // Get the value of the key that was pressed\n"
40160"        let [, keyval] = event.get_keyval();\n"
40161"\n"
40162"        // If it was the spacebar, toggle the spinner to start or stop\n"
40163"        if (keyval == Gdk.KEY_space) {\n"
40164"            if (this._spinner.active == true)\n"
40165"                this._spinner.stop();\n"
40166"            else\n"
40167"                this._spinner.start();\n"
40168"        }\n"
40169"    }\n"
40170"};\n"
40171"\n"
40172"// Run the application\n"
40173"let app = new SpinnerExample ();\n"
40174"app.application.run (ARGV);\n"
40175
40176#. (itstool) path: item/p
40177#: C/spinner.js.page:30
40178msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gdk.html\">Gdk - Key Values</link>"
40179msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gdk.html\">Gdk - 키 값</link>"
40180
40181#. (itstool) path: item/p
40182#: C/spinner.js.page:33 C/togglebutton.js.page:158
40183msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Spinner.html\">Gtk.Spinner</link>"
40184msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Spinner.html\">Gtk.Spinner</link>"
40185
40186#. (itstool) path: info/title
40187#: C/spinner.py.page:8
40188msgctxt "text"
40189msgid "Spinner (Python)"
40190msgstr "Spinner (Python)"
40191
40192#. (itstool) path: section/code
40193#: C/spinner.py.page:31
40194#, no-wrap
40195msgid ""
40196"from gi.repository import Gtk\n"
40197"from gi.repository import Gdk\n"
40198"import sys\n"
40199"\n"
40200"\n"
40201"class MyWindow(Gtk.ApplicationWindow):\n"
40202"    # a window\n"
40203"\n"
40204"    def __init__(self, app):\n"
40205"        Gtk.Window.__init__(self, title=\"Spinner Example\", application=app)\n"
40206"        self.set_default_size(200, 200)\n"
40207"        self.set_border_width(30)\n"
40208"\n"
40209"        # a spinner\n"
40210"        self.spinner = Gtk.Spinner()\n"
40211"        # that by default spins\n"
40212"        self.spinner.start()\n"
40213"        # add the spinner to the window\n"
40214"        self.add(self.spinner)\n"
40215"\n"
40216"    # event handler\n"
40217"    # a signal from the keyboard (space) controls if the spinner stops/starts\n"
40218"    def do_key_press_event(self, event):\n"
40219"        # keyname is the symbolic name of the key value given by the event\n"
40220"        keyname = Gdk.keyval_name(event.keyval)\n"
40221"        # if it is \"space\"\n"
40222"        if keyname == \"space\":\n"
40223"            # and the spinner is active\n"
40224"            if self.spinner.get_property(\"active\"):\n"
40225"                # stop the spinner\n"
40226"                self.spinner.stop()\n"
40227"            # if the spinner is not active\n"
40228"            else:\n"
40229"                # start it again\n"
40230"                self.spinner.start()\n"
40231"        # stop the signal emission\n"
40232"        return True\n"
40233"\n"
40234"\n"
40235"class MyApplication(Gtk.Application):\n"
40236"\n"
40237"    def __init__(self):\n"
40238"        Gtk.Application.__init__(self)\n"
40239"\n"
40240"    def do_activate(self):\n"
40241"        win = MyWindow(self)\n"
40242"        win.show_all()\n"
40243"\n"
40244"    def do_startup(self):\n"
40245"        Gtk.Application.do_startup(self)\n"
40246"\n"
40247"app = MyApplication()\n"
40248"exit_status = app.run(sys.argv)\n"
40249"sys.exit(exit_status)\n"
40250msgstr ""
40251"from gi.repository import Gtk\n"
40252"from gi.repository import Gdk\n"
40253"import sys\n"
40254"\n"
40255"\n"
40256"class MyWindow(Gtk.ApplicationWindow):\n"
40257"    # a window\n"
40258"\n"
40259"    def __init__(self, app):\n"
40260"        Gtk.Window.__init__(self, title=\"Spinner Example\", application=app)\n"
40261"        self.set_default_size(200, 200)\n"
40262"        self.set_border_width(30)\n"
40263"\n"
40264"        # a spinner\n"
40265"        self.spinner = Gtk.Spinner()\n"
40266"        # that by default spins\n"
40267"        self.spinner.start()\n"
40268"        # add the spinner to the window\n"
40269"        self.add(self.spinner)\n"
40270"\n"
40271"    # event handler\n"
40272"    # a signal from the keyboard (space) controls if the spinner stops/starts\n"
40273"    def do_key_press_event(self, event):\n"
40274"        # keyname is the symbolic name of the key value given by the event\n"
40275"        keyname = Gdk.keyval_name(event.keyval)\n"
40276"        # if it is \"space\"\n"
40277"        if keyname == \"space\":\n"
40278"            # and the spinner is active\n"
40279"            if self.spinner.get_property(\"active\"):\n"
40280"                # stop the spinner\n"
40281"                self.spinner.stop()\n"
40282"            # if the spinner is not active\n"
40283"            else:\n"
40284"                # start it again\n"
40285"                self.spinner.start()\n"
40286"        # stop the signal emission\n"
40287"        return True\n"
40288"\n"
40289"\n"
40290"class MyApplication(Gtk.Application):\n"
40291"\n"
40292"    def __init__(self):\n"
40293"        Gtk.Application.__init__(self)\n"
40294"\n"
40295"    def do_activate(self):\n"
40296"        win = MyWindow(self)\n"
40297"        win.show_all()\n"
40298"\n"
40299"    def do_startup(self):\n"
40300"        Gtk.Application.do_startup(self)\n"
40301"\n"
40302"app = MyApplication()\n"
40303"exit_status = app.run(sys.argv)\n"
40304"sys.exit(exit_status)\n"
40305
40306#. (itstool) path: note/p
40307#: C/spinner.py.page:33
40308msgid ""
40309"<code>Gdk.keyval_name(event.keyval)</code> converts the key value <code>event.keyval</code> into a symbolic name. "
40310"The names and corresponding key values can be found <link href=\"http://git.gnome.org/browse/gtk+/tree/gdk/"
40311"gdkkeysyms.h\">here</link>,but for instance <code>GDK_KEY_BackSpace</code> becomes the string <code>\"BackSpace\"</"
40312"code>."
40313msgstr ""
40314"<code>Gdk.keyval_name(event.keyval)</code>은  <code>event.keyval</code> 키 값을 심볼릭 이름으로 변환합니다. 이름과 "
40315"관련 키 값은 <link href=\"http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms.h\">여기</link>에서 알아볼 수 있지"
40316"만, 예를 들어 <code>GDK_KEY_BackSpace</code> 인스턴스는 <code>\"BackSpace\"</code> 문자열입니다."
40317
40318#. (itstool) path: item/p
40319#: C/spinner.py.page:42 C/togglebutton.py.page:46
40320msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSpinner.html\">GtkSpinner</link>"
40321msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSpinner.html\">GtkSpinner</link>"
40322
40323#. (itstool) path: item/p
40324#: C/spinner.py.page:43
40325msgid "<link href=\"http://developer.gnome.org/gdk/stable/gdk-Keyboard-Handling.html\">Key Values</link>"
40326msgstr "<link href=\"http://developer.gnome.org/gdk/stable/gdk-Keyboard-Handling.html\">Key Values</link>"
40327
40328#. (itstool) path: info/title
40329#: C/spinner.vala.page:8
40330msgctxt "text"
40331msgid "Spinner (Vala)"
40332msgstr "Spinner (Vala)"
40333
40334#. (itstool) path: page/code
40335#: C/spinner.vala.page:25
40336#, no-wrap
40337msgid ""
40338"public class MyWindow : Gtk.ApplicationWindow {\n"
40339"\n"
40340"\tGtk.Widget spinner;\n"
40341"\n"
40342"\tinternal MyWindow (MyApplication app) {\n"
40343"\n"
40344"\t\tObject (application: app, title: \"Spinner Example\");\n"
40345"\n"
40346"\t\tthis.set_default_size (200, 200);\n"
40347"\t\tthis.border_width = 30;\n"
40348"\n"
40349"\t\tspinner = new Gtk.Spinner ();\n"
40350"\n"
40351"\t\tthis.add (spinner);\n"
40352"\t\t(spinner as Gtk.Spinner).active = true;\n"
40353"\t\tspinner.show ();\n"
40354"\t}\n"
40355"\n"
40356"\tprotected override bool key_press_event (Gdk.EventKey event) {\n"
40357"\n"
40358"\t\t//print (Gdk.keyval_name(event.keyval) +\"\\n\");\n"
40359"\t\tif (Gdk.keyval_name(event.keyval) == \"space\") {\n"
40360"\n"
40361"\t\t\tif ((spinner as Gtk.Spinner).active) {\n"
40362"\t\t\t\t(spinner as Gtk.Spinner).stop ();\n"
40363"\t\t\t\t//spinner.visible = false;\n"
40364"\t\t\t}\n"
40365"\t\t\telse {\n"
40366"\t\t\t\t(spinner as Gtk.Spinner).start ();\n"
40367"\t\t\t\t//spinner.visible = true;\n"
40368"\t\t\t}\n"
40369"\t\t}\n"
40370"\t\treturn true;\n"
40371"\t}\n"
40372"}\n"
40373"\n"
40374"public class MyApplication : Gtk.Application {\n"
40375"\n"
40376"\tprotected override void activate () {\n"
40377"\t\tMyWindow window = new MyWindow (this);\n"
40378"\t\twindow.show ();\n"
40379"\t}\n"
40380"\n"
40381"\tinternal MyApplication () {\n"
40382"\t\tObject (application_id: \"org.example.spinner\");\n"
40383"\t}\n"
40384"}\n"
40385"\n"
40386"public int main (string[] args) {\n"
40387"\treturn new MyApplication ().run (args);\n"
40388"}\n"
40389msgstr ""
40390"public class MyWindow : Gtk.ApplicationWindow {\n"
40391"\n"
40392"\tGtk.Widget spinner;\n"
40393"\n"
40394"\tinternal MyWindow (MyApplication app) {\n"
40395"\n"
40396"\t\tObject (application: app, title: \"Spinner Example\");\n"
40397"\n"
40398"\t\tthis.set_default_size (200, 200);\n"
40399"\t\tthis.border_width = 30;\n"
40400"\n"
40401"\t\tspinner = new Gtk.Spinner ();\n"
40402"\n"
40403"\t\tthis.add (spinner);\n"
40404"\t\t(spinner as Gtk.Spinner).active = true;\n"
40405"\t\tspinner.show ();\n"
40406"\t}\n"
40407"\n"
40408"\tprotected override bool key_press_event (Gdk.EventKey event) {\n"
40409"\n"
40410"\t\t//print (Gdk.keyval_name(event.keyval) +\"\\n\");\n"
40411"\t\tif (Gdk.keyval_name(event.keyval) == \"space\") {\n"
40412"\n"
40413"\t\t\tif ((spinner as Gtk.Spinner).active) {\n"
40414"\t\t\t\t(spinner as Gtk.Spinner).stop ();\n"
40415"\t\t\t\t//spinner.visible = false;\n"
40416"\t\t\t}\n"
40417"\t\t\telse {\n"
40418"\t\t\t\t(spinner as Gtk.Spinner).start ();\n"
40419"\t\t\t\t//spinner.visible = true;\n"
40420"\t\t\t}\n"
40421"\t\t}\n"
40422"\t\treturn true;\n"
40423"\t}\n"
40424"}\n"
40425"\n"
40426"public class MyApplication : Gtk.Application {\n"
40427"\n"
40428"\tprotected override void activate () {\n"
40429"\t\tMyWindow window = new MyWindow (this);\n"
40430"\t\twindow.show ();\n"
40431"\t}\n"
40432"\n"
40433"\tinternal MyApplication () {\n"
40434"\t\tObject (application_id: \"org.example.spinner\");\n"
40435"\t}\n"
40436"}\n"
40437"\n"
40438"public int main (string[] args) {\n"
40439"\treturn new MyApplication ().run (args);\n"
40440"}\n"
40441
40442#. (itstool) path: item/p
40443#: C/spinner.vala.page:30
40444msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Widget.html\">Gtk.Widget</link>"
40445msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Widget.html\">Gtk.Widget</link>"
40446
40447#. (itstool) path: item/p
40448#: C/spinner.vala.page:31
40449msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Spinner.html\">Gtk.Spinner</link>"
40450msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Spinner.html\">Gtk.Spinner</link>"
40451
40452#. (itstool) path: item/p
40453#: C/spinner.vala.page:32
40454msgid "<link href=\"http://www.valadoc.org/gdk-3.0/Gdk.keyval_name.html\">Gdk.keyval_name</link>"
40455msgstr "<link href=\"http://www.valadoc.org/gdk-3.0/Gdk.keyval_name.html\">Gdk.keyval_name</link>"
40456
40457#. (itstool) path: info/title
40458#: C/statusbar.c.page:8
40459msgctxt "text"
40460msgid "Statusbar (C)"
40461msgstr "Statusbar (C)"
40462
40463#. (itstool) path: info/desc
40464#: C/statusbar.c.page:22 C/statusbar.py.page:20 C/statusbar.vala.page:21
40465msgid "Report messages of minor importance to the user"
40466msgstr "별로 중요하지 않은 메시지를 사용자에게 알립니다"
40467
40468#. (itstool) path: page/title
40469#: C/statusbar.c.page:25 C/statusbar.js.page:21 C/statusbar.py.page:23 C/statusbar.vala.page:24
40470msgid "Statusbar"
40471msgstr "Statusbar"
40472
40473#. (itstool) path: page/media
40474#. This is a reference to an external file such as an image or video. When
40475#. the file changes, the md5 hash will change to let you know you need to
40476#. update your localized copy. The msgstr is not used at all. Set it to
40477#. whatever you like once you have updated your copy of the file.
40478#: C/statusbar.c.page:27
40479msgctxt "_"
40480msgid "external ref='media/statusbar3.png' md5='60c71604fb44656237ee66dfb39a8689'"
40481msgstr ""
40482
40483#. (itstool) path: page/p
40484#: C/statusbar.c.page:28
40485msgid ""
40486"This statusbar is used to demonstrate how messages are stacked in a last-in-first-out order. The message at the "
40487"top of the stack is always the one displayed."
40488msgstr ""
40489"Statusbar는 가장 나중에 넣은 메시지를 먼저 빼내는 순으로 스택에 메시지를 넣어 다루는 방법을 보여줍니다. 항상 스택 "
40490"상단의 메시지만 나타납니다."
40491
40492#. (itstool) path: page/code
40493#: C/statusbar.c.page:30
40494#, no-wrap
40495msgid ""
40496"\n"
40497"#include &lt;gtk/gtk.h&gt;\n"
40498"\n"
40499"\n"
40500"\n"
40501"/*Callback function in which pushes an item onto the statusbar*/\n"
40502"static void \n"
40503"push_item (GtkWidget *widget,\n"
40504"           gpointer   data)\n"
40505"{\n"
40506"  GtkWidget *status_bar = data;\n"
40507"\n"
40508"  /*Create a context id, which is used to uniquely identify \n"
40509"   *the source of a message*/\n"
40510"  guint context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (status_bar), \n"
40511"                                                   \"Statusbar example\");\n"
40512"\n"
40513"  /*Count is used to keep track of the amount of items \n"
40514"  the user is pushing/popping*/\n"
40515"  static int count = 1;\n"
40516"  char hold_output[20];\n"
40517"  \n"
40518"  /*This is a safer form of the standard sprintf () function. The output is \n"
40519"  guaranteed in this case to not exceed 20 characters, and the result is stored\n"
40520"  into the 'hold_output' variable*/\n"
40521"  g_snprintf (hold_output, 20, \"Item %d\", count++);\n"
40522"  gtk_statusbar_push (GTK_STATUSBAR (status_bar), \n"
40523"                     context_id, \n"
40524"                     hold_output);\n"
40525"}\n"
40526"\n"
40527"\n"
40528"\n"
40529"/*Callback function that is used to pop an item off the statusbar*/\n"
40530"static void \n"
40531"pop_item (GtkWidget *widget,\n"
40532"          gpointer   data )\n"
40533"{\n"
40534"  GtkWidget *status_bar = data;\n"
40535"  guint context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (status_bar), \n"
40536"                                                   \"Statusbar example\");\n"
40537"\n"
40538"  gtk_statusbar_pop (GTK_STATUSBAR (status_bar), context_id);\n"
40539"}\n"
40540"\n"
40541"\n"
40542"\n"
40543"static void\n"
40544"activate (GtkApplication *app,\n"
40545"          gpointer        user_data)\n"
40546"{\n"
40547"    GtkWidget *grid;\n"
40548"    GtkWidget *window;\n"
40549"    GtkWidget *status_bar;\n"
40550"    GtkWidget *pop_button;\n"
40551"    GtkWidget *push_button;\n"
40552"\n"
40553"    /*Create a window with a title, border width, and a default size**/\n"
40554"    window = gtk_application_window_new (app);\n"
40555"    gtk_window_set_default_size (GTK_WINDOW (window), 220, 100);\n"
40556"    gtk_window_set_title (GTK_WINDOW (window), \"Statusbar Example\");\n"
40557"    gtk_container_set_border_width (GTK_CONTAINER(window), 10);\n"
40558"    \n"
40559"    /*Create the status bar, which is held in the global variable*/\n"
40560"    status_bar = gtk_statusbar_new ();      \n"
40561"    \n"
40562"    /*Create the buttons with labels*/\n"
40563"    push_button = gtk_button_new_with_label (\"push item\");\n"
40564"    pop_button = gtk_button_new_with_label (\"pop last item\");\n"
40565"    \n"
40566"    /*Create the grid, and attach the buttons/statusbar accordingly*/\n"
40567"    grid = gtk_grid_new ();\n"
40568"    gtk_grid_attach (GTK_GRID (grid), push_button, 0,1,1,1);\n"
40569"    gtk_grid_attach (GTK_GRID (grid), pop_button, 0,2,1,1);\n"
40570"    gtk_grid_attach (GTK_GRID (grid), status_bar, 0,3,1,1);\n"
40571"    \n"
40572"    /*Connecting the clicked signals to the corresponding callback functions*/\n"
40573"    g_signal_connect (GTK_BUTTON (push_button), \"clicked\", \n"
40574"                      G_CALLBACK (push_item), status_bar);\n"
40575"    g_signal_connect (GTK_BUTTON (pop_button), \"clicked\", \n"
40576"                      G_CALLBACK (pop_item), status_bar);\n"
40577"    \n"
40578"    /*Attach the grid holding the child widgets onto the window, and show all*/\n"
40579"    gtk_container_add (GTK_CONTAINER (window), grid);\n"
40580"    gtk_widget_show_all (window);\n"
40581"}\n"
40582"\n"
40583"\n"
40584"\n"
40585"int\n"
40586"main (int argc, char **argv)\n"
40587"{\n"
40588"  GtkApplication *app;\n"
40589"  int status;\n"
40590"\n"
40591"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
40592"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
40593"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
40594"  g_object_unref (app);\n"
40595"\n"
40596"  return status;\n"
40597"}\n"
40598msgstr ""
40599"\n"
40600"#include &lt;gtk/gtk.h&gt;\n"
40601"\n"
40602"\n"
40603"\n"
40604"/*Callback function in which pushes an item onto the statusbar*/\n"
40605"static void \n"
40606"push_item (GtkWidget *widget,\n"
40607"           gpointer   data)\n"
40608"{\n"
40609"  GtkWidget *status_bar = data;\n"
40610"\n"
40611"  /*Create a context id, which is used to uniquely identify \n"
40612"   *the source of a message*/\n"
40613"  guint context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (status_bar), \n"
40614"                                                   \"Statusbar example\");\n"
40615"\n"
40616"  /*Count is used to keep track of the amount of items \n"
40617"  the user is pushing/popping*/\n"
40618"  static int count = 1;\n"
40619"  char hold_output[20];\n"
40620"  \n"
40621"  /*This is a safer form of the standard sprintf () function. The output is \n"
40622"  guaranteed in this case to not exceed 20 characters, and the result is stored\n"
40623"  into the 'hold_output' variable*/\n"
40624"  g_snprintf (hold_output, 20, \"Item %d\", count++);\n"
40625"  gtk_statusbar_push (GTK_STATUSBAR (status_bar), \n"
40626"                     context_id, \n"
40627"                     hold_output);\n"
40628"}\n"
40629"\n"
40630"\n"
40631"\n"
40632"/*Callback function that is used to pop an item off the statusbar*/\n"
40633"static void \n"
40634"pop_item (GtkWidget *widget,\n"
40635"          gpointer   data )\n"
40636"{\n"
40637"  GtkWidget *status_bar = data;\n"
40638"  guint context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (status_bar), \n"
40639"                                                   \"Statusbar example\");\n"
40640"\n"
40641"  gtk_statusbar_pop (GTK_STATUSBAR (status_bar), context_id);\n"
40642"}\n"
40643"\n"
40644"\n"
40645"\n"
40646"static void\n"
40647"activate (GtkApplication *app,\n"
40648"          gpointer        user_data)\n"
40649"{\n"
40650"    GtkWidget *grid;\n"
40651"    GtkWidget *window;\n"
40652"    GtkWidget *status_bar;\n"
40653"    GtkWidget *pop_button;\n"
40654"    GtkWidget *push_button;\n"
40655"\n"
40656"    /*Create a window with a title, border width, and a default size**/\n"
40657"    window = gtk_application_window_new (app);\n"
40658"    gtk_window_set_default_size (GTK_WINDOW (window), 220, 100);\n"
40659"    gtk_window_set_title (GTK_WINDOW (window), \"Statusbar Example\");\n"
40660"    gtk_container_set_border_width (GTK_CONTAINER(window), 10);\n"
40661"    \n"
40662"    /*Create the status bar, which is held in the global variable*/\n"
40663"    status_bar = gtk_statusbar_new ();      \n"
40664"    \n"
40665"    /*Create the buttons with labels*/\n"
40666"    push_button = gtk_button_new_with_label (\"push item\");\n"
40667"    pop_button = gtk_button_new_with_label (\"pop last item\");\n"
40668"    \n"
40669"    /*Create the grid, and attach the buttons/statusbar accordingly*/\n"
40670"    grid = gtk_grid_new ();\n"
40671"    gtk_grid_attach (GTK_GRID (grid), push_button, 0,1,1,1);\n"
40672"    gtk_grid_attach (GTK_GRID (grid), pop_button, 0,2,1,1);\n"
40673"    gtk_grid_attach (GTK_GRID (grid), status_bar, 0,3,1,1);\n"
40674"    \n"
40675"    /*Connecting the clicked signals to the corresponding callback functions*/\n"
40676"    g_signal_connect (GTK_BUTTON (push_button), \"clicked\", \n"
40677"                      G_CALLBACK (push_item), status_bar);\n"
40678"    g_signal_connect (GTK_BUTTON (pop_button), \"clicked\", \n"
40679"                      G_CALLBACK (pop_item), status_bar);\n"
40680"    \n"
40681"    /*Attach the grid holding the child widgets onto the window, and show all*/\n"
40682"    gtk_container_add (GTK_CONTAINER (window), grid);\n"
40683"    gtk_widget_show_all (window);\n"
40684"}\n"
40685"\n"
40686"\n"
40687"\n"
40688"int\n"
40689"main (int argc, char **argv)\n"
40690"{\n"
40691"  GtkApplication *app;\n"
40692"  int status;\n"
40693"\n"
40694"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
40695"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
40696"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
40697"  g_object_unref (app);\n"
40698"\n"
40699"  return status;\n"
40700"}\n"
40701
40702#. (itstool) path: item/p
40703#: C/statusbar.c.page:38
40704msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkStatusbar.html\">GtkStatusBar</link>"
40705msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkStatusbar.html\">GtkStatusBar</link>"
40706
40707#. (itstool) path: item/p
40708#: C/statusbar.c.page:39
40709msgid ""
40710"<link href=\"http://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-snprintf\">String Utility "
40711"Functions</link>"
40712msgstr ""
40713"<link href=\"http://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-snprintf\">String Utility "
40714"Functions</link>"
40715
40716#. (itstool) path: info/title
40717#: C/statusbar.js.page:8
40718msgctxt "text"
40719msgid "Statusbar (JavaScript)"
40720msgstr "Statusbar (JavaScript)"
40721
40722#. (itstool) path: info/desc
40723#: C/statusbar.js.page:18
40724msgid "Show notifications in a dedicated statusbar"
40725msgstr "지정 상태 표시줄에 알림 표시"
40726
40727#. (itstool) path: page/media
40728#. This is a reference to an external file such as an image or video. When
40729#. the file changes, the md5 hash will change to let you know you need to
40730#. update your localized copy. The msgstr is not used at all. Set it to
40731#. whatever you like once you have updated your copy of the file.
40732#: C/statusbar.js.page:22
40733msgctxt "_"
40734msgid "external ref='media/statusbar2.png' md5='ff6f7e5b270827ca98b2d5f7087aa766'"
40735msgstr ""
40736
40737#. (itstool) path: page/p
40738#: C/statusbar.js.page:23
40739msgid ""
40740"This statusbar keeps track of how many times you've clicked a button. Applications like <link href=\"http://"
40741"projects.gnome.org/gedit/\">gedit</link> use statusbars to display information at a glance, and show notifications "
40742"without interrupting the user."
40743msgstr ""
40744"이 상태 표시줄은 단추를 얼마나 눌렀는지 횟수 정보를 지니고 있습니다. <link href=\"http://projects.gnome.org/gedit/"
40745"\">지에디트</link>의 경우는 상태 표시줄을 활용하여 잠깐 살펴볼 정보를 나타내고 사용자의 일을 방해하지 않으면서 알림"
40746"을 보여줍니다."
40747
40748#. (itstool) path: page/p
40749#: C/statusbar.js.page:24
40750msgid ""
40751"Messages pushed to a statusbar go on top of its stack, and can be popped off to show the next-most recent one. You "
40752"can also clear away every message of a specific type all at once. This sample application demonstrates these "
40753"functions."
40754msgstr ""
40755"상태 표시줄에 밀어넣은 메시지는 스택의 상단에 있으며, 가장 최근에 밀어넣은 순으로 보여주면서 빼낼 수 있습니다. 지"
40756"정 형식의 모든 메시지를 한번에 빼낼 수 있습니다. 이 예제 프로그램에서는 이런 기능을 보여드립니다."
40757
40758#. (itstool) path: section/code
40759#: C/statusbar.js.page:41
40760#, no-wrap
40761msgid ""
40762"\n"
40763"const StatusbarExample = new Lang.Class({\n"
40764"    Name: 'Statusbar Example',\n"
40765"\n"
40766"    // Create the application itself\n"
40767"    _init: function() {\n"
40768"        this.application = new Gtk.Application({\n"
40769"            application_id: 'org.example.jsstatusbar',\n"
40770"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
40771"        });\n"
40772"\n"
40773"    // Connect 'activate' and 'startup' signals to the callback functions\n"
40774"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
40775"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
40776"    },\n"
40777"\n"
40778"    // Callback function for 'activate' signal presents window when active\n"
40779"    _onActivate: function() {\n"
40780"        this._window.present();\n"
40781"    },\n"
40782"\n"
40783"    // Callback function for 'startup' signal builds the UI\n"
40784"    _onStartup: function() {\n"
40785"        this._buildUI ();\n"
40786"    },\n"
40787msgstr ""
40788"\n"
40789"const StatusbarExample = new Lang.Class({\n"
40790"    Name: 'Statusbar Example',\n"
40791"\n"
40792"    // Create the application itself\n"
40793"    _init: function() {\n"
40794"        this.application = new Gtk.Application({\n"
40795"            application_id: 'org.example.jsstatusbar',\n"
40796"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
40797"        });\n"
40798"\n"
40799"    // Connect 'activate' and 'startup' signals to the callback functions\n"
40800"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
40801"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
40802"    },\n"
40803"\n"
40804"    // Callback function for 'activate' signal presents window when active\n"
40805"    _onActivate: function() {\n"
40806"        this._window.present();\n"
40807"    },\n"
40808"\n"
40809"    // Callback function for 'startup' signal builds the UI\n"
40810"    _onStartup: function() {\n"
40811"        this._buildUI ();\n"
40812"    },\n"
40813
40814#. (itstool) path: section/p
40815#: C/statusbar.js.page:67
40816msgid ""
40817"All the code for this sample goes in the StatusbarExample class. The above code creates a <link href=\"http://www."
40818"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to go "
40819"in."
40820msgstr ""
40821"이 예제의 모든 코드는 StatusbarExample 클래스에 들어갑니다. 위 코드는 위젯과 창을 넣는 <link href=\"http://www."
40822"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만듭니다."
40823
40824#. (itstool) path: section/code
40825#: C/statusbar.js.page:68
40826#, no-wrap
40827msgid ""
40828"\n"
40829"    // Build the application's UI\n"
40830"    _buildUI: function() {\n"
40831"\n"
40832"        // Create the application window\n"
40833"        this._window = new Gtk.ApplicationWindow({\n"
40834"            application: this.application,\n"
40835"            window_position: Gtk.WindowPosition.CENTER,\n"
40836"            default_height: 120,\n"
40837"            default_width: 300,\n"
40838"            title: \"Button Clicker\"});\n"
40839"\n"
40840"        // Create a paned interface\n"
40841"        this._panes = new Gtk.Paned ({\n"
40842"            orientation: Gtk.Orientation.VERTICAL });\n"
40843msgstr ""
40844"\n"
40845"    // Build the application's UI\n"
40846"    _buildUI: function() {\n"
40847"\n"
40848"        // Create the application window\n"
40849"        this._window = new Gtk.ApplicationWindow({\n"
40850"            application: this.application,\n"
40851"            window_position: Gtk.WindowPosition.CENTER,\n"
40852"            default_height: 120,\n"
40853"            default_width: 300,\n"
40854"            title: \"Button Clicker\"});\n"
40855"\n"
40856"        // Create a paned interface\n"
40857"        this._panes = new Gtk.Paned ({\n"
40858"            orientation: Gtk.Orientation.VERTICAL });\n"
40859
40860#. (itstool) path: section/p
40861#: C/statusbar.js.page:84
40862msgid ""
40863"The _buildUI function is where we put all the code to create the application's user interface. The first step is "
40864"creating a new <link href=\"GtkApplicationWindow.js.page\">Gtk.ApplicationWindow</link> to put all our widgets "
40865"into. The next step is to create a vertically-oriented Gtk.Paned interface, to divide the window up into two "
40866"sections. This way the statusbar looks like those used in other applications, and it stays at the bottom of the "
40867"window, even if the user resizes it."
40868msgstr ""
40869"_buildUI 함수는 프로그램 사용자 인터페이스를 만들 모든 코드를 넣는 곳입니다. 첫번째 단계에서는 모든 위젯을 넣을 새 "
40870"<link href=\"GtkApplicationWindow.js.page\">Gtk.ApplicationWindow</link>를 만듭니다. 그 다음 단계에서는 수직 방향 "
40871"Gtk.Paned 인터페이스를 만들어 창을 두 부분으로 나눕니다. 이 방식으로 상태 표시줄을 다른 프로그램에서 나타나는 것처"
40872"럼 표시하고, 사용자가 창 크기를 조절하더라도 창 하단에 머물러 있습니다."
40873
40874#. (itstool) path: section/title
40875#: C/statusbar.js.page:88
40876msgid "Creating the buttons"
40877msgstr "단추 만들기"
40878
40879#. (itstool) path: section/code
40880#: C/statusbar.js.page:89
40881#, no-wrap
40882msgid ""
40883"\n"
40884"        // Create the main button\n"
40885"        this._clickMe = new Gtk.Button ({\n"
40886"            label: \"Click Me!\" });\n"
40887"        this._clickMe.connect (\"clicked\", Lang.bind (this, this._clicked));\n"
40888"\n"
40889"        // Create the back button\n"
40890"        this._backButton = new Gtk.Button ({\n"
40891"            label: \"gtk-go-back\",\n"
40892"            use_stock: true });\n"
40893"        this._backButton.connect (\"clicked\", Lang.bind (this, this._back));\n"
40894"\n"
40895"        // Create the clear button\n"
40896"        this._clearButton = new Gtk.Button ({\n"
40897"            label: \"gtk-clear\",\n"
40898"            use_stock: true });\n"
40899"        this._clearButton.connect (\"clicked\", Lang.bind (this, this._clear));\n"
40900msgstr ""
40901"\n"
40902"        // Create the main button\n"
40903"        this._clickMe = new Gtk.Button ({\n"
40904"            label: \"Click Me!\" });\n"
40905"        this._clickMe.connect (\"clicked\", Lang.bind (this, this._clicked));\n"
40906"\n"
40907"        // Create the back button\n"
40908"        this._backButton = new Gtk.Button ({\n"
40909"            label: \"gtk-go-back\",\n"
40910"            use_stock: true });\n"
40911"        this._backButton.connect (\"clicked\", Lang.bind (this, this._back));\n"
40912"\n"
40913"        // Create the clear button\n"
40914"        this._clearButton = new Gtk.Button ({\n"
40915"            label: \"gtk-clear\",\n"
40916"            use_stock: true });\n"
40917"        this._clearButton.connect (\"clicked\", Lang.bind (this, this._clear));\n"
40918
40919#. (itstool) path: section/p
40920#: C/statusbar.js.page:107
40921msgid ""
40922"This code creates the three <link href=\"button.js.page\">Gtk.Buttons</link> we'll use to push a new message to "
40923"the statusbar, pop the last one off, and clear all existing messages. The \"back\" and \"clear\" buttons are <link "
40924"href=\"https://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html\">stock buttons</link>, which are automatically "
40925"translated into any language GNOME supports."
40926msgstr ""
40927"이 코드는 상태 표시줄에서 새 메시지를 밀어넣고, 마지막 매시지를 빼내며, 기존 모든 메시지를 지울 때 쓸 <link href="
40928"\"button.js.page\">Gtk.Buttons</link> 세 개를 만듭니다. \"뒤로\"와 \"지우기\" 단추는 그놈에서 지원하는 언어로 이미 "
40929"자동으로 번역해주는 <link href=\"https://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html\">스톡 단추</link> 입니"
40930"다."
40931
40932#. (itstool) path: section/code
40933#: C/statusbar.js.page:109
40934#, no-wrap
40935msgid ""
40936"\n"
40937"        // Put the buttons in a grid\n"
40938"        this._grid = new Gtk.Grid ({\n"
40939"            halign: Gtk.Align.CENTER,\n"
40940"            valign: Gtk.Align.CENTER });\n"
40941"        this._grid.attach (this._backButton, 0, 0, 1, 1);\n"
40942"        this._grid.attach_next_to (this._clickMe, this._backButton, Gtk.PositionType.RIGHT, 1, 1);\n"
40943"        this._grid.attach_next_to (this._clearButton, this._clickMe, Gtk.PositionType.RIGHT, 1, 1);\n"
40944"\n"
40945"        // Put the grid in a large frame that fills most of the window\n"
40946"        this._topFrame = new Gtk.Frame ({\n"
40947"            border_width: 20,\n"
40948"            height_request: 90,\n"
40949"            width_request: 300});\n"
40950"        this._topFrame.add (this._grid);\n"
40951msgstr ""
40952"\n"
40953"        // Put the buttons in a grid\n"
40954"        this._grid = new Gtk.Grid ({\n"
40955"            halign: Gtk.Align.CENTER,\n"
40956"            valign: Gtk.Align.CENTER });\n"
40957"        this._grid.attach (this._backButton, 0, 0, 1, 1);\n"
40958"        this._grid.attach_next_to (this._clickMe, this._backButton, Gtk.PositionType.RIGHT, 1, 1);\n"
40959"        this._grid.attach_next_to (this._clearButton, this._clickMe, Gtk.PositionType.RIGHT, 1, 1);\n"
40960"\n"
40961"        // Put the grid in a large frame that fills most of the window\n"
40962"        this._topFrame = new Gtk.Frame ({\n"
40963"            border_width: 20,\n"
40964"            height_request: 90,\n"
40965"            width_request: 300});\n"
40966"        this._topFrame.add (this._grid);\n"
40967
40968#. (itstool) path: section/p
40969#: C/statusbar.js.page:125
40970msgid ""
40971"This code creates the <link href=\"grid.js.page\">Gtk.Grid</link> that we'll use to organize the buttons, and "
40972"attaches the buttons to it in order. It then creates a <link href=\"paned.js.page\">Gtk.Frame</link> which will "
40973"take up most of the window and has a large amount of padding around the buttons, and adds the Grid to the Frame. "
40974"Note that we still need to put the Frame into the Paned interface, and then add it to the ApplicationWindow."
40975msgstr ""
40976"단추를 모아 정돈하고 순서대로 단추를 붙여넣는데 쓸 <link href=\"grid.js.page\">Gtk.Grid</link>를 만듭니다. 그 다음 "
40977"대부분 창을  차지하고, 단추 주변에 상당히 많은 여백을 차지하는 <link href=\"paned.js.page\">Gtk.Frame</link>를 만들"
40978"고 그리드를 프레임에 추가합니다. 참고로 프레임을 Pane 인터페이스에 넣고 ApplicationWindow에 추가해야합니다."
40979
40980#. (itstool) path: section/title
40981#: C/statusbar.js.page:129
40982msgid "Creating the statusbar"
40983msgstr "상태 표시줄 만들기"
40984
40985#. (itstool) path: section/code
40986#: C/statusbar.js.page:130
40987#, no-wrap
40988msgid ""
40989"\n"
40990"        // Create the statusbar\n"
40991"        this._statusbar = new Gtk.Statusbar();\n"
40992"\n"
40993"        // Keep track of the number of times the button has been clicked\n"
40994"        this.Clicks = 0;\n"
40995"        this.ContextID = this._statusbar.get_context_id (\"Number of Clicks\");\n"
40996"\n"
40997"        // Give the statusbar an initial message\n"
40998"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
40999"\n"
41000"        // Put the statusbar in its own frame at the bottom\n"
41001"        this._barFrame = new Gtk.Frame ({\n"
41002"            height_request: 30 });\n"
41003"        this._barFrame.add (this._statusbar);\n"
41004msgstr ""
41005"\n"
41006"        // Create the statusbar\n"
41007"        this._statusbar = new Gtk.Statusbar();\n"
41008"\n"
41009"        // Keep track of the number of times the button has been clicked\n"
41010"        this.Clicks = 0;\n"
41011"        this.ContextID = this._statusbar.get_context_id (\"Number of Clicks\");\n"
41012"\n"
41013"        // Give the statusbar an initial message\n"
41014"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41015"\n"
41016"        // Put the statusbar in its own frame at the bottom\n"
41017"        this._barFrame = new Gtk.Frame ({\n"
41018"            height_request: 30 });\n"
41019"        this._barFrame.add (this._statusbar);\n"
41020
41021#. (itstool) path: section/p
41022#: C/statusbar.js.page:146
41023msgid ""
41024"Here we create the Gtk.Statusbar, and push a message to it to start off with. Then we give it its own narrow frame "
41025"at the bottom of the window."
41026msgstr "Gtk.Statusbar를 만들고 시작할 때 메시지를 밀어넣습니다. 그 다음 창 하단에 좁은 틀을 확보합니다."
41027
41028#. (itstool) path: section/p
41029#: C/statusbar.js.page:147
41030msgid ""
41031"Every message needs to have a context id, which is an integer value you can get from the statusbar with the "
41032"get_context_id() function. Its only parameter is the string value you use to describe that particular context id. "
41033"Normally, you'll get a new context id for different kinds of messages, so that you can use the remove() function "
41034"to remove a specific message and not just the most recent one on the stack. This is a simple example with only one "
41035"kind of message, though, so we're just using one for everything."
41036msgstr ""
41037"모든 메시지에는 컨텍스트 ID가 필요한데 get_context_id() 함수로 상태 표시줄에서 가져올 수 있는 정수값입니다. 각각의 "
41038"컨텍스트 ID를 설명할 때 여러분이 활용할 유일한 매개 변수는 문자열 값 뿐입니다. 보통 메시지의 다양한 유형에 대해 새 "
41039"컨텍스트 ID를 받기에 remove() 함수는 스택에 있는 최근 메시지가 아닌 지정 메시지를 제거할 목적으로 활용할 수 있습니"
41040"다. 이 부분은 어떤 종류의 메시지에 대한 예제이므로 모든 경우에 대해 한가지만 활용하겠습니다."
41041
41042#. (itstool) path: section/p
41043#: C/statusbar.js.page:148
41044msgid ""
41045"We use the push() function to push a new message onto the stack. Its first parameter is the context id, and its "
41046"second is the message."
41047msgstr ""
41048"스택에 새 메시지를 밀어넣을때는 push() 함수를 사용합니다. 처음 매개변수는 컨텍스트 ID며 두번째는 메시지입니다."
41049
41050#. (itstool) path: section/code
41051#: C/statusbar.js.page:149
41052#, no-wrap
41053msgid ""
41054"\n"
41055"        // Assemble the frames into the paned interface\n"
41056"        this._panes.pack1 (this._topFrame, true, false);\n"
41057"        this._panes.pack2 (this._barFrame, false, false);\n"
41058"\n"
41059"        // Put the panes into the window\n"
41060"        this._window.add (this._panes);\n"
41061"\n"
41062"        // Show the window and all child widgets\n"
41063"        this._window.show_all();\n"
41064"    },\n"
41065msgstr ""
41066"\n"
41067"        // Assemble the frames into the paned interface\n"
41068"        this._panes.pack1 (this._topFrame, true, false);\n"
41069"        this._panes.pack2 (this._barFrame, false, false);\n"
41070"\n"
41071"        // Put the panes into the window\n"
41072"        this._window.add (this._panes);\n"
41073"\n"
41074"        // Show the window and all child widgets\n"
41075"        this._window.show_all();\n"
41076"    },\n"
41077
41078#. (itstool) path: section/p
41079#: C/statusbar.js.page:161
41080msgid ""
41081"This code finishes up creating the window, by packing the frames into the pane, adding it to the window, and "
41082"telling the window to show all child widgets."
41083msgstr ""
41084"이 코드는 하위 창에 프레임을 패킹해넣고 창에 추가한 다음, 창에게 하위 위젯을 나타내도록 지시하여 창 만들기를 끝냅니"
41085"다."
41086
41087#. (itstool) path: section/title
41088#: C/statusbar.js.page:165
41089msgid "Functions for interacting with the statusbar"
41090msgstr "상태 표시줄을 다루는 함수"
41091
41092#. (itstool) path: section/code
41093#: C/statusbar.js.page:166
41094#, no-wrap
41095msgid ""
41096"\n"
41097"    _clicked: function() {\n"
41098"\n"
41099"        // Increment the number of clicks by 1\n"
41100"        this.Clicks++;\n"
41101"\n"
41102"        // Update the statusbar with the new number of clicks\n"
41103"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41104"\n"
41105"    },\n"
41106"\n"
41107"\n"
41108"\n"
41109"    _back: function () {\n"
41110"\n"
41111"        // If there have been any clicks, decrement by 1 and remove last statusbar update\n"
41112"        if (this.Clicks &gt; 0 ) {\n"
41113"            this.Clicks--;\n"
41114"            this._statusbar.pop (this.ContextID);\n"
41115"        };\n"
41116"\n"
41117"    },\n"
41118"\n"
41119"\n"
41120"\n"
41121"    _clear: function () {\n"
41122"\n"
41123"        // Reset the number of clicks\n"
41124"        this.Clicks = 0;\n"
41125"\n"
41126"        // Wipe out all the messages pushed to the statusbar\n"
41127"        this._statusbar.remove_all (this.ContextID);\n"
41128"\n"
41129"        // Reset the statusbar's message\n"
41130"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41131"\n"
41132"    }\n"
41133"\n"
41134"});\n"
41135msgstr ""
41136"\n"
41137"    _clicked: function() {\n"
41138"\n"
41139"        // Increment the number of clicks by 1\n"
41140"        this.Clicks++;\n"
41141"\n"
41142"        // Update the statusbar with the new number of clicks\n"
41143"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41144"\n"
41145"    },\n"
41146"\n"
41147"\n"
41148"\n"
41149"    _back: function () {\n"
41150"\n"
41151"        // If there have been any clicks, decrement by 1 and remove last statusbar update\n"
41152"        if (this.Clicks &gt; 0 ) {\n"
41153"            this.Clicks--;\n"
41154"            this._statusbar.pop (this.ContextID);\n"
41155"        };\n"
41156"\n"
41157"    },\n"
41158"\n"
41159"\n"
41160"\n"
41161"    _clear: function () {\n"
41162"\n"
41163"        // Reset the number of clicks\n"
41164"        this.Clicks = 0;\n"
41165"\n"
41166"        // Wipe out all the messages pushed to the statusbar\n"
41167"        this._statusbar.remove_all (this.ContextID);\n"
41168"\n"
41169"        // Reset the statusbar's message\n"
41170"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41171"\n"
41172"    }\n"
41173"\n"
41174"});\n"
41175
41176#. (itstool) path: section/p
41177#: C/statusbar.js.page:206
41178msgid ""
41179"Here we have functions which demonstrate pushing a message onto the stack, popping the top one off of it, and "
41180"clearing all messages of a particular context id. The pop() function just takes one parameter, which is the "
41181"context id for the type of message you want to pop off the most recent one of. The remove_all() function works the "
41182"same way, except it removes all messages of that type from the stack."
41183msgstr ""
41184"여기서 메시지를 스택에 밀어넣고, 상단의 메시지를 빼내며, context ID를 가진 일부 메시지를 모두 지우는 함수가 있습니"
41185"다. pop() 함수는 여러분이 빼고자 하는 최근 추가 메시지 형식에 대한 context ID 매개 변수만을 가지며, 설정 형식의 모"
41186"든 메시지를 스택에서 제거했을 경우는 제외됩니다."
41187
41188#. (itstool) path: section/code
41189#: C/statusbar.js.page:207
41190#, no-wrap
41191msgid ""
41192"\n"
41193"// Run the application\n"
41194"let app = new StatusbarExample ();\n"
41195"app.application.run (ARGV);\n"
41196msgstr ""
41197"\n"
41198"// Run the application\n"
41199"let app = new StatusbarExample ();\n"
41200"app.application.run (ARGV);\n"
41201
41202#. (itstool) path: section/p
41203#: C/statusbar.js.page:212
41204msgid "Finally, we create a new instance of the finished StatusbarExample class, and set the application running."
41205msgstr "마지막으로, StatusbarExample 클래스에서 새 인스턴스를 만들고 프로그램 실행을 설정하겠습니다."
41206
41207#. (itstool) path: section/code
41208#: C/statusbar.js.page:217
41209#, no-wrap
41210msgid ""
41211"#!/usr/bin/gjs\n"
41212"\n"
41213"imports.gi.versions.Gtk = '3.0';\n"
41214"\n"
41215"const Gio = imports.gi.Gio;\n"
41216"const Gtk = imports.gi.Gtk;\n"
41217"\n"
41218"class StatusbarExample {\n"
41219"\n"
41220"    // Create the application itself\n"
41221"    constructor() {\n"
41222"        this.application = new Gtk.Application({\n"
41223"            application_id: 'org.example.jsstatusbar',\n"
41224"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
41225"        });\n"
41226"\n"
41227"        // Connect 'activate' and 'startup' signals to the callback functions\n"
41228"        this.application.connect('activate', this._onActivate.bind(this));\n"
41229"        this.application.connect('startup', this._onStartup.bind(this));\n"
41230"    }\n"
41231"\n"
41232"    // Callback function for 'activate' signal presents window when active\n"
41233"    _onActivate() {\n"
41234"        this._window.present();\n"
41235"    }\n"
41236"\n"
41237"    // Callback function for 'startup' signal builds the UI\n"
41238"    _onStartup() {\n"
41239"        this._buildUI();\n"
41240"    }\n"
41241"\n"
41242"    // Build the application's UI\n"
41243"    _buildUI() {\n"
41244"\n"
41245"        // Create the application window\n"
41246"        this._window = new Gtk.ApplicationWindow({\n"
41247"            application: this.application,\n"
41248"            window_position: Gtk.WindowPosition.CENTER,\n"
41249"            default_height: 120,\n"
41250"            default_width: 300,\n"
41251"            title: \"Button Clicker\"});\n"
41252"\n"
41253"        // Create a paned interface\n"
41254"        this._panes = new Gtk.Paned ({\n"
41255"            orientation: Gtk.Orientation.VERTICAL });\n"
41256"\n"
41257"        // Create the main button\n"
41258"        this._clickMe = new Gtk.Button ({\n"
41259"            label: \"Click Me!\" });\n"
41260"        this._clickMe.connect (\"clicked\", this._clicked.bind(this));\n"
41261"\n"
41262"        // Create the back button\n"
41263"        this._backButton = new Gtk.Button ({\n"
41264"            label: \"gtk-go-back\",\n"
41265"            use_stock: true });\n"
41266"        this._backButton.connect (\"clicked\", this._back.bind(this));\n"
41267"\n"
41268"        // Create the clear button\n"
41269"        this._clearButton = new Gtk.Button ({\n"
41270"            label: \"gtk-clear\",\n"
41271"            use_stock: true });\n"
41272"        this._clearButton.connect (\"clicked\", this._clear.bind(this));\n"
41273"\n"
41274"        // Put the buttons in a grid\n"
41275"        this._grid = new Gtk.Grid ({\n"
41276"            halign: Gtk.Align.CENTER,\n"
41277"            valign: Gtk.Align.CENTER });\n"
41278"        this._grid.attach (this._backButton, 0, 0, 1, 1);\n"
41279"        this._grid.attach_next_to (this._clickMe, this._backButton, Gtk.PositionType.RIGHT, 1, 1);\n"
41280"        this._grid.attach_next_to (this._clearButton, this._clickMe, Gtk.PositionType.RIGHT, 1, 1);\n"
41281"\n"
41282"        // Put the grid in a large frame that fills most of the window\n"
41283"        this._topFrame = new Gtk.Frame ({\n"
41284"            border_width: 20,\n"
41285"            height_request: 90,\n"
41286"            width_request: 300});\n"
41287"        this._topFrame.add (this._grid);\n"
41288"\n"
41289"        // Create the statusbar\n"
41290"        this._statusbar = new Gtk.Statusbar();\n"
41291"\n"
41292"        // Keep track of the number of times the button has been clicked\n"
41293"        this.Clicks = 0;\n"
41294"        this.ContextID = this._statusbar.get_context_id (\"Number of Clicks\");\n"
41295"\n"
41296"        // Give the statusbar an initial message\n"
41297"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41298"\n"
41299"        // Put the statusbar in its own frame at the bottom\n"
41300"        this._barFrame = new Gtk.Frame ({\n"
41301"            height_request: 30 });\n"
41302"        this._barFrame.add (this._statusbar);\n"
41303"\n"
41304"        // Assemble the frames into the paned interface\n"
41305"        this._panes.pack1 (this._topFrame, true, false);\n"
41306"        this._panes.pack2 (this._barFrame, false, false);\n"
41307"\n"
41308"        // Put the panes into the window\n"
41309"        this._window.add (this._panes);\n"
41310"\n"
41311"        // Show the window and all child widgets\n"
41312"        this._window.show_all();\n"
41313"    }\n"
41314"\n"
41315"    _clicked() {\n"
41316"\n"
41317"        // Increment the number of clicks by 1\n"
41318"        this.Clicks++;\n"
41319"\n"
41320"        // Update the statusbar with the new number of clicks\n"
41321"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41322"    }\n"
41323"\n"
41324"    _back() {\n"
41325"\n"
41326"        // If there have been any clicks, decrement by 1 and remove last statusbar update\n"
41327"        if (this.Clicks &gt; 0 ) {\n"
41328"            this.Clicks--;\n"
41329"            this._statusbar.pop (this.ContextID);\n"
41330"        };\n"
41331"    }\n"
41332"\n"
41333"    _clear() {\n"
41334"\n"
41335"        // Reset the number of clicks\n"
41336"        this.Clicks = 0;\n"
41337"\n"
41338"        // Wipe out all the messages pushed to the statusbar\n"
41339"        this._statusbar.remove_all (this.ContextID);\n"
41340"\n"
41341"        // Reset the statusbar's message\n"
41342"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41343"    }\n"
41344"};\n"
41345"\n"
41346"// Run the application\n"
41347"let app = new StatusbarExample ();\n"
41348"app.application.run (ARGV);\n"
41349msgstr ""
41350"#!/usr/bin/gjs\n"
41351"\n"
41352"imports.gi.versions.Gtk = '3.0';\n"
41353"\n"
41354"const Gio = imports.gi.Gio;\n"
41355"const Gtk = imports.gi.Gtk;\n"
41356"\n"
41357"class StatusbarExample {\n"
41358"\n"
41359"    // Create the application itself\n"
41360"    constructor() {\n"
41361"        this.application = new Gtk.Application({\n"
41362"            application_id: 'org.example.jsstatusbar',\n"
41363"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
41364"        });\n"
41365"\n"
41366"        // Connect 'activate' and 'startup' signals to the callback functions\n"
41367"        this.application.connect('activate', this._onActivate.bind(this));\n"
41368"        this.application.connect('startup', this._onStartup.bind(this));\n"
41369"    }\n"
41370"\n"
41371"    // Callback function for 'activate' signal presents window when active\n"
41372"    _onActivate() {\n"
41373"        this._window.present();\n"
41374"    }\n"
41375"\n"
41376"    // Callback function for 'startup' signal builds the UI\n"
41377"    _onStartup() {\n"
41378"        this._buildUI();\n"
41379"    }\n"
41380"\n"
41381"    // Build the application's UI\n"
41382"    _buildUI() {\n"
41383"\n"
41384"        // Create the application window\n"
41385"        this._window = new Gtk.ApplicationWindow({\n"
41386"            application: this.application,\n"
41387"            window_position: Gtk.WindowPosition.CENTER,\n"
41388"            default_height: 120,\n"
41389"            default_width: 300,\n"
41390"            title: \"Button Clicker\"});\n"
41391"\n"
41392"        // Create a paned interface\n"
41393"        this._panes = new Gtk.Paned ({\n"
41394"            orientation: Gtk.Orientation.VERTICAL });\n"
41395"\n"
41396"        // Create the main button\n"
41397"        this._clickMe = new Gtk.Button ({\n"
41398"            label: \"Click Me!\" });\n"
41399"        this._clickMe.connect (\"clicked\", this._clicked.bind(this));\n"
41400"\n"
41401"        // Create the back button\n"
41402"        this._backButton = new Gtk.Button ({\n"
41403"            label: \"gtk-go-back\",\n"
41404"            use_stock: true });\n"
41405"        this._backButton.connect (\"clicked\", this._back.bind(this));\n"
41406"\n"
41407"        // Create the clear button\n"
41408"        this._clearButton = new Gtk.Button ({\n"
41409"            label: \"gtk-clear\",\n"
41410"            use_stock: true });\n"
41411"        this._clearButton.connect (\"clicked\", this._clear.bind(this));\n"
41412"\n"
41413"        // Put the buttons in a grid\n"
41414"        this._grid = new Gtk.Grid ({\n"
41415"            halign: Gtk.Align.CENTER,\n"
41416"            valign: Gtk.Align.CENTER });\n"
41417"        this._grid.attach (this._backButton, 0, 0, 1, 1);\n"
41418"        this._grid.attach_next_to (this._clickMe, this._backButton, Gtk.PositionType.RIGHT, 1, 1);\n"
41419"        this._grid.attach_next_to (this._clearButton, this._clickMe, Gtk.PositionType.RIGHT, 1, 1);\n"
41420"\n"
41421"        // Put the grid in a large frame that fills most of the window\n"
41422"        this._topFrame = new Gtk.Frame ({\n"
41423"            border_width: 20,\n"
41424"            height_request: 90,\n"
41425"            width_request: 300});\n"
41426"        this._topFrame.add (this._grid);\n"
41427"\n"
41428"        // Create the statusbar\n"
41429"        this._statusbar = new Gtk.Statusbar();\n"
41430"\n"
41431"        // Keep track of the number of times the button has been clicked\n"
41432"        this.Clicks = 0;\n"
41433"        this.ContextID = this._statusbar.get_context_id (\"Number of Clicks\");\n"
41434"\n"
41435"        // Give the statusbar an initial message\n"
41436"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41437"\n"
41438"        // Put the statusbar in its own frame at the bottom\n"
41439"        this._barFrame = new Gtk.Frame ({\n"
41440"            height_request: 30 });\n"
41441"        this._barFrame.add (this._statusbar);\n"
41442"\n"
41443"        // Assemble the frames into the paned interface\n"
41444"        this._panes.pack1 (this._topFrame, true, false);\n"
41445"        this._panes.pack2 (this._barFrame, false, false);\n"
41446"\n"
41447"        // Put the panes into the window\n"
41448"        this._window.add (this._panes);\n"
41449"\n"
41450"        // Show the window and all child widgets\n"
41451"        this._window.show_all();\n"
41452"    }\n"
41453"\n"
41454"    _clicked() {\n"
41455"\n"
41456"        // Increment the number of clicks by 1\n"
41457"        this.Clicks++;\n"
41458"\n"
41459"        // Update the statusbar with the new number of clicks\n"
41460"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41461"    }\n"
41462"\n"
41463"    _back() {\n"
41464"\n"
41465"        // If there have been any clicks, decrement by 1 and remove last statusbar update\n"
41466"        if (this.Clicks &gt; 0 ) {\n"
41467"            this.Clicks--;\n"
41468"            this._statusbar.pop (this.ContextID);\n"
41469"        };\n"
41470"    }\n"
41471"\n"
41472"    _clear() {\n"
41473"\n"
41474"        // Reset the number of clicks\n"
41475"        this.Clicks = 0;\n"
41476"\n"
41477"        // Wipe out all the messages pushed to the statusbar\n"
41478"        this._statusbar.remove_all (this.ContextID);\n"
41479"\n"
41480"        // Reset the statusbar's message\n"
41481"        this._statusbar.push (this.ContextID, \"Number of clicks: \" + this.Clicks);\n"
41482"    }\n"
41483"};\n"
41484"\n"
41485"// Run the application\n"
41486"let app = new StatusbarExample ();\n"
41487"app.application.run (ARGV);\n"
41488
41489#. (itstool) path: item/p
41490#: C/statusbar.js.page:226
41491msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Frame.html\">Gtk.Frame</link>"
41492msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Frame.html\">Gtk.Frame</link>"
41493
41494#. (itstool) path: item/p
41495#: C/statusbar.js.page:227
41496msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Paned.html\">Gtk.Paned</link>"
41497msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Paned.html\">Gtk.Paned</link>"
41498
41499#. (itstool) path: item/p
41500#: C/statusbar.js.page:228
41501msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Statusbar.html\">Gtk.Statusbar</link>"
41502msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Statusbar.html\">Gtk.Statusbar</link>"
41503
41504#. (itstool) path: info/title
41505#: C/statusbar.py.page:8
41506msgctxt "text"
41507msgid "Statusbar (Python)"
41508msgstr "Statusbar (Python)"
41509
41510#. (itstool) path: page/media
41511#. This is a reference to an external file such as an image or video. When
41512#. the file changes, the md5 hash will change to let you know you need to
41513#. update your localized copy. The msgstr is not used at all. Set it to
41514#. whatever you like once you have updated your copy of the file.
41515#: C/statusbar.py.page:24 C/statusbar.vala.page:25
41516msgctxt "_"
41517msgid "external ref='media/statusbar.png' md5='eb1aca55315d6cda57b12a5f36058ba8'"
41518msgstr ""
41519
41520#. (itstool) path: page/p
41521#: C/statusbar.py.page:25
41522msgid "This statusbar tells you if you click the button or if you press any key (and which key)."
41523msgstr "이 상태 표시줄은 단추를 누르거나 아무 키(어떤 키)를 눌렀을 때 알려줍니다."
41524
41525#. (itstool) path: section/code
41526#: C/statusbar.py.page:32
41527#, no-wrap
41528msgid ""
41529"from gi.repository import Gtk\n"
41530"from gi.repository import Gdk\n"
41531"import sys\n"
41532"\n"
41533"\n"
41534"class MyWindow(Gtk.ApplicationWindow):\n"
41535"    # a window\n"
41536"\n"
41537"    def __init__(self, app):\n"
41538"        Gtk.Window.__init__(self, title=\"StatusBar Example\", application=app)\n"
41539"        self.set_default_size(200, 100)\n"
41540"\n"
41541"        # a label\n"
41542"        label = Gtk.Label(label=\"Press any key or \")\n"
41543"\n"
41544"        # a button\n"
41545"        button = Gtk.Button(label=\"click me.\")\n"
41546"        # connected to a callback\n"
41547"        button.connect(\"clicked\", self.button_clicked_cb)\n"
41548"\n"
41549"        # the statusbar\n"
41550"        self.statusbar = Gtk.Statusbar()\n"
41551"        # its context_id - not shown in the UI but needed to uniquely identify\n"
41552"        # the source of a message\n"
41553"        self.context_id = self.statusbar.get_context_id(\"example\")\n"
41554"        # we push a message onto the statusbar's stack\n"
41555"        self.statusbar.push(\n"
41556"            self.context_id, \"Waiting for you to do something...\")\n"
41557"\n"
41558"        # a grid to attach the widgets\n"
41559"        grid = Gtk.Grid()\n"
41560"        grid.set_column_spacing(5)\n"
41561"        grid.set_column_homogeneous(True)\n"
41562"        grid.set_row_homogeneous(True)\n"
41563"        grid.attach(label, 0, 0, 1, 1)\n"
41564"        grid.attach_next_to(button, label, Gtk.PositionType.RIGHT, 1, 1)\n"
41565"        grid.attach(self.statusbar, 0, 1, 2, 1)\n"
41566"\n"
41567"        # add the grid to the window\n"
41568"        self.add(grid)\n"
41569"\n"
41570"    # callback function for the button clicked\n"
41571"    # if the button is clicked the event is signaled to the statusbar\n"
41572"    # onto which we push a new status\n"
41573"    def button_clicked_cb(self, button):\n"
41574"        self.statusbar.push(self.context_id, \"You clicked the button.\")\n"
41575"\n"
41576"    # event handler\n"
41577"    def do_key_press_event(self, event):\n"
41578"    # any signal from the keyboard is signaled to the statusbar\n"
41579"    # onto which we push a new status with the symbolic name\n"
41580"    # of the key pressed\n"
41581"        self.statusbar.push(self.context_id, Gdk.keyval_name(event.keyval) +\n"
41582"                            \" key was pressed.\")\n"
41583"        # stop the signal emission\n"
41584"        return True\n"
41585"\n"
41586"\n"
41587"class MyApplication(Gtk.Application):\n"
41588"\n"
41589"    def __init__(self):\n"
41590"        Gtk.Application.__init__(self)\n"
41591"\n"
41592"    def do_activate(self):\n"
41593"        win = MyWindow(self)\n"
41594"        win.show_all()\n"
41595"\n"
41596"    def do_startup(self):\n"
41597"        Gtk.Application.do_startup(self)\n"
41598"\n"
41599"app = MyApplication()\n"
41600"exit_status = app.run(sys.argv)\n"
41601"sys.exit(exit_status)\n"
41602msgstr ""
41603"from gi.repository import Gtk\n"
41604"from gi.repository import Gdk\n"
41605"import sys\n"
41606"\n"
41607"\n"
41608"class MyWindow(Gtk.ApplicationWindow):\n"
41609"    # a window\n"
41610"\n"
41611"    def __init__(self, app):\n"
41612"        Gtk.Window.__init__(self, title=\"StatusBar Example\", application=app)\n"
41613"        self.set_default_size(200, 100)\n"
41614"\n"
41615"        # a label\n"
41616"        label = Gtk.Label(label=\"Press any key or \")\n"
41617"\n"
41618"        # a button\n"
41619"        button = Gtk.Button(label=\"click me.\")\n"
41620"        # connected to a callback\n"
41621"        button.connect(\"clicked\", self.button_clicked_cb)\n"
41622"\n"
41623"        # the statusbar\n"
41624"        self.statusbar = Gtk.Statusbar()\n"
41625"        # its context_id - not shown in the UI but needed to uniquely identify\n"
41626"        # the source of a message\n"
41627"        self.context_id = self.statusbar.get_context_id(\"example\")\n"
41628"        # we push a message onto the statusbar's stack\n"
41629"        self.statusbar.push(\n"
41630"            self.context_id, \"Waiting for you to do something...\")\n"
41631"\n"
41632"        # a grid to attach the widgets\n"
41633"        grid = Gtk.Grid()\n"
41634"        grid.set_column_spacing(5)\n"
41635"        grid.set_column_homogeneous(True)\n"
41636"        grid.set_row_homogeneous(True)\n"
41637"        grid.attach(label, 0, 0, 1, 1)\n"
41638"        grid.attach_next_to(button, label, Gtk.PositionType.RIGHT, 1, 1)\n"
41639"        grid.attach(self.statusbar, 0, 1, 2, 1)\n"
41640"\n"
41641"        # add the grid to the window\n"
41642"        self.add(grid)\n"
41643"\n"
41644"    # callback function for the button clicked\n"
41645"    # if the button is clicked the event is signaled to the statusbar\n"
41646"    # onto which we push a new status\n"
41647"    def button_clicked_cb(self, button):\n"
41648"        self.statusbar.push(self.context_id, \"You clicked the button.\")\n"
41649"\n"
41650"    # event handler\n"
41651"    def do_key_press_event(self, event):\n"
41652"    # any signal from the keyboard is signaled to the statusbar\n"
41653"    # onto which we push a new status with the symbolic name\n"
41654"    # of the key pressed\n"
41655"        self.statusbar.push(self.context_id, Gdk.keyval_name(event.keyval) +\n"
41656"                            \" key was pressed.\")\n"
41657"        # stop the signal emission\n"
41658"        return True\n"
41659"\n"
41660"\n"
41661"class MyApplication(Gtk.Application):\n"
41662"\n"
41663"    def __init__(self):\n"
41664"        Gtk.Application.__init__(self)\n"
41665"\n"
41666"    def do_activate(self):\n"
41667"        win = MyWindow(self)\n"
41668"        win.show_all()\n"
41669"\n"
41670"    def do_startup(self):\n"
41671"        Gtk.Application.do_startup(self)\n"
41672"\n"
41673"app = MyApplication()\n"
41674"exit_status = app.run(sys.argv)\n"
41675"sys.exit(exit_status)\n"
41676
41677#. (itstool) path: note/p
41678#: C/statusbar.py.page:34
41679msgid ""
41680"<code>Gdk.keyval_name(event.keyval)</code> converts the key value <code>event.keyval</code> into a symbolic name. "
41681"The names and corresponding key values can be found <link href=\"http://git.gnome.org/browse/gtk+/tree/gdk/"
41682"gdkkeysyms.h\">here</link>, but for instance <code>GDK_KEY_BackSpace</code> becomes the string <code>\"BackSpace"
41683"\"</code>."
41684msgstr ""
41685"<code>Gdk.keyval_name(event.keyval)</code>은  <code>event.keyval</code> 키 값을 심볼릭 이름으로 변환합니다. 이름과 "
41686"관련 키 값은 <link href=\"http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms.h\">여기</link>에서 알아볼 수 있지"
41687"만, 예를 들어 <code>GDK_KEY_BackSpace</code> 인스턴스는 <code>\"BackSpace\"</code> 문자열입니다."
41688
41689#. (itstool) path: section/title
41690#: C/statusbar.py.page:40
41691msgid "Useful methods for a Statusbar widget"
41692msgstr "Statusbar 위젯에 쓸만한 메서드"
41693
41694#. (itstool) path: section/p
41695#: C/statusbar.py.page:41
41696msgid ""
41697"In line 17 the signal <code>\"clicked\"</code> is connected to the callback function <code>button_clicked_cb()</"
41698"code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link "
41699"xref=\"signals-callbacks.py\"/> for a more detailed explanation."
41700msgstr ""
41701"17번째 줄에서 <code>\"clicked\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
41702"function</var>)</code> 함수로  <code>button_clicked_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link "
41703"xref=\"signals-callbacks.py\"/>를 참조하십시오."
41704
41705#. (itstool) path: item/p
41706#: C/statusbar.py.page:43
41707msgid ""
41708"<code>pop(context_id)</code> removes the first message in the statusbar stack with the given <code>context_id</"
41709"code>."
41710msgstr ""
41711"<code>pop(context_id)</code> 함수는 상태 표시줄 스택에서 <code>context_id</code>가 주어진 처음 메시지를 제거합니다."
41712
41713#. (itstool) path: item/p
41714#: C/statusbar.py.page:44
41715msgid ""
41716"<code>remove_all(context_id)</code> removes all the messages in the statusbar stack with the given "
41717"<code>context_id</code>."
41718msgstr ""
41719"<code>remove_all(context_id)</code> 함수는 상태 표시줄 스택에서 <code>context_id</code>가 주어진 모든 메시지를 제거"
41720"합니다."
41721
41722#. (itstool) path: item/p
41723#: C/statusbar.py.page:45
41724msgid ""
41725"<code>remove(context_id, message_id)</code> removes the message with the given <code>message_id</code> in the "
41726"statusbar stack with the given <code>context_id</code>. The <code>message_id</code> is returned by "
41727"<code>push(context_id, \"the message\")</code> when pushing the message on the statusbar."
41728msgstr ""
41729"<code>remove(context_id, message_id)</code> 함수는 상태 표시줄 스택에서 <code>message_id</code>가 주어진 메시지를 "
41730"제거합니다. <code>message_id</code>는 <code>push(context_id, \"the message\")</code> 함수로 상태 표시줄에 메시지를 "
41731"밀어넣을 때 반환합니다."
41732
41733#. (itstool) path: item/p
41734#: C/statusbar.py.page:53
41735msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkStatusbar.html\">GtkStatusbar</link>"
41736msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkStatusbar.html\">GtkStatusbar</link>"
41737
41738#. (itstool) path: item/p
41739#: C/statusbar.py.page:54
41740msgid "<link href=\"http://developer.gnome.org/gdk/stable/gdk-Keyboard-Handling.html\">Gdk - Key Values</link>"
41741msgstr "<link href=\"http://developer.gnome.org/gdk/stable/gdk-Keyboard-Handling.html\">Gdk - 키 값</link>"
41742
41743#. (itstool) path: info/title
41744#: C/statusbar.vala.page:8
41745msgctxt "text"
41746msgid "Statusbar (Vala)"
41747msgstr "Statusbar (Vala)"
41748
41749#. (itstool) path: page/p
41750#: C/statusbar.vala.page:26
41751msgid "This statusbar tells you what's going on."
41752msgstr "상태 표시줄은 무슨 일이 일어나는지 알려줍니다."
41753
41754#. (itstool) path: page/code
41755#: C/statusbar.vala.page:28
41756#, no-wrap
41757msgid ""
41758"public class MyWindow : Gtk.ApplicationWindow {\n"
41759"\n"
41760"\tGtk.Statusbar statusbar;\n"
41761"\tuint context_id;\n"
41762"\n"
41763"\tinternal MyWindow (MyApplication app) {\n"
41764"\t\tObject (application: app, title: \"Statusbar Example\");\n"
41765"\n"
41766"\t\tstatusbar = new Gtk.Statusbar ();\n"
41767"\t\tcontext_id = statusbar.get_context_id (\"example\");\n"
41768"\t\tstatusbar.push (context_id, \"Waiting for you to do something...\");\n"
41769"\n"
41770"\t\t//set the default size of the window\n"
41771"\t\tthis.set_default_size (200, 100);\n"
41772"\t\tvar grid = new Gtk.Grid ();\n"
41773"\t\tvar label = new Gtk.Label (\"Press any key or \");\n"
41774"\n"
41775"\t\tgrid.attach (label, 0, 0, 1, 1);\n"
41776"\t\tlabel.show ();\n"
41777"\n"
41778"\t\tvar button = new Gtk.Button.with_label (\"click me.\");\n"
41779"\t\tgrid.attach_next_to (button, label, Gtk.PositionType.RIGHT, 1, 1);\n"
41780"\t\tbutton.show ();\n"
41781"\n"
41782"\t\tgrid.attach (statusbar, 0, 1, 2, 1);\n"
41783"\t\tstatusbar.show ();\n"
41784"\n"
41785"\t\tgrid.set_column_spacing (5);\n"
41786"\t\tgrid.set_column_homogeneous (true);\n"
41787"\t\tgrid.set_row_homogeneous (true);\n"
41788"\n"
41789"\t\tthis.add (grid);\n"
41790"\t\tgrid.show ();\n"
41791"\n"
41792"\t\tbutton.clicked.connect(button_clicked_cb);\n"
41793"\t}\n"
41794"\n"
41795"\t/* Since the key-press-event is a signal received by the window, we don't need to connect\n"
41796"\tthe window to a callback function.  We can just override key_press_event. */\n"
41797"\tprotected override bool key_press_event (Gdk.EventKey event) {\n"
41798"\t\tstatusbar.push (context_id, Gdk.keyval_name(event.keyval) + \" key was pressed.\");\n"
41799"\t\treturn true;\n"
41800"\t}\n"
41801"\n"
41802"\tvoid button_clicked_cb (Gtk.Button button) {\n"
41803"\t\tstatusbar.push (context_id, \"You clicked the button.\");\n"
41804"\t}\n"
41805"}\n"
41806"\n"
41807"public class MyApplication : Gtk.Application {\n"
41808"\tprotected override void activate () {\n"
41809"\t\tnew MyWindow (this).show ();\n"
41810"\t}\n"
41811"\n"
41812"\tinternal MyApplication () {\n"
41813"\t\tObject (application_id: \"org.example.status\");\n"
41814"\t}\n"
41815"}\n"
41816"\n"
41817"public int main (string[] args) {\n"
41818"\treturn new MyApplication ().run (args);\n"
41819"}\n"
41820msgstr ""
41821"public class MyWindow : Gtk.ApplicationWindow {\n"
41822"\n"
41823"\tGtk.Statusbar statusbar;\n"
41824"\tuint context_id;\n"
41825"\n"
41826"\tinternal MyWindow (MyApplication app) {\n"
41827"\t\tObject (application: app, title: \"Statusbar Example\");\n"
41828"\n"
41829"\t\tstatusbar = new Gtk.Statusbar ();\n"
41830"\t\tcontext_id = statusbar.get_context_id (\"example\");\n"
41831"\t\tstatusbar.push (context_id, \"Waiting for you to do something...\");\n"
41832"\n"
41833"\t\t//set the default size of the window\n"
41834"\t\tthis.set_default_size (200, 100);\n"
41835"\t\tvar grid = new Gtk.Grid ();\n"
41836"\t\tvar label = new Gtk.Label (\"Press any key or \");\n"
41837"\n"
41838"\t\tgrid.attach (label, 0, 0, 1, 1);\n"
41839"\t\tlabel.show ();\n"
41840"\n"
41841"\t\tvar button = new Gtk.Button.with_label (\"click me.\");\n"
41842"\t\tgrid.attach_next_to (button, label, Gtk.PositionType.RIGHT, 1, 1);\n"
41843"\t\tbutton.show ();\n"
41844"\n"
41845"\t\tgrid.attach (statusbar, 0, 1, 2, 1);\n"
41846"\t\tstatusbar.show ();\n"
41847"\n"
41848"\t\tgrid.set_column_spacing (5);\n"
41849"\t\tgrid.set_column_homogeneous (true);\n"
41850"\t\tgrid.set_row_homogeneous (true);\n"
41851"\n"
41852"\t\tthis.add (grid);\n"
41853"\t\tgrid.show ();\n"
41854"\n"
41855"\t\tbutton.clicked.connect(button_clicked_cb);\n"
41856"\t}\n"
41857"\n"
41858"\t/* Since the key-press-event is a signal received by the window, we don't need to connect\n"
41859"\tthe window to a callback function.  We can just override key_press_event. */\n"
41860"\tprotected override bool key_press_event (Gdk.EventKey event) {\n"
41861"\t\tstatusbar.push (context_id, Gdk.keyval_name(event.keyval) + \" key was pressed.\");\n"
41862"\t\treturn true;\n"
41863"\t}\n"
41864"\n"
41865"\tvoid button_clicked_cb (Gtk.Button button) {\n"
41866"\t\tstatusbar.push (context_id, \"You clicked the button.\");\n"
41867"\t}\n"
41868"}\n"
41869"\n"
41870"public class MyApplication : Gtk.Application {\n"
41871"\tprotected override void activate () {\n"
41872"\t\tnew MyWindow (this).show ();\n"
41873"\t}\n"
41874"\n"
41875"\tinternal MyApplication () {\n"
41876"\t\tObject (application_id: \"org.example.status\");\n"
41877"\t}\n"
41878"}\n"
41879"\n"
41880"public int main (string[] args) {\n"
41881"\treturn new MyApplication ().run (args);\n"
41882"}\n"
41883
41884#. (itstool) path: item/p
41885#: C/statusbar.vala.page:33
41886msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Statusbar.html\">Gtk.Statusbar</link>"
41887msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Statusbar.html\">Gtk.Statusbar</link>"
41888
41889#. (itstool) path: info/title
41890#: C/strings.py.page:9
41891msgctxt "text"
41892msgid "Strings (Python)"
41893msgstr "Strings (Python)"
41894
41895#. (itstool) path: info/desc
41896#: C/strings.py.page:14
41897msgid "An explanation of how to deal with strings in Python and GTK+."
41898msgstr "파이썬과 GTK+에서 문자열을 다루는 방법을 설명합니다."
41899
41900#. (itstool) path: page/title
41901#: C/strings.py.page:27
41902msgid "Strings"
41903msgstr "문자열"
41904
41905#. (itstool) path: note/p
41906#: C/strings.py.page:31
41907msgid "GNOME strongly encourages the use of Python 3 for writing applications!"
41908msgstr "그놈은 프로그램을 작성할 때 파이썬 3 활용을 강력하게 권장합니다!"
41909
41910#. (itstool) path: section/title
41911#: C/strings.py.page:34
41912msgid "Strings in Python 2"
41913msgstr "파이썬 2의 문자열"
41914
41915#. (itstool) path: section/p
41916#: C/strings.py.page:36
41917msgid ""
41918"Python 2 comes with two different kinds of objects that can be used to represent strings, <code>str</code> and "
41919"<code>unicode</code>. Instances of <code>unicode</code> are used to express Unicode strings, whereas instances of "
41920"the <code>str</code> type are byte representations (the encoded string). Under the hood, Python represents Unicode "
41921"strings as either 16- or 32-bit integers, depending on how the Python interpreter was compiled."
41922msgstr ""
41923"파이썬 2에서는 문자열을 표현하는 두가지 다른 객체 형식이 있는데 <code>str</code>과 <code>unicode</code>가 있습니"
41924"다. <code>unicode</code> 인스턴스는 유니코드 문자열을 표현할 때 활용하며, <code>str</code>형식은 인코딩한 문자열 바"
41925"이트를 표현할 때 활용합니다. 내부적으로 파이썬에서는 파이썬 인터프리터를 어떻게 컴파일했느냐에 따라 유니코드 문자열"
41926"을 16비트 내지는 32비트 정수로 표현합니다."
41927
41928#. (itstool) path: section/code
41929#: C/strings.py.page:38
41930#, no-wrap
41931msgid ""
41932"\n"
41933"&gt;&gt;&gt; unicode_string = u\"Fu\\u00dfb\\u00e4lle\"\n"
41934"&gt;&gt;&gt; print unicode_string\n"
41935"Fußbälle\n"
41936msgstr ""
41937"\n"
41938"&gt;&gt;&gt; unicode_string = u\"Fu\\u00dfb\\u00e4lle\"\n"
41939"&gt;&gt;&gt; print unicode_string\n"
41940"Fußbälle\n"
41941
41942#. (itstool) path: section/p
41943#: C/strings.py.page:44
41944msgid ""
41945"Unicode strings can be converted to 8-bit strings with <code>unicode.encode()</code>. Python’s 8-bit strings have "
41946"a <code>str.decode()</code> method that interprets the string using the given encoding (that is, it is the inverse "
41947"of the <code>unicode.encode()</code>):"
41948msgstr ""
41949"유니코드 문자열은 <code>unicode.encode()</code>로 8비트 문자열로 바꿀 수 있습니다. 파이썬의 8비트 문자열은 주어진 "
41950"인코딩으로 문자열을 해석하는 <code>str.decode()</code> 메서드가 있습니다(그 말인 즉슨, <code>unicode.encode()</"
41951"code>의 반대 개념입니다):"
41952
41953#. (itstool) path: section/code
41954#: C/strings.py.page:46
41955#, no-wrap
41956msgid ""
41957"\n"
41958"&gt;&gt;&gt; type(unicode_string)\n"
41959"&lt;type 'unicode'&gt;\n"
41960"&gt;&gt;&gt; unicode_string.encode(\"utf-8\")\n"
41961"'Fu\\xc3\\x9fb\\xc3\\xa4lle'\n"
41962"&gt;&gt;&gt; utf8_string = unicode_string.encode(\"utf-8\")\n"
41963"&gt;&gt;&gt; type(utf8_string)\n"
41964"&lt;type 'str'&gt;\n"
41965"&gt;&gt;&gt; unicode_string == utf8_string.decode(\"utf-8\")\n"
41966"True"
41967msgstr ""
41968"\n"
41969"&gt;&gt;&gt; type(unicode_string)\n"
41970"&lt;type 'unicode'&gt;\n"
41971"&gt;&gt;&gt; unicode_string.encode(\"utf-8\")\n"
41972"'Fu\\xc3\\x9fb\\xc3\\xa4lle'\n"
41973"&gt;&gt;&gt; utf8_string = unicode_string.encode(\"utf-8\")\n"
41974"&gt;&gt;&gt; type(utf8_string)\n"
41975"&lt;type 'str'&gt;\n"
41976"&gt;&gt;&gt; unicode_string == utf8_string.decode(\"utf-8\")\n"
41977"True"
41978
41979#. (itstool) path: section/p
41980#: C/strings.py.page:57
41981msgid ""
41982"Unfortunately, Python 2.x allows you to mix <code>unicode</code> and <code>str</code> if the 8-bit string happened "
41983"to contain only 7-bit (ASCII) bytes, but would get <sys>UnicodeDecodeError</sys> if it contained non-ASCII values."
41984msgstr ""
41985"불행하게도 파이썬 2.x에서는 8비트 문자열에 7비트(아스키) 바이트가 들어가지만 ASCII 값이 아닌 경우 "
41986"<sys>UnicodeDecodeError</sys>가 발생하므로, <code>unicode</code>와 <code>str</code> 의 혼용을 허용하지 않습니다."
41987
41988#. (itstool) path: section/title
41989#: C/strings.py.page:62
41990msgid "Strings in Python 3"
41991msgstr "파이썬 3의 문자열"
41992
41993#. (itstool) path: section/p
41994#: C/strings.py.page:64
41995msgid ""
41996"Since Python 3.0, all strings are stored as Unicode in an instance of the <code>str</code> type. Encoded strings "
41997"on the other hand are represented as binary data in the form of instances of the bytes type. Conceptually, "
41998"<code>str</code> refers to text, whereas bytes refers to data. Use <code>encode()</code> to go from <code>str</"
41999"code> to <code>bytes</code>, and <code>decode()</code> to go from <code>bytes</code> to <code>str</code>."
42000msgstr ""
42001"파이썬 3.0 부터는 모든 문자열을 <code>str</code> 형식의 인스턴스에 유니코드로 저장합니다. 다른 방식으로 인코딩한 문"
42002"자는 바이트 타입의 인스턴스에 이진 데이터로 표현합니다. 개념적으로 <code>str</code>은 텍스트를 참조하고 bytes는 데"
42003"이터를 참조합니다. <code>str</code> 형식에서 <code>bytes</code> 형식으로 변환할 때는 <code>encode()</code> 함수를, "
42004"<code>bytes</code> 형식에서 <code>str</code> 형식으로 변환할 때는 <code>decode()</code> 함수를 사용하십시오."
42005
42006#. (itstool) path: section/p
42007#: C/strings.py.page:66
42008msgid ""
42009"In addition, it is no longer possible to mix Unicode strings with encoded strings, because it will result in a "
42010"<code>TypeError</code>:"
42011msgstr ""
42012"게다가, 더이상 유니코드 문자열과 인코딩 문자열을 혼용할 수 없는데, 결과적으로 <code>TypeError</code>가 발생하기 때"
42013"문입니다:"
42014
42015#. (itstool) path: section/code
42016#: C/strings.py.page:68
42017#, no-wrap
42018msgid ""
42019"\n"
42020"&gt;&gt;&gt; text = \"Fu\\u00dfb\\u00e4lle\"\n"
42021"&gt;&gt;&gt; data = b\" sind rund\"\n"
42022"&gt;&gt;&gt; text + data\n"
42023"Traceback (most recent call last):\n"
42024"  File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n"
42025"TypeError: Can't convert 'bytes' object to str implicitly\n"
42026"&gt;&gt;&gt; text + data.decode(\"utf-8\")\n"
42027"'Fußbälle sind rund'\n"
42028"&gt;&gt;&gt; text.encode(\"utf-8\") + data\n"
42029"b'Fu\\xc3\\x9fb\\xc3\\xa4lle sind rund'"
42030msgstr ""
42031"\n"
42032"&gt;&gt;&gt; text = \"Fu\\u00dfb\\u00e4lle\"\n"
42033"&gt;&gt;&gt; data = b\" sind rund\"\n"
42034"&gt;&gt;&gt; text + data\n"
42035"Traceback (most recent call last):\n"
42036"  File \"&lt;stdin&gt;\", line 1, in &lt;module&gt;\n"
42037"TypeError: Can't convert 'bytes' object to str implicitly\n"
42038"&gt;&gt;&gt; text + data.decode(\"utf-8\")\n"
42039"'Fußbälle sind rund'\n"
42040"&gt;&gt;&gt; text.encode(\"utf-8\") + data\n"
42041"b'Fu\\xc3\\x9fb\\xc3\\xa4lle sind rund'"
42042
42043#. (itstool) path: section/title
42044#: C/strings.py.page:83
42045msgid "Unicode in GTK+"
42046msgstr "GTK+의 유니코드"
42047
42048#. (itstool) path: section/p
42049#: C/strings.py.page:85
42050msgid ""
42051"GTK+ uses UTF-8 encoded strings for all text. This means that if you call a method that returns a string you will "
42052"always obtain an instance of the <code>str</code> type. The same applies to methods that expect one or more "
42053"strings as parameter, they must be UTF-8 encoded. However, for convenience PyGObject will automatically convert "
42054"any unicode instance to str if supplied as argument:"
42055msgstr ""
42056"GTK+에서는 UTF-8 인코딩 문자열을 모든 텍스트에 사용합니다. 무슨 이야기냐면, 문자열을 반환하는 메서드를 호출하면 "
42057"<code>str</code> 형식 인스턴스를 받습니다. 하나 이상의 문자열을 받는 메서드에도 동일하게 적용하며, UTF-8로 인코딩해"
42058"야합니다. 그러나 PyGObject에서는 인자에 데이터가 들어오면 어떤 유니코드 인스턴스든 문자열로 자동으로 바꿔줍니다:"
42059
42060#. (itstool) path: section/code
42061#: C/strings.py.page:87
42062#, no-wrap
42063msgid ""
42064"\n"
42065"&gt;&gt;&gt; from gi.repository import Gtk\n"
42066"&gt;&gt;&gt; label = Gtk.Label()\n"
42067"&gt;&gt;&gt; unicode_string = u\"Fu\\u00dfb\\u00e4lle\"\n"
42068"&gt;&gt;&gt; label.set_text(unicode_string)\n"
42069"&gt;&gt;&gt; txt = label.get_text()\n"
42070"&gt;&gt;&gt; type(txt)\n"
42071"&lt;type 'str'&gt;"
42072msgstr ""
42073"\n"
42074"&gt;&gt;&gt; from gi.repository import Gtk\n"
42075"&gt;&gt;&gt; label = Gtk.Label()\n"
42076"&gt;&gt;&gt; unicode_string = u\"Fu\\u00dfb\\u00e4lle\"\n"
42077"&gt;&gt;&gt; label.set_text(unicode_string)\n"
42078"&gt;&gt;&gt; txt = label.get_text()\n"
42079"&gt;&gt;&gt; type(txt)\n"
42080"&lt;type 'str'&gt;"
42081
42082#. (itstool) path: section/p
42083#: C/strings.py.page:96
42084msgid "Furthermore:"
42085msgstr "게다가:"
42086
42087#. (itstool) path: section/code
42088#: C/strings.py.page:98
42089#, no-wrap
42090msgid ""
42091"\n"
42092"&gt;&gt;&gt; txt == unicode_string"
42093msgstr ""
42094"\n"
42095"&gt;&gt;&gt; txt == unicode_string"
42096
42097#. (itstool) path: section/p
42098#: C/strings.py.page:101
42099msgid ""
42100"would return <code>False</code>, with the warning <code>__main__:1: UnicodeWarning: Unicode equal comparison "
42101"failed to convert both arguments to Unicode - interpreting them as being unequal</code> (<code>Gtk.Label."
42102"get_text()</code> will always return a <code>str</code> instance; therefore, <code>txt</code> and "
42103"<code>unicode_string</code> are not equal)."
42104msgstr ""
42105"는 <code>False</code>값을 반환하며, <code>__main__:1: UnicodeWarning: Unicode equal comparison failed to convert "
42106"both arguments to Unicode - interpreting them as being unequal</code> (<code>Gtk.Label.get_text()</code> 는 항상 "
42107"<code>str</code> 인스턴스를 내보내기 때문에, <code>txt</code> 와 <code>unicode_string</code> 은 다릅니다) 경고를 내"
42108"보냅니다.."
42109
42110#. (itstool) path: section/p
42111#: C/strings.py.page:103
42112msgid ""
42113"This is especially important if you want to internationalize your program using <link href=\"http://docs.python."
42114"org/library/gettext.html\"><code>gettext</code></link>. You have to make sure that <code>gettext</code> will "
42115"return UTF-8 encoded 8-bit strings for all languages."
42116msgstr ""
42117"<link href=\"http://docs.python.org/library/gettext.html\"><code>gettext</code></link>로 프로그램을 국제화할 경우 "
42118"특히 더 중요합니다. <code>gettext</code>에서 모든 언어에 대해 항상 UTF-8로 인코딩한 8비트 문자열을 반환하는지 확인"
42119"하셔야합니다."
42120
42121#. (itstool) path: section/p
42122#: C/strings.py.page:105
42123msgid ""
42124"In general it is recommended to not use <code>unicode</code> objects in GTK+ applications at all, and only use "
42125"UTF-8 encoded <code>str</code> objects since GTK+ does not fully integrate with <code>unicode</code> objects."
42126msgstr ""
42127"일반적으로 GTK+ 프로그램 전체에서 <code>unicode</code> 객체를 안 쓰는게 좋으며, GTK+가 <code>unicode</code>를 완전"
42128"히 통합하지 않았기에,  UTF-8로 인코딩한 <code>str</code> 객체만 씁니다."
42129
42130#. (itstool) path: section/p
42131#: C/strings.py.page:107
42132msgid ""
42133"String encoding is more consistent in Python 3.x because PyGObject will automatically encode/decode to/from UTF-8 "
42134"if you pass a string to a method or a method returns a string. Strings, or text, will always be represented as "
42135"instances of <code>str</code> only."
42136msgstr ""
42137"문자열 인코딩은 파이썬 3.x에서 좀 더 일관성이 있는데 PyGObject는 메서드로 문자열을 넘겨주거나 메서드에서 문자열을 "
42138"반환할 때 자동으로 UTF-8로/부터 인코딩/디코딩을 처리합니다. 문자열, 텍스트는 항상 <code>str</code> 인스턴스로만 표"
42139"현합니다."
42140
42141#. (itstool) path: section/p
42142#: C/strings.py.page:114
42143msgid ""
42144"<link href=\"http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html\">How To Deal With Strings - The "
42145"Python GTK+ 3 Tutorial</link>"
42146msgstr ""
42147"<link href=\"http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html\">문자열 다루기 - Python GTK+ 3 따"
42148"라하기 지침서</link>"
42149
42150#. (itstool) path: info/title
42151#: C/switch.c.page:8
42152msgctxt "text"
42153msgid "Switch (C)"
42154msgstr "Switch (C)"
42155
42156#. (itstool) path: info/desc
42157#: C/switch.c.page:18 C/switch.py.page:19 C/switch.vala.page:22
42158msgid "A \"light switch\" style toggle"
42159msgstr "\"조명 스위치\" 방식 토글"
42160
42161#. (itstool) path: page/title
42162#: C/switch.c.page:21 C/switch.js.page:21 C/switch.py.page:22 C/switch.vala.page:25
42163msgid "Switch"
42164msgstr "Switch"
42165
42166#. (itstool) path: page/media
42167#. This is a reference to an external file such as an image or video. When
42168#. the file changes, the md5 hash will change to let you know you need to
42169#. update your localized copy. The msgstr is not used at all. Set it to
42170#. whatever you like once you have updated your copy of the file.
42171#: C/switch.c.page:23 C/switch.py.page:23 C/switch.vala.page:26
42172msgctxt "_"
42173msgid "external ref='media/switch_off.png' md5='211a2962708800697ad5373dcc86ad6d'"
42174msgstr ""
42175
42176#. (itstool) path: page/media
42177#. This is a reference to an external file such as an image or video. When
42178#. the file changes, the md5 hash will change to let you know you need to
42179#. update your localized copy. The msgstr is not used at all. Set it to
42180#. whatever you like once you have updated your copy of the file.
42181#: C/switch.c.page:24 C/switch.py.page:24 C/switch.vala.page:27
42182msgctxt "_"
42183msgid "external ref='media/switch_on.png' md5='95e8769f758c2d95ace0fa8ecf30b29d'"
42184msgstr ""
42185
42186#. (itstool) path: page/p
42187#: C/switch.c.page:25
42188msgid "This switch toggles the title of the window."
42189msgstr "이 스위치는 창 제목의 표시 여부를 바꿉니다."
42190
42191#. (itstool) path: page/code
42192#: C/switch.c.page:27
42193#, no-wrap
42194msgid ""
42195"\n"
42196"#include &lt;gtk/gtk.h&gt;\n"
42197"\n"
42198"\n"
42199"\n"
42200"/*Signal handler for the \"active\" signal of the Switch*/\n"
42201"static void\n"
42202"activate_cb (GObject    *switcher,\n"
42203"             GParamSpec *pspec,\n"
42204"             gpointer    user_data)\n"
42205"{\n"
42206"  GtkWindow *window = user_data;\n"
42207"\n"
42208"  if (gtk_switch_get_active (GTK_SWITCH (switcher)))\n"
42209"    gtk_window_set_title (GTK_WINDOW (window), \"Switch Example\");\n"
42210"  else\n"
42211"    gtk_window_set_title (GTK_WINDOW (window), \"\");\n"
42212"}\n"
42213"\n"
42214"\n"
42215"\n"
42216"static void\n"
42217"activate (GtkApplication *app,\n"
42218"          gpointer        user_data)\n"
42219"{\n"
42220"  GtkWidget *grid;\n"
42221"  GtkWidget *window;\n"
42222"  GtkWidget *label;\n"
42223"  GtkWidget *switcher;\n"
42224"\n"
42225"  /*Create a window with a set title and default size.\n"
42226"  Also, set a border width for the amount of space to leave\n"
42227"  inside the window*/\n"
42228"  window = gtk_application_window_new (app);\n"
42229"  gtk_window_set_title (GTK_WINDOW (window), \"Switch Example\");\n"
42230"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 100);\n"
42231"  gtk_container_set_border_width (GTK_CONTAINER (window), 10);\n"
42232"\n"
42233"  /*Create a label*/\n"
42234"  label = gtk_label_new (\"Title\");\n"
42235"\n"
42236"  /*Create a switch with a default active state*/\n"
42237"  switcher = gtk_switch_new ();\n"
42238"  gtk_switch_set_active (GTK_SWITCH (switcher), TRUE);\n"
42239"\n"
42240"  /*Create a grid and set the column spacing, attach the label and\n"
42241"  switch onto the grid and position them accordingly*/\n"
42242"  grid = gtk_grid_new();\n"
42243"  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);\n"
42244"  gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);\n"
42245"  gtk_grid_attach (GTK_GRID (grid), switcher, 1, 0, 1, 1);\n"
42246"\n"
42247"  /*Connecting the clicked signal to the callback function*/\n"
42248"  g_signal_connect (GTK_SWITCH (switcher), \n"
42249"                    \"notify::active\", \n"
42250"                    G_CALLBACK (activate_cb), \n"
42251"                    window);\n"
42252"\n"
42253"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
42254"\n"
42255"  gtk_widget_show_all (window);\n"
42256"}\n"
42257"\n"
42258"\n"
42259"\n"
42260"int\n"
42261"main (int argc, char **argv)\n"
42262"{\n"
42263"  GtkApplication *app;\n"
42264"  int status;\n"
42265"\n"
42266"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
42267"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
42268"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
42269"  g_object_unref (app);\n"
42270"\n"
42271"  return status;\n"
42272"}\n"
42273msgstr ""
42274"\n"
42275"#include &lt;gtk/gtk.h&gt;\n"
42276"\n"
42277"\n"
42278"\n"
42279"/*Signal handler for the \"active\" signal of the Switch*/\n"
42280"static void\n"
42281"activate_cb (GObject    *switcher,\n"
42282"             GParamSpec *pspec,\n"
42283"             gpointer    user_data)\n"
42284"{\n"
42285"  GtkWindow *window = user_data;\n"
42286"\n"
42287"  if (gtk_switch_get_active (GTK_SWITCH (switcher)))\n"
42288"    gtk_window_set_title (GTK_WINDOW (window), \"Switch Example\");\n"
42289"  else\n"
42290"    gtk_window_set_title (GTK_WINDOW (window), \"\");\n"
42291"}\n"
42292"\n"
42293"\n"
42294"\n"
42295"static void\n"
42296"activate (GtkApplication *app,\n"
42297"          gpointer        user_data)\n"
42298"{\n"
42299"  GtkWidget *grid;\n"
42300"  GtkWidget *window;\n"
42301"  GtkWidget *label;\n"
42302"  GtkWidget *switcher;\n"
42303"\n"
42304"  /*Create a window with a set title and default size.\n"
42305"  Also, set a border width for the amount of space to leave\n"
42306"  inside the window*/\n"
42307"  window = gtk_application_window_new (app);\n"
42308"  gtk_window_set_title (GTK_WINDOW (window), \"Switch Example\");\n"
42309"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 100);\n"
42310"  gtk_container_set_border_width (GTK_CONTAINER (window), 10);\n"
42311"\n"
42312"  /*Create a label*/\n"
42313"  label = gtk_label_new (\"Title\");\n"
42314"\n"
42315"  /*Create a switch with a default active state*/\n"
42316"  switcher = gtk_switch_new ();\n"
42317"  gtk_switch_set_active (GTK_SWITCH (switcher), TRUE);\n"
42318"\n"
42319"  /*Create a grid and set the column spacing, attach the label and\n"
42320"  switch onto the grid and position them accordingly*/\n"
42321"  grid = gtk_grid_new();\n"
42322"  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);\n"
42323"  gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);\n"
42324"  gtk_grid_attach (GTK_GRID (grid), switcher, 1, 0, 1, 1);\n"
42325"\n"
42326"  /*Connecting the clicked signal to the callback function*/\n"
42327"  g_signal_connect (GTK_SWITCH (switcher), \n"
42328"                    \"notify::active\", \n"
42329"                    G_CALLBACK (activate_cb), \n"
42330"                    window);\n"
42331"\n"
42332"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
42333"\n"
42334"  gtk_widget_show_all (window);\n"
42335"}\n"
42336"\n"
42337"\n"
42338"\n"
42339"int\n"
42340"main (int argc, char **argv)\n"
42341"{\n"
42342"  GtkApplication *app;\n"
42343"  int status;\n"
42344"\n"
42345"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
42346"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
42347"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
42348"  g_object_unref (app);\n"
42349"\n"
42350"  return status;\n"
42351"}\n"
42352
42353#. (itstool) path: info/title
42354#: C/switch.js.page:8
42355msgctxt "text"
42356msgid "Switch (JavaScript)"
42357msgstr "Switch (JavaScript)"
42358
42359#. (itstool) path: info/desc
42360#: C/switch.js.page:18
42361msgid "A sliding switch that can be flipped on and off"
42362msgstr "켬/끔 상태를 뒤집을 수 있는 슬라이딩 스위치"
42363
42364#. (itstool) path: page/media
42365#. This is a reference to an external file such as an image or video. When
42366#. the file changes, the md5 hash will change to let you know you need to
42367#. update your localized copy. The msgstr is not used at all. Set it to
42368#. whatever you like once you have updated your copy of the file.
42369#: C/switch.js.page:22
42370msgctxt "_"
42371msgid "external ref='media/switchanimals.png' md5='513ae15dcf68e15eef30b76420b8c714'"
42372msgstr ""
42373
42374#. (itstool) path: page/p
42375#: C/switch.js.page:23
42376msgid ""
42377"A Switch has two positions, on and off. This example shows how you can use multiple switches together to control "
42378"which <link xref=\"image.js\">Image</link> is shown in the window. The pictures used in this example <link href="
42379"\"https://live.gnome.org/TarynFox?action=AttachFile&amp;do=get&amp;target=Animal+Photos.zip\">can be downloaded "
42380"here</link>."
42381msgstr ""
42382"스위치 위치는 켬과 끔이 있습니다. 이 예제에서는 어떤 <link xref=\"image.js\">Image</link>를 창에 보여줄 지 여러 스"
42383"위치로 동시에 제어하는 방법을 보여드립니다. 이 예제에서 사용한 그림은 <link href=\"https://live.gnome.org/TarynFox?"
42384"action=AttachFile&amp;do=get&amp;target=Animal+Photos.zip\">여기에서 다운로드할 수 있습니다</link>."
42385
42386#. (itstool) path: note/p
42387#: C/switch.js.page:24
42388msgid ""
42389"The window will contain a \"broken image\" icon instead of a picture if picture files named <file>redfox.png</"
42390"file>, <file>muteswan.png</file>, <file>fruitbat.png</file>, and <file>gentoopenguin.png</file> aren't in the same "
42391"directory. You can change the code and the pictures around as you like, but the Creative Commons-licensed photos "
42392"used in this example were taken from the following sources and cropped to 640x425:"
42393msgstr ""
42394"<file>redfox.png</file>, <file>muteswan.png</file>, <file>fruitbat.png</file>, <file>gentoopenguin.png</file> 파일"
42395"이 동일한 디렉터리에 없으면 창에는 그림 대신 \"깨진 그림\" 아이콘이 나타납니다. 원하는 대로 코드와 그림 이곳저곳을 "
42396"바꿀 수 있지만 이 예제에서 크리에이티브 커먼즈 라이선스 기반으로 활용하는 사진은 다음 원본을 가져왔으며 640x425 크"
42397"기로 잘랐습니다:"
42398
42399#. (itstool) path: item/p
42400#: C/switch.js.page:26
42401msgid ""
42402"<link href=\"http://en.wikipedia.org/wiki/File:Fuzzy_Freddy.jpg\">Red fox photo</link> by Rob Lee, licensed <link "
42403"href=\"http://creativecommons.org/licenses/by/2.0/deed.en\">CC-By</link>"
42404msgstr ""
42405"Rob Lee의 <link href=\"http://en.wikipedia.org/wiki/File:Fuzzy_Freddy.jpg\">Red fox photo</link>는 <link href="
42406"\"http://creativecommons.org/licenses/by/2.0/deed.en\">CC-By</link> 라이선스를 따릅니다"
42407
42408#. (itstool) path: item/p
42409#: C/switch.js.page:27
42410msgid ""
42411"<link href=\"http://en.wikipedia.org/wiki/File:Pygoscelis_papua_-Nagasaki_Penguin_Aquarium_-swimming_underwater-8a."
42412"jpg\">Gentoo penguin photo</link> by Ken Funakoshi, licensed <link href=\"http://creativecommons.org/licenses/by-"
42413"sa/2.0/deed.en\">CC-By-SA</link>"
42414msgstr ""
42415"Ken Funakoshi의 <link href=\"http://en.wikipedia.org/wiki/File:Pygoscelis_papua_-Nagasaki_Penguin_Aquarium_-"
42416"swimming_underwater-8a.jpg\">Gentoo penguin photo</link>는 <link href=\"http://creativecommons.org/licenses/by-"
42417"sa/2.0/deed.en\">CC-By-SA</link> 라이선스를 따릅니다"
42418
42419#. (itstool) path: item/p
42420#: C/switch.js.page:28
42421msgid ""
42422"<link href=\"http://www.flickr.com/photos/shekgraham/127431519/in/photostream/\">Fruit bat photo</link> by Shek "
42423"Graham, licensed <link href=\"http://creativecommons.org/licenses/by/2.0/deed.en\">CC-By</link>"
42424msgstr ""
42425"Shek Graham의 <link href=\"http://www.flickr.com/photos/shekgraham/127431519/in/photostream/\">Fruit bat photo</"
42426"link>는 <link href=\"http://creativecommons.org/licenses/by/2.0/deed.en\">CC-By</link> 라이선스를 따릅니다"
42427
42428#. (itstool) path: item/p
42429#: C/switch.js.page:29
42430msgid ""
42431"<link href=\"http://commons.wikimedia.org/wiki/File:Mute_Swan-Mindaugas_Urbonas.jpg\">Mute swan photo</link> by "
42432"Mindaugas Urbonas, licensed <link href=\"http://creativecommons.org/licenses/by-sa/2.5/deed.en\">CC-By-SA</link>"
42433msgstr ""
42434"Mindaugas Urbonas의 <link href=\"http://commons.wikimedia.org/wiki/File:Mute_Swan-Mindaugas_Urbonas.jpg\">Mute "
42435"swan photo</link>는 <link href=\"http://creativecommons.org/licenses/by-sa/2.5/deed.en\">CC-By-SA</link> 라이선스"
42436"를 따릅니다"
42437
42438#. (itstool) path: note/p
42439#: C/switch.js.page:31
42440msgid ""
42441"Photo credits and licensing information are shown in the application's <link xref=\"aboutdialog.js\">AboutDialog</"
42442"link>. Always remember to credit the original artist when using <link href=\"http://creativecommons.org\">Creative "
42443"Commons-licensed works!</link>"
42444msgstr ""
42445"그놈 사진의 제작자와 라이선스 정보는 프로그램의 <link xref=\"aboutdialog.js\">AboutDialog</link>로 나타냅니다. 항"
42446"상 <link href=\"http://creativecommons.org\">크리에이티브 커먼즈 라이선스 작품</link>을 사용할 때 원 저작자 저작 정"
42447"보 기입을 기억하십시오!"
42448
42449#. (itstool) path: section/code
42450#: C/switch.js.page:48
42451#, no-wrap
42452msgid ""
42453"\n"
42454"const SwitchExample = new Lang.Class({\n"
42455"    Name: 'Switch Example',\n"
42456"\n"
42457"    // Create the application itself\n"
42458"    _init: function() {\n"
42459"        this.application = new Gtk.Application({\n"
42460"            application_id: 'org.example.jsswitch',\n"
42461"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
42462"        });\n"
42463"\n"
42464"    // Connect 'activate' and 'startup' signals to the callback functions\n"
42465"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
42466"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
42467"    },\n"
42468"\n"
42469"    // Callback function for 'activate' signal presents window when active\n"
42470"    _onActivate: function() {\n"
42471"        this._window.present();\n"
42472"    },\n"
42473"\n"
42474"    // Callback function for 'startup' signal creates the menu and builds the UI\n"
42475"    _onStartup: function() {\n"
42476"        this._initMenus();\n"
42477"        this._buildUI ();\n"
42478"    },\n"
42479msgstr ""
42480"\n"
42481"const SwitchExample = new Lang.Class({\n"
42482"    Name: 'Switch Example',\n"
42483"\n"
42484"    // Create the application itself\n"
42485"    _init: function() {\n"
42486"        this.application = new Gtk.Application({\n"
42487"            application_id: 'org.example.jsswitch',\n"
42488"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
42489"        });\n"
42490"\n"
42491"    // Connect 'activate' and 'startup' signals to the callback functions\n"
42492"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
42493"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
42494"    },\n"
42495"\n"
42496"    // Callback function for 'activate' signal presents window when active\n"
42497"    _onActivate: function() {\n"
42498"        this._window.present();\n"
42499"    },\n"
42500"\n"
42501"    // Callback function for 'startup' signal creates the menu and builds the UI\n"
42502"    _onStartup: function() {\n"
42503"        this._initMenus();\n"
42504"        this._buildUI ();\n"
42505"    },\n"
42506
42507#. (itstool) path: section/p
42508#: C/switch.js.page:75
42509msgid ""
42510"All the code for this sample goes in the SwitchExample class. The above code creates a <link href=\"http://www."
42511"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to go "
42512"in."
42513msgstr ""
42514"이 예제의 모든 코드는 SwitchExample 클래스에 들어갔습니다. 위 코드는 위젯과 창이 들어가는 <link href=\"http://www."
42515"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만듭니다."
42516
42517#. (itstool) path: section/code
42518#: C/switch.js.page:77
42519#, no-wrap
42520msgid ""
42521"\n"
42522"    // Build the application's UI\n"
42523"    _buildUI: function() {\n"
42524"\n"
42525"        // Create the application window\n"
42526"        this._window = new Gtk.ApplicationWindow({\n"
42527"            application: this.application,\n"
42528"            window_position: Gtk.WindowPosition.CENTER,\n"
42529"            border_width: 20,\n"
42530"            title: \"Animal Creator\"});\n"
42531msgstr ""
42532"\n"
42533"    // Build the application's UI\n"
42534"    _buildUI: function() {\n"
42535"\n"
42536"        // Create the application window\n"
42537"        this._window = new Gtk.ApplicationWindow({\n"
42538"            application: this.application,\n"
42539"            window_position: Gtk.WindowPosition.CENTER,\n"
42540"            border_width: 20,\n"
42541"            title: \"Animal Creator\"});\n"
42542
42543#. (itstool) path: section/title
42544#: C/switch.js.page:92
42545msgid "Creating the switches"
42546msgstr "스위치 만들기"
42547
42548#. (itstool) path: section/code
42549#: C/switch.js.page:93
42550#, no-wrap
42551msgid ""
42552"\n"
42553"        // Create the image widget and set its default picture\n"
42554"        this._image = new Gtk.Image ({file: \"redfox.png\"});\n"
42555msgstr ""
42556"\n"
42557"        // Create the image widget and set its default picture\n"
42558"        this._image = new Gtk.Image ({file: \"redfox.png\"});\n"
42559
42560#. (itstool) path: section/p
42561#: C/switch.js.page:98
42562msgid ""
42563"We first create the <link xref=\"image.js\">Image</link> that the switches will control. Remember that a file "
42564"named <file>redfox.png</file> needs to be in the same directory as this application."
42565msgstr ""
42566"우선 스위치가 제어할 <link xref=\"image.js\">Image</link>를 만들겠습니다. 이 프로그램과 동일한 디렉터리에 "
42567"<file>redfox.png</file> 그림을 두어야 함을 기억하십시오."
42568
42569#. (itstool) path: section/code
42570#: C/switch.js.page:100
42571#, no-wrap
42572msgid ""
42573"\n"
42574"        // Create a label for the first switch\n"
42575"        this._flyLabel = new Gtk.Label ({\n"
42576"            label: \"Make it fly\",\n"
42577"            margin_right: 30});\n"
42578"\n"
42579"        // Create the first switch and set its default position\n"
42580"        this._flySwitch = new Gtk.Switch ({active: false});\n"
42581"        this._flySwitch.connect ('notify::active', Lang.bind (this, this._switchFlip));\n"
42582"\n"
42583"        // Create a label for the second switch\n"
42584"        this._birdLabel = new Gtk.Label ({\n"
42585"            label: \"Make it a bird\",\n"
42586"            margin_right: 30});\n"
42587"\n"
42588"        // Create the second switch\n"
42589"        this._birdSwitch = new Gtk.Switch ({active: false});\n"
42590"        this._birdSwitch.connect ('notify::active', Lang.bind (this, this._switchFlip));\n"
42591msgstr ""
42592"\n"
42593"        // Create a label for the first switch\n"
42594"        this._flyLabel = new Gtk.Label ({\n"
42595"            label: \"Make it fly\",\n"
42596"            margin_right: 30});\n"
42597"\n"
42598"        // Create the first switch and set its default position\n"
42599"        this._flySwitch = new Gtk.Switch ({active: false});\n"
42600"        this._flySwitch.connect ('notify::active', Lang.bind (this, this._switchFlip));\n"
42601"\n"
42602"        // Create a label for the second switch\n"
42603"        this._birdLabel = new Gtk.Label ({\n"
42604"            label: \"Make it a bird\",\n"
42605"            margin_right: 30});\n"
42606"\n"
42607"        // Create the second switch\n"
42608"        this._birdSwitch = new Gtk.Switch ({active: false});\n"
42609"        this._birdSwitch.connect ('notify::active', Lang.bind (this, this._switchFlip));\n"
42610
42611#. (itstool) path: section/p
42612#: C/switch.js.page:120
42613msgid ""
42614"We use a <link xref=\"label.js\">Label</link> to mark each Switch, and give them a bit of a margin on the right so "
42615"that they aren't crammed right next to the Switches. After that we create the Switches, and set them to be "
42616"switched off by default."
42617msgstr ""
42618"각 스위치에 표시할 <link xref=\"label.js\">Label</link>을 만들고 우측에 약간의 여백을 주어 스위치 뒤에서 쑤셔 넣은 "
42619"느낌이 안나게 하겠습니다. 그 다음 스위치를 만들고 기본적으로 스위치를 꺼둔 상태로 설정하겠습니다."
42620
42621#. (itstool) path: section/p
42622#: C/switch.js.page:121
42623msgid ""
42624"The signal a switch sends out when it's flipped on or off is called notify::active. After we create each switch, "
42625"we connect its notify::active signal to a function called _switchFlip. If you have multiple switches that each do "
42626"something different, you might want to connect them to different functions, but here they're both used for the "
42627"same thing: To control what picture's displayed by _image."
42628msgstr ""
42629"스위치를 다른 방향으로 제낄 경우 스위치에서 내보내는 시그널은 notify::active입니다. 스위치를 만들고 나면 notify::"
42630"active 시그널을 _switchFlip 함수에 연결합니다. 여러 스위치가 서로 다른 동작을 한다면 다른 함수에 연결해야 합니다"
42631"만, 이 스위치는 _image로 표시한 그림을 처리하는 동일한 동작을 하는데 씁니다."
42632
42633#. (itstool) path: section/code
42634#: C/switch.js.page:123
42635#, no-wrap
42636msgid ""
42637"\n"
42638"        // Create a grid for the labels and switches beneath the picture\n"
42639"        this._UIGrid = new Gtk.Grid ({\n"
42640"            halign: Gtk.Align.CENTER,\n"
42641"            valign: Gtk.Align.CENTER,\n"
42642"            margin_top: 20});\n"
42643"\n"
42644"        // Attach the labels and switches to that grid\n"
42645"        this._UIGrid.attach (this._flyLabel, 0, 0, 1, 1);\n"
42646"        this._UIGrid.attach (this._flySwitch, 1, 0, 1, 1);\n"
42647"        this._UIGrid.attach (this._birdLabel, 0, 1, 1, 1);\n"
42648"        this._UIGrid.attach (this._birdSwitch, 1, 1, 1, 1);\n"
42649"\n"
42650"        // Create a master grid to put both the UI and the picture into\n"
42651"        this._mainGrid = new Gtk.Grid ({\n"
42652"            halign: Gtk.Align.CENTER,\n"
42653"            valign: Gtk.Align.CENTER });\n"
42654"\n"
42655"        // Attach the picture and the UI grid to the master grid\n"
42656"        this._mainGrid.attach (this._image, 0, 0, 1, 1);\n"
42657"        this._mainGrid.attach (this._UIGrid, 0, 1, 1, 1);\n"
42658msgstr ""
42659"\n"
42660"        // Create a grid for the labels and switches beneath the picture\n"
42661"        this._UIGrid = new Gtk.Grid ({\n"
42662"            halign: Gtk.Align.CENTER,\n"
42663"            valign: Gtk.Align.CENTER,\n"
42664"            margin_top: 20});\n"
42665"\n"
42666"        // Attach the labels and switches to that grid\n"
42667"        this._UIGrid.attach (this._flyLabel, 0, 0, 1, 1);\n"
42668"        this._UIGrid.attach (this._flySwitch, 1, 0, 1, 1);\n"
42669"        this._UIGrid.attach (this._birdLabel, 0, 1, 1, 1);\n"
42670"        this._UIGrid.attach (this._birdSwitch, 1, 1, 1, 1);\n"
42671"\n"
42672"        // Create a master grid to put both the UI and the picture into\n"
42673"        this._mainGrid = new Gtk.Grid ({\n"
42674"            halign: Gtk.Align.CENTER,\n"
42675"            valign: Gtk.Align.CENTER });\n"
42676"\n"
42677"        // Attach the picture and the UI grid to the master grid\n"
42678"        this._mainGrid.attach (this._image, 0, 0, 1, 1);\n"
42679"        this._mainGrid.attach (this._UIGrid, 0, 1, 1, 1);\n"
42680
42681#. (itstool) path: section/p
42682#: C/switch.js.page:145
42683msgid ""
42684"We create a <link xref=\"grid.js\">Grid</link> for the Labels and Switches first, so that we can organize them in "
42685"a 2x2 layout with a margin between it and the Image. Then we put that Grid into a larger 2x1 Grid that has the "
42686"Image on top, and the Grid with the Labels and Switches on the bottom."
42687msgstr ""
42688"레이블과 스위치를 넣을 <link xref=\"grid.js\">Grid</link>를 먼저 만들어, 그림 사이에 간격을 준 2x2 배치로 모아둘 "
42689"수 있습니다. 그 다음 더 큰 2x1 그리드를 활용하여 상단에 그림을 넣도록 하고 레이블과 스위치는 하단에 넣도록 합니다."
42690
42691#. (itstool) path: section/code
42692#: C/switch.js.page:146
42693#, no-wrap
42694msgid ""
42695"\n"
42696"        // Add the master grid to the window\n"
42697"        this._window.add (this._mainGrid);\n"
42698"\n"
42699"        // Show the window and all child widgets\n"
42700"        this._window.show_all();\n"
42701"    },\n"
42702msgstr ""
42703"\n"
42704"        // Add the master grid to the window\n"
42705"        this._window.add (this._mainGrid);\n"
42706"\n"
42707"        // Show the window and all child widgets\n"
42708"        this._window.show_all();\n"
42709"    },\n"
42710
42711#. (itstool) path: section/title
42712#: C/switch.js.page:158
42713msgid "Function which handles the switches being flipped"
42714msgstr "스위치 전환을 처리하는 함수"
42715
42716#. (itstool) path: section/code
42717#: C/switch.js.page:160
42718#, no-wrap
42719msgid ""
42720"\n"
42721"    _switchFlip: function() {\n"
42722"\n"
42723"        // Change the picture depending on which switches are flipped\n"
42724"        if (this._flySwitch.get_active()) {\n"
42725"\n"
42726"            if (this._birdSwitch.get_active()) this._image.set_from_file (\"muteswan.png\");\n"
42727"\n"
42728"            else this._image.set_from_file (\"fruitbat.png\");\n"
42729"        }\n"
42730"\n"
42731"        else {\n"
42732"\n"
42733"            if (this._birdSwitch.get_active()) this._image.set_from_file (\"gentoopenguin.png\");\n"
42734"\n"
42735"            else this._image.set_from_file (\"redfox.png\");\n"
42736"\n"
42737"        }\n"
42738"\n"
42739"    },\n"
42740msgstr ""
42741"\n"
42742"    _switchFlip: function() {\n"
42743"\n"
42744"        // Change the picture depending on which switches are flipped\n"
42745"        if (this._flySwitch.get_active()) {\n"
42746"\n"
42747"            if (this._birdSwitch.get_active()) this._image.set_from_file (\"muteswan.png\");\n"
42748"\n"
42749"            else this._image.set_from_file (\"fruitbat.png\");\n"
42750"        }\n"
42751"\n"
42752"        else {\n"
42753"\n"
42754"            if (this._birdSwitch.get_active()) this._image.set_from_file (\"gentoopenguin.png\");\n"
42755"\n"
42756"            else this._image.set_from_file (\"redfox.png\");\n"
42757"\n"
42758"        }\n"
42759"\n"
42760"    },\n"
42761
42762#. (itstool) path: section/p
42763#: C/switch.js.page:181
42764msgid ""
42765"Each time a Switch is flipped, this function checks to see which of the two Switches are active afterwards, using "
42766"the Switches' built-in get_active() function. It then changes the Image accordingly. You can change the filenames "
42767"around as you like, so long as you have pictures to go with them."
42768msgstr ""
42769"스위치를 제낄 때마다, 이 함수는 두 스위치 중 어떤 스위치가 동작했는지 스위치 내장 get_active() 함수로 나중에 확인합"
42770"니다. 그 다음 그림을 바로 바꿉니다. 이미 그림이 있다 하더라도 원하는 대로 그림을 바꿀 수 있습니다."
42771
42772#. (itstool) path: section/title
42773#: C/switch.js.page:185
42774msgid "Creating the AboutDialog"
42775msgstr "AboutDialog 만들기"
42776
42777#. (itstool) path: section/code
42778#: C/switch.js.page:186
42779#, no-wrap
42780msgid ""
42781"\n"
42782"    _initMenus: function() {\n"
42783"\n"
42784"        // Build the application's menu so we can have an \"About\" button\n"
42785"        let menu = new Gio.Menu();\n"
42786"        menu.append(\"About\", 'app.about');\n"
42787"        menu.append(\"Quit\",'app.quit');\n"
42788"        this.application.set_app_menu(menu);\n"
42789"\n"
42790"        // Bind the \"About\" button to the _showAbout() function\n"
42791"        let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
42792"        aboutAction.connect('activate', Lang.bind(this,\n"
42793"            function() {\n"
42794"                this._showAbout();\n"
42795"            }));\n"
42796"        this.application.add_action(aboutAction);\n"
42797"\n"
42798"        // Bind the \"Quit\" button to the function that closes the window\n"
42799"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
42800"        quitAction.connect('activate', Lang.bind(this,\n"
42801"            function() {\n"
42802"                this._window.destroy();\n"
42803"            }));\n"
42804"        this.application.add_action(quitAction);\n"
42805"    },\n"
42806msgstr ""
42807"\n"
42808"    _initMenus: function() {\n"
42809"\n"
42810"        // Build the application's menu so we can have an \"About\" button\n"
42811"        let menu = new Gio.Menu();\n"
42812"        menu.append(\"About\", 'app.about');\n"
42813"        menu.append(\"Quit\",'app.quit');\n"
42814"        this.application.set_app_menu(menu);\n"
42815"\n"
42816"        // Bind the \"About\" button to the _showAbout() function\n"
42817"        let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
42818"        aboutAction.connect('activate', Lang.bind(this,\n"
42819"            function() {\n"
42820"                this._showAbout();\n"
42821"            }));\n"
42822"        this.application.add_action(aboutAction);\n"
42823"\n"
42824"        // Bind the \"Quit\" button to the function that closes the window\n"
42825"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
42826"        quitAction.connect('activate', Lang.bind(this,\n"
42827"            function() {\n"
42828"                this._window.destroy();\n"
42829"            }));\n"
42830"        this.application.add_action(quitAction);\n"
42831"    },\n"
42832
42833#. (itstool) path: section/p
42834#: C/switch.js.page:212
42835msgid ""
42836"The first step is building the <link xref=\"gmenu.js\">GMenu</link> that the \"About\" button goes into. This is "
42837"the menu that appears when you click the application's name in the upper-left corner of the screen, next to the "
42838"Activities menu. Our menu only has two options in it: About, and Quit."
42839msgstr ""
42840"첫 단계에서는 \"정보\" 단추를 넣을 <link xref=\"gmenu.js\">GMenu</link>를 만듭니다. 화면의 좌측 상단 구석에 뜰 프로"
42841"그램 이름을 눌렀을 떄 현재 활동 옆에 나타나는 메뉴입니다. 우리가 만든 메뉴에는 정보, 끝내기 옵션 두개를 넣습니다."
42842
42843#. (itstool) path: section/code
42844#: C/switch.js.page:214
42845#, no-wrap
42846msgid ""
42847"\n"
42848"    _showAbout: function () {\n"
42849"\n"
42850"        // String arrays of the names of the people involved in the project\n"
42851"        var artists = ['Rob Lee http://en.wikipedia.org/wiki/File:Fuzzy_Freddy.jpg', 'Ken Funakoshi http://en.wikipedia.org/wiki/File:Pygoscelis_papua_-Nagasaki_Penguin_Aquarium_-swimming_underwater-8a.jpg', 'Shek Graham http://www.flickr.com/photos/shekgraham/127431519/in/photostream/', 'Mindaugas Urbonas http://commons.wikimedia.org/wiki/File:Mute_Swan-Mindaugas_Urbonas.jpg'];\n"
42852"        var authors = [\"GNOME Documentation Team\"];\n"
42853"        var documenters = [\"GNOME Documentation Team\"];\n"
42854"\n"
42855"        // Create the About dialog\n"
42856"        let aboutDialog = new Gtk.AboutDialog({\n"
42857"            title: \"AboutDialog Example\",\n"
42858"            program_name: \"Animal Creator\",\n"
42859"            copyright: \"Copyright \\xa9 2012 GNOME Documentation Team\\n\\nRed fox photo licensed CC-By by Rob Lee\\nGentoo penguin photo licensed CC-By-SA by Ken Funakoshi\\nFruit bat photo licensed CC-By by Shek Graham\\nMute swan photo licensed CC-By-SA by Mindaugas Urbonas\\nLinks to the originals are available under Credits.\\n\\nHave you hugged a penguin today?\",\n"
42860"            artists: artists,\n"
42861"            authors: authors,\n"
42862"            documenters: documenters,\n"
42863"            website: \"http://developer.gnome.org\",\n"
42864"            website_label: \"GNOME Developer Website\" });\n"
42865"\n"
42866"        // Attach the About dialog to the window\n"
42867"        aboutDialog.modal = true;\n"
42868"        aboutDialog.transient_for = this._window;\n"
42869"\n"
42870"        // Show the About dialog\n"
42871"        aboutDialog.show();\n"
42872"\n"
42873"        // Connect the Close button to the destroy signal for the dialog\n"
42874"        aboutDialog.connect('response', function() {\n"
42875"            aboutDialog.destroy();\n"
42876"        });\n"
42877"    }\n"
42878"\n"
42879"});\n"
42880msgstr ""
42881"\n"
42882"    _showAbout: function () {\n"
42883"\n"
42884"        // String arrays of the names of the people involved in the project\n"
42885"        var artists = ['Rob Lee http://en.wikipedia.org/wiki/File:Fuzzy_Freddy.jpg', 'Ken Funakoshi http://en.wikipedia.org/wiki/File:Pygoscelis_papua_-Nagasaki_Penguin_Aquarium_-swimming_underwater-8a.jpg', 'Shek Graham http://www.flickr.com/photos/shekgraham/127431519/in/photostream/', 'Mindaugas Urbonas http://commons.wikimedia.org/wiki/File:Mute_Swan-Mindaugas_Urbonas.jpg'];\n"
42886"        var authors = [\"GNOME Documentation Team\"];\n"
42887"        var documenters = [\"GNOME Documentation Team\"];\n"
42888"\n"
42889"        // Create the About dialog\n"
42890"        let aboutDialog = new Gtk.AboutDialog({\n"
42891"            title: \"AboutDialog Example\",\n"
42892"            program_name: \"Animal Creator\",\n"
42893"            copyright: \"Copyright \\xa9 2012 GNOME Documentation Team\\n\\nRed fox photo licensed CC-By by Rob Lee\\nGentoo penguin photo licensed CC-By-SA by Ken Funakoshi\\nFruit bat photo licensed CC-By by Shek Graham\\nMute swan photo licensed CC-By-SA by Mindaugas Urbonas\\nLinks to the originals are available under Credits.\\n\\nHave you hugged a penguin today?\",\n"
42894"            artists: artists,\n"
42895"            authors: authors,\n"
42896"            documenters: documenters,\n"
42897"            website: \"http://developer.gnome.org\",\n"
42898"            website_label: \"GNOME Developer Website\" });\n"
42899"\n"
42900"        // Attach the About dialog to the window\n"
42901"        aboutDialog.modal = true;\n"
42902"        aboutDialog.transient_for = this._window;\n"
42903"\n"
42904"        // Show the About dialog\n"
42905"        aboutDialog.show();\n"
42906"\n"
42907"        // Connect the Close button to the destroy signal for the dialog\n"
42908"        aboutDialog.connect('response', function() {\n"
42909"            aboutDialog.destroy();\n"
42910"        });\n"
42911"    }\n"
42912"\n"
42913"});\n"
42914
42915#. (itstool) path: section/p
42916#: C/switch.js.page:248
42917msgid ""
42918"An <link xref=\"aboutdialog.js\">AboutDialog</link> has a lot of different things you can set, to credit everyone "
42919"who worked on the application and leave a note to whomever reads it. In this case, the copyright section contains "
42920"our note and credits the original photographers, while the artists section shows you a list of the photographers "
42921"with links to the original photos when you click the Credits button. The web URLs put after their names in the "
42922"array turn their names into clickable links in the Credits section."
42923msgstr ""
42924"<link xref=\"aboutdialog.js\">AboutDialog</link>에는 여러분이 설정할 수 있는 여러 다른 요소가 있는데, 프로그램을 만"
42925"들 때 기여한 모든 사람, 그리고 이 부분을 봐야 할 독자에게 보여줄 참고 내용을 담습니다. 이 경우 저작권 섹션에 참고 "
42926"메모와 만든 사람의 사진 원본 촬영자 목록을 올려둡니다. 다만, 아티스트 섹션에는 만든 사람 단추를 눌렀을 때 원본 사"
42927"진 링크와 사진사 목록을 보여줍니다. 웹 URL은 만든 사람 섹션에서 누를 수 있는 항목으로 이름에 걸어두겠습니다."
42928
42929#. (itstool) path: section/code
42930#: C/switch.js.page:250
42931#, no-wrap
42932msgid ""
42933"\n"
42934"// Run the application\n"
42935"let app = new SwitchExample ();\n"
42936"app.application.run (ARGV);\n"
42937msgstr ""
42938"\n"
42939"// Run the application\n"
42940"let app = new SwitchExample ();\n"
42941"app.application.run (ARGV);\n"
42942
42943#. (itstool) path: section/p
42944#: C/switch.js.page:255
42945msgid "Finally, we create a new instance of the finished SwitchExample class, and set the application running."
42946msgstr "마지막으로, 마무리한 SwitchExample 클래스의 새 인스턴스를 만들고, 프로그램 실행을 설정합니다."
42947
42948#. (itstool) path: section/code
42949#: C/switch.js.page:260
42950#, no-wrap
42951msgid ""
42952"#!/usr/bin/gjs\n"
42953"\n"
42954"imports.gi.versions.Gtk = '3.0';\n"
42955"\n"
42956"const Gio = imports.gi.Gio;\n"
42957"const Gtk = imports.gi.Gtk;\n"
42958"\n"
42959"class SwitchExample {\n"
42960"\n"
42961"    // Create the application itself\n"
42962"    constructor() {\n"
42963"        this.application = new Gtk.Application({\n"
42964"            application_id: 'org.example.jsswitch'\n"
42965"        });\n"
42966"\n"
42967"        // Connect 'activate' and 'startup' signals to the callback functions\n"
42968"        this.application.connect('activate', this._onActivate.bind(this));\n"
42969"        this.application.connect('startup', this._onStartup.bind(this));\n"
42970"    }\n"
42971"\n"
42972"    // Callback function for 'activate' signal presents window when active\n"
42973"    _onActivate() {\n"
42974"        this._window.present();\n"
42975"    }\n"
42976"\n"
42977"    // Callback function for 'startup' signal creates the menu and builds the UI\n"
42978"    _onStartup() {\n"
42979"        this._initMenus();\n"
42980"        this._buildUI();\n"
42981"    }\n"
42982"\n"
42983"    // Build the application's UI\n"
42984"    _buildUI() {\n"
42985"\n"
42986"        // Create the application window\n"
42987"        this._window = new Gtk.ApplicationWindow({\n"
42988"            application: this.application,\n"
42989"            window_position: Gtk.WindowPosition.CENTER,\n"
42990"            border_width: 20,\n"
42991"            title: \"Animal Creator\"});\n"
42992"\n"
42993"        // Create the image widget and set its default picture\n"
42994"        this._image = new Gtk.Image ({file: \"redfox.png\"});\n"
42995"\n"
42996"        // Create a label for the first switch\n"
42997"        this._flyLabel = new Gtk.Label ({\n"
42998"            label: \"Make it fly\",\n"
42999"            margin_right: 30});\n"
43000"\n"
43001"        // Create the first switch and set its default position\n"
43002"        this._flySwitch = new Gtk.Switch ({active: false});\n"
43003"        this._flySwitch.connect ('notify::active', this._switchFlip.bind(this));\n"
43004"\n"
43005"        // Create a label for the second switch\n"
43006"        this._birdLabel = new Gtk.Label ({\n"
43007"            label: \"Make it a bird\",\n"
43008"            margin_right: 30});\n"
43009"\n"
43010"        // Create the second switch\n"
43011"        this._birdSwitch = new Gtk.Switch ({active: false});\n"
43012"        this._birdSwitch.connect ('notify::active', this._switchFlip.bind(this));\n"
43013"\n"
43014"        // Create a grid for the labels and switches beneath the picture\n"
43015"        this._UIGrid = new Gtk.Grid ({\n"
43016"            halign: Gtk.Align.CENTER,\n"
43017"            valign: Gtk.Align.CENTER,\n"
43018"            margin_top: 20});\n"
43019"\n"
43020"        // Attach the labels and switches to that grid\n"
43021"        this._UIGrid.attach (this._flyLabel, 0, 0, 1, 1);\n"
43022"        this._UIGrid.attach (this._flySwitch, 1, 0, 1, 1);\n"
43023"        this._UIGrid.attach (this._birdLabel, 0, 1, 1, 1);\n"
43024"        this._UIGrid.attach (this._birdSwitch, 1, 1, 1, 1);\n"
43025"\n"
43026"        // Create a master grid to put both the UI and the picture into\n"
43027"        this._mainGrid = new Gtk.Grid ({\n"
43028"            halign: Gtk.Align.CENTER,\n"
43029"            valign: Gtk.Align.CENTER });\n"
43030"\n"
43031"        // Attach the picture and the UI grid to the master grid\n"
43032"        this._mainGrid.attach (this._image, 0, 0, 1, 1);\n"
43033"        this._mainGrid.attach (this._UIGrid, 0, 1, 1, 1);\n"
43034"\n"
43035"        // Add the master grid to the window\n"
43036"        this._window.add (this._mainGrid);\n"
43037"\n"
43038"        // Show the window and all child widgets\n"
43039"        this._window.show_all();\n"
43040"    }\n"
43041"\n"
43042"    _switchFlip() {\n"
43043"\n"
43044"        // Change the picture depending on which switches are flipped\n"
43045"        if (this._flySwitch.get_active()) {\n"
43046"\n"
43047"            if (this._birdSwitch.get_active())\n"
43048"                this._image.set_from_file (\"muteswan.png\");\n"
43049"            else\n"
43050"                this._image.set_from_file (\"fruitbat.png\");\n"
43051"        } else {\n"
43052"\n"
43053"            if (this._birdSwitch.get_active())\n"
43054"                this._image.set_from_file (\"gentoopenguin.png\");\n"
43055"            else\n"
43056"                this._image.set_from_file (\"redfox.png\");\n"
43057"        }\n"
43058"    }\n"
43059"\n"
43060"    _initMenus() {\n"
43061"\n"
43062"        // Build the application's menu so we can have an \"About\" button\n"
43063"        let menu = new Gio.Menu();\n"
43064"        menu.append(\"About\", 'app.about');\n"
43065"        menu.append(\"Quit\",'app.quit');\n"
43066"        this.application.set_app_menu(menu);\n"
43067"\n"
43068"        // Bind the \"About\" button to the _showAbout() function\n"
43069"        let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
43070"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
43071"        this.application.add_action(aboutAction);\n"
43072"\n"
43073"        // Bind the \"Quit\" button to the function that closes the window\n"
43074"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
43075"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
43076"        this.application.add_action(quitAction);\n"
43077"    }\n"
43078"\n"
43079"    _showAbout() {\n"
43080"\n"
43081"        // String arrays of the names of the people involved in the project\n"
43082"        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"
43083"        var authors = [\"GNOME Documentation Team\"];\n"
43084"        var documenters = [\"GNOME Documentation Team\"];\n"
43085"\n"
43086"        // Create the About dialog\n"
43087"        let aboutDialog = new Gtk.AboutDialog({\n"
43088"            title: \"AboutDialog Example\",\n"
43089"            program_name: \"Animal Creator\",\n"
43090"            copyright: \"Copyright \\xa9 2012 GNOME Documentation Team\\n\\nRed fox photo licensed CC-By by Rob Lee\\nGentoo penguin photo licensed CC-By-SA by Ken Funakoshi\\nFruit bat photo licensed CC-By by Shek Graham\\nMute swan photo licensed CC-By-SA by Mindaugas Urbonas\\nLinks to the originals are available under Credits.\\n\\nHave you hugged a penguin today?\",\n"
43091"            artists: artists,\n"
43092"            authors: authors,\n"
43093"            documenters: documenters,\n"
43094"            website: \"http://developer.gnome.org\",\n"
43095"            website_label: \"GNOME Developer Website\" });\n"
43096"\n"
43097"        // Attach the About dialog to the window\n"
43098"        aboutDialog.modal = true;\n"
43099"        aboutDialog.transient_for = this._window;\n"
43100"\n"
43101"        // Show the About dialog\n"
43102"        aboutDialog.show();\n"
43103"\n"
43104"        // Connect the Close button to the destroy signal for the dialog\n"
43105"        aboutDialog.connect('response', function() {\n"
43106"            aboutDialog.destroy();\n"
43107"        });\n"
43108"    }\n"
43109"};\n"
43110"\n"
43111"// Run the application\n"
43112"let app = new SwitchExample ();\n"
43113"app.application.run (ARGV);\n"
43114msgstr ""
43115"#!/usr/bin/gjs\n"
43116"\n"
43117"imports.gi.versions.Gtk = '3.0';\n"
43118"\n"
43119"const Gio = imports.gi.Gio;\n"
43120"const Gtk = imports.gi.Gtk;\n"
43121"\n"
43122"class SwitchExample {\n"
43123"\n"
43124"    // Create the application itself\n"
43125"    constructor() {\n"
43126"        this.application = new Gtk.Application({\n"
43127"            application_id: 'org.example.jsswitch'\n"
43128"        });\n"
43129"\n"
43130"        // Connect 'activate' and 'startup' signals to the callback functions\n"
43131"        this.application.connect('activate', this._onActivate.bind(this));\n"
43132"        this.application.connect('startup', this._onStartup.bind(this));\n"
43133"    }\n"
43134"\n"
43135"    // Callback function for 'activate' signal presents window when active\n"
43136"    _onActivate() {\n"
43137"        this._window.present();\n"
43138"    }\n"
43139"\n"
43140"    // Callback function for 'startup' signal creates the menu and builds the UI\n"
43141"    _onStartup() {\n"
43142"        this._initMenus();\n"
43143"        this._buildUI();\n"
43144"    }\n"
43145"\n"
43146"    // Build the application's UI\n"
43147"    _buildUI() {\n"
43148"\n"
43149"        // Create the application window\n"
43150"        this._window = new Gtk.ApplicationWindow({\n"
43151"            application: this.application,\n"
43152"            window_position: Gtk.WindowPosition.CENTER,\n"
43153"            border_width: 20,\n"
43154"            title: \"Animal Creator\"});\n"
43155"\n"
43156"        // Create the image widget and set its default picture\n"
43157"        this._image = new Gtk.Image ({file: \"redfox.png\"});\n"
43158"\n"
43159"        // Create a label for the first switch\n"
43160"        this._flyLabel = new Gtk.Label ({\n"
43161"            label: \"Make it fly\",\n"
43162"            margin_right: 30});\n"
43163"\n"
43164"        // Create the first switch and set its default position\n"
43165"        this._flySwitch = new Gtk.Switch ({active: false});\n"
43166"        this._flySwitch.connect ('notify::active', this._switchFlip.bind(this));\n"
43167"\n"
43168"        // Create a label for the second switch\n"
43169"        this._birdLabel = new Gtk.Label ({\n"
43170"            label: \"Make it a bird\",\n"
43171"            margin_right: 30});\n"
43172"\n"
43173"        // Create the second switch\n"
43174"        this._birdSwitch = new Gtk.Switch ({active: false});\n"
43175"        this._birdSwitch.connect ('notify::active', this._switchFlip.bind(this));\n"
43176"\n"
43177"        // Create a grid for the labels and switches beneath the picture\n"
43178"        this._UIGrid = new Gtk.Grid ({\n"
43179"            halign: Gtk.Align.CENTER,\n"
43180"            valign: Gtk.Align.CENTER,\n"
43181"            margin_top: 20});\n"
43182"\n"
43183"        // Attach the labels and switches to that grid\n"
43184"        this._UIGrid.attach (this._flyLabel, 0, 0, 1, 1);\n"
43185"        this._UIGrid.attach (this._flySwitch, 1, 0, 1, 1);\n"
43186"        this._UIGrid.attach (this._birdLabel, 0, 1, 1, 1);\n"
43187"        this._UIGrid.attach (this._birdSwitch, 1, 1, 1, 1);\n"
43188"\n"
43189"        // Create a master grid to put both the UI and the picture into\n"
43190"        this._mainGrid = new Gtk.Grid ({\n"
43191"            halign: Gtk.Align.CENTER,\n"
43192"            valign: Gtk.Align.CENTER });\n"
43193"\n"
43194"        // Attach the picture and the UI grid to the master grid\n"
43195"        this._mainGrid.attach (this._image, 0, 0, 1, 1);\n"
43196"        this._mainGrid.attach (this._UIGrid, 0, 1, 1, 1);\n"
43197"\n"
43198"        // Add the master grid to the window\n"
43199"        this._window.add (this._mainGrid);\n"
43200"\n"
43201"        // Show the window and all child widgets\n"
43202"        this._window.show_all();\n"
43203"    }\n"
43204"\n"
43205"    _switchFlip() {\n"
43206"\n"
43207"        // Change the picture depending on which switches are flipped\n"
43208"        if (this._flySwitch.get_active()) {\n"
43209"\n"
43210"            if (this._birdSwitch.get_active())\n"
43211"                this._image.set_from_file (\"muteswan.png\");\n"
43212"            else\n"
43213"                this._image.set_from_file (\"fruitbat.png\");\n"
43214"        } else {\n"
43215"\n"
43216"            if (this._birdSwitch.get_active())\n"
43217"                this._image.set_from_file (\"gentoopenguin.png\");\n"
43218"            else\n"
43219"                this._image.set_from_file (\"redfox.png\");\n"
43220"        }\n"
43221"    }\n"
43222"\n"
43223"    _initMenus() {\n"
43224"\n"
43225"        // Build the application's menu so we can have an \"About\" button\n"
43226"        let menu = new Gio.Menu();\n"
43227"        menu.append(\"About\", 'app.about');\n"
43228"        menu.append(\"Quit\",'app.quit');\n"
43229"        this.application.set_app_menu(menu);\n"
43230"\n"
43231"        // Bind the \"About\" button to the _showAbout() function\n"
43232"        let aboutAction = new Gio.SimpleAction ({ name: 'about' });\n"
43233"        aboutAction.connect('activate', () =&gt; { this._showAbout(); });\n"
43234"        this.application.add_action(aboutAction);\n"
43235"\n"
43236"        // Bind the \"Quit\" button to the function that closes the window\n"
43237"        let quitAction = new Gio.SimpleAction ({ name: 'quit' });\n"
43238"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
43239"        this.application.add_action(quitAction);\n"
43240"    }\n"
43241"\n"
43242"    _showAbout() {\n"
43243"\n"
43244"        // String arrays of the names of the people involved in the project\n"
43245"        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"
43246"        var authors = [\"GNOME Documentation Team\"];\n"
43247"        var documenters = [\"GNOME Documentation Team\"];\n"
43248"\n"
43249"        // Create the About dialog\n"
43250"        let aboutDialog = new Gtk.AboutDialog({\n"
43251"            title: \"AboutDialog Example\",\n"
43252"            program_name: \"Animal Creator\",\n"
43253"            copyright: \"Copyright \\xa9 2012 GNOME Documentation Team\\n\\nRed fox photo licensed CC-By by Rob Lee\\nGentoo penguin photo licensed CC-By-SA by Ken Funakoshi\\nFruit bat photo licensed CC-By by Shek Graham\\nMute swan photo licensed CC-By-SA by Mindaugas Urbonas\\nLinks to the originals are available under Credits.\\n\\nHave you hugged a penguin today?\",\n"
43254"            artists: artists,\n"
43255"            authors: authors,\n"
43256"            documenters: documenters,\n"
43257"            website: \"http://developer.gnome.org\",\n"
43258"            website_label: \"GNOME Developer Website\" });\n"
43259"\n"
43260"        // Attach the About dialog to the window\n"
43261"        aboutDialog.modal = true;\n"
43262"        aboutDialog.transient_for = this._window;\n"
43263"\n"
43264"        // Show the About dialog\n"
43265"        aboutDialog.show();\n"
43266"\n"
43267"        // Connect the Close button to the destroy signal for the dialog\n"
43268"        aboutDialog.connect('response', function() {\n"
43269"            aboutDialog.destroy();\n"
43270"        });\n"
43271"    }\n"
43272"};\n"
43273"\n"
43274"// Run the application\n"
43275"let app = new SwitchExample ();\n"
43276"app.application.run (ARGV);\n"
43277
43278#. (itstool) path: item/p
43279#: C/switch.js.page:271
43280msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Image.html\">Gtk.Image</link>"
43281msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Image.html\">Gtk.Image</link>"
43282
43283#. (itstool) path: item/p
43284#: C/switch.js.page:273
43285msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Switch.html\">Gtk.Switch</link>"
43286msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Switch.html\">Gtk.Switch</link>"
43287
43288#. (itstool) path: info/title
43289#: C/switch.py.page:8
43290msgctxt "text"
43291msgid "Switch (Python)"
43292msgstr "Switch (Python)"
43293
43294#. (itstool) path: page/p
43295#: C/switch.py.page:26
43296msgid "This Switch makes the title appears and disappear."
43297msgstr "이 스위치는 제목을 나타나게 하거나 사라지게 합니다."
43298
43299#. (itstool) path: section/code
43300#: C/switch.py.page:33
43301#, no-wrap
43302msgid ""
43303"from gi.repository import Gtk\n"
43304"import sys\n"
43305"\n"
43306"\n"
43307"class MyWindow(Gtk.ApplicationWindow):\n"
43308"    # a window\n"
43309"\n"
43310"    def __init__(self, app):\n"
43311"        Gtk.Window.__init__(self, title=\"Switch Example\", application=app)\n"
43312"        self.set_default_size(300, 100)\n"
43313"        self.set_border_width(10)\n"
43314"\n"
43315"        # a switch\n"
43316"        switch = Gtk.Switch()\n"
43317"        # turned on by default\n"
43318"        switch.set_active(True)\n"
43319"        # connect the signal notify::active emitted by the switch\n"
43320"        # to the callback function activate_cb\n"
43321"        switch.connect(\"notify::active\", self.activate_cb)\n"
43322"\n"
43323"        # a label\n"
43324"        label = Gtk.Label()\n"
43325"        label.set_text(\"Title\")\n"
43326"\n"
43327"        # a grid to allocate the widgets\n"
43328"        grid = Gtk.Grid()\n"
43329"        grid.set_column_spacing(10)\n"
43330"        grid.attach(label, 0, 0, 1, 1)\n"
43331"        grid.attach(switch, 1, 0, 1, 1)\n"
43332"\n"
43333"        # add the grid to the window\n"
43334"        self.add(grid)\n"
43335"\n"
43336"    # Callback function. Since the signal is notify::active\n"
43337"    # we need the argument 'active'\n"
43338"    def activate_cb(self, button, active):\n"
43339"        # if the button (i.e. the switch) is active, set the title\n"
43340"        # of the window to \"Switch Example\"\n"
43341"        if button.get_active():\n"
43342"            self.set_title(\"Switch Example\")\n"
43343"        # else, set it to \"\" (empty string)\n"
43344"        else:\n"
43345"            self.set_title(\"\")\n"
43346"\n"
43347"\n"
43348"class MyApplication(Gtk.Application):\n"
43349"\n"
43350"    def __init__(self):\n"
43351"        Gtk.Application.__init__(self)\n"
43352"\n"
43353"    def do_activate(self):\n"
43354"        win = MyWindow(self)\n"
43355"        win.show_all()\n"
43356"\n"
43357"    def do_startup(self):\n"
43358"        Gtk.Application.do_startup(self)\n"
43359"\n"
43360"app = MyApplication()\n"
43361"exit_status = app.run(sys.argv)\n"
43362"sys.exit(exit_status)\n"
43363msgstr ""
43364"from gi.repository import Gtk\n"
43365"import sys\n"
43366"\n"
43367"\n"
43368"class MyWindow(Gtk.ApplicationWindow):\n"
43369"    # a window\n"
43370"\n"
43371"    def __init__(self, app):\n"
43372"        Gtk.Window.__init__(self, title=\"Switch Example\", application=app)\n"
43373"        self.set_default_size(300, 100)\n"
43374"        self.set_border_width(10)\n"
43375"\n"
43376"        # a switch\n"
43377"        switch = Gtk.Switch()\n"
43378"        # turned on by default\n"
43379"        switch.set_active(True)\n"
43380"        # connect the signal notify::active emitted by the switch\n"
43381"        # to the callback function activate_cb\n"
43382"        switch.connect(\"notify::active\", self.activate_cb)\n"
43383"\n"
43384"        # a label\n"
43385"        label = Gtk.Label()\n"
43386"        label.set_text(\"Title\")\n"
43387"\n"
43388"        # a grid to allocate the widgets\n"
43389"        grid = Gtk.Grid()\n"
43390"        grid.set_column_spacing(10)\n"
43391"        grid.attach(label, 0, 0, 1, 1)\n"
43392"        grid.attach(switch, 1, 0, 1, 1)\n"
43393"\n"
43394"        # add the grid to the window\n"
43395"        self.add(grid)\n"
43396"\n"
43397"    # Callback function. Since the signal is notify::active\n"
43398"    # we need the argument 'active'\n"
43399"    def activate_cb(self, button, active):\n"
43400"        # if the button (i.e. the switch) is active, set the title\n"
43401"        # of the window to \"Switch Example\"\n"
43402"        if button.get_active():\n"
43403"            self.set_title(\"Switch Example\")\n"
43404"        # else, set it to \"\" (empty string)\n"
43405"        else:\n"
43406"            self.set_title(\"\")\n"
43407"\n"
43408"\n"
43409"class MyApplication(Gtk.Application):\n"
43410"\n"
43411"    def __init__(self):\n"
43412"        Gtk.Application.__init__(self)\n"
43413"\n"
43414"    def do_activate(self):\n"
43415"        win = MyWindow(self)\n"
43416"        win.show_all()\n"
43417"\n"
43418"    def do_startup(self):\n"
43419"        Gtk.Application.do_startup(self)\n"
43420"\n"
43421"app = MyApplication()\n"
43422"exit_status = app.run(sys.argv)\n"
43423"sys.exit(exit_status)\n"
43424
43425#. (itstool) path: section/title
43426#: C/switch.py.page:37
43427msgid "Useful methods for a Switch widget"
43428msgstr "Switch 위젯에 쓸만한 메서드"
43429
43430#. (itstool) path: section/p
43431#: C/switch.py.page:38
43432msgid ""
43433"In line 17 the signal <code>\"notify::active\"</code> is connected to the callback function <code>activate_cb()</"
43434"code> using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link "
43435"xref=\"signals-callbacks.py\"/> for a more detailed explanation."
43436msgstr ""
43437"17번째 줄에서 <code>\"notify::active\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, "
43438"<var>callback function</var>)</code> 함수로  <code>activate_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 "
43439"<link xref=\"signals-callbacks.py\"/>를 참조하십시오."
43440
43441#. (itstool) path: item/p
43442#: C/switch.py.page:45
43443msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSwitch.html\">GtkSwitch</link>"
43444msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkSwitch.html\">GtkSwitch</link>"
43445
43446#. (itstool) path: info/title
43447#: C/switch.vala.page:8
43448msgctxt "text"
43449msgid "Switch (Vala)"
43450msgstr "Switch (Vala)"
43451
43452#. (itstool) path: page/p
43453#: C/switch.vala.page:29
43454msgid "This Switch toggles the title."
43455msgstr "이 스위치는 제목을 바꿉니다."
43456
43457#. (itstool) path: page/code
43458#: C/switch.vala.page:31
43459#, no-wrap
43460msgid ""
43461"class MyWindow : Gtk.ApplicationWindow {\n"
43462"\n"
43463"\tinternal MyWindow (MyApplication app) {\n"
43464"\t\tObject (application: app, title: \"Switch Example\");\n"
43465"\n"
43466"\t\tthis.set_default_size (300, 100);\n"
43467"\t\tthis.border_width = 10;\n"
43468"\n"
43469"\t\tvar label = new Gtk.Label (\"Title\");\n"
43470"\t\tvar switcher = new Gtk.Switch ();\n"
43471"\n"
43472"\t\tswitcher.set_active (true);\n"
43473"\n"
43474"\t\tswitcher.notify[\"active\"].connect (switcher_cb);\n"
43475"\n"
43476"\t\tvar grid = new Gtk.Grid ();\n"
43477"\t\tgrid.set_column_spacing (10);\n"
43478"\t\tgrid.attach (label, 0, 0, 1, 1);\n"
43479"\t\tgrid.attach (switcher, 1, 0, 1, 1);\n"
43480"\n"
43481"\t\tthis.add (grid);\n"
43482"\t}\n"
43483"\n"
43484"\tvoid switcher_cb (Object switcher, ParamSpec pspec) {\n"
43485"\t\tif ((switcher as Gtk.Switch).get_active())\n"
43486"\t\t\tthis.set_title (\"Switch Example\");\n"
43487"\t\telse\n"
43488"\t\t\tthis.set_title (\"\");\n"
43489"\t}\n"
43490"}\n"
43491"\n"
43492"class MyApplication : Gtk.Application {\n"
43493"\tprotected override void activate () {\n"
43494"\n"
43495"\t\tvar window = new MyWindow (this);\n"
43496"\t\twindow.show_all (); //show all the things\n"
43497"\t}\n"
43498"\n"
43499"\tinternal MyApplication () {\n"
43500"\t\tObject (application_id: \"org.example.checkbutton\");\n"
43501"\t}\n"
43502"}\n"
43503"\n"
43504"int main (string[] args) {\n"
43505"\treturn new MyApplication ().run (args);\n"
43506"}\n"
43507msgstr ""
43508"class MyWindow : Gtk.ApplicationWindow {\n"
43509"\n"
43510"\tinternal MyWindow (MyApplication app) {\n"
43511"\t\tObject (application: app, title: \"Switch Example\");\n"
43512"\n"
43513"\t\tthis.set_default_size (300, 100);\n"
43514"\t\tthis.border_width = 10;\n"
43515"\n"
43516"\t\tvar label = new Gtk.Label (\"Title\");\n"
43517"\t\tvar switcher = new Gtk.Switch ();\n"
43518"\n"
43519"\t\tswitcher.set_active (true);\n"
43520"\n"
43521"\t\tswitcher.notify[\"active\"].connect (switcher_cb);\n"
43522"\n"
43523"\t\tvar grid = new Gtk.Grid ();\n"
43524"\t\tgrid.set_column_spacing (10);\n"
43525"\t\tgrid.attach (label, 0, 0, 1, 1);\n"
43526"\t\tgrid.attach (switcher, 1, 0, 1, 1);\n"
43527"\n"
43528"\t\tthis.add (grid);\n"
43529"\t}\n"
43530"\n"
43531"\tvoid switcher_cb (Object switcher, ParamSpec pspec) {\n"
43532"\t\tif ((switcher as Gtk.Switch).get_active())\n"
43533"\t\t\tthis.set_title (\"Switch Example\");\n"
43534"\t\telse\n"
43535"\t\t\tthis.set_title (\"\");\n"
43536"\t}\n"
43537"}\n"
43538"\n"
43539"class MyApplication : Gtk.Application {\n"
43540"\tprotected override void activate () {\n"
43541"\n"
43542"\t\tvar window = new MyWindow (this);\n"
43543"\t\twindow.show_all (); //show all the things\n"
43544"\t}\n"
43545"\n"
43546"\tinternal MyApplication () {\n"
43547"\t\tObject (application_id: \"org.example.checkbutton\");\n"
43548"\t}\n"
43549"}\n"
43550"\n"
43551"int main (string[] args) {\n"
43552"\treturn new MyApplication ().run (args);\n"
43553"}\n"
43554
43555#. (itstool) path: item/p
43556#: C/switch.vala.page:36
43557msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Switch.html\">Gtk.Switch</link>"
43558msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Switch.html\">Gtk.Switch</link>"
43559
43560#. (itstool) path: info/title
43561#: C/textview.c.page:8
43562msgctxt "text"
43563msgid "TextView (C)"
43564msgstr "TextView (C)"
43565
43566#. (itstool) path: info/desc
43567#: C/textview.c.page:18 C/textview.vala.page:18
43568msgid "Widget which displays a GtkTextBuffer"
43569msgstr "GtkTextBuffer를 나타내는 위젯"
43570
43571#. (itstool) path: page/title
43572#: C/textview.c.page:21 C/textview.vala.page:21
43573msgid "TextView widget"
43574msgstr "TextView 위젯"
43575
43576#. (itstool) path: note/p
43577#: C/textview.c.page:22 C/textview.py.page:33 C/textview.vala.page:22
43578msgid "If we press \"enter\", we have a new line."
43579msgstr "\"enter\" 키를 누르면 줄이 바뀝니다."
43580
43581#. (itstool) path: note/p
43582#: C/textview.c.page:23 C/textview.vala.page:23
43583msgid ""
43584"If we press \"enter\" more times then there are lines in the default sized window, then a vertical scrollbar "
43585"appears."
43586msgstr ""
43587"\"enter\" 키를 더 누르면 기본 크기 창 안에 줄이 더 생기며, 창 크기를 넘으면서 수직 스크롤 표시줄이 나타납니다."
43588
43589#. (itstool) path: note/p
43590#: C/textview.c.page:24 C/textview.vala.page:24
43591msgid "If we write a long sentence, the text will wrap breaking lines between words."
43592msgstr "긴 문장을 적어넣으면 문장에 있는 단어 사이에서 줄바꿈이 일어납니다."
43593
43594#. (itstool) path: note/p
43595#: C/textview.c.page:25
43596msgid ""
43597"If we have a loooooooooooooooooooooooooooooooooooong (that was long) word, a* horizontal scrollbar will appear."
43598msgstr "기이이이이이이이이이이이이이이이이이이인 단어가 있다면(길었다면), 수평 스크롤 표시줄이 나타납니다."
43599
43600#. (itstool) path: page/media
43601#. This is a reference to an external file such as an image or video. When
43602#. the file changes, the md5 hash will change to let you know you need to
43603#. update your localized copy. The msgstr is not used at all. Set it to
43604#. whatever you like once you have updated your copy of the file.
43605#: C/textview.c.page:27 C/textview.py.page:39 C/textview.vala.page:27
43606msgctxt "_"
43607msgid "external ref='media/textview.png' md5='049e859ed1af2d7c93d8cb5cfd9f7792'"
43608msgstr ""
43609
43610#. (itstool) path: page/p
43611#: C/textview.c.page:28 C/textview.vala.page:28
43612msgid "This is an example of Gtk.TextView"
43613msgstr "Gtk.TextView 예제입니다"
43614
43615#. (itstool) path: page/code
43616#: C/textview.c.page:30
43617#, no-wrap
43618msgid ""
43619"\n"
43620"#include &lt;gtk/gtk.h&gt;\n"
43621"\n"
43622"\n"
43623"\n"
43624"static void\n"
43625"activate (GtkApplication *app,\n"
43626"          gpointer        user_data)\n"
43627"{\n"
43628"  /* Declare variables */\n"
43629"  GtkWidget *window;\n"
43630"  GtkWidget *text_view;\n"
43631"  GtkWidget *scrolled_window;\n"
43632"\n"
43633"  GtkTextBuffer *buffer;\n"
43634"\n"
43635"\n"
43636"  /* Create a window with a title, and a default size */\n"
43637"  window = gtk_application_window_new (app);\n"
43638"  gtk_window_set_title (GTK_WINDOW (window), \"TextView Example\");\n"
43639"  gtk_window_set_default_size (GTK_WINDOW (window), 220, 200);\n"
43640"\n"
43641"\n"
43642"  /* The text buffer represents the text being edited */\n"
43643"  buffer = gtk_text_buffer_new (NULL);\n"
43644"  \n"
43645"\n"
43646"  /* Text view is a widget in which can display the text buffer. \n"
43647"   * The line wrapping is set to break lines in between words.\n"
43648"   */\n"
43649"  text_view = gtk_text_view_new_with_buffer (buffer);\n"
43650"  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD); \n"
43651"\n"
43652"\n"
43653"  /* Create the scrolled window. Usually NULL is passed for both parameters so \n"
43654"   * that it creates the horizontal/vertical adjustments automatically. Setting \n"
43655"   * the scrollbar policy to automatic allows the scrollbars to only show up \n"
43656"   * when needed. \n"
43657"   */\n"
43658"  scrolled_window = gtk_scrolled_window_new (NULL, NULL);\n"
43659"  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), \n"
43660"                                  GTK_POLICY_AUTOMATIC, \n"
43661"                                  GTK_POLICY_AUTOMATIC); \n"
43662"  /* The function directly below is used to add children to the scrolled window \n"
43663"   * with scrolling capabilities (e.g text_view), otherwise, \n"
43664"   * gtk_scrolled_window_add_with_viewport() would have been used\n"
43665"   */\n"
43666"  gtk_container_add (GTK_CONTAINER (scrolled_window), \n"
43667"                                         text_view);\n"
43668"  gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 5);\n"
43669" \n"
43670"  \n"
43671"  gtk_container_add (GTK_CONTAINER (window), scrolled_window);\n"
43672"\n"
43673"  gtk_widget_show_all (window);\n"
43674"}\n"
43675"\n"
43676"\n"
43677"\n"
43678"int\n"
43679"main (int argc, char **argv)\n"
43680"{\n"
43681"  GtkApplication *app;\n"
43682"  int status;\n"
43683"\n"
43684"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
43685"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
43686"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
43687"  g_object_unref (app);\n"
43688"\n"
43689"  return status;\n"
43690"}\n"
43691msgstr ""
43692"\n"
43693"#include &lt;gtk/gtk.h&gt;\n"
43694"\n"
43695"\n"
43696"\n"
43697"static void\n"
43698"activate (GtkApplication *app,\n"
43699"          gpointer        user_data)\n"
43700"{\n"
43701"  /* Declare variables */\n"
43702"  GtkWidget *window;\n"
43703"  GtkWidget *text_view;\n"
43704"  GtkWidget *scrolled_window;\n"
43705"\n"
43706"  GtkTextBuffer *buffer;\n"
43707"\n"
43708"\n"
43709"  /* Create a window with a title, and a default size */\n"
43710"  window = gtk_application_window_new (app);\n"
43711"  gtk_window_set_title (GTK_WINDOW (window), \"TextView Example\");\n"
43712"  gtk_window_set_default_size (GTK_WINDOW (window), 220, 200);\n"
43713"\n"
43714"\n"
43715"  /* The text buffer represents the text being edited */\n"
43716"  buffer = gtk_text_buffer_new (NULL);\n"
43717"  \n"
43718"\n"
43719"  /* Text view is a widget in which can display the text buffer. \n"
43720"   * The line wrapping is set to break lines in between words.\n"
43721"   */\n"
43722"  text_view = gtk_text_view_new_with_buffer (buffer);\n"
43723"  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), GTK_WRAP_WORD); \n"
43724"\n"
43725"\n"
43726"  /* Create the scrolled window. Usually NULL is passed for both parameters so \n"
43727"   * that it creates the horizontal/vertical adjustments automatically. Setting \n"
43728"   * the scrollbar policy to automatic allows the scrollbars to only show up \n"
43729"   * when needed. \n"
43730"   */\n"
43731"  scrolled_window = gtk_scrolled_window_new (NULL, NULL);\n"
43732"  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), \n"
43733"                                  GTK_POLICY_AUTOMATIC, \n"
43734"                                  GTK_POLICY_AUTOMATIC); \n"
43735"  /* The function directly below is used to add children to the scrolled window \n"
43736"   * with scrolling capabilities (e.g text_view), otherwise, \n"
43737"   * gtk_scrolled_window_add_with_viewport() would have been used\n"
43738"   */\n"
43739"  gtk_container_add (GTK_CONTAINER (scrolled_window), \n"
43740"                                         text_view);\n"
43741"  gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 5);\n"
43742" \n"
43743"  \n"
43744"  gtk_container_add (GTK_CONTAINER (window), scrolled_window);\n"
43745"\n"
43746"  gtk_widget_show_all (window);\n"
43747"}\n"
43748"\n"
43749"\n"
43750"\n"
43751"int\n"
43752"main (int argc, char **argv)\n"
43753"{\n"
43754"  GtkApplication *app;\n"
43755"  int status;\n"
43756"\n"
43757"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
43758"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
43759"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
43760"  g_object_unref (app);\n"
43761"\n"
43762"  return status;\n"
43763"}\n"
43764
43765#. (itstool) path: item/p
43766#: C/textview.c.page:41
43767msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkContainer.html\">GtkContainer</link>"
43768msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkContainer.html\">GtkContainer</link>"
43769
43770#. (itstool) path: info/title
43771#: C/textview.js.page:8
43772msgctxt "text"
43773msgid "TextView (JavaScript)"
43774msgstr "TextView (JavaScript)"
43775
43776#. (itstool) path: info/desc
43777#: C/textview.js.page:22
43778msgid "A multiline text editor"
43779msgstr "다중 행 텍스트 편집기"
43780
43781#. (itstool) path: page/title
43782#: C/textview.js.page:25 C/textview.py.page:30
43783msgid "TextView"
43784msgstr "TextView"
43785
43786#. (itstool) path: page/media
43787#. This is a reference to an external file such as an image or video. When
43788#. the file changes, the md5 hash will change to let you know you need to
43789#. update your localized copy. The msgstr is not used at all. Set it to
43790#. whatever you like once you have updated your copy of the file.
43791#: C/textview.js.page:26
43792msgctxt "_"
43793msgid "external ref='media/textviewpenguinchat.png' md5='0dd6f6aa44aaeab7901bd90162ed4c9a'"
43794msgstr ""
43795
43796#. (itstool) path: page/p
43797#: C/textview.js.page:27
43798msgid "A TextView is really (or at least usually) a nested set of three objects."
43799msgstr "TextView는 정말(아니면 최소한 보통) 세 객체의 모음으로 이루어져있습니다."
43800
43801#. (itstool) path: item/p
43802#: C/textview.js.page:29
43803msgid ""
43804"At the bottom there is a <link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextBuffer.html"
43805"\">TextBuffer</link>. This holds the text itself."
43806msgstr ""
43807"하단에는 <link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextBuffer.html\">TextBuffer</link>가 있습"
43808"니다. TextBuffer는 텍스트를 저장해둡니다."
43809
43810#. (itstool) path: item/p
43811#: C/textview.js.page:30
43812msgid ""
43813"In the middle there is the <link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextView.html"
43814"\">TextView</link>, which is a widget that lets you see and edit the text in the buffer. It automatically resizes "
43815"itself depending on how much text there is."
43816msgstr ""
43817"가운데에는 <link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextView.html\">TextView</link>가 있는데 "
43818"버퍼의 텍스트를 보고 편집할 수 있게 하는 위젯입니다. 텍스트가 얼마나 있느냐에 따라 자동으로 크기 조절 합니다."
43819
43820#. (itstool) path: item/p
43821#: C/textview.js.page:31
43822msgid ""
43823"Since the automatic resizing can make a TextView unwieldy, you normally place it inside of a ScrolledWindow. "
43824"Despite the name, it's not an actual window in terms of having a title bar and an X button; it's a widget you put "
43825"on the application you're making, which acts like a window onto a more manageable chunk of a TextView. If the text "
43826"in the buffer is too big to fit, scrollbars will appear."
43827msgstr ""
43828"자동으로 크기 조절을 해서 TextView를 이상하게 보이지 않게 할 수 있으므로, 보통 ScrolledWindow의 안에 둡니다. 이름"
43829"이 있는데도 불구, 제목 표시줄과 X 단추가 있는 실제 창이 아닙니다. 더 관리하기 쉬운 TextView에서 창처럼 동작하며, 여"
43830"러분이 만들려는 프로그램에 넣을 수 있는 위젯입니다. 버퍼의 텍스트가 공간을 맞추기에 너무 많다면, 스크롤 표시줄이 나"
43831"타납니다."
43832
43833#. (itstool) path: page/p
43834#: C/textview.js.page:33
43835msgid ""
43836"If you want to change what text is displayed in the TextView, you act on the TextBuffer, since it's what actually "
43837"holds the text. The same goes for if you want to see what text someone typed in. This sample application lets you "
43838"talk to a (make-believe) penguin, and checks the TextBuffer to see if you typed the word \"fish\" anywhere in it."
43839msgstr ""
43840"TextView에 나타난 텍스트를 바꾸려면 TextBuffer가 실제로 텍스트 내용을 가지고 있으니 TextBuffer에서 처리하십시오. 누"
43841"가 어떤 텍스트를 입력하는지 여러분이 보려고 할 떄도 동일합니다. 여기 예제 프로그램에서는 펭귄으로 가장한 누군가와 "
43842"대화하고, \"fish\" 단어가 어딘가에 있는지 TextBuffer를 확인합니다."
43843
43844#. (itstool) path: note/p
43845#: C/textview.js.page:34
43846msgid ""
43847"Real-life penguin populations are declining fast, because climate change is melting the ice that they live on and "
43848"killing the fish that they eat. If you'd like to play a (somewhat silly) GNOME game based on this premise, take a "
43849"look at <link href=\"http://pingus.seul.org/\">Pingus</link>."
43850msgstr ""
43851"실제로 수많은 펭귄의 수가 빠르게 줄어가고 있는데, 기후가 바뀌어 펭귄이 살아갈 터전의 빙하가 녹고 펭귄이 먹는 물고기"
43852"가 줄어가기 때문입니다. 이 전제를 기반으로 만든 (약간은 바보 같을지도 모르는) 그놈 게임을 즐겨보고 싶으시다면 "
43853"<link href=\"http://pingus.seul.org/\">핑구스</link>를 찾아보십시오."
43854
43855#. (itstool) path: section/code
43856#: C/textview.js.page:50
43857#, no-wrap
43858msgid ""
43859"\n"
43860"const TextViewExample = new Lang.Class ({\n"
43861"    Name: 'TextView Example',\n"
43862"\n"
43863"    // Create the application itself\n"
43864"    _init: function () {\n"
43865"        this.application = new Gtk.Application ({\n"
43866"            application_id: 'org.example.jstextview' });\n"
43867"\n"
43868"        // Connect 'activate' and 'startup' signals to the callback functions\n"
43869"        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
43870"        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
43871"    },\n"
43872"\n"
43873"    // Callback function for 'activate' signal presents windows when active\n"
43874"    _onActivate: function () {\n"
43875"        this._window.present ();\n"
43876"    },\n"
43877"\n"
43878"    // Callback function for 'startup' signal builds the UI\n"
43879"    _onStartup: function () {\n"
43880"        this._buildUI ();\n"
43881"    },\n"
43882msgstr ""
43883"\n"
43884"const TextViewExample = new Lang.Class ({\n"
43885"    Name: 'TextView Example',\n"
43886"\n"
43887"    // Create the application itself\n"
43888"    _init: function () {\n"
43889"        this.application = new Gtk.Application ({\n"
43890"            application_id: 'org.example.jstextview' });\n"
43891"\n"
43892"        // Connect 'activate' and 'startup' signals to the callback functions\n"
43893"        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
43894"        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
43895"    },\n"
43896"\n"
43897"    // Callback function for 'activate' signal presents windows when active\n"
43898"    _onActivate: function () {\n"
43899"        this._window.present ();\n"
43900"    },\n"
43901"\n"
43902"    // Callback function for 'startup' signal builds the UI\n"
43903"    _onStartup: function () {\n"
43904"        this._buildUI ();\n"
43905"    },\n"
43906
43907#. (itstool) path: section/p
43908#: C/textview.js.page:74
43909msgid ""
43910"All the code for this sample goes in the TextViewExample class. The above code creates a <link href=\"http://www."
43911"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to go "
43912"in."
43913msgstr ""
43914"이 예제의 모든 코드는 TextViewExample 클래스에 들어갑니다. 위 코드는 위젯과 창이 들어가는 <link href=\"http://www."
43915"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>를 만듭니다."
43916
43917#. (itstool) path: section/code
43918#: C/textview.js.page:75
43919#, no-wrap
43920msgid ""
43921"\n"
43922"    // Build the application's UI\n"
43923"    _buildUI: function () {\n"
43924"\n"
43925"        // Create the application window\n"
43926"        this._window = new Gtk.ApplicationWindow  ({\n"
43927"            application: this.application,\n"
43928"            window_position: Gtk.WindowPosition.CENTER,\n"
43929"            title: \"Talk to a Penguin\",\n"
43930"            default_height: 400,\n"
43931"            default_width: 440,\n"
43932"            border_width: 20 });\n"
43933msgstr ""
43934"\n"
43935"    // Build the application's UI\n"
43936"    _buildUI: function () {\n"
43937"\n"
43938"        // Create the application window\n"
43939"        this._window = new Gtk.ApplicationWindow  ({\n"
43940"            application: this.application,\n"
43941"            window_position: Gtk.WindowPosition.CENTER,\n"
43942"            title: \"Talk to a Penguin\",\n"
43943"            default_height: 400,\n"
43944"            default_width: 440,\n"
43945"            border_width: 20 });\n"
43946
43947#. (itstool) path: section/title
43948#: C/textview.js.page:92
43949msgid "Creating the TextView"
43950msgstr "TextView 만들기"
43951
43952#. (itstool) path: section/code
43953#: C/textview.js.page:93
43954#, no-wrap
43955msgid ""
43956"\n"
43957"        // Create a label for the penguin to talk to you\n"
43958"        this._penguin = new Gtk.Label ({\n"
43959"            height_request: 180,\n"
43960"            width_request: 400,\n"
43961"            label: \"Squaaaak?\",\n"
43962"            wrap: true });\n"
43963msgstr ""
43964"\n"
43965"        // Create a label for the penguin to talk to you\n"
43966"        this._penguin = new Gtk.Label ({\n"
43967"            height_request: 180,\n"
43968"            width_request: 400,\n"
43969"            label: \"Squaaaak?\",\n"
43970"            wrap: true });\n"
43971
43972#. (itstool) path: section/p
43973#: C/textview.js.page:102
43974msgid ""
43975"Our first step in this example is to create the <link xref=\"label.js\">Label</link> that the penguin will use to "
43976"talk to you. We set the text in it to wrap by setting its wrap property to true, but we'll use a different method "
43977"on the TextView itself that allows for more fine-grained control."
43978msgstr ""
43979"이 예제의 첫단계에서는 펭귄이 여러분에게 무언가 할 말을 넣을 때 쓸 <link xref=\"label.js\">Label</link>을 만듭니"
43980"다. 줄바꿈 속성을 true로 설정하여 텍스트 줄을 알아서 바꾸게 한 채로 텍스트를 설정하겠지만, TextView 자체에서 더 세"
43981"밀한 설정이 가능하기에 다른 방식으로 해보겠습니다."
43982
43983#. (itstool) path: section/code
43984#: C/textview.js.page:104
43985#, no-wrap
43986msgid ""
43987"\n"
43988"        // Create a textview for you to talk to the penguin\n"
43989"        this.buffer = new Gtk.TextBuffer();\n"
43990"        this._textView = new Gtk.TextView ({\n"
43991"            buffer: this.buffer,\n"
43992"            editable: true,\n"
43993"            wrap_mode: Gtk.WrapMode.WORD });\n"
43994msgstr ""
43995"\n"
43996"        // Create a textview for you to talk to the penguin\n"
43997"        this.buffer = new Gtk.TextBuffer();\n"
43998"        this._textView = new Gtk.TextView ({\n"
43999"            buffer: this.buffer,\n"
44000"            editable: true,\n"
44001"            wrap_mode: Gtk.WrapMode.WORD });\n"
44002
44003#. (itstool) path: section/p
44004#: C/textview.js.page:113
44005msgid ""
44006"Our first step is to create a TextBuffer to put the words into. After that we create the TextView, and tell it to "
44007"use the TextBuffer we created as its buffer. We also set it to be editable, since we want to be able to type new "
44008"things in."
44009msgstr ""
44010"첫 단계로 내용을 넣을 TextButter를 만듭니다. 그 다음 TextView를 만들고, 앞서 만든 TextButter를 버퍼로 활용하라고 지"
44011"시하겠습니다. 또한 새로운 내용을 입력할 수 있게 할 목적으로 편집 가능하게 설정하겠습니다."
44012
44013#. (itstool) path: section/p
44014#: C/textview.js.page:114
44015msgid ""
44016"The wrap_mode property lets you select from four different <link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/"
44017"gjs/Gtk.WrapMode.html\">WrapModes</link>. Gtk.WrapMode.CHAR, for instance, starts wrapping around in the middle of "
44018"a word if you keep typing when it gets to the edge. Most people are probably used to Gtk.WrapMode.WORD, which will "
44019"automatically put the word you're typing on the next line if it gets to be too long."
44020msgstr ""
44021"wrap_mode 속성은 네가지 각각의 <link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.WrapMode.html"
44022"\">WrapModes</link> 중 하나를 선택하게 합니다. 예로, Gtk.WrapMode.CHAR는 페이지 모서리에 줄 끝이 도달하면 단어 중간"
44023"을 잘라 줄을 바꿉니다. 대부분 사람은 줄이 너무 길면 단어 단위로 자동으로 줄을 바꿔주는 Gtk.WrapMode.WORD 옵션을 사"
44024"용할지도 모릅니다."
44025
44026#. (itstool) path: section/code
44027#: C/textview.js.page:116
44028#, no-wrap
44029msgid ""
44030"\n"
44031"        // Create a \"scrolled window\" to put your textview in so it will scroll\n"
44032"        this._scrolled = new Gtk.ScrolledWindow ({\n"
44033"            hscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44034"            vscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44035"            shadow_type: Gtk.ShadowType.ETCHED_IN,\n"
44036"            height_request: 180,\n"
44037"            width_request: 400, });\n"
44038"\n"
44039"        // Put the textview into the scrolled window\n"
44040"        this._scrolled.add_with_viewport (this._textView);\n"
44041msgstr ""
44042"\n"
44043"        // Create a \"scrolled window\" to put your textview in so it will scroll\n"
44044"        this._scrolled = new Gtk.ScrolledWindow ({\n"
44045"            hscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44046"            vscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44047"            shadow_type: Gtk.ShadowType.ETCHED_IN,\n"
44048"            height_request: 180,\n"
44049"            width_request: 400, });\n"
44050"\n"
44051"        // Put the textview into the scrolled window\n"
44052"        this._scrolled.add_with_viewport (this._textView);\n"
44053
44054#. (itstool) path: section/p
44055#: C/textview.js.page:128
44056msgid ""
44057"Here we create a ScrolledWindow, and set it to automatically scroll if it gets to be too big horizontally or "
44058"vertically. We also give it a nice-looking ETCHED_IN border. After that, we put our TextView inside, and tell the "
44059"ScrolledWindow to give us a viewport onto it."
44060msgstr ""
44061"ScrolledWindow를 만들고 수직 수평 방향으로 너무 크면 자동으로 스크롤하게 설정하겠습니다. 또한 멋들어지게 보이도록 "
44062"잘 다듬은 테두리를 설정하겠습니다. 그 다음, TextView에 넣고 ScrolledWindow에 뷰포트를 제공하라고 지시하겠습니다."
44063
44064#. (itstool) path: section/code
44065#: C/textview.js.page:134
44066#, no-wrap
44067msgid ""
44068"\n"
44069"        // Create a grid to organize them in\n"
44070"        this._grid = new Gtk.Grid ({\n"
44071"            halign: Gtk.Align.CENTER,\n"
44072"            valign: Gtk.Align.CENTER });\n"
44073"\n"
44074"        // Put the label and textview in the grid one on top of the other\n"
44075"        this._grid.attach (this._penguin, 0, 0, 1, 1);\n"
44076"        this._grid.attach (this._scrolled, 0, 1, 1, 1);\n"
44077msgstr ""
44078"\n"
44079"        // Create a grid to organize them in\n"
44080"        this._grid = new Gtk.Grid ({\n"
44081"            halign: Gtk.Align.CENTER,\n"
44082"            valign: Gtk.Align.CENTER });\n"
44083"\n"
44084"        // Put the label and textview in the grid one on top of the other\n"
44085"        this._grid.attach (this._penguin, 0, 0, 1, 1);\n"
44086"        this._grid.attach (this._scrolled, 0, 1, 1, 1);\n"
44087
44088#. (itstool) path: section/p
44089#: C/textview.js.page:144
44090msgid "The first <link xref=\"grid.js\">Grid</link> we create only has the Label and the ScrolledWindow inside it."
44091msgstr "처음 <link xref=\"grid.js\">Grid</link> 부분에서 Label과 ScrolledWindow를 만들어넣겠습니다."
44092
44093#. (itstool) path: section/code
44094#: C/textview.js.page:146
44095#, no-wrap
44096msgid ""
44097"\n"
44098"        // Create a button to send your message to the penguin\n"
44099"        this._send = new Gtk.Button ({\n"
44100"            halign: Gtk.Align.END,\n"
44101"            margin_top: 20,\n"
44102"            label: \"Send\" });\n"
44103"        this._send.connect ('clicked', Lang.bind (this, this._chat));\n"
44104"\n"
44105"        // Create a grid that will have the other grid on top and the button on bottom\n"
44106"        this._mainGrid = new Gtk.Grid ({\n"
44107"            halign: Gtk.Align.CENTER,\n"
44108"            valign: Gtk.Align.CENTER });\n"
44109"\n"
44110"        // Add the other grid and the button to the main grid\n"
44111"        this._mainGrid.attach (this._grid, 0, 0, 1, 1);\n"
44112"        this._mainGrid.attach (this._send, 0, 1, 1, 1);\n"
44113msgstr ""
44114"\n"
44115"        // Create a button to send your message to the penguin\n"
44116"        this._send = new Gtk.Button ({\n"
44117"            halign: Gtk.Align.END,\n"
44118"            margin_top: 20,\n"
44119"            label: \"Send\" });\n"
44120"        this._send.connect ('clicked', Lang.bind (this, this._chat));\n"
44121"\n"
44122"        // Create a grid that will have the other grid on top and the button on bottom\n"
44123"        this._mainGrid = new Gtk.Grid ({\n"
44124"            halign: Gtk.Align.CENTER,\n"
44125"            valign: Gtk.Align.CENTER });\n"
44126"\n"
44127"        // Add the other grid and the button to the main grid\n"
44128"        this._mainGrid.attach (this._grid, 0, 0, 1, 1);\n"
44129"        this._mainGrid.attach (this._send, 0, 1, 1, 1);\n"
44130
44131#. (itstool) path: section/p
44132#: C/textview.js.page:163
44133msgid ""
44134"We create a <link xref=\"button.js\">Button</link> to send your message to the penguin, and a new Grid that has "
44135"the other one on top and the Button on the bottom. The Button has a margin on top, so that it isn't squished up "
44136"against the ScrolledWindow."
44137msgstr ""
44138"펭귄에게 메시지를 보낼 <link xref=\"button.js\">Button</link>를 만들고, 상단에는 다른 새 Grid를 하단에는 Button을 "
44139"넣겠습니다. 이 Button에는 상단에 여백을 주어 ScrolledWindow와 찰싹 붙어있지 않게 하겠습니다."
44140
44141#. (itstool) path: section/code
44142#: C/textview.js.page:165
44143#, no-wrap
44144msgid ""
44145"\n"
44146"        // Attach the main grid to the window\n"
44147"        this._window.add (this._mainGrid);\n"
44148"\n"
44149"        // Show the window and all child widgets\n"
44150"        this._window.show_all();\n"
44151"    },\n"
44152msgstr ""
44153"\n"
44154"        // Attach the main grid to the window\n"
44155"        this._window.add (this._mainGrid);\n"
44156"\n"
44157"        // Show the window and all child widgets\n"
44158"        this._window.show_all();\n"
44159"    },\n"
44160
44161#. (itstool) path: section/p
44162#: C/textview.js.page:174
44163msgid ""
44164"Finally, we attach the main Grid to the window, then we tell the window and everything inside it to become visible "
44165"when the application is run."
44166msgstr "마지막으로 창에 메인 Grid를 붙이고, 프로그램을 실행할 때 창과 창 안에 있는 모든 요소를 나타내게 하겠습니다."
44167
44168#. (itstool) path: section/title
44169#: C/textview.js.page:179
44170msgid "Function which handles the penguin's response"
44171msgstr "펭귄의 응답을 처리하는 함수"
44172
44173#. (itstool) path: section/code
44174#: C/textview.js.page:180
44175#, no-wrap
44176msgid ""
44177"\n"
44178"    _chat: function () {\n"
44179"\n"
44180"        // Create a random number to determine what the penguin says\n"
44181"        this.number = Math.floor ((Math.random() * 3) + 1);\n"
44182"\n"
44183"        // Did you actually say anything?\n"
44184"        if (this.buffer.text) {\n"
44185"\n"
44186"            // Did you mention fish?\n"
44187"            if (this.buffer.text.match (/fish/gi)) {\n"
44188"\n"
44189"                // Have the penguin squaak about fish\n"
44190"                if (this.number == 1)\n"
44191"                    this._penguin.set_label (\"FISH!\");\n"
44192"\n"
44193"                else if (this.number == 2)\n"
44194"                    this._penguin.set_label (\"Fish fish fish fish. Fish!\");\n"
44195"\n"
44196"                else\n"
44197"                    this._penguin.set_label (\"Fish? Fish fish fish. Fish fish. FISH!\");\n"
44198"\n"
44199"            }\n"
44200"\n"
44201"            // I guess you didn't mention fish\n"
44202"            else {\n"
44203"\n"
44204"                // Have the penguin talk about penguinny stuff\n"
44205"                if (this.number == 1)\n"
44206"                    this._penguin.set_label (\"SQUAAK!\");\n"
44207"\n"
44208"                else if (this.number == 2)\n"
44209"                    this._penguin.set_label (\"Ork ork ork ork squaak. Squaak squaak! *waves flippers*\");\n"
44210"\n"
44211"                else\n"
44212"                    this._penguin.set_label (\"Ork ork ork ork ork?\");\n"
44213"\n"
44214"            }\n"
44215"\n"
44216"        }\n"
44217"\n"
44218"        // Clear the buffer\n"
44219"        this.buffer.text = \"\";\n"
44220"\n"
44221"        // Give focus back to the textview so you don't have to click it again\n"
44222"        this._textView.has_focus = true;\n"
44223"\n"
44224"    }\n"
44225"\n"
44226"});\n"
44227msgstr ""
44228"\n"
44229"    _chat: function () {\n"
44230"\n"
44231"        // Create a random number to determine what the penguin says\n"
44232"        this.number = Math.floor ((Math.random() * 3) + 1);\n"
44233"\n"
44234"        // Did you actually say anything?\n"
44235"        if (this.buffer.text) {\n"
44236"\n"
44237"            // Did you mention fish?\n"
44238"            if (this.buffer.text.match (/fish/gi)) {\n"
44239"\n"
44240"                // Have the penguin squaak about fish\n"
44241"                if (this.number == 1)\n"
44242"                    this._penguin.set_label (\"FISH!\");\n"
44243"\n"
44244"                else if (this.number == 2)\n"
44245"                    this._penguin.set_label (\"Fish fish fish fish. Fish!\");\n"
44246"\n"
44247"                else\n"
44248"                    this._penguin.set_label (\"Fish? Fish fish fish. Fish fish. FISH!\");\n"
44249"\n"
44250"            }\n"
44251"\n"
44252"            // I guess you didn't mention fish\n"
44253"            else {\n"
44254"\n"
44255"                // Have the penguin talk about penguinny stuff\n"
44256"                if (this.number == 1)\n"
44257"                    this._penguin.set_label (\"SQUAAK!\");\n"
44258"\n"
44259"                else if (this.number == 2)\n"
44260"                    this._penguin.set_label (\"Ork ork ork ork squaak. Squaak squaak! *waves flippers*\");\n"
44261"\n"
44262"                else\n"
44263"                    this._penguin.set_label (\"Ork ork ork ork ork?\");\n"
44264"\n"
44265"            }\n"
44266"\n"
44267"        }\n"
44268"\n"
44269"        // Clear the buffer\n"
44270"        this.buffer.text = \"\";\n"
44271"\n"
44272"        // Give focus back to the textview so you don't have to click it again\n"
44273"        this._textView.has_focus = true;\n"
44274"\n"
44275"    }\n"
44276"\n"
44277"});\n"
44278
44279#. (itstool) path: section/p
44280#: C/textview.js.page:231
44281msgid ""
44282"Here we use some basic JavaScript functions to have the penguins say something random. Penguins like fish, though, "
44283"so if you mention fish we want the penguin to respond to that. To do that, we use the JavaScript String object's "
44284"match method on <file>this.buffer.text</file>, which returns the contents of our TextBuffer."
44285msgstr ""
44286"여기에 펭귄이 아무렇게나 말하는 JavaScript 기본 함수를 사용합니다. 펭귄은 물고기를 좋아하니, 물고기를 언급하면 펭귄"
44287"이 대답하게 하겠습니다. 따라서, TextBuffer에 내용을 반환하는 JavaScript 문자열 객체의 <file>this.buffer.text</file>"
44288"에 있는 match 메서드를 사용하겠습니다."
44289
44290#. (itstool) path: section/p
44291#: C/textview.js.page:232
44292msgid ""
44293"Since we want to clear out the TextBuffer after each time you click Send, we set <file>this.buffer.text</file> to "
44294"contain an empty string afterwards. Then we return focus to our TextView, so that you can keep typing without "
44295"having to click on it beforehand."
44296msgstr ""
44297"보내기를 누를 떄마다 TextBuffer를 지울테니, 과정이 끝나면 <file>this.buffer.text</file> 값을 빈 문자열로 넣겠습니"
44298"다. 그 다음 TextView에 포커스를 반환하여 입력하기 전에 굳이 누르지 않아도 계속 입력할 수 있게 하겠습니다."
44299
44300#. (itstool) path: section/code
44301#: C/textview.js.page:234
44302#, no-wrap
44303msgid ""
44304"\n"
44305"// Run the application\n"
44306"let app = new TextViewExample ();\n"
44307"app.application.run (ARGV);\n"
44308msgstr ""
44309"\n"
44310"// Run the application\n"
44311"let app = new TextViewExample ();\n"
44312"app.application.run (ARGV);\n"
44313
44314#. (itstool) path: section/p
44315#: C/textview.js.page:239
44316msgid "Finally, we create a new instance of the finished TextViewExample class, and set the application running."
44317msgstr "마지막으로 마무리한 TextViewExample 클래스의 새 인스턴스를 만들고 프로그램을 실행하도록 설정하겠습니다."
44318
44319#. (itstool) path: section/code
44320#: C/textview.js.page:244
44321#, no-wrap
44322msgid ""
44323"#!/usr/bin/gjs\n"
44324"\n"
44325"imports.gi.versions.Gtk = '3.0';\n"
44326"const Gtk = imports.gi.Gtk;\n"
44327"\n"
44328"class TextViewExample {\n"
44329"\n"
44330"    // Create the application itself\n"
44331"    constructor() {\n"
44332"        this.application = new Gtk.Application({\n"
44333"            application_id: 'org.example.jstextview'\n"
44334"        });\n"
44335"\n"
44336"        // Connect 'activate' and 'startup' signals to the callback functions\n"
44337"        this.application.connect('activate', this._onActivate.bind(this));\n"
44338"        this.application.connect('startup', this._onStartup.bind(this));\n"
44339"    }\n"
44340"\n"
44341"    // Callback function for 'activate' signal presents windows when active\n"
44342"    _onActivate() {\n"
44343"        this._window.present();\n"
44344"    }\n"
44345"\n"
44346"    // Callback function for 'startup' signal builds the UI\n"
44347"    _onStartup() {\n"
44348"        this._buildUI();\n"
44349"    }\n"
44350"\n"
44351"    // Build the application's UI\n"
44352"    _buildUI() {\n"
44353"\n"
44354"        // Create the application window\n"
44355"        this._window = new Gtk.ApplicationWindow  ({\n"
44356"            application: this.application,\n"
44357"            window_position: Gtk.WindowPosition.CENTER,\n"
44358"            title: \"Talk to a Penguin\",\n"
44359"            default_height: 400,\n"
44360"            default_width: 440,\n"
44361"            border_width: 20 });\n"
44362"\n"
44363"        // Create a label for the penguin to talk to you\n"
44364"        this._penguin = new Gtk.Label ({\n"
44365"            height_request: 180,\n"
44366"            width_request: 400,\n"
44367"            label: \"Squaaaak?\",\n"
44368"            wrap: true });\n"
44369"\n"
44370"        // Create a textview for you to talk to the penguin\n"
44371"        this.buffer = new Gtk.TextBuffer();\n"
44372"        this._textView = new Gtk.TextView ({\n"
44373"            buffer: this.buffer,\n"
44374"            editable: true,\n"
44375"            wrap_mode: Gtk.WrapMode.WORD });\n"
44376"\n"
44377"        // Create a \"scrolled window\" to put your textview in so it will scroll\n"
44378"        this._scrolled = new Gtk.ScrolledWindow ({\n"
44379"            hscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44380"            vscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44381"            shadow_type: Gtk.ShadowType.ETCHED_IN,\n"
44382"            height_request: 180,\n"
44383"            width_request: 400, });\n"
44384"\n"
44385"        // Put the textview into the scrolled window\n"
44386"        this._scrolled.add_with_viewport (this._textView);\n"
44387"\n"
44388"        // Create a grid to organize them in\n"
44389"        this._grid = new Gtk.Grid ({\n"
44390"            halign: Gtk.Align.CENTER,\n"
44391"            valign: Gtk.Align.CENTER });\n"
44392"\n"
44393"        // Put the label and textview in the grid one on top of the other\n"
44394"        this._grid.attach (this._penguin, 0, 0, 1, 1);\n"
44395"        this._grid.attach (this._scrolled, 0, 1, 1, 1);\n"
44396"\n"
44397"        // Create a button to send your message to the penguin\n"
44398"        this._send = new Gtk.Button ({\n"
44399"            halign: Gtk.Align.END,\n"
44400"            margin_top: 20,\n"
44401"            label: \"Send\" });\n"
44402"        this._send.connect ('clicked', this._chat.bind(this));\n"
44403"\n"
44404"        // Create a grid that will have the other grid on top and the button on bottom\n"
44405"        this._mainGrid = new Gtk.Grid ({\n"
44406"            halign: Gtk.Align.CENTER,\n"
44407"            valign: Gtk.Align.CENTER });\n"
44408"\n"
44409"        // Add the other grid and the button to the main grid\n"
44410"        this._mainGrid.attach (this._grid, 0, 0, 1, 1);\n"
44411"        this._mainGrid.attach (this._send, 0, 1, 1, 1);\n"
44412"\n"
44413"        // Attach the main grid to the window\n"
44414"        this._window.add (this._mainGrid);\n"
44415"\n"
44416"        // Show the window and all child widgets\n"
44417"        this._window.show_all();\n"
44418"    }\n"
44419"\n"
44420"    _chat() {\n"
44421"\n"
44422"        // Create a random number to determine what the penguin says\n"
44423"        this.number = Math.floor ((Math.random() * 3) + 1);\n"
44424"\n"
44425"        // Did you actually say anything?\n"
44426"        if (this.buffer.text) {\n"
44427"\n"
44428"            // Did you mention fish?\n"
44429"            if (this.buffer.text.match (/fish/gi)) {\n"
44430"\n"
44431"                // Have the penguin squaak about fish\n"
44432"                if (this.number == 1)\n"
44433"                    this._penguin.set_label (\"FISH!\");\n"
44434"\n"
44435"                else if (this.number == 2)\n"
44436"                    this._penguin.set_label (\"Fish fish fish fish. Fish!\");\n"
44437"\n"
44438"                else\n"
44439"                    this._penguin.set_label (\"Fish? Fish fish fish. Fish fish. FISH!\");\n"
44440"\n"
44441"            }\n"
44442"\n"
44443"            // I guess you didn't mention fish\n"
44444"            else {\n"
44445"\n"
44446"                // Have the penguin talk about penguinny stuff\n"
44447"                if (this.number == 1)\n"
44448"                    this._penguin.set_label (\"SQUAAK!\");\n"
44449"\n"
44450"                else if (this.number == 2)\n"
44451"                    this._penguin.set_label (\"Ork ork ork ork squaak. Squaak squaak! *waves flippers*\");\n"
44452"\n"
44453"                else\n"
44454"                    this._penguin.set_label (\"Ork ork ork ork ork?\");\n"
44455"\n"
44456"            }\n"
44457"\n"
44458"        }\n"
44459"\n"
44460"        // Clear the buffer\n"
44461"        this.buffer.text = \"\";\n"
44462"\n"
44463"        // Give focus back to the textview so you don't have to click it again\n"
44464"        this._textView.has_focus = true;\n"
44465"    }\n"
44466"};\n"
44467"\n"
44468"// Run the application\n"
44469"let app = new TextViewExample ();\n"
44470"app.application.run (ARGV);\n"
44471msgstr ""
44472"#!/usr/bin/gjs\n"
44473"\n"
44474"imports.gi.versions.Gtk = '3.0';\n"
44475"const Gtk = imports.gi.Gtk;\n"
44476"\n"
44477"class TextViewExample {\n"
44478"\n"
44479"    // Create the application itself\n"
44480"    constructor() {\n"
44481"        this.application = new Gtk.Application({\n"
44482"            application_id: 'org.example.jstextview'\n"
44483"        });\n"
44484"\n"
44485"        // Connect 'activate' and 'startup' signals to the callback functions\n"
44486"        this.application.connect('activate', this._onActivate.bind(this));\n"
44487"        this.application.connect('startup', this._onStartup.bind(this));\n"
44488"    }\n"
44489"\n"
44490"    // Callback function for 'activate' signal presents windows when active\n"
44491"    _onActivate() {\n"
44492"        this._window.present();\n"
44493"    }\n"
44494"\n"
44495"    // Callback function for 'startup' signal builds the UI\n"
44496"    _onStartup() {\n"
44497"        this._buildUI();\n"
44498"    }\n"
44499"\n"
44500"    // Build the application's UI\n"
44501"    _buildUI() {\n"
44502"\n"
44503"        // Create the application window\n"
44504"        this._window = new Gtk.ApplicationWindow  ({\n"
44505"            application: this.application,\n"
44506"            window_position: Gtk.WindowPosition.CENTER,\n"
44507"            title: \"Talk to a Penguin\",\n"
44508"            default_height: 400,\n"
44509"            default_width: 440,\n"
44510"            border_width: 20 });\n"
44511"\n"
44512"        // Create a label for the penguin to talk to you\n"
44513"        this._penguin = new Gtk.Label ({\n"
44514"            height_request: 180,\n"
44515"            width_request: 400,\n"
44516"            label: \"Squaaaak?\",\n"
44517"            wrap: true });\n"
44518"\n"
44519"        // Create a textview for you to talk to the penguin\n"
44520"        this.buffer = new Gtk.TextBuffer();\n"
44521"        this._textView = new Gtk.TextView ({\n"
44522"            buffer: this.buffer,\n"
44523"            editable: true,\n"
44524"            wrap_mode: Gtk.WrapMode.WORD });\n"
44525"\n"
44526"        // Create a \"scrolled window\" to put your textview in so it will scroll\n"
44527"        this._scrolled = new Gtk.ScrolledWindow ({\n"
44528"            hscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44529"            vscrollbar_policy: Gtk.PolicyType.AUTOMATIC,\n"
44530"            shadow_type: Gtk.ShadowType.ETCHED_IN,\n"
44531"            height_request: 180,\n"
44532"            width_request: 400, });\n"
44533"\n"
44534"        // Put the textview into the scrolled window\n"
44535"        this._scrolled.add_with_viewport (this._textView);\n"
44536"\n"
44537"        // Create a grid to organize them in\n"
44538"        this._grid = new Gtk.Grid ({\n"
44539"            halign: Gtk.Align.CENTER,\n"
44540"            valign: Gtk.Align.CENTER });\n"
44541"\n"
44542"        // Put the label and textview in the grid one on top of the other\n"
44543"        this._grid.attach (this._penguin, 0, 0, 1, 1);\n"
44544"        this._grid.attach (this._scrolled, 0, 1, 1, 1);\n"
44545"\n"
44546"        // Create a button to send your message to the penguin\n"
44547"        this._send = new Gtk.Button ({\n"
44548"            halign: Gtk.Align.END,\n"
44549"            margin_top: 20,\n"
44550"            label: \"Send\" });\n"
44551"        this._send.connect ('clicked', this._chat.bind(this));\n"
44552"\n"
44553"        // Create a grid that will have the other grid on top and the button on bottom\n"
44554"        this._mainGrid = new Gtk.Grid ({\n"
44555"            halign: Gtk.Align.CENTER,\n"
44556"            valign: Gtk.Align.CENTER });\n"
44557"\n"
44558"        // Add the other grid and the button to the main grid\n"
44559"        this._mainGrid.attach (this._grid, 0, 0, 1, 1);\n"
44560"        this._mainGrid.attach (this._send, 0, 1, 1, 1);\n"
44561"\n"
44562"        // Attach the main grid to the window\n"
44563"        this._window.add (this._mainGrid);\n"
44564"\n"
44565"        // Show the window and all child widgets\n"
44566"        this._window.show_all();\n"
44567"    }\n"
44568"\n"
44569"    _chat() {\n"
44570"\n"
44571"        // Create a random number to determine what the penguin says\n"
44572"        this.number = Math.floor ((Math.random() * 3) + 1);\n"
44573"\n"
44574"        // Did you actually say anything?\n"
44575"        if (this.buffer.text) {\n"
44576"\n"
44577"            // Did you mention fish?\n"
44578"            if (this.buffer.text.match (/fish/gi)) {\n"
44579"\n"
44580"                // Have the penguin squaak about fish\n"
44581"                if (this.number == 1)\n"
44582"                    this._penguin.set_label (\"FISH!\");\n"
44583"\n"
44584"                else if (this.number == 2)\n"
44585"                    this._penguin.set_label (\"Fish fish fish fish. Fish!\");\n"
44586"\n"
44587"                else\n"
44588"                    this._penguin.set_label (\"Fish? Fish fish fish. Fish fish. FISH!\");\n"
44589"\n"
44590"            }\n"
44591"\n"
44592"            // I guess you didn't mention fish\n"
44593"            else {\n"
44594"\n"
44595"                // Have the penguin talk about penguinny stuff\n"
44596"                if (this.number == 1)\n"
44597"                    this._penguin.set_label (\"SQUAAK!\");\n"
44598"\n"
44599"                else if (this.number == 2)\n"
44600"                    this._penguin.set_label (\"Ork ork ork ork squaak. Squaak squaak! *waves flippers*\");\n"
44601"\n"
44602"                else\n"
44603"                    this._penguin.set_label (\"Ork ork ork ork ork?\");\n"
44604"\n"
44605"            }\n"
44606"\n"
44607"        }\n"
44608"\n"
44609"        // Clear the buffer\n"
44610"        this.buffer.text = \"\";\n"
44611"\n"
44612"        // Give focus back to the textview so you don't have to click it again\n"
44613"        this._textView.has_focus = true;\n"
44614"    }\n"
44615"};\n"
44616"\n"
44617"// Run the application\n"
44618"let app = new TextViewExample ();\n"
44619"app.application.run (ARGV);\n"
44620
44621#. (itstool) path: item/p
44622#: C/textview.js.page:256
44623msgid ""
44624"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ScrolledWindow.html\">Gtk.ScrolledWindow</link>"
44625msgstr ""
44626"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ScrolledWindow.html\">Gtk.ScrolledWindow</link>"
44627
44628#. (itstool) path: item/p
44629#: C/textview.js.page:257
44630msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextBuffer.html\">Gtk.TextBuffer</link>"
44631msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextBuffer.html\">Gtk.TextBuffer</link>"
44632
44633#. (itstool) path: item/p
44634#: C/textview.js.page:258
44635msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextView.html\">Gtk.TextView</link>"
44636msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TextView.html\">Gtk.TextView</link>"
44637
44638#. (itstool) path: info/title
44639#: C/textview.py.page:8
44640msgctxt "text"
44641msgid "TextView (Python)"
44642msgstr "TextView (Python)"
44643
44644#. (itstool) path: info/desc
44645#: C/textview.py.page:27
44646msgid "Widget that displays a GtkTextBuffer"
44647msgstr "GtkTextBuffer를 나타내는 위젯"
44648
44649#. (itstool) path: note/p
44650#: C/textview.py.page:32
44651msgid "This is an example of Gtk.TextView."
44652msgstr "Gtk.TextView 예제입니다."
44653
44654#. (itstool) path: note/p
44655#: C/textview.py.page:34
44656msgid ""
44657"But we can also have a new line if we write a long sentence (the text will wrap breaking lines between words)."
44658msgstr "그러나 긴 문장을 쓸 경우 줄을 바꿀 수 있습니다(문장을 단어 단위로 나누어 줄을 바꿉니다)."
44659
44660#. (itstool) path: note/p
44661#: C/textview.py.page:35
44662msgid "If we have a loooooooooooooooooooooooooooooooooooong"
44663msgstr "기이이이이이이이이이이이이이이이이이이인"
44664
44665#. (itstool) path: note/p
44666#: C/textview.py.page:36
44667msgid "(that was long)"
44668msgstr "(길었다면)"
44669
44670#. (itstool) path: note/p
44671#: C/textview.py.page:37
44672msgid "word, an horizontal scrollbar will appear."
44673msgstr "단어가 있다면, 수평 스크롤 표시줄이 나타납니다."
44674
44675#. (itstool) path: section/code
44676#: C/textview.py.page:46
44677#, no-wrap
44678msgid ""
44679"from gi.repository import Gtk\n"
44680"import sys\n"
44681"\n"
44682"\n"
44683"class MyWindow(Gtk.ApplicationWindow):\n"
44684"\n"
44685"    def __init__(self, app):\n"
44686"        Gtk.Window.__init__(self, title=\"TextView Example\", application=app)\n"
44687"        self.set_default_size(300, 450)\n"
44688"\n"
44689"        # a scrollbar for the child widget (that is going to be the textview)\n"
44690"        scrolled_window = Gtk.ScrolledWindow()\n"
44691"        scrolled_window.set_border_width(5)\n"
44692"        # we scroll only if needed\n"
44693"        scrolled_window.set_policy(\n"
44694"            Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n"
44695"\n"
44696"        # a text buffer (stores text)\n"
44697"        buffer1 = Gtk.TextBuffer()\n"
44698"\n"
44699"        # a textview (displays the buffer)\n"
44700"        textview = Gtk.TextView(buffer=buffer1)\n"
44701"        # wrap the text, if needed, breaking lines in between words\n"
44702"        textview.set_wrap_mode(Gtk.WrapMode.WORD)\n"
44703"\n"
44704"        # textview is scrolled\n"
44705"        scrolled_window.add(textview)\n"
44706"\n"
44707"        self.add(scrolled_window)\n"
44708"\n"
44709"\n"
44710"class MyApplication(Gtk.Application):\n"
44711"\n"
44712"    def __init__(self):\n"
44713"        Gtk.Application.__init__(self)\n"
44714"\n"
44715"    def do_activate(self):\n"
44716"        win = MyWindow(self)\n"
44717"        win.show_all()\n"
44718"\n"
44719"    def do_startup(self):\n"
44720"        Gtk.Application.do_startup(self)\n"
44721"\n"
44722"app = MyApplication()\n"
44723"exit_status = app.run(sys.argv)\n"
44724"sys.exit(exit_status)\n"
44725msgstr ""
44726"from gi.repository import Gtk\n"
44727"import sys\n"
44728"\n"
44729"\n"
44730"class MyWindow(Gtk.ApplicationWindow):\n"
44731"\n"
44732"    def __init__(self, app):\n"
44733"        Gtk.Window.__init__(self, title=\"TextView Example\", application=app)\n"
44734"        self.set_default_size(300, 450)\n"
44735"\n"
44736"        # a scrollbar for the child widget (that is going to be the textview)\n"
44737"        scrolled_window = Gtk.ScrolledWindow()\n"
44738"        scrolled_window.set_border_width(5)\n"
44739"        # we scroll only if needed\n"
44740"        scrolled_window.set_policy(\n"
44741"            Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)\n"
44742"\n"
44743"        # a text buffer (stores text)\n"
44744"        buffer1 = Gtk.TextBuffer()\n"
44745"\n"
44746"        # a textview (displays the buffer)\n"
44747"        textview = Gtk.TextView(buffer=buffer1)\n"
44748"        # wrap the text, if needed, breaking lines in between words\n"
44749"        textview.set_wrap_mode(Gtk.WrapMode.WORD)\n"
44750"\n"
44751"        # textview is scrolled\n"
44752"        scrolled_window.add(textview)\n"
44753"\n"
44754"        self.add(scrolled_window)\n"
44755"\n"
44756"\n"
44757"class MyApplication(Gtk.Application):\n"
44758"\n"
44759"    def __init__(self):\n"
44760"        Gtk.Application.__init__(self)\n"
44761"\n"
44762"    def do_activate(self):\n"
44763"        win = MyWindow(self)\n"
44764"        win.show_all()\n"
44765"\n"
44766"    def do_startup(self):\n"
44767"        Gtk.Application.do_startup(self)\n"
44768"\n"
44769"app = MyApplication()\n"
44770"exit_status = app.run(sys.argv)\n"
44771"sys.exit(exit_status)\n"
44772
44773#. (itstool) path: section/title
44774#: C/textview.py.page:50
44775msgid "Useful methods for a TextView widget"
44776msgstr "TextView 위젯에 쓸만한 메서드"
44777
44778#. (itstool) path: section/p
44779#: C/textview.py.page:51
44780msgid ""
44781"A <code>Gtk.TextView</code> displays the text stored in a <code>Gtk.TextBuffer</code>. However, most text "
44782"manipulation is accomplished with iterators, represented by a <code>Gtk.TextIter</code> - a position between two "
44783"characters in the text buffer. Iterators are not valid indefinitely; whenever the buffer is modified in a way that "
44784"affects the contents of the buffer, all outstanding iterators become invalid. Because of this, iterators can’t be "
44785"used to preserve positions across buffer modifications. To preserve a position, we use a <code>Gtk.TextMark</"
44786"code>, that can be set visible with <code>visible(True)</code>. A text buffer contains two built-in marks; an "
44787"\"insert\" mark (the position of the cursor) and the \"selection_bound\" mark."
44788msgstr ""
44789"<code>Gtk.TextView</code>는 <code>Gtk.TextBuffer</code>에 저장한 텍스트를 나타냅니다. 그러나, 대부분 텍스트 처리는 "
44790"텍스트 버퍼의 두 문자간 위치 <code>Gtk.TextIter</code>로 표현하는 반복자로 끝냅니다. 반복자는 항상 유효한 존재는 아"
44791"닙니다. 버퍼의 내용에 영향을 주어 버퍼의 내용이 바뀌면 이 부분을 알고 있든 반복자는 무효화 처리됩니다. 이 때문에, "
44792"반복자는 버퍼를 수정할 때 위치 정보를 보관할 목적으로 사용할 수 없습니다. 위치 정보를 어딘가에 보관할 때 "
44793"<code>visible(True)</code> 함수로 눈에 띄게 나타낼 수 있는 <code>Gtk.TextMark</code>를 사용합니다. 텍스트 버퍼에는 "
44794"자체적으로 내장한 \"insert\" 마크(커서 위치)와 \"selection_bound\"마크가 있습니다."
44795
44796#. (itstool) path: section/p
44797#: C/textview.py.page:52
44798msgid "Methods for a TextView widget:"
44799msgstr "TextView 위젯의 메서드는 다음과 같습니다:"
44800
44801#. (itstool) path: item/p
44802#: C/textview.py.page:54
44803msgid ""
44804"The TextView widget is by default editable. If you prefer otherwise, use <code>set_editable(False)</code>. If the "
44805"buffer has no editable text, it might be a good idea to use <code>set_cursor_visible(False)</code> as well."
44806msgstr ""
44807"TextView 위젯은 기본적으로 편집할 수 있습니다. 편집할 수 없게 하려면  <code>set_editable(False)</code> 함수를 사용"
44808"하십시오 버퍼에 편집할 수 있는 텍스트가 없다면, 마찬가지로 <code>set_cursor_visible(False)</code> 함수를 사용하시는"
44809"것이 좋습니다."
44810
44811#. (itstool) path: item/p
44812#: C/textview.py.page:55
44813msgid ""
44814"The justification of the text is set with <code>set_justification(Gtk.Justification.JUSTIFICATION)</code> where "
44815"<code>JUSTIFICATION</code> is one of <code>LEFT, RIGHT, CENTER, FILL</code>."
44816msgstr ""
44817"텍스트 정렬은 <code>set_justification(Gtk.Justification.JUSTIFICATION)</code> 함수로 설정합니다. 여기서 "
44818"<code>JUSTIFICATION</code>은 <code>LEFT, RIGHT, CENTER, FILL</code> 값 중 하나가 들어갑니다."
44819
44820#. (itstool) path: item/p
44821#: C/textview.py.page:56
44822msgid ""
44823"The line wrapping of the text is set with <code>set_wrap_mode(Gtk.WrapMode.WRAP)</code> where <code>WRAP</code> is "
44824"one of <code>NONE</code> (the text area is made wider), <code>CHAR</code> (break lines anywhere the cursor can "
44825"appear), <code>WORD</code> (break lines between words), <code>WORD_CHAR</code> (break lines between words, but if "
44826"that is not enough between characters)."
44827msgstr ""
44828"텍스트 줄 바꿈은 <code>set_wrap_mode(Gtk.WrapMode.WRAP)</code> 함수로 설정합니다. 여기서 <code>WRAP</code> 값은 "
44829"<code>NONE</code> (텍스트 영역이 더 넓어짐), <code>CHAR</code> (커서가 나타날 수 있는 어디든 줄 바꿈), <code>WORD</"
44830"code> (단어 사이 줄 바꿈), <code>WORD_CHAR</code> (단어 사이에 줄을 바꾸지만 문자를 더 넣을 여력이 안되면 문자 사이"
44831"를 줄바꿈) 값 중 하나입니다."
44832
44833#. (itstool) path: section/p
44834#: C/textview.py.page:58
44835msgid "Methods for a TextBuffer widget:"
44836msgstr "TextBuffer 위젯의 메서드:"
44837
44838#. (itstool) path: item/p
44839#: C/textview.py.page:60
44840msgid ""
44841"<code>get_insert()</code> returns the <code>Gtk.TextMark</code> that represents the cursor, that is the insertion "
44842"point."
44843msgstr "<code>get_insert()</code> 함수에서는 삽입 지점 커서를 나타내는 <code>Gtk.TextMark</code>를 반환합니다."
44844
44845#. (itstool) path: item/p
44846#: C/textview.py.page:61
44847msgid "<code>get_selection_bound()</code> returns the <code>Gtk.TextMark</code> that represents the selection bound."
44848msgstr "<code>get_selection_bound()</code> 함수는 선택 범위를 나타내는 <code>Gtk.TextMark</code>를 반환합니다."
44849
44850#. (itstool) path: item/p
44851#: C/textview.py.page:62
44852msgid ""
44853"<code>set_text(\"some text\", length)</code> where <code>length</code> is a positive integer or <code>-1</code>, "
44854"sets the content of the buffer as the first <code>length</code> characters of the <code>\"some text\"</code> text. "
44855"If <code>length</code> is omitted or <code>-1</code>, the text is inserted completely. The content of the buffer, "
44856"if there is any, is destroyed."
44857msgstr ""
44858"<code>length</code>에 양의 정수 또는 <code>-1</code>을 넣을 수 있는 <code>set_text(\"some text\", length)</code> 함"
44859"수는 <code>\"some text\"</code> 텍스트를 처음 <code>length</code> 글자 만큼 버퍼에 내용을 넣습니다. <code>length</"
44860"code> 값을 생략하거나 <code>-1</code>로 두면, 텍스트를 전부 넣습니다. 어떤 값이 들어가면 버퍼의 내용을 해체합니다."
44861
44862#. (itstool) path: item/p
44863#: C/textview.py.page:63
44864msgid ""
44865"<code>insert(iter, \"some text\", length)</code> where <code>iter</code> is a text iterator and <code>length</"
44866"code> is a positive integer or <code>-1</code>, inserts in the buffer at <code>iter</code> the first <code>length</"
44867"code> characters of the <code>\"some text\"</code> text. If <code>length</code> is omitted or <code>-1</code>, the "
44868"text is inserted completely."
44869msgstr ""
44870"<code>iter</code> 에 텍스트 반복자가 들어가고 <code>length</code>에 양의 정수 또는 <code>-1</code>을 넣을 수 있는 "
44871"<code>insert(iter, \"some text\", length)</code> 함수에는 <code>\"some text\"</code> 텍스트 중 처음 <code>length</"
44872"code> 글자를 버퍼의 <code>iter</code> 위치에 삽입합니다. <code>length</code> 값을 생략하거나 <code>-1</code>로 두"
44873"면, 텍스트를 전부 넣습니다."
44874
44875#. (itstool) path: item/p
44876#: C/textview.py.page:64
44877msgid ""
44878"<code>insert_at_cursor(\"some text\", length)</code> does the same as <code>insert(iter, \"some text\", length)</"
44879"code>, with the current cursor taken as <code>iter</code>."
44880msgstr ""
44881"<code>insert_at_cursor(\"some text\", length)</code> 함수는 <code>insert(iter, \"some text\", length)</code> 함수"
44882"와 동일한 동작을 취하지만 현재 커서 위치를 <code>iter</code>로 취합니다."
44883
44884#. (itstool) path: item/p
44885#: C/textview.py.page:65
44886msgid ""
44887"<code>create_mark(\"mark_name\", iter, left_gravity)</code> where <code>iter</code> is a <code>Gtk.TextIter</code> "
44888"and <code>left_gravity</code> is a boolean, creates a <code>Gtk.TextMark</code> at the position of <code>iter</"
44889"code>. If <code>\"mark_name\"</code> is <code>None</code>, the mark is anonymous; otherwise, the mark can be "
44890"retrieved by name using <code>get_mark()</code>. If a mark has left gravity, and text is inserted at the mark’s "
44891"current location, the mark will be moved to the left of the newly-inserted text. If <code>left_gravity</code> is "
44892"omitted, it defaults to <code>False</code>."
44893msgstr ""
44894"<code>iter</code>는 <code>Gtk.TextIter</code>이고, <code>left_gravity</code> 값은 부울린 값인 "
44895"<code>create_mark(\"mark_name\", iter, left_gravity)</code> 함수는 <code>Gtk.TextMark</code>를 <code>iter</code> 위"
44896"치에 만듭니다. <code>\"mark_name\"</code>을 <code>None</code>으로 설정하면, 익명으로 표시합니다. 그렇지 않으면 "
44897"<code>get_mark()</code> 함수를 활용할 때 지정 이름으로 표시 항목을 가져올 수 있습니다. 마크가 왼쪽 정렬 상태고 마"
44898"크 현재 위치에 텍스트를 넣으면, 마크는 새로 넣은 텍스트의 왼편으로 갑니다. <code>left_gravity</code> 매개변수 값을 "
44899"생략하면 기본값은 <code>False</code>로 들어갑니다."
44900
44901#. (itstool) path: item/p
44902#: C/textview.py.page:67
44903msgid ""
44904"To specify that some text in the buffer should have specific formatting, you must define a tag to hold that "
44905"formatting information, and then apply that tag to the region of text using <code>create_tag(\"tag name\", "
44906"property)</code> and <code>apply_tag(tag, start_iter, end_iter)</code> as in, for instance:"
44907msgstr ""
44908"버퍼에 임의의 텍스트를 특정 형식으로 지정하려면, 형식 정보를 유지하는 태그를 지정해야하며, 다음과 같이  "
44909"<code>create_tag(\"tag name\", property)</code> 함수와 <code>apply_tag(tag, start_iter, end_iter)</code> 함수로 태"
44910"그를 텍스트 영역에 적용해야합니다:"
44911
44912#. (itstool) path: item/code
44913#: C/textview.py.page:68
44914#, no-wrap
44915msgid ""
44916"\n"
44917"tag = textbuffer.create_tag(\"orange_bg\", background=\"orange\")\n"
44918"textbuffer.apply_tag(tag, start_iter, end_iter)"
44919msgstr ""
44920"\n"
44921"tag = textbuffer.create_tag(\"orange_bg\", background=\"orange\")\n"
44922"textbuffer.apply_tag(tag, start_iter, end_iter)"
44923
44924#. (itstool) path: item/p
44925#: C/textview.py.page:71
44926msgid "The following are some of the common styles applied to text:"
44927msgstr "다음은 텍스트에 적용하는 일반 모양새 일부입니다:"
44928
44929#. (itstool) path: item/p
44930#: C/textview.py.page:73
44931msgid "Background colour (\"background\" property)"
44932msgstr "배경 색상(\"background\" 속성)"
44933
44934#. (itstool) path: item/p
44935#: C/textview.py.page:74
44936msgid "Foreground colour (\"foreground\" property)"
44937msgstr "전경 색상(\"foreground\" 속성)"
44938
44939#. (itstool) path: item/p
44940#: C/textview.py.page:75
44941msgid "Underline (\"underline\" property)"
44942msgstr "밑줄(\"underline\" 속성)"
44943
44944#. (itstool) path: item/p
44945#: C/textview.py.page:76
44946msgid "Bold (\"weight\" property)"
44947msgstr "굵게(\"weight\" 속성)"
44948
44949#. (itstool) path: item/p
44950#: C/textview.py.page:77
44951msgid "Italics (\"style\" property)"
44952msgstr "기울임(\"style\" 속성)"
44953
44954#. (itstool) path: item/p
44955#: C/textview.py.page:78
44956msgid "Strikethrough (\"strikethrough\" property)"
44957msgstr "취소선(\"strikethrough\" 속성)"
44958
44959#. (itstool) path: item/p
44960#: C/textview.py.page:79
44961msgid "Justification (\"justification\" property)"
44962msgstr "양쪽배분(\"justification\" 속성)"
44963
44964#. (itstool) path: item/p
44965#: C/textview.py.page:80
44966msgid "Size (\"size\" and \"size-points\" properties)"
44967msgstr "크기(\"size\"와 \"size-points\" 속성)"
44968
44969#. (itstool) path: item/p
44970#: C/textview.py.page:81
44971msgid "Text wrapping (\"wrap-mode\" property)"
44972msgstr "텍스트 줄바꿈(\"wrap-mode\" 속성)"
44973
44974#. (itstool) path: item/p
44975#: C/textview.py.page:83
44976msgid ""
44977"You can also delete particular tags later using <code>remove_tag()</code> or delete all tags in a given region by "
44978"calling <code>remove_all_tags()</code>."
44979msgstr ""
44980"<code>remove_tag()</code> 함수로 태그 일부를 삭제하거나 <code>remove_all_tags()</code> 함수를 호출하여 주어진 영역"
44981"의 모든 태그를 삭제할 수 있습니다."
44982
44983#. (itstool) path: section/p
44984#: C/textview.py.page:85
44985msgid "Methods for a TextIter widget"
44986msgstr "TextIter 위젯 메서드"
44987
44988#. (itstool) path: item/p
44989#: C/textview.py.page:87
44990msgid ""
44991"<code>forward_search(needle, flags, limit)</code> searches forward for <code>needle</code>. The search will not "
44992"continue past the <code>Gtk.TextIter</code> limit. The <code>flags</code> can be set to one of the following, or "
44993"any combination of it by concatenating them with the bitwise-OR operator <code>|</code>: <code>0</code> (the match "
44994"must be exact); <code>Gtk.TextSearchFlags.VISIBLE_ONLY</code> (the match may have invisible text interspersed in "
44995"needle); <code>Gtk.TextSearchFlags.TEXT_ONLY</code> (the match may have pixbufs or child widgets mixed inside the "
44996"matched range); <code>Gtk.TextSearchFlags.CASE_INSENSITIVE</code> (the text will be matched regardless of what "
44997"case it is in). The method returns a tuple containing a <code>Gtk.TextIter</code> pointing to the start and to the "
44998"first character after the match; if no match is found, <code>None</code> is returned."
44999msgstr ""
45000"<code>forward_search(needle, flags, limit)</code>는 <code>needle</code>을 앞방향으로 검색합니다. <code>Gtk."
45001"TextIter</code>에서 지정한 한계값에 도달하면 검색을 계속하지 않습니다. <code>flags</code> 는 <code>0</code>(결과 일"
45002"치 내용이 정확해야함), <code>Gtk.TextSearchFlags.VISIBLE_ONLY</code> (보이지 않는 글자가 needle에 있을 수도 있음); "
45003"<code>Gtk.TextSearchFlags.TEXT_ONLY</code> (일치 범위에 있는 내용에 픽셀 버퍼 또는 하위 위젯의 조합으로 이루어짐); "
45004"<code>Gtk.TextSearchFlags.CASE_INSENSITIVE</code> (대소문자 관계 없이 일치하면 됨)값 중 하나로 지정하거나 비트-OR "
45005"연산자 <code>|</code>로 지정할 수 있습니다. 메서드에서는 시작 지점을 가리키는 <code>Gtk.TextIter</code>와 일치 결과"
45006"를 찾은 지점 다음의 첫번째 문자를 튜플 형태로 반환합니다. 만약 일치 결과가 없으면 <code>None</code>을 반환합니다."
45007
45008#. (itstool) path: item/p
45009#: C/textview.py.page:88
45010msgid ""
45011"<code>backward_search(needle, flags, limit)</code> does the same as <code>forward_search()</code>, but moving "
45012"backwards."
45013msgstr ""
45014"<code>backward_search(needle, flags, limit)</code> 함수는 <code>forward_search()</code>와 동일하게 동작하지만 뒷 방"
45015"향으로 검색합니다."
45016
45017#. (itstool) path: item/p
45018#: C/textview.py.page:96
45019msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTextView.html\">GtkTextView</link>"
45020msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTextView.html\">GtkTextView</link>"
45021
45022#. (itstool) path: item/p
45023#: C/textview.py.page:97
45024msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTextBuffer.html\">GtkTextBuffer</link>"
45025msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTextBuffer.html\">GtkTextBuffer</link>"
45026
45027#. (itstool) path: item/p
45028#: C/textview.py.page:98
45029msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTextTag.html\">GtkTextTag</link>"
45030msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTextTag.html\">GtkTextTag</link>"
45031
45032#. (itstool) path: info/title
45033#: C/textview.vala.page:8
45034msgctxt "text"
45035msgid "TextView (Vala)"
45036msgstr "TextView (Vala)"
45037
45038#. (itstool) path: note/p
45039#: C/textview.vala.page:25
45040msgid "If we have a loooooooooooooooooooooooooooooooooooong word, a horizontal scrollbar will appear."
45041msgstr "기이이이이이이이이이이이이이이이이이이인 단어가 있다면 수평 스크롤 표시줄이 나타납니다."
45042
45043#. (itstool) path: page/code
45044#: C/textview.vala.page:30
45045#, no-wrap
45046msgid ""
45047"/* This is the application. */\n"
45048"public class MyApplication : Gtk.Application {\n"
45049"\t/* Override the 'activate' signal of GLib.Application. */\n"
45050"\tprotected override void activate () {\n"
45051"\t\t/* Create the window of this application. */\n"
45052"\t\tnew MyWindow (this).show_all ();\n"
45053"\t}\n"
45054"}\n"
45055"\n"
45056"/* This is the window. */\n"
45057"class MyWindow: Gtk.ApplicationWindow {\n"
45058"\tinternal MyWindow (MyApplication app) {\n"
45059"\t\tObject (application: app, title: \"TextView Example\");\n"
45060"\t\tthis.set_default_size (220, 200);\n"
45061"\n"
45062"\t\tvar buffer = new Gtk.TextBuffer (null); //stores text to be displayed\n"
45063"\t\tvar textview = new Gtk.TextView.with_buffer (buffer); //displays TextBuffer\n"
45064"\t\ttextview.set_wrap_mode (Gtk.WrapMode.WORD); //sets line wrapping\n"
45065"\n"
45066"\t\tvar scrolled_window = new Gtk.ScrolledWindow (null, null);\n"
45067"\t\tscrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC,\n"
45068"\t\t                            Gtk.PolicyType.AUTOMATIC);\n"
45069"\n"
45070"\t\tscrolled_window.add (textview);\n"
45071"\t\tscrolled_window.set_border_width (5);\n"
45072"\n"
45073"\t\tthis.add (scrolled_window);\n"
45074"\t}\n"
45075"}\n"
45076"/* main creates and runs the application. */\n"
45077"public int main (string[] args) {\n"
45078"\treturn new MyApplication ().run (args);\n"
45079"}\n"
45080msgstr ""
45081"/* This is the application. */\n"
45082"public class MyApplication : Gtk.Application {\n"
45083"\t/* Override the 'activate' signal of GLib.Application. */\n"
45084"\tprotected override void activate () {\n"
45085"\t\t/* Create the window of this application. */\n"
45086"\t\tnew MyWindow (this).show_all ();\n"
45087"\t}\n"
45088"}\n"
45089"\n"
45090"/* This is the window. */\n"
45091"class MyWindow: Gtk.ApplicationWindow {\n"
45092"\tinternal MyWindow (MyApplication app) {\n"
45093"\t\tObject (application: app, title: \"TextView Example\");\n"
45094"\t\tthis.set_default_size (220, 200);\n"
45095"\n"
45096"\t\tvar buffer = new Gtk.TextBuffer (null); //stores text to be displayed\n"
45097"\t\tvar textview = new Gtk.TextView.with_buffer (buffer); //displays TextBuffer\n"
45098"\t\ttextview.set_wrap_mode (Gtk.WrapMode.WORD); //sets line wrapping\n"
45099"\n"
45100"\t\tvar scrolled_window = new Gtk.ScrolledWindow (null, null);\n"
45101"\t\tscrolled_window.set_policy (Gtk.PolicyType.AUTOMATIC,\n"
45102"\t\t                            Gtk.PolicyType.AUTOMATIC);\n"
45103"\n"
45104"\t\tscrolled_window.add (textview);\n"
45105"\t\tscrolled_window.set_border_width (5);\n"
45106"\n"
45107"\t\tthis.add (scrolled_window);\n"
45108"\t}\n"
45109"}\n"
45110"/* main creates and runs the application. */\n"
45111"public int main (string[] args) {\n"
45112"\treturn new MyApplication ().run (args);\n"
45113"}\n"
45114
45115#. (itstool) path: item/p
45116#: C/textview.vala.page:35
45117msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TextBuffer.html\">Gtk.TextBuffer</link>"
45118msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TextBuffer.html\">Gtk.TextBuffer</link>"
45119
45120#. (itstool) path: item/p
45121#: C/textview.vala.page:36
45122msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TextView.html\">Gtk.TextView</link>"
45123msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TextView.html\">Gtk.TextView</link>"
45124
45125#. (itstool) path: item/p
45126#: C/textview.vala.page:38
45127msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.WrapMode.html\">Gtk.WrapMode</link>"
45128msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.WrapMode.html\">Gtk.WrapMode</link>"
45129
45130#. (itstool) path: info/title
45131#: C/togglebutton.c.page:8
45132msgctxt "text"
45133msgid "ToggleButton (C)"
45134msgstr "ToggleButton (C)"
45135
45136#. (itstool) path: info/desc
45137#: C/togglebutton.c.page:22 C/togglebutton.py.page:19 C/togglebutton.vala.page:21
45138msgid "A button which retains state"
45139msgstr "상태를 유지하는 단추"
45140
45141#. (itstool) path: page/title
45142#: C/togglebutton.c.page:25 C/togglebutton.js.page:21 C/togglebutton.py.page:22 C/togglebutton.vala.page:24
45143msgid "ToggleButton"
45144msgstr "ToggleButton"
45145
45146#. (itstool) path: page/media
45147#. This is a reference to an external file such as an image or video. When
45148#. the file changes, the md5 hash will change to let you know you need to
45149#. update your localized copy. The msgstr is not used at all. Set it to
45150#. whatever you like once you have updated your copy of the file.
45151#: C/togglebutton.c.page:27 C/togglebutton.js.page:22 C/togglebutton.py.page:23 C/togglebutton.vala.page:25
45152msgctxt "_"
45153msgid "external ref='media/togglebutton.png' md5='791e062613d4f9bd5936390b0aa18448'"
45154msgstr ""
45155
45156#. (itstool) path: page/p
45157#: C/togglebutton.c.page:28 C/togglebutton.py.page:24 C/togglebutton.vala.page:26
45158msgid "When this ToggleButton is in an active state, the spinner spins."
45159msgstr "ToggleButton을 활성 상태로 두면 스피너가 돌아갑니다."
45160
45161#. (itstool) path: page/code
45162#: C/togglebutton.c.page:30
45163#, no-wrap
45164msgid ""
45165"\n"
45166"#include &lt;gtk/gtk.h&gt;\n"
45167"\n"
45168"\n"
45169"\n"
45170"/*This is the callback function. It is a handler function \n"
45171"which reacts to the signal. In this case, it will cause the \n"
45172"spinner to start and stop according to how many times the user \n"
45173"presses the button.*/\n"
45174"static void\n"
45175"button_toggled_cb (GtkWidget *button,\n"
45176"                   gpointer   user_data)\n"
45177"{\n"
45178"  GtkWidget *spinner = user_data;\n"
45179"\n"
45180"  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button)))\n"
45181"          gtk_spinner_start (GTK_SPINNER (spinner));\n"
45182"  else {\n"
45183"          gtk_spinner_stop (GTK_SPINNER (spinner));\n"
45184"  }\n"
45185"}\n"
45186"\n"
45187"\n"
45188"\n"
45189"static void\n"
45190"activate (GtkApplication *app,\n"
45191"          gpointer        user_data)\n"
45192"{\n"
45193"  GtkWidget *window;\n"
45194"  GtkWidget *button;\n"
45195"  GtkWidget *grid;\n"
45196"  GtkWidget *spinner;\n"
45197"\n"
45198"  /*Create a window with a title, border width and a default size*/\n"
45199"  window = gtk_application_window_new (app);\n"
45200"  gtk_window_set_title (GTK_WINDOW (window), \"ToggleButton Example\");\n"
45201"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);\n"
45202"  gtk_container_set_border_width(GTK_CONTAINER(window), 30);\n"
45203"\n"
45204"  /*Create a togglebutton with a label*/\n"
45205"  button = gtk_toggle_button_new_with_label (\"Start/Stop\");\n"
45206"\n"
45207"  /*Create a spinner, with extra horizontal and vertical space*/\n"
45208"  spinner = gtk_spinner_new ();\n"
45209"  gtk_widget_set_hexpand (spinner, TRUE);\n"
45210"  gtk_widget_set_vexpand (spinner, TRUE);\n"
45211"\n"
45212"  /*Create a grid and set the row spacing, attach the togglebutton \n"
45213"  and spinner onto the grid and position them accordingly*/\n"
45214"  grid = gtk_grid_new();\n"
45215"  gtk_grid_set_row_homogeneous (GTK_GRID (grid), FALSE);\n"
45216"  gtk_grid_set_row_spacing (GTK_GRID (grid), 15);\n"
45217"  gtk_grid_attach (GTK_GRID (grid), spinner, 0, 0, 1, 1);\n"
45218"  gtk_grid_attach (GTK_GRID (grid), button, 0, 1, 1, 1);\n"
45219"  \n"
45220"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
45221"\n"
45222"  /*Connecting the toggled signal to the callback*/\n"
45223"  g_signal_connect (GTK_TOGGLE_BUTTON (button), \"toggled\", \n"
45224"                    G_CALLBACK (button_toggled_cb), spinner);\n"
45225"\n"
45226"  gtk_widget_show_all (window);\n"
45227"}\n"
45228"\n"
45229"\n"
45230"\n"
45231"int\n"
45232"main (int argc, char **argv)\n"
45233"{\n"
45234"  GtkApplication *app;\n"
45235"  int status;\n"
45236"\n"
45237"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
45238"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
45239"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
45240"  g_object_unref (app);\n"
45241"\n"
45242"  return status;\n"
45243"}\n"
45244msgstr ""
45245"\n"
45246"#include &lt;gtk/gtk.h&gt;\n"
45247"\n"
45248"\n"
45249"\n"
45250"/*This is the callback function. It is a handler function \n"
45251"which reacts to the signal. In this case, it will cause the \n"
45252"spinner to start and stop according to how many times the user \n"
45253"presses the button.*/\n"
45254"static void\n"
45255"button_toggled_cb (GtkWidget *button,\n"
45256"                   gpointer   user_data)\n"
45257"{\n"
45258"  GtkWidget *spinner = user_data;\n"
45259"\n"
45260"  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button)))\n"
45261"          gtk_spinner_start (GTK_SPINNER (spinner));\n"
45262"  else {\n"
45263"          gtk_spinner_stop (GTK_SPINNER (spinner));\n"
45264"  }\n"
45265"}\n"
45266"\n"
45267"\n"
45268"\n"
45269"static void\n"
45270"activate (GtkApplication *app,\n"
45271"          gpointer        user_data)\n"
45272"{\n"
45273"  GtkWidget *window;\n"
45274"  GtkWidget *button;\n"
45275"  GtkWidget *grid;\n"
45276"  GtkWidget *spinner;\n"
45277"\n"
45278"  /*Create a window with a title, border width and a default size*/\n"
45279"  window = gtk_application_window_new (app);\n"
45280"  gtk_window_set_title (GTK_WINDOW (window), \"ToggleButton Example\");\n"
45281"  gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);\n"
45282"  gtk_container_set_border_width(GTK_CONTAINER(window), 30);\n"
45283"\n"
45284"  /*Create a togglebutton with a label*/\n"
45285"  button = gtk_toggle_button_new_with_label (\"Start/Stop\");\n"
45286"\n"
45287"  /*Create a spinner, with extra horizontal and vertical space*/\n"
45288"  spinner = gtk_spinner_new ();\n"
45289"  gtk_widget_set_hexpand (spinner, TRUE);\n"
45290"  gtk_widget_set_vexpand (spinner, TRUE);\n"
45291"\n"
45292"  /*Create a grid and set the row spacing, attach the togglebutton \n"
45293"  and spinner onto the grid and position them accordingly*/\n"
45294"  grid = gtk_grid_new();\n"
45295"  gtk_grid_set_row_homogeneous (GTK_GRID (grid), FALSE);\n"
45296"  gtk_grid_set_row_spacing (GTK_GRID (grid), 15);\n"
45297"  gtk_grid_attach (GTK_GRID (grid), spinner, 0, 0, 1, 1);\n"
45298"  gtk_grid_attach (GTK_GRID (grid), button, 0, 1, 1, 1);\n"
45299"  \n"
45300"  gtk_container_add (GTK_CONTAINER (window), grid);\n"
45301"\n"
45302"  /*Connecting the toggled signal to the callback*/\n"
45303"  g_signal_connect (GTK_TOGGLE_BUTTON (button), \"toggled\", \n"
45304"                    G_CALLBACK (button_toggled_cb), spinner);\n"
45305"\n"
45306"  gtk_widget_show_all (window);\n"
45307"}\n"
45308"\n"
45309"\n"
45310"\n"
45311"int\n"
45312"main (int argc, char **argv)\n"
45313"{\n"
45314"  GtkApplication *app;\n"
45315"  int status;\n"
45316"\n"
45317"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
45318"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
45319"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
45320"  g_object_unref (app);\n"
45321"\n"
45322"  return status;\n"
45323"}\n"
45324
45325#. (itstool) path: item/p
45326#: C/togglebutton.c.page:39
45327msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkToggleButton.html\">GtkTogglebutton</link>"
45328msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkToggleButton.html\">GtkTogglebutton</link>"
45329
45330#. (itstool) path: info/title
45331#: C/togglebutton.js.page:8
45332msgctxt "text"
45333msgid "ToggleButton (JavaScript)"
45334msgstr "ToggleButton (JavaScript)"
45335
45336#. (itstool) path: info/desc
45337#: C/togglebutton.js.page:18
45338msgid "Stays pressed until you click it again"
45339msgstr "다시 클릭하기 전에는 눌린 상태를 유지합니다"
45340
45341#. (itstool) path: page/p
45342#: C/togglebutton.js.page:23
45343msgid ""
45344"A ToggleButton is like a normal <link xref=\"button.js\">Button</link>, except that it stays pressed in when you "
45345"click it. You can use it like an on/off switch, to control things like the <link xref=\"spinner.js\">Spinner</"
45346"link> in this example."
45347msgstr ""
45348"ToggleButton은 보통 <link xref=\"button.js\">Button</link>이지만 눌렀을 때 눌린 상태라는 점은 다릅니다. 이 예제에"
45349"서 <link xref=\"spinner.js\">Spinner</link>와 같은 매개를 다룰때 켬/끔 스위치로 사용할 수 있습니다."
45350
45351#. (itstool) path: page/p
45352#: C/togglebutton.js.page:24
45353msgid ""
45354"A ToggleButton's get_active method returns true if it's pressed in, and false if it's not. Its set_active method "
45355"is used if you want to change its state without needing to click on it. When it changes state from pressed in to "
45356"popped out and vice-versa, it sends out the \"toggled\" signal, which you can connect to a function to do "
45357"something."
45358msgstr ""
45359"ToggleButton의 <code>get_active()</code> 메서드는 눌렸을 때 true를 반환합니다. 그리고 눌린 상태가 아니면 false를 반"
45360"환합니다. <code>set_active()</code> 메서드는 단추를 누르지 않아도 상태를 설정하고 싶을 때 사용합니다. 눌려있거나 튀"
45361"어나왔거나 하는 상태를 바꿀 때, 어떤 함수와 연결할 수 있는 \"toggled\" 시그널을 내보냅니다."
45362
45363#. (itstool) path: section/code
45364#: C/togglebutton.js.page:41
45365#, no-wrap
45366msgid ""
45367"\n"
45368"const ToggleButtonExample = new Lang.Class({\n"
45369"    Name: 'ToggleButton Example',\n"
45370"\n"
45371"    // Create the application itself\n"
45372"    _init: function() {\n"
45373"        this.application = new Gtk.Application({\n"
45374"            application_id: 'org.example.jstogglebutton',\n"
45375"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
45376"        });\n"
45377"\n"
45378"    // Connect 'activate' and 'startup' signals to the callback functions\n"
45379"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
45380"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
45381"    },\n"
45382"\n"
45383"    // Callback function for 'activate' signal presents window when active\n"
45384"    _onActivate: function() {\n"
45385"        this._window.present();\n"
45386"    },\n"
45387"\n"
45388"    // Callback function for 'startup' signal builds the UI\n"
45389"    _onStartup: function() {\n"
45390"        this._buildUI ();\n"
45391"    },\n"
45392msgstr ""
45393"\n"
45394"const ToggleButtonExample = new Lang.Class({\n"
45395"    Name: 'ToggleButton Example',\n"
45396"\n"
45397"    // Create the application itself\n"
45398"    _init: function() {\n"
45399"        this.application = new Gtk.Application({\n"
45400"            application_id: 'org.example.jstogglebutton',\n"
45401"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
45402"        });\n"
45403"\n"
45404"    // Connect 'activate' and 'startup' signals to the callback functions\n"
45405"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
45406"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
45407"    },\n"
45408"\n"
45409"    // Callback function for 'activate' signal presents window when active\n"
45410"    _onActivate: function() {\n"
45411"        this._window.present();\n"
45412"    },\n"
45413"\n"
45414"    // Callback function for 'startup' signal builds the UI\n"
45415"    _onStartup: function() {\n"
45416"        this._buildUI ();\n"
45417"    },\n"
45418
45419#. (itstool) path: section/code
45420#: C/togglebutton.js.page:68
45421#, no-wrap
45422msgid ""
45423"\n"
45424"    // Build the application's UI\n"
45425"    _buildUI: function() {\n"
45426"\n"
45427"        // Create the application window\n"
45428"        this._window = new Gtk.ApplicationWindow({\n"
45429"            application: this.application,\n"
45430"            window_position: Gtk.WindowPosition.CENTER,\n"
45431"            default_height: 300,\n"
45432"            default_width: 300,\n"
45433"            border_width: 30,\n"
45434"            title: \"ToggleButton Example\"});\n"
45435msgstr ""
45436"\n"
45437"    // Build the application's UI\n"
45438"    _buildUI: function() {\n"
45439"\n"
45440"        // Create the application window\n"
45441"        this._window = new Gtk.ApplicationWindow({\n"
45442"            application: this.application,\n"
45443"            window_position: Gtk.WindowPosition.CENTER,\n"
45444"            default_height: 300,\n"
45445"            default_width: 300,\n"
45446"            border_width: 30,\n"
45447"            title: \"ToggleButton Example\"});\n"
45448
45449#. (itstool) path: section/title
45450#: C/togglebutton.js.page:85
45451msgid "Creating the ToggleButton and other widgets"
45452msgstr "ToggleButton과 다른 위젯 만들기"
45453
45454#. (itstool) path: section/code
45455#: C/togglebutton.js.page:86
45456#, no-wrap
45457msgid ""
45458"\n"
45459"        // Create the spinner that the button stops and starts\n"
45460"        this._spinner = new Gtk.Spinner ({hexpand: true, vexpand: true});\n"
45461msgstr ""
45462"\n"
45463"        // Create the spinner that the button stops and starts\n"
45464"        this._spinner = new Gtk.Spinner ({hexpand: true, vexpand: true});\n"
45465
45466#. (itstool) path: section/p
45467#: C/togglebutton.js.page:91
45468msgid ""
45469"We want this <link xref=\"spinner.js\">Spinner</link> to expand vertically and horizontally, to take up as much "
45470"space as possible inside the window."
45471msgstr ""
45472"여기 <link xref=\"spinner.js\">Spinner</link>를 가로 세로 망향으로 확장하여 창 안에서 최대한의 공간을 취할 수 있도"
45473"록 하려고 합니다."
45474
45475#. (itstool) path: section/code
45476#: C/togglebutton.js.page:93
45477#, no-wrap
45478msgid ""
45479"\n"
45480"        // Create the togglebutton that starts and stops the spinner\n"
45481"        this._toggleButton = new Gtk.ToggleButton ({label: \"Start/Stop\"});\n"
45482"        this._toggleButton.connect ('toggled', Lang.bind (this, this._onToggle));\n"
45483msgstr ""
45484"\n"
45485"        // Create the togglebutton that starts and stops the spinner\n"
45486"        this._toggleButton = new Gtk.ToggleButton ({label: \"Start/Stop\"});\n"
45487"        this._toggleButton.connect ('toggled', Lang.bind (this, this._onToggle));\n"
45488
45489#. (itstool) path: section/p
45490#: C/togglebutton.js.page:99
45491msgid ""
45492"Creating a ToggleButton is a lot like creating a normal <link xref=\"button.js\">Button</link>. The biggest "
45493"difference is that you're handling a \"toggled\" signal instead of a \"clicked\" signal. This code binds the "
45494"_onToggle function to that signal, so that it's called whenever our ToggleButton is toggled."
45495msgstr ""
45496"ToggleButton을 만드는 과정은 보통 <link xref=\"button.js\">Button</link>을 만드는 과정과 비슷합니다. \"clicked\" 시"
45497"그널이 아닌 \"toggled\" 시그널을 처리한다는게 큰 차이점입니다. 이 코드에서는 _onToggle 함수를 시그널에 연결하여 "
45498"ToggleButton의 상태가 바뀌었을 때 호출합니다."
45499
45500#. (itstool) path: section/code
45501#: C/togglebutton.js.page:101
45502#, no-wrap
45503msgid ""
45504"\n"
45505"        // Create a grid and put everything in it\n"
45506"        this._grid = new Gtk.Grid ({\n"
45507"            row_homogeneous: false,\n"
45508"            row_spacing: 15});\n"
45509"        this._grid.attach (this._spinner, 0, 0, 1, 1);\n"
45510"        this._grid.attach (this._toggleButton, 0, 1, 1, 1);\n"
45511msgstr ""
45512"\n"
45513"        // Create a grid and put everything in it\n"
45514"        this._grid = new Gtk.Grid ({\n"
45515"            row_homogeneous: false,\n"
45516"            row_spacing: 15});\n"
45517"        this._grid.attach (this._spinner, 0, 0, 1, 1);\n"
45518"        this._grid.attach (this._toggleButton, 0, 1, 1, 1);\n"
45519
45520#. (itstool) path: section/p
45521#: C/togglebutton.js.page:109
45522msgid ""
45523"Here we create a simple <link xref=\"grid.js\">Grid</link> to organize everything in, then attach the Spinner and "
45524"ToggleButton to it."
45525msgstr ""
45526"여기서 우리는 모든 위젯을 모아두는 간단한 <link xref=\"grid.js\">Grid</link>를 만들고 Spinner와 ToggleButton을 붙여"
45527"두겠습니다."
45528
45529#. (itstool) path: section/code
45530#: C/togglebutton.js.page:111
45531#, no-wrap
45532msgid ""
45533"\n"
45534"        // Add the grid to the window\n"
45535"        this._window.add (this._grid);\n"
45536"\n"
45537"        // Show the window and all child widgets\n"
45538"        this._window.show_all();\n"
45539"    },\n"
45540msgstr ""
45541"\n"
45542"        // Add the grid to the window\n"
45543"        this._window.add (this._grid);\n"
45544"\n"
45545"        // Show the window and all child widgets\n"
45546"        this._window.show_all();\n"
45547"    },\n"
45548
45549#. (itstool) path: section/p
45550#: C/togglebutton.js.page:119
45551msgid ""
45552"Now we add the Grid to the Window, and tell the Window to show itself and its child widgets when the application "
45553"is started."
45554msgstr "이제 창에 Grid를 추가하고, 프로그램을 시작할 때 창 자체를 나타낸 다음 하위 위젯을 나타내라고 하겠습니다."
45555
45556#. (itstool) path: section/title
45557#: C/togglebutton.js.page:123
45558msgid "Making something happen when the ToggleButton is toggled"
45559msgstr "ToggleButton 상태가 바뀔때 동작 만들기"
45560
45561#. (itstool) path: section/code
45562#: C/togglebutton.js.page:125
45563#, no-wrap
45564msgid ""
45565"\n"
45566"    _onToggle: function() {\n"
45567"\n"
45568"        // Start or stop the spinner\n"
45569"        if (this._toggleButton.get_active ())\n"
45570"            this._spinner.start ();\n"
45571"        else this._spinner.stop ();\n"
45572"\n"
45573"    }\n"
45574"\n"
45575"});\n"
45576msgstr ""
45577"\n"
45578"    _onToggle: function() {\n"
45579"\n"
45580"        // Start or stop the spinner\n"
45581"        if (this._toggleButton.get_active ())\n"
45582"            this._spinner.start ();\n"
45583"        else this._spinner.stop ();\n"
45584"\n"
45585"    }\n"
45586"\n"
45587"});\n"
45588
45589#. (itstool) path: section/p
45590#: C/togglebutton.js.page:137
45591msgid ""
45592"Whenever someone toggles the button, this function checks what its state is afterwards using get_active and starts "
45593"or stops the spinner accordingly. We want it to spin only while the button is pressed in, so if get_active returns "
45594"true we start the spinner. Otherwise, we tell it to stop."
45595msgstr ""
45596"단추 눌린 상태를 누군가가 바꾸면, 이 함수에서 get_active() 함수를 사용하여 상태를 확인한 다음에 바로 스피너 동작을 "
45597"시작하거나 멈춥니다. 우리는 단추가 눌린 동안에만 스피너가 돌아가게 하려고 하기에 get_active에서 true를 반환할 경우"
45598"에 스피너 회전을 시작하겠습니다. 아니면 멈추라고 하고요."
45599
45600#. (itstool) path: section/code
45601#: C/togglebutton.js.page:139
45602#, no-wrap
45603msgid ""
45604"\n"
45605"// Run the application\n"
45606"let app = new ToggleButtonExample ();\n"
45607"app.application.run (ARGV);\n"
45608msgstr ""
45609"\n"
45610"// Run the application\n"
45611"let app = new ToggleButtonExample ();\n"
45612"app.application.run (ARGV);\n"
45613
45614#. (itstool) path: section/code
45615#: C/togglebutton.js.page:149
45616#, no-wrap
45617msgid ""
45618"#!/usr/bin/gjs\n"
45619"\n"
45620"imports.gi.versions.Gtk = '3.0';\n"
45621"\n"
45622"const Gio = imports.gi.Gio;\n"
45623"const Gtk = imports.gi.Gtk;\n"
45624"\n"
45625"class ToggleButtonExample {\n"
45626"\n"
45627"    // Create the application itself\n"
45628"    constructor() {\n"
45629"        this.application = new Gtk.Application({\n"
45630"            application_id: 'org.example.jstogglebutton',\n"
45631"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
45632"        });\n"
45633"\n"
45634"        // Connect 'activate' and 'startup' signals to the callback functions\n"
45635"        this.application.connect('activate', this._onActivate.bind(this));\n"
45636"        this.application.connect('startup', this._onStartup.bind(this));\n"
45637"    }\n"
45638"\n"
45639"    // Callback function for 'activate' signal presents window when active\n"
45640"    _onActivate() {\n"
45641"        this._window.present();\n"
45642"    }\n"
45643"\n"
45644"    // Callback function for 'startup' signal builds the UI\n"
45645"    _onStartup() {\n"
45646"        this._buildUI();\n"
45647"    }\n"
45648"\n"
45649"    // Build the application's UI\n"
45650"    _buildUI() {\n"
45651"\n"
45652"        // Create the application window\n"
45653"        this._window = new Gtk.ApplicationWindow({\n"
45654"            application: this.application,\n"
45655"            window_position: Gtk.WindowPosition.CENTER,\n"
45656"            default_height: 300,\n"
45657"            default_width: 300,\n"
45658"            border_width: 30,\n"
45659"            title: \"ToggleButton Example\"});\n"
45660"\n"
45661"        // Create the spinner that the button stops and starts\n"
45662"        this._spinner = new Gtk.Spinner ({hexpand: true, vexpand: true});\n"
45663"\n"
45664"        // Create the togglebutton that starts and stops the spinner\n"
45665"        this._toggleButton = new Gtk.ToggleButton ({label: \"Start/Stop\"});\n"
45666"        this._toggleButton.connect ('toggled', this._onToggle.bind(this));\n"
45667"\n"
45668"        // Create a grid and put everything in it\n"
45669"        this._grid = new Gtk.Grid ({\n"
45670"            row_homogeneous: false,\n"
45671"            row_spacing: 15});\n"
45672"        this._grid.attach (this._spinner, 0, 0, 1, 1);\n"
45673"        this._grid.attach (this._toggleButton, 0, 1, 1, 1);\n"
45674"\n"
45675"        // Add the grid to the window\n"
45676"        this._window.add (this._grid);\n"
45677"\n"
45678"        // Show the window and all child widgets\n"
45679"        this._window.show_all();\n"
45680"    }\n"
45681"\n"
45682"    _onToggle() {\n"
45683"\n"
45684"        // Start or stop the spinner\n"
45685"        if (this._toggleButton.get_active ())\n"
45686"            this._spinner.start ();\n"
45687"        else this._spinner.stop ();\n"
45688"\n"
45689"    }\n"
45690"};\n"
45691"\n"
45692"// Run the application\n"
45693"let app = new ToggleButtonExample ();\n"
45694"app.application.run (ARGV);\n"
45695msgstr ""
45696"#!/usr/bin/gjs\n"
45697"\n"
45698"imports.gi.versions.Gtk = '3.0';\n"
45699"\n"
45700"const Gio = imports.gi.Gio;\n"
45701"const Gtk = imports.gi.Gtk;\n"
45702"\n"
45703"class ToggleButtonExample {\n"
45704"\n"
45705"    // Create the application itself\n"
45706"    constructor() {\n"
45707"        this.application = new Gtk.Application({\n"
45708"            application_id: 'org.example.jstogglebutton',\n"
45709"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
45710"        });\n"
45711"\n"
45712"        // Connect 'activate' and 'startup' signals to the callback functions\n"
45713"        this.application.connect('activate', this._onActivate.bind(this));\n"
45714"        this.application.connect('startup', this._onStartup.bind(this));\n"
45715"    }\n"
45716"\n"
45717"    // Callback function for 'activate' signal presents window when active\n"
45718"    _onActivate() {\n"
45719"        this._window.present();\n"
45720"    }\n"
45721"\n"
45722"    // Callback function for 'startup' signal builds the UI\n"
45723"    _onStartup() {\n"
45724"        this._buildUI();\n"
45725"    }\n"
45726"\n"
45727"    // Build the application's UI\n"
45728"    _buildUI() {\n"
45729"\n"
45730"        // Create the application window\n"
45731"        this._window = new Gtk.ApplicationWindow({\n"
45732"            application: this.application,\n"
45733"            window_position: Gtk.WindowPosition.CENTER,\n"
45734"            default_height: 300,\n"
45735"            default_width: 300,\n"
45736"            border_width: 30,\n"
45737"            title: \"ToggleButton Example\"});\n"
45738"\n"
45739"        // Create the spinner that the button stops and starts\n"
45740"        this._spinner = new Gtk.Spinner ({hexpand: true, vexpand: true});\n"
45741"\n"
45742"        // Create the togglebutton that starts and stops the spinner\n"
45743"        this._toggleButton = new Gtk.ToggleButton ({label: \"Start/Stop\"});\n"
45744"        this._toggleButton.connect ('toggled', this._onToggle.bind(this));\n"
45745"\n"
45746"        // Create a grid and put everything in it\n"
45747"        this._grid = new Gtk.Grid ({\n"
45748"            row_homogeneous: false,\n"
45749"            row_spacing: 15});\n"
45750"        this._grid.attach (this._spinner, 0, 0, 1, 1);\n"
45751"        this._grid.attach (this._toggleButton, 0, 1, 1, 1);\n"
45752"\n"
45753"        // Add the grid to the window\n"
45754"        this._window.add (this._grid);\n"
45755"\n"
45756"        // Show the window and all child widgets\n"
45757"        this._window.show_all();\n"
45758"    }\n"
45759"\n"
45760"    _onToggle() {\n"
45761"\n"
45762"        // Start or stop the spinner\n"
45763"        if (this._toggleButton.get_active ())\n"
45764"            this._spinner.start ();\n"
45765"        else this._spinner.stop ();\n"
45766"\n"
45767"    }\n"
45768"};\n"
45769"\n"
45770"// Run the application\n"
45771"let app = new ToggleButtonExample ();\n"
45772"app.application.run (ARGV);\n"
45773
45774#. (itstool) path: item/p
45775#: C/togglebutton.js.page:159
45776msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ToggleButton.html\">Gtk.ToggleButton</link>"
45777msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ToggleButton.html\">Gtk.ToggleButton</link>"
45778
45779#. (itstool) path: info/title
45780#: C/togglebutton.py.page:8
45781msgctxt "text"
45782msgid "ToggleButton (Python)"
45783msgstr "ToggleButton (Python)"
45784
45785#. (itstool) path: section/code
45786#: C/togglebutton.py.page:31
45787#, no-wrap
45788msgid ""
45789"from gi.repository import Gtk\n"
45790"import sys\n"
45791"\n"
45792"\n"
45793"class MyWindow(Gtk.ApplicationWindow):\n"
45794"    # a window\n"
45795"\n"
45796"    def __init__(self, app):\n"
45797"        Gtk.Window.__init__(\n"
45798"            self, title=\"ToggleButton Example\", application=app)\n"
45799"        self.set_default_size(300, 300)\n"
45800"        self.set_border_width(30)\n"
45801"\n"
45802"        # a spinner animation\n"
45803"        self.spinner = Gtk.Spinner()\n"
45804"        # with extra horizontal space\n"
45805"        self.spinner.set_hexpand(True)\n"
45806"        # with extra vertical space\n"
45807"        self.spinner.set_vexpand(True)\n"
45808"\n"
45809"        # a togglebutton\n"
45810"        button = Gtk.ToggleButton.new_with_label(\"Start/Stop\")\n"
45811"        # connect the signal \"toggled\" emitted by the togglebutton\n"
45812"        # when its state is changed to the callback function toggled_cb\n"
45813"        button.connect(\"toggled\", self.toggled_cb)\n"
45814"\n"
45815"        # a grid to allocate the widgets\n"
45816"        grid = Gtk.Grid()\n"
45817"        grid.set_row_homogeneous(False)\n"
45818"        grid.set_row_spacing(15)\n"
45819"        grid.attach(self.spinner, 0, 0, 1, 1)\n"
45820"        grid.attach(button, 0, 1, 1, 1)\n"
45821"\n"
45822"        # add the grid to the window\n"
45823"        self.add(grid)\n"
45824"\n"
45825"    # callback function for the signal \"toggled\"\n"
45826"    def toggled_cb(self, button):\n"
45827"        # if the togglebutton is active, start the spinner\n"
45828"        if button.get_active():\n"
45829"            self.spinner.start()\n"
45830"        # else, stop it\n"
45831"        else:\n"
45832"            self.spinner.stop()\n"
45833"\n"
45834"\n"
45835"class MyApplication(Gtk.Application):\n"
45836"\n"
45837"    def __init__(self):\n"
45838"        Gtk.Application.__init__(self)\n"
45839"\n"
45840"    def do_activate(self):\n"
45841"        win = MyWindow(self)\n"
45842"        win.show_all()\n"
45843"\n"
45844"    def do_startup(self):\n"
45845"        Gtk.Application.do_startup(self)\n"
45846"\n"
45847"app = MyApplication()\n"
45848"exit_status = app.run(sys.argv)\n"
45849"sys.exit(exit_status)\n"
45850msgstr ""
45851"from gi.repository import Gtk\n"
45852"import sys\n"
45853"\n"
45854"\n"
45855"class MyWindow(Gtk.ApplicationWindow):\n"
45856"    # a window\n"
45857"\n"
45858"    def __init__(self, app):\n"
45859"        Gtk.Window.__init__(\n"
45860"            self, title=\"ToggleButton Example\", application=app)\n"
45861"        self.set_default_size(300, 300)\n"
45862"        self.set_border_width(30)\n"
45863"\n"
45864"        # a spinner animation\n"
45865"        self.spinner = Gtk.Spinner()\n"
45866"        # with extra horizontal space\n"
45867"        self.spinner.set_hexpand(True)\n"
45868"        # with extra vertical space\n"
45869"        self.spinner.set_vexpand(True)\n"
45870"\n"
45871"        # a togglebutton\n"
45872"        button = Gtk.ToggleButton.new_with_label(\"Start/Stop\")\n"
45873"        # connect the signal \"toggled\" emitted by the togglebutton\n"
45874"        # when its state is changed to the callback function toggled_cb\n"
45875"        button.connect(\"toggled\", self.toggled_cb)\n"
45876"\n"
45877"        # a grid to allocate the widgets\n"
45878"        grid = Gtk.Grid()\n"
45879"        grid.set_row_homogeneous(False)\n"
45880"        grid.set_row_spacing(15)\n"
45881"        grid.attach(self.spinner, 0, 0, 1, 1)\n"
45882"        grid.attach(button, 0, 1, 1, 1)\n"
45883"\n"
45884"        # add the grid to the window\n"
45885"        self.add(grid)\n"
45886"\n"
45887"    # callback function for the signal \"toggled\"\n"
45888"    def toggled_cb(self, button):\n"
45889"        # if the togglebutton is active, start the spinner\n"
45890"        if button.get_active():\n"
45891"            self.spinner.start()\n"
45892"        # else, stop it\n"
45893"        else:\n"
45894"            self.spinner.stop()\n"
45895"\n"
45896"\n"
45897"class MyApplication(Gtk.Application):\n"
45898"\n"
45899"    def __init__(self):\n"
45900"        Gtk.Application.__init__(self)\n"
45901"\n"
45902"    def do_activate(self):\n"
45903"        win = MyWindow(self)\n"
45904"        win.show_all()\n"
45905"\n"
45906"    def do_startup(self):\n"
45907"        Gtk.Application.do_startup(self)\n"
45908"\n"
45909"app = MyApplication()\n"
45910"exit_status = app.run(sys.argv)\n"
45911"sys.exit(exit_status)\n"
45912
45913#. (itstool) path: section/title
45914#: C/togglebutton.py.page:36
45915msgid "Useful methods for a ToggleButton widget"
45916msgstr "ToggleButton 위젯에 쓸만한 메서드"
45917
45918#. (itstool) path: section/p
45919#: C/togglebutton.py.page:37
45920msgid ""
45921"In line 22 the signal <code>\"toggled\"</code> is connected to the callback function <code>toggled_cb()</code> "
45922"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
45923"\"signals-callbacks.py\"/> for a more detailed explanation."
45924msgstr ""
45925"22번째 줄에서 <code>\"toggled\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
45926"function</var>)</code> 함수로  <code>toggled_cb()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
45927"\"signals-callbacks.py\"/>를 참조하십시오."
45928
45929#. (itstool) path: item/p
45930#: C/togglebutton.py.page:45 C/toolbar.py.page:60 C/toolbar_builder.py.page:198 C/widget_drawing.py.page:38
45931msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkWidget.html\">GtkWidget</link>"
45932msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkWidget.html\">GtkWidget</link>"
45933
45934#. (itstool) path: info/title
45935#: C/togglebutton.vala.page:8
45936msgctxt "text"
45937msgid "ToggleButton (Vala)"
45938msgstr "ToggleButton (Vala)"
45939
45940#. (itstool) path: page/code
45941#: C/togglebutton.vala.page:28
45942#, no-wrap
45943msgid ""
45944"public class MyWindow : Gtk.ApplicationWindow {\n"
45945"\n"
45946"\tGtk.Spinner spinner;\n"
45947"\n"
45948"\tinternal MyWindow (MyApplication app) {\n"
45949"\t\tObject (application: app, title: \"ToggleButton Example\");\n"
45950"\n"
45951"\t\tthis.set_default_size (300, 300);\n"
45952"\t\tthis.border_width = 30;\n"
45953"\n"
45954"\t\t/*Spinner*/\n"
45955"\t\tspinner = new Gtk.Spinner ();\n"
45956"\t\tspinner.set_hexpand (true);\n"
45957"\t\tspinner.set_vexpand (true);\n"
45958"\n"
45959"\t\t/*ToggleButton*/\n"
45960"\t\tvar togglebutton = new Gtk.ToggleButton.with_label (\"Start/Stop\");\n"
45961"\t\ttogglebutton.toggled.connect (toggled_cb);\n"
45962"\n"
45963"\t\t/*Grid*/\n"
45964"\t\tvar grid = new Gtk.Grid ();\n"
45965"\t\tgrid.set_row_homogeneous (false);\n"
45966"\t\tgrid.set_row_spacing (15);\n"
45967"\t\tgrid.attach (spinner, 0, 0, 1, 1);\n"
45968"\t\tgrid.attach (togglebutton, 0, 1, 1, 1);\n"
45969"\n"
45970"\t\tthis.add (grid);\n"
45971"\t}\n"
45972"\n"
45973"\tvoid toggled_cb (Gtk.ToggleButton button) {\n"
45974"\t\tif (button.get_active()) {\n"
45975"\t\t\tspinner.start ();\n"
45976"\t\t}\n"
45977"\t\telse {\n"
45978"\t\t\tspinner.stop ();\n"
45979"\t\t}\n"
45980"\t}\n"
45981"}\n"
45982"\n"
45983"public class MyApplication : Gtk.Application {\n"
45984"\n"
45985"\tprotected override void activate () {\n"
45986"\n"
45987"\t\t//Show all the things\n"
45988"\t\tnew MyWindow (this).show_all ();\n"
45989"\t}\n"
45990"\n"
45991"\tinternal MyApplication () {\n"
45992"\t\tObject (application_id: \"org.example.spinner\");\n"
45993"\t}\n"
45994"}\n"
45995"\n"
45996"public int main (string[] args) {\n"
45997"\treturn new MyApplication ().run (args);\n"
45998"}\n"
45999msgstr ""
46000"public class MyWindow : Gtk.ApplicationWindow {\n"
46001"\n"
46002"\tGtk.Spinner spinner;\n"
46003"\n"
46004"\tinternal MyWindow (MyApplication app) {\n"
46005"\t\tObject (application: app, title: \"ToggleButton Example\");\n"
46006"\n"
46007"\t\tthis.set_default_size (300, 300);\n"
46008"\t\tthis.border_width = 30;\n"
46009"\n"
46010"\t\t/*Spinner*/\n"
46011"\t\tspinner = new Gtk.Spinner ();\n"
46012"\t\tspinner.set_hexpand (true);\n"
46013"\t\tspinner.set_vexpand (true);\n"
46014"\n"
46015"\t\t/*ToggleButton*/\n"
46016"\t\tvar togglebutton = new Gtk.ToggleButton.with_label (\"Start/Stop\");\n"
46017"\t\ttogglebutton.toggled.connect (toggled_cb);\n"
46018"\n"
46019"\t\t/*Grid*/\n"
46020"\t\tvar grid = new Gtk.Grid ();\n"
46021"\t\tgrid.set_row_homogeneous (false);\n"
46022"\t\tgrid.set_row_spacing (15);\n"
46023"\t\tgrid.attach (spinner, 0, 0, 1, 1);\n"
46024"\t\tgrid.attach (togglebutton, 0, 1, 1, 1);\n"
46025"\n"
46026"\t\tthis.add (grid);\n"
46027"\t}\n"
46028"\n"
46029"\tvoid toggled_cb (Gtk.ToggleButton button) {\n"
46030"\t\tif (button.get_active()) {\n"
46031"\t\t\tspinner.start ();\n"
46032"\t\t}\n"
46033"\t\telse {\n"
46034"\t\t\tspinner.stop ();\n"
46035"\t\t}\n"
46036"\t}\n"
46037"}\n"
46038"\n"
46039"public class MyApplication : Gtk.Application {\n"
46040"\n"
46041"\tprotected override void activate () {\n"
46042"\n"
46043"\t\t//Show all the things\n"
46044"\t\tnew MyWindow (this).show_all ();\n"
46045"\t}\n"
46046"\n"
46047"\tinternal MyApplication () {\n"
46048"\t\tObject (application_id: \"org.example.spinner\");\n"
46049"\t}\n"
46050"}\n"
46051"\n"
46052"public int main (string[] args) {\n"
46053"\treturn new MyApplication ().run (args);\n"
46054"}\n"
46055
46056#. (itstool) path: item/p
46057#: C/togglebutton.vala.page:33
46058msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ToggleButton.html\">Gtk.ToggleButton</link>"
46059msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ToggleButton.html\">Gtk.ToggleButton</link>"
46060
46061#. (itstool) path: info/title
46062#: C/toolbar.c.page:8
46063msgctxt "text"
46064msgid "Toolbar (C)"
46065msgstr "Toolbar (C)"
46066
46067#. (itstool) path: info/desc
46068#: C/toolbar.c.page:20 C/toolbar.vala.page:19 C/toolbar_builder.vala.page:20
46069msgid "A bar of buttons"
46070msgstr "단추 표시줄"
46071
46072#. (itstool) path: page/title
46073#: C/toolbar.c.page:23 C/toolbar.js.page:21 C/toolbar.py.page:23 C/toolbar.vala.page:22
46074msgid "Toolbar"
46075msgstr "Toolbar"
46076
46077#. (itstool) path: page/media
46078#. This is a reference to an external file such as an image or video. When
46079#. the file changes, the md5 hash will change to let you know you need to
46080#. update your localized copy. The msgstr is not used at all. Set it to
46081#. whatever you like once you have updated your copy of the file.
46082#: C/toolbar.c.page:25 C/toolbar.js.page:22 C/toolbar.py.page:25 C/toolbar.vala.page:24 C/toolbar_builder.py.page:38
46083#: C/toolbar_builder.vala.page:25
46084msgctxt "_"
46085msgid "external ref='media/toolbar.png' md5='f0350855eedf6343952b72d6d906f738'"
46086msgstr ""
46087
46088#. (itstool) path: page/p
46089#: C/toolbar.c.page:26 C/toolbar.js.page:23 C/toolbar.vala.page:25
46090msgid ""
46091"Toolbar can contain either text or stock icons. In this sample we use stock icons. This example has fullscreen "
46092"functionality."
46093msgstr ""
46094"Toolbar에는 텍스트나 스톡 아이콘을 넣을 수 있습니다. 이 예제에서는 스톡 아이콘을 사용하겠습니다. 이 예제에는 전체 "
46095"화면 기능이 있습니다."
46096
46097#. (itstool) path: page/p
46098#: C/toolbar.c.page:27
46099msgid "This example uses SimpleActions (window and app). App actions can easily be added to the app menu."
46100msgstr "SimpleAction(창과 앱)을 활용하는 예제입니다. 앱 동작은 앱 메뉴에서 쉽게 추가할 수 있습니다."
46101
46102#. (itstool) path: page/code
46103#: C/toolbar.c.page:29
46104#, no-wrap
46105msgid ""
46106"\n"
46107"#include &lt;gtk/gtk.h&gt;\n"
46108"\n"
46109"/* Declare these two Toolbuttons, as they will be used in both the fullscreen\n"
46110" * action callback as well as the activate function.\n"
46111" */\n"
46112"GtkToolItem *fullscreen_button;\n"
46113"GtkToolItem *leavefullscreen_button;\n"
46114"\n"
46115"\n"
46116"\n"
46117"/* Callback function for the undo action */\n"
46118"static void\n"
46119"undo_callback (GSimpleAction *simple,\n"
46120"               GVariant      *parameter,\n"
46121"               gpointer       user_data)\n"
46122"{\n"
46123"  g_print (\"You clicked \\\"Undo\\\".\\n\");\n"
46124"}\n"
46125"\n"
46126"\n"
46127"\n"
46128"/* Callback function for the fullscreen action */\n"
46129"static void\n"
46130"fullscreen_callback (GSimpleAction *simple,\n"
46131"                     GVariant      *parameter,\n"
46132"                     gpointer       user_data)\n"
46133"{\n"
46134"  GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (user_data));\n"
46135"\n"
46136"  GdkWindowState current_state = gdk_window_get_state (window);\n"
46137"\n"
46138"  /* If the window is currently in fullscreen mode */\n"
46139"  if ( (current_state &amp; GDK_WINDOW_STATE_FULLSCREEN) != 0)\n"
46140"    {\n"
46141"      /* Minimize the window and change to the fullscreen button */\n"
46142"      gdk_window_unfullscreen (window);\n"
46143"      gtk_widget_hide (GTK_WIDGET(leavefullscreen_button));\n"
46144"      gtk_widget_show (GTK_WIDGET(fullscreen_button));\n"
46145"    }\n"
46146"  else\n"
46147"    {\n"
46148"      /* Maximize the window, and change to the unfullscreen button */\n"
46149"      gdk_window_fullscreen (window);\n"
46150"      gtk_widget_hide (GTK_WIDGET (fullscreen_button));\n"
46151"      gtk_widget_show (GTK_WIDGET (leavefullscreen_button));\n"
46152"    }\n"
46153"}\n"
46154"\n"
46155"\n"
46156"static void\n"
46157"activate (GtkApplication *app,\n"
46158"          gpointer        user_data)\n"
46159"{\n"
46160"  /* Initialize variables */\n"
46161"  GtkWidget *window;\n"
46162"  GtkWidget *grid;\n"
46163"  GtkWidget *toolbar;\n"
46164"\n"
46165"  GtkToolItem *new_button;\n"
46166"  GtkToolItem *open_button;\n"
46167"  GtkToolItem *undo_button;\n"
46168"\n"
46169"  GtkStyleContext *style_context;\n"
46170"\n"
46171"  GSimpleAction *undo_action;\n"
46172"  GSimpleAction *fullscreen_action;\n"
46173"  GSimpleAction *leavefullscreen_action;\n"
46174"\n"
46175"  /* Create a window with a title and a default size */\n"
46176"  window = gtk_application_window_new (app);\n"
46177"  gtk_window_set_title (GTK_WINDOW (window), \"Toolbar Example\");\n"
46178"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 200);\n"
46179"\n"
46180"  /* Here we begin to create the toolbar */\n"
46181"  toolbar = gtk_toolbar_new ();\n"
46182"  /* Set the toolbar to be the primary toolbar of the application */\n"
46183"  style_context = gtk_widget_get_style_context (toolbar);\n"
46184"  gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);\n"
46185"\n"
46186"  /* Create a button for the \"new\" action, with a stock image */\n"
46187"  new_button = gtk_tool_button_new_from_stock (GTK_STOCK_NEW);\n"
46188"  /* Show the \"new\" button's label */\n"
46189"  gtk_tool_item_set_is_important (new_button, TRUE);\n"
46190"  /* Insert the button in the desired position within the toolbar */\n"
46191"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), new_button, 0);\n"
46192"  /* Show the button */\n"
46193"  gtk_widget_show (GTK_WIDGET (new_button));\n"
46194"  /* Set the action name for the \"new\" action. We use \"app.new\" to\n"
46195"   * indicate that the action controls the application.\n"
46196"   */\n"
46197"  gtk_actionable_set_action_name (GTK_ACTIONABLE (new_button), \"app.new\");\n"
46198"\n"
46199"  /* Repeat the same steps for the \"open\" action */\n"
46200"  open_button = gtk_tool_button_new_from_stock (GTK_STOCK_OPEN);\n"
46201"  gtk_tool_item_set_is_important (open_button, TRUE);\n"
46202"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), open_button, 1);\n"
46203"  gtk_widget_show (GTK_WIDGET (open_button));\n"
46204"  gtk_actionable_set_action_name (GTK_ACTIONABLE (open_button), \"app.open\");\n"
46205"\n"
46206"  /* Repeat the same steps for the \"undo\" action */\n"
46207"  undo_button = gtk_tool_button_new_from_stock (GTK_STOCK_UNDO);\n"
46208"  gtk_tool_item_set_is_important (undo_button, TRUE);\n"
46209"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), undo_button, 2);\n"
46210"  gtk_widget_show (GTK_WIDGET (undo_button));\n"
46211"  /* In this case, we use \"win.undo\" to indicate that\n"
46212"   * the action controls only the window\n"
46213"   */\n"
46214"  gtk_actionable_set_action_name (GTK_ACTIONABLE (undo_button), \"win.undo\");\n"
46215"\n"
46216"  /* Repeat the same steps for the \"fullscreen\" action */\n"
46217"  fullscreen_button = gtk_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN);\n"
46218"  gtk_tool_item_set_is_important (fullscreen_button, TRUE);\n"
46219"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), fullscreen_button, 3);\n"
46220"  gtk_widget_show (GTK_WIDGET (fullscreen_button));\n"
46221"  gtk_actionable_set_action_name (GTK_ACTIONABLE (fullscreen_button),\n"
46222"                                  \"win.fullscreen\");\n"
46223"\n"
46224"  /*Repeat the same steps for the \"leavefullscreen\" action */\n"
46225"  leavefullscreen_button = gtk_tool_button_new_from_stock (GTK_STOCK_LEAVE_FULLSCREEN);\n"
46226"  gtk_tool_item_set_is_important (leavefullscreen_button, TRUE);\n"
46227"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), leavefullscreen_button, 3);\n"
46228"  /* The only difference here is that we don't show the leavefullscreen button,\n"
46229"   * as it will later replace the fullscreen button.\n"
46230"   */\n"
46231"  gtk_actionable_set_action_name (GTK_ACTIONABLE (leavefullscreen_button),\n"
46232"                                  \"win.leavefullscreen\");\n"
46233"\n"
46234"  /* Once we've created the bare-bones of the toolbar, we make\n"
46235"   * sure it has enough horizontal space.\n"
46236"   */\n"
46237"  gtk_widget_set_hexpand (toolbar, TRUE);\n"
46238"  gtk_widget_show (toolbar);\n"
46239"\n"
46240"  /* Attach the toolbar to the grid and add it to the overall window */\n"
46241"  grid = gtk_grid_new ();\n"
46242"  gtk_grid_attach (GTK_GRID (grid), toolbar, 0, 0, 1, 1);\n"
46243"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
46244"  gtk_widget_show (GTK_WIDGET (grid));\n"
46245"\n"
46246"  /* Use the action names to create the actions that control the window, and\n"
46247"   * connect them to the appropriate callbackfunctions.\n"
46248"   */\n"
46249"  undo_action = g_simple_action_new (\"undo\", NULL);\n"
46250"  g_signal_connect (undo_action, \"activate\", G_CALLBACK (undo_callback),\n"
46251"                    GTK_WINDOW (window));\n"
46252"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (undo_action));\n"
46253"\n"
46254"  fullscreen_action = g_simple_action_new (\"fullscreen\", NULL);\n"
46255"  g_signal_connect (fullscreen_action, \"activate\", G_CALLBACK (fullscreen_callback),\n"
46256"                    GTK_WINDOW (window));\n"
46257"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (fullscreen_action));\n"
46258"\n"
46259"  leavefullscreen_action = g_simple_action_new (\"leavefullscreen\", NULL);\n"
46260"  g_signal_connect (leavefullscreen_action, \"activate\", G_CALLBACK (fullscreen_callback),\n"
46261"                    GTK_WINDOW (window));\n"
46262"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (leavefullscreen_action));\n"
46263"\n"
46264"  gtk_widget_show (window);\n"
46265"}\n"
46266"\n"
46267"\n"
46268"\n"
46269"/* Callback function for the new action */\n"
46270"static void\n"
46271"new_callback (GSimpleAction *simple,\n"
46272"              GVariant      *parameter,\n"
46273"              gpointer       user_data)\n"
46274"{\n"
46275"  g_print (\"You clicked \\\"New\\\".\\n\");\n"
46276"}\n"
46277"\n"
46278"\n"
46279"\n"
46280"/* Callback function for the open action */\n"
46281"static void\n"
46282"open_callback (GSimpleAction *simple,\n"
46283"               GVariant      *parameter,\n"
46284"               gpointer       user_data)\n"
46285"{\n"
46286"  g_print (\"You clicked \\\"Open\\\".\\n\");\n"
46287"}\n"
46288"\n"
46289"\n"
46290"\n"
46291"/* In this function, we create the actions in which control the window, and\n"
46292" * connect their signals to the appropriate callback function.\n"
46293" */\n"
46294"static void\n"
46295"startup (GApplication *app,\n"
46296"         gpointer      user_data)\n"
46297"{\n"
46298"  GSimpleAction *new_action;\n"
46299"  GSimpleAction *open_action;\n"
46300"\n"
46301"  new_action = g_simple_action_new (\"new\", NULL);\n"
46302"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
46303"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
46304"\n"
46305"  open_action = g_simple_action_new (\"open\", NULL);\n"
46306"  g_signal_connect (open_action, \"activate\", G_CALLBACK (open_callback), app);\n"
46307"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (open_action));\n"
46308"}\n"
46309"\n"
46310"\n"
46311"\n"
46312"/* Startup function for the application */\n"
46313"int\n"
46314"main (int argc, char **argv)\n"
46315"{\n"
46316"  GtkApplication *app;\n"
46317"  int status;\n"
46318"\n"
46319"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
46320"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
46321"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
46322"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
46323"  g_object_unref (app);\n"
46324"\n"
46325"  return status;\n"
46326"}\n"
46327msgstr ""
46328"\n"
46329"#include &lt;gtk/gtk.h&gt;\n"
46330"\n"
46331"/* Declare these two Toolbuttons, as they will be used in both the fullscreen\n"
46332" * action callback as well as the activate function.\n"
46333" */\n"
46334"GtkToolItem *fullscreen_button;\n"
46335"GtkToolItem *leavefullscreen_button;\n"
46336"\n"
46337"\n"
46338"\n"
46339"/* Callback function for the undo action */\n"
46340"static void\n"
46341"undo_callback (GSimpleAction *simple,\n"
46342"               GVariant      *parameter,\n"
46343"               gpointer       user_data)\n"
46344"{\n"
46345"  g_print (\"You clicked \\\"Undo\\\".\\n\");\n"
46346"}\n"
46347"\n"
46348"\n"
46349"\n"
46350"/* Callback function for the fullscreen action */\n"
46351"static void\n"
46352"fullscreen_callback (GSimpleAction *simple,\n"
46353"                     GVariant      *parameter,\n"
46354"                     gpointer       user_data)\n"
46355"{\n"
46356"  GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (user_data));\n"
46357"\n"
46358"  GdkWindowState current_state = gdk_window_get_state (window);\n"
46359"\n"
46360"  /* If the window is currently in fullscreen mode */\n"
46361"  if ( (current_state &amp; GDK_WINDOW_STATE_FULLSCREEN) != 0)\n"
46362"    {\n"
46363"      /* Minimize the window and change to the fullscreen button */\n"
46364"      gdk_window_unfullscreen (window);\n"
46365"      gtk_widget_hide (GTK_WIDGET(leavefullscreen_button));\n"
46366"      gtk_widget_show (GTK_WIDGET(fullscreen_button));\n"
46367"    }\n"
46368"  else\n"
46369"    {\n"
46370"      /* Maximize the window, and change to the unfullscreen button */\n"
46371"      gdk_window_fullscreen (window);\n"
46372"      gtk_widget_hide (GTK_WIDGET (fullscreen_button));\n"
46373"      gtk_widget_show (GTK_WIDGET (leavefullscreen_button));\n"
46374"    }\n"
46375"}\n"
46376"\n"
46377"\n"
46378"static void\n"
46379"activate (GtkApplication *app,\n"
46380"          gpointer        user_data)\n"
46381"{\n"
46382"  /* Initialize variables */\n"
46383"  GtkWidget *window;\n"
46384"  GtkWidget *grid;\n"
46385"  GtkWidget *toolbar;\n"
46386"\n"
46387"  GtkToolItem *new_button;\n"
46388"  GtkToolItem *open_button;\n"
46389"  GtkToolItem *undo_button;\n"
46390"\n"
46391"  GtkStyleContext *style_context;\n"
46392"\n"
46393"  GSimpleAction *undo_action;\n"
46394"  GSimpleAction *fullscreen_action;\n"
46395"  GSimpleAction *leavefullscreen_action;\n"
46396"\n"
46397"  /* Create a window with a title and a default size */\n"
46398"  window = gtk_application_window_new (app);\n"
46399"  gtk_window_set_title (GTK_WINDOW (window), \"Toolbar Example\");\n"
46400"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 200);\n"
46401"\n"
46402"  /* Here we begin to create the toolbar */\n"
46403"  toolbar = gtk_toolbar_new ();\n"
46404"  /* Set the toolbar to be the primary toolbar of the application */\n"
46405"  style_context = gtk_widget_get_style_context (toolbar);\n"
46406"  gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);\n"
46407"\n"
46408"  /* Create a button for the \"new\" action, with a stock image */\n"
46409"  new_button = gtk_tool_button_new_from_stock (GTK_STOCK_NEW);\n"
46410"  /* Show the \"new\" button's label */\n"
46411"  gtk_tool_item_set_is_important (new_button, TRUE);\n"
46412"  /* Insert the button in the desired position within the toolbar */\n"
46413"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), new_button, 0);\n"
46414"  /* Show the button */\n"
46415"  gtk_widget_show (GTK_WIDGET (new_button));\n"
46416"  /* Set the action name for the \"new\" action. We use \"app.new\" to\n"
46417"   * indicate that the action controls the application.\n"
46418"   */\n"
46419"  gtk_actionable_set_action_name (GTK_ACTIONABLE (new_button), \"app.new\");\n"
46420"\n"
46421"  /* Repeat the same steps for the \"open\" action */\n"
46422"  open_button = gtk_tool_button_new_from_stock (GTK_STOCK_OPEN);\n"
46423"  gtk_tool_item_set_is_important (open_button, TRUE);\n"
46424"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), open_button, 1);\n"
46425"  gtk_widget_show (GTK_WIDGET (open_button));\n"
46426"  gtk_actionable_set_action_name (GTK_ACTIONABLE (open_button), \"app.open\");\n"
46427"\n"
46428"  /* Repeat the same steps for the \"undo\" action */\n"
46429"  undo_button = gtk_tool_button_new_from_stock (GTK_STOCK_UNDO);\n"
46430"  gtk_tool_item_set_is_important (undo_button, TRUE);\n"
46431"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), undo_button, 2);\n"
46432"  gtk_widget_show (GTK_WIDGET (undo_button));\n"
46433"  /* In this case, we use \"win.undo\" to indicate that\n"
46434"   * the action controls only the window\n"
46435"   */\n"
46436"  gtk_actionable_set_action_name (GTK_ACTIONABLE (undo_button), \"win.undo\");\n"
46437"\n"
46438"  /* Repeat the same steps for the \"fullscreen\" action */\n"
46439"  fullscreen_button = gtk_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN);\n"
46440"  gtk_tool_item_set_is_important (fullscreen_button, TRUE);\n"
46441"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), fullscreen_button, 3);\n"
46442"  gtk_widget_show (GTK_WIDGET (fullscreen_button));\n"
46443"  gtk_actionable_set_action_name (GTK_ACTIONABLE (fullscreen_button),\n"
46444"                                  \"win.fullscreen\");\n"
46445"\n"
46446"  /*Repeat the same steps for the \"leavefullscreen\" action */\n"
46447"  leavefullscreen_button = gtk_tool_button_new_from_stock (GTK_STOCK_LEAVE_FULLSCREEN);\n"
46448"  gtk_tool_item_set_is_important (leavefullscreen_button, TRUE);\n"
46449"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), leavefullscreen_button, 3);\n"
46450"  /* The only difference here is that we don't show the leavefullscreen button,\n"
46451"   * as it will later replace the fullscreen button.\n"
46452"   */\n"
46453"  gtk_actionable_set_action_name (GTK_ACTIONABLE (leavefullscreen_button),\n"
46454"                                  \"win.leavefullscreen\");\n"
46455"\n"
46456"  /* Once we've created the bare-bones of the toolbar, we make\n"
46457"   * sure it has enough horizontal space.\n"
46458"   */\n"
46459"  gtk_widget_set_hexpand (toolbar, TRUE);\n"
46460"  gtk_widget_show (toolbar);\n"
46461"\n"
46462"  /* Attach the toolbar to the grid and add it to the overall window */\n"
46463"  grid = gtk_grid_new ();\n"
46464"  gtk_grid_attach (GTK_GRID (grid), toolbar, 0, 0, 1, 1);\n"
46465"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
46466"  gtk_widget_show (GTK_WIDGET (grid));\n"
46467"\n"
46468"  /* Use the action names to create the actions that control the window, and\n"
46469"   * connect them to the appropriate callbackfunctions.\n"
46470"   */\n"
46471"  undo_action = g_simple_action_new (\"undo\", NULL);\n"
46472"  g_signal_connect (undo_action, \"activate\", G_CALLBACK (undo_callback),\n"
46473"                    GTK_WINDOW (window));\n"
46474"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (undo_action));\n"
46475"\n"
46476"  fullscreen_action = g_simple_action_new (\"fullscreen\", NULL);\n"
46477"  g_signal_connect (fullscreen_action, \"activate\", G_CALLBACK (fullscreen_callback),\n"
46478"                    GTK_WINDOW (window));\n"
46479"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (fullscreen_action));\n"
46480"\n"
46481"  leavefullscreen_action = g_simple_action_new (\"leavefullscreen\", NULL);\n"
46482"  g_signal_connect (leavefullscreen_action, \"activate\", G_CALLBACK (fullscreen_callback),\n"
46483"                    GTK_WINDOW (window));\n"
46484"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (leavefullscreen_action));\n"
46485"\n"
46486"  gtk_widget_show (window);\n"
46487"}\n"
46488"\n"
46489"\n"
46490"\n"
46491"/* Callback function for the new action */\n"
46492"static void\n"
46493"new_callback (GSimpleAction *simple,\n"
46494"              GVariant      *parameter,\n"
46495"              gpointer       user_data)\n"
46496"{\n"
46497"  g_print (\"You clicked \\\"New\\\".\\n\");\n"
46498"}\n"
46499"\n"
46500"\n"
46501"\n"
46502"/* Callback function for the open action */\n"
46503"static void\n"
46504"open_callback (GSimpleAction *simple,\n"
46505"               GVariant      *parameter,\n"
46506"               gpointer       user_data)\n"
46507"{\n"
46508"  g_print (\"You clicked \\\"Open\\\".\\n\");\n"
46509"}\n"
46510"\n"
46511"\n"
46512"\n"
46513"/* In this function, we create the actions in which control the window, and\n"
46514" * connect their signals to the appropriate callback function.\n"
46515" */\n"
46516"static void\n"
46517"startup (GApplication *app,\n"
46518"         gpointer      user_data)\n"
46519"{\n"
46520"  GSimpleAction *new_action;\n"
46521"  GSimpleAction *open_action;\n"
46522"\n"
46523"  new_action = g_simple_action_new (\"new\", NULL);\n"
46524"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
46525"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
46526"\n"
46527"  open_action = g_simple_action_new (\"open\", NULL);\n"
46528"  g_signal_connect (open_action, \"activate\", G_CALLBACK (open_callback), app);\n"
46529"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (open_action));\n"
46530"}\n"
46531"\n"
46532"\n"
46533"\n"
46534"/* Startup function for the application */\n"
46535"int\n"
46536"main (int argc, char **argv)\n"
46537"{\n"
46538"  GtkApplication *app;\n"
46539"  int status;\n"
46540"\n"
46541"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
46542"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
46543"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
46544"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
46545"  g_object_unref (app);\n"
46546"\n"
46547"  return status;\n"
46548"}\n"
46549
46550#. (itstool) path: item/p
46551#: C/toolbar.c.page:35 C/tooltip.c.page:39 C/tooltip.py.page:60
46552msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkToolbar.html\">GtkToolbar</link>"
46553msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkToolbar.html\">GtkToolbar</link>"
46554
46555#. (itstool) path: item/p
46556#: C/toolbar.c.page:36
46557msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkToolButton.html\">GtkToolbutton</link>"
46558msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkToolButton.html\">GtkToolbutton</link>"
46559
46560#. (itstool) path: info/title
46561#: C/toolbar.js.page:8
46562msgctxt "text"
46563msgid "Toolbar (JavaScript)"
46564msgstr "Toolbar (JavaScript)"
46565
46566#. (itstool) path: info/desc
46567#: C/toolbar.js.page:18
46568msgid "A bar of tools"
46569msgstr "도구 표시줄"
46570
46571#. (itstool) path: page/p
46572#: C/toolbar.js.page:24 C/toolbar.vala.page:26
46573msgid "This example uses SimpleActions (window and app). App actions can easily be added the the app menu."
46574msgstr "SimpleAction(창과 앱)을 활용하는 예제입니다. 앱 동작은 앱 메뉴에서 쉽게 추가할 수 있습니다."
46575
46576#. (itstool) path: page/code
46577#: C/toolbar.js.page:26
46578#, no-wrap
46579msgid ""
46580"#!/usr/bin/gjs\n"
46581"\n"
46582"imports.gi.versions.Gdk = '3.0';\n"
46583"imports.gi.versions.Gtk = '3.0';\n"
46584"\n"
46585"const Gdk = imports.gi.Gdk;\n"
46586"const Gio = imports.gi.Gio;\n"
46587"const GLib = imports.gi.GLib;\n"
46588"const Gtk = imports.gi.Gtk;\n"
46589"\n"
46590"class Application {\n"
46591"\n"
46592"    //create the application\n"
46593"    constructor() {\n"
46594"        this.application = new Gtk.Application({\n"
46595"            application_id: 'org.example.myapp',\n"
46596"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
46597"        });\n"
46598"\n"
46599"       //connect to 'activate' and 'startup' signals to the callback functions\n"
46600"       this.application.connect('activate', this._onActivate.bind(this));\n"
46601"       this.application.connect('startup', this._onStartup.bind(this));\n"
46602"    }\n"
46603"\n"
46604"    //create the UI (in this case it's just the ApplicationWindow\n"
46605"    _buildUI() {\n"
46606"        this._window = new Gtk.ApplicationWindow({\n"
46607"            application: this.application,\n"
46608"            window_position: Gtk.WindowPosition.CENTER,\n"
46609"            title: \"Toolbar Example\",\n"
46610"            default_height: 200,\n"
46611"            default_width: 400\n"
46612"        });\n"
46613"\n"
46614"        this._grid = new Gtk.Grid();\n"
46615"        this._window.add(this._grid);\n"
46616"        this._grid.show();\n"
46617"\n"
46618"        this._createToolbar();\n"
46619"        this._toolbar.set_hexpand(true);\n"
46620"        this._grid.attach(this._toolbar, 0, 0, 1, 1);\n"
46621"\n"
46622"        //show the  toolbar and window\n"
46623"        this._toolbar.show();\n"
46624"        this._window.show();\n"
46625"    }\n"
46626"\n"
46627"    //callback function for 'activate' signal\n"
46628"    _onActivate() {\n"
46629"        this._window.present();\n"
46630"    }\n"
46631"\n"
46632"    //callback function for 'startup' signal\n"
46633"    _onStartup() {\n"
46634"        this._initMenus();\n"
46635"        this._buildUI();\n"
46636"    }\n"
46637"\n"
46638"    //create the toolbar, its toolbuttons and their actions\n"
46639"    _createToolbar() {\n"
46640"\n"
46641"        this._toolbar = new Gtk.Toolbar();\n"
46642"        this._toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
46643"\n"
46644"        //create the \"New\" ToolButton and its SimpleAction.\n"
46645"        //Using actions allows you to add them to the app menu\n"
46646"        //without duplicating code.\n"
46647"        let newAction = new Gio.SimpleAction({ name: 'new'});\n"
46648"        newAction.connect('activate', () =&gt; { this._newCB(); });\n"
46649"        this.application.add_action(newAction);//note: this action is added to the app\n"
46650"\n"
46651"        this._newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
46652"        this._newButton.is_important = true;\n"
46653"        this._toolbar.add(this._newButton);\n"
46654"        this._newButton.show();\n"
46655"        this._newButton.action_name = \"app.new\";\n"
46656"\n"
46657"        //create the \"Open\" ToolButton and its SimpleAction\n"
46658"        let openAction = new Gio.SimpleAction({ name: 'open'});\n"
46659"        openAction.connect('activate', () =&gt; { this._openCB(); });\n"
46660"        this.application.add_action(openAction);\n"
46661"\n"
46662"        this._openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
46663"        this._openButton.is_important = true;\n"
46664"        this._toolbar.add(this._openButton);\n"
46665"        this._openButton.show();\n"
46666"        this._openButton.action_name = \"app.open\";\n"
46667"\n"
46668"        //create the \"Undo\" ToolButton and its SimpleAction\n"
46669"        let undoAction = new Gio.SimpleAction({ name: 'undo'});\n"
46670"        undoAction.connect('activate', () =&gt; { this._undoCB(); });\n"
46671"        this._window.add_action(undoAction);//note this action is added to the window\n"
46672"\n"
46673"        this._undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
46674"        this._undoButton.is_important = true;\n"
46675"        this._toolbar.add(this._undoButton);\n"
46676"        this._undoButton.show();\n"
46677"        this._undoButton.action_name = \"win.undo\";\n"
46678"\n"
46679"        //create the \"Fullscreen\" ToolButton and its SimpleAction\n"
46680"        let fullscreenToggleAction = new Gio.SimpleAction ({ name: 'fullscreenToggle' });\n"
46681"        fullscreenToggleAction.connect('activate', () =&gt; {\n"
46682"            this._fullscreenToggleCB();\n"
46683"        });\n"
46684"        this._window.add_action(fullscreenToggleAction);\n"
46685"\n"
46686"        this._fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
46687"        this._fullscreenButton.is_important = true;\n"
46688"        this._toolbar.add(this._fullscreenButton);\n"
46689"        this._fullscreenButton.show();\n"
46690"        this._fullscreenButton.action_name = \"win.fullscreenToggle\";\n"
46691"\n"
46692"        //create the \"leaveFullscreen\" ToolButton, and set the action name to \"win.fullscreenToggle\"\n"
46693"        this._leaveFullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
46694"        this._leaveFullscreenButton.is_important = true;\n"
46695"        this._toolbar.add(this._leaveFullscreenButton);\n"
46696"        this._leaveFullscreenButton.action_name = \"win.fullscreenToggle\";\n"
46697"    }\n"
46698"\n"
46699"    _initMenus() {\n"
46700"        let menu = new Gio.Menu();\n"
46701"        menu.append(\"New\", 'app.new');\n"
46702"        menu.append(\"Open\", 'app.open');\n"
46703"        menu.append(\"Quit\", 'app.quit');\n"
46704"\n"
46705"        this.application.set_app_menu(menu);\n"
46706"\n"
46707"        let quitAction = new Gio.SimpleAction({name: 'quit' });\n"
46708"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
46709"        this.application.add_action(quitAction);\n"
46710"    }\n"
46711"\n"
46712"    _newCB() {\n"
46713"        print(\"You clicked 'New'.\");\n"
46714"    }\n"
46715"\n"
46716"    _openCB() {\n"
46717"        print(\"You clicked 'Open'.\");\n"
46718"    }\n"
46719"\n"
46720"    _undoCB() {\n"
46721"        print (\"You clicked 'Undo'.\");\n"
46722"    }\n"
46723"\n"
46724"    _fullscreenToggleCB() {\n"
46725"        if ((this._window.get_window().get_state() &amp; Gdk.WindowState.FULLSCREEN) != 0 ) {\n"
46726"              this._window.unfullscreen();\n"
46727"              this._leaveFullscreenButton.hide();\n"
46728"              this._fullscreenButton.show();\n"
46729"        } else {\n"
46730"             this._window.fullscreen();\n"
46731"             this._fullscreenButton.hide();\n"
46732"             this._leaveFullscreenButton.show();\n"
46733"        }\n"
46734"    }\n"
46735"};\n"
46736"\n"
46737"//run the application\n"
46738"let app = new Application();\n"
46739"app.application.run(ARGV);\n"
46740msgstr ""
46741"#!/usr/bin/gjs\n"
46742"\n"
46743"imports.gi.versions.Gdk = '3.0';\n"
46744"imports.gi.versions.Gtk = '3.0';\n"
46745"\n"
46746"const Gdk = imports.gi.Gdk;\n"
46747"const Gio = imports.gi.Gio;\n"
46748"const GLib = imports.gi.GLib;\n"
46749"const Gtk = imports.gi.Gtk;\n"
46750"\n"
46751"class Application {\n"
46752"\n"
46753"    //create the application\n"
46754"    constructor() {\n"
46755"        this.application = new Gtk.Application({\n"
46756"            application_id: 'org.example.myapp',\n"
46757"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
46758"        });\n"
46759"\n"
46760"       //connect to 'activate' and 'startup' signals to the callback functions\n"
46761"       this.application.connect('activate', this._onActivate.bind(this));\n"
46762"       this.application.connect('startup', this._onStartup.bind(this));\n"
46763"    }\n"
46764"\n"
46765"    //create the UI (in this case it's just the ApplicationWindow\n"
46766"    _buildUI() {\n"
46767"        this._window = new Gtk.ApplicationWindow({\n"
46768"            application: this.application,\n"
46769"            window_position: Gtk.WindowPosition.CENTER,\n"
46770"            title: \"Toolbar Example\",\n"
46771"            default_height: 200,\n"
46772"            default_width: 400\n"
46773"        });\n"
46774"\n"
46775"        this._grid = new Gtk.Grid();\n"
46776"        this._window.add(this._grid);\n"
46777"        this._grid.show();\n"
46778"\n"
46779"        this._createToolbar();\n"
46780"        this._toolbar.set_hexpand(true);\n"
46781"        this._grid.attach(this._toolbar, 0, 0, 1, 1);\n"
46782"\n"
46783"        //show the  toolbar and window\n"
46784"        this._toolbar.show();\n"
46785"        this._window.show();\n"
46786"    }\n"
46787"\n"
46788"    //callback function for 'activate' signal\n"
46789"    _onActivate() {\n"
46790"        this._window.present();\n"
46791"    }\n"
46792"\n"
46793"    //callback function for 'startup' signal\n"
46794"    _onStartup() {\n"
46795"        this._initMenus();\n"
46796"        this._buildUI();\n"
46797"    }\n"
46798"\n"
46799"    //create the toolbar, its toolbuttons and their actions\n"
46800"    _createToolbar() {\n"
46801"\n"
46802"        this._toolbar = new Gtk.Toolbar();\n"
46803"        this._toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
46804"\n"
46805"        //create the \"New\" ToolButton and its SimpleAction.\n"
46806"        //Using actions allows you to add them to the app menu\n"
46807"        //without duplicating code.\n"
46808"        let newAction = new Gio.SimpleAction({ name: 'new'});\n"
46809"        newAction.connect('activate', () =&gt; { this._newCB(); });\n"
46810"        this.application.add_action(newAction);//note: this action is added to the app\n"
46811"\n"
46812"        this._newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
46813"        this._newButton.is_important = true;\n"
46814"        this._toolbar.add(this._newButton);\n"
46815"        this._newButton.show();\n"
46816"        this._newButton.action_name = \"app.new\";\n"
46817"\n"
46818"        //create the \"Open\" ToolButton and its SimpleAction\n"
46819"        let openAction = new Gio.SimpleAction({ name: 'open'});\n"
46820"        openAction.connect('activate', () =&gt; { this._openCB(); });\n"
46821"        this.application.add_action(openAction);\n"
46822"\n"
46823"        this._openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
46824"        this._openButton.is_important = true;\n"
46825"        this._toolbar.add(this._openButton);\n"
46826"        this._openButton.show();\n"
46827"        this._openButton.action_name = \"app.open\";\n"
46828"\n"
46829"        //create the \"Undo\" ToolButton and its SimpleAction\n"
46830"        let undoAction = new Gio.SimpleAction({ name: 'undo'});\n"
46831"        undoAction.connect('activate', () =&gt; { this._undoCB(); });\n"
46832"        this._window.add_action(undoAction);//note this action is added to the window\n"
46833"\n"
46834"        this._undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
46835"        this._undoButton.is_important = true;\n"
46836"        this._toolbar.add(this._undoButton);\n"
46837"        this._undoButton.show();\n"
46838"        this._undoButton.action_name = \"win.undo\";\n"
46839"\n"
46840"        //create the \"Fullscreen\" ToolButton and its SimpleAction\n"
46841"        let fullscreenToggleAction = new Gio.SimpleAction ({ name: 'fullscreenToggle' });\n"
46842"        fullscreenToggleAction.connect('activate', () =&gt; {\n"
46843"            this._fullscreenToggleCB();\n"
46844"        });\n"
46845"        this._window.add_action(fullscreenToggleAction);\n"
46846"\n"
46847"        this._fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
46848"        this._fullscreenButton.is_important = true;\n"
46849"        this._toolbar.add(this._fullscreenButton);\n"
46850"        this._fullscreenButton.show();\n"
46851"        this._fullscreenButton.action_name = \"win.fullscreenToggle\";\n"
46852"\n"
46853"        //create the \"leaveFullscreen\" ToolButton, and set the action name to \"win.fullscreenToggle\"\n"
46854"        this._leaveFullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
46855"        this._leaveFullscreenButton.is_important = true;\n"
46856"        this._toolbar.add(this._leaveFullscreenButton);\n"
46857"        this._leaveFullscreenButton.action_name = \"win.fullscreenToggle\";\n"
46858"    }\n"
46859"\n"
46860"    _initMenus() {\n"
46861"        let menu = new Gio.Menu();\n"
46862"        menu.append(\"New\", 'app.new');\n"
46863"        menu.append(\"Open\", 'app.open');\n"
46864"        menu.append(\"Quit\", 'app.quit');\n"
46865"\n"
46866"        this.application.set_app_menu(menu);\n"
46867"\n"
46868"        let quitAction = new Gio.SimpleAction({name: 'quit' });\n"
46869"        quitAction.connect('activate', () =&gt; { this._window.destroy(); });\n"
46870"        this.application.add_action(quitAction);\n"
46871"    }\n"
46872"\n"
46873"    _newCB() {\n"
46874"        print(\"You clicked 'New'.\");\n"
46875"    }\n"
46876"\n"
46877"    _openCB() {\n"
46878"        print(\"You clicked 'Open'.\");\n"
46879"    }\n"
46880"\n"
46881"    _undoCB() {\n"
46882"        print (\"You clicked 'Undo'.\");\n"
46883"    }\n"
46884"\n"
46885"    _fullscreenToggleCB() {\n"
46886"        if ((this._window.get_window().get_state() &amp; Gdk.WindowState.FULLSCREEN) != 0 ) {\n"
46887"              this._window.unfullscreen();\n"
46888"              this._leaveFullscreenButton.hide();\n"
46889"              this._fullscreenButton.show();\n"
46890"        } else {\n"
46891"             this._window.fullscreen();\n"
46892"             this._fullscreenButton.hide();\n"
46893"             this._leaveFullscreenButton.show();\n"
46894"        }\n"
46895"    }\n"
46896"};\n"
46897"\n"
46898"//run the application\n"
46899"let app = new Application();\n"
46900"app.application.run(ARGV);\n"
46901
46902#. (itstool) path: item/p
46903#: C/toolbar.js.page:31
46904msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Window.html\">Gtk.Window</link>"
46905msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Window.html\">Gtk.Window</link>"
46906
46907#. (itstool) path: item/p
46908#: C/toolbar.js.page:32
46909msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Toolbar.html\">Gtk.Toolbar</link>"
46910msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.Toolbar.html\">Gtk.Toolbar</link>"
46911
46912#. (itstool) path: item/p
46913#: C/toolbar.js.page:33
46914msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ToolButton.html\">Gtk.ToolButton</link>"
46915msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.ToolButton.html\">Gtk.ToolButton</link>"
46916
46917#. (itstool) path: item/p
46918#: C/toolbar.js.page:34
46919msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.html\">Gtk Stock items</link>"
46920msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.html\">Gtk에 들어있는 항목</link>"
46921
46922#. (itstool) path: item/p
46923#: C/toolbar.js.page:35
46924msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gdk.WindowState.html\">Gdk.WindowState</link>"
46925msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gdk.WindowState.html\">Gdk.WindowState</link>"
46926
46927#. (itstool) path: info/title
46928#: C/toolbar.py.page:8
46929msgctxt "text"
46930msgid "Toolbar (Python)"
46931msgstr "Toolbar (Python)"
46932
46933#. (itstool) path: info/desc
46934#: C/toolbar.py.page:20 C/toolbar_builder.py.page:33
46935msgid "A bar of buttons and other widgets"
46936msgstr "단추 및 기타 위젯 표시줄"
46937
46938#. (itstool) path: page/p
46939#: C/toolbar.py.page:26
46940msgid "An example of toolbar with buttons (from stock icons)."
46941msgstr "(스톡 아이콘에서 온)단추를 Toolbar에 넣은 예제입니다."
46942
46943#. (itstool) path: section/code
46944#: C/toolbar.py.page:33
46945#, no-wrap
46946msgid ""
46947"from gi.repository import Gtk\n"
46948"from gi.repository import Gdk\n"
46949"from gi.repository import Gio\n"
46950"import sys\n"
46951"\n"
46952"\n"
46953"class MyWindow(Gtk.ApplicationWindow):\n"
46954"\n"
46955"    def __init__(self, app):\n"
46956"        Gtk.Window.__init__(self, title=\"Toolbar Example\", application=app)\n"
46957"        self.set_default_size(400, 200)\n"
46958"\n"
46959"        # a grid to attach the toolbar\n"
46960"        grid = Gtk.Grid()\n"
46961"\n"
46962"        # a toolbar created in the method create_toolbar (see below)\n"
46963"        toolbar = self.create_toolbar()\n"
46964"        # with extra horizontal space\n"
46965"        toolbar.set_hexpand(True)\n"
46966"        # show the toolbar\n"
46967"        toolbar.show()\n"
46968"\n"
46969"        # attach the toolbar to the grid\n"
46970"        grid.attach(toolbar, 0, 0, 1, 1)\n"
46971"\n"
46972"        # add the grid to the window\n"
46973"        self.add(grid)\n"
46974"\n"
46975"        # create the actions that control the window and connect their signal to a\n"
46976"        # callback method (see below):\n"
46977"\n"
46978"        # undo\n"
46979"        undo_action = Gio.SimpleAction.new(\"undo\", None)\n"
46980"        undo_action.connect(\"activate\", self.undo_callback)\n"
46981"        self.add_action(undo_action)\n"
46982"\n"
46983"        # fullscreen\n"
46984"        fullscreen_action = Gio.SimpleAction.new(\"fullscreen\", None)\n"
46985"        fullscreen_action.connect(\"activate\", self.fullscreen_callback)\n"
46986"        self.add_action(fullscreen_action)\n"
46987"\n"
46988"    # a method to create the toolbar\n"
46989"    def create_toolbar(self):\n"
46990"        # a toolbar\n"
46991"        toolbar = Gtk.Toolbar()\n"
46992"\n"
46993"        # which is the primary toolbar of the application\n"
46994"        toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)\n"
46995"\n"
46996"        # create a button for the \"new\" action, with a stock image\n"
46997"        new_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW)\n"
46998"        # label is shown\n"
46999"        new_button.set_is_important(True)\n"
47000"        # insert the button at position in the toolbar\n"
47001"        toolbar.insert(new_button, 0)\n"
47002"        # show the button\n"
47003"        new_button.show()\n"
47004"        # set the name of the action associated with the button.\n"
47005"        # The action controls the application (app)\n"
47006"        new_button.set_action_name(\"app.new\")\n"
47007"\n"
47008"        # button for the \"open\" action\n"
47009"        open_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN)\n"
47010"        open_button.set_is_important(True)\n"
47011"        toolbar.insert(open_button, 1)\n"
47012"        open_button.show()\n"
47013"        open_button.set_action_name(\"app.open\")\n"
47014"\n"
47015"        # button for the \"undo\" action\n"
47016"        undo_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO)\n"
47017"        undo_button.set_is_important(True)\n"
47018"        toolbar.insert(undo_button, 2)\n"
47019"        undo_button.show()\n"
47020"        undo_button.set_action_name(\"win.undo\")\n"
47021"\n"
47022"        # button for the \"fullscreen/leave fullscreen\" action\n"
47023"        self.fullscreen_button = Gtk.ToolButton.new_from_stock(\n"
47024"            Gtk.STOCK_FULLSCREEN)\n"
47025"        self.fullscreen_button.set_is_important(True)\n"
47026"        toolbar.insert(self.fullscreen_button, 3)\n"
47027"        self.fullscreen_button.set_action_name(\"win.fullscreen\")\n"
47028"\n"
47029"        # return the complete toolbar\n"
47030"        return toolbar\n"
47031"\n"
47032"    # callback method for undo\n"
47033"    def undo_callback(self, action, parameter):\n"
47034"        print(\"You clicked \\\"Undo\\\".\")\n"
47035"\n"
47036"    # callback method for fullscreen / leave fullscreen\n"
47037"    def fullscreen_callback(self, action, parameter):\n"
47038"        # check if the state is the same as Gdk.WindowState.FULLSCREEN, which\n"
47039"        # is a bit flag\n"
47040"        is_fullscreen = self.get_window().get_state(\n"
47041"        ) &amp; Gdk.WindowState.FULLSCREEN != 0\n"
47042"        if not is_fullscreen:\n"
47043"            self.fullscreen_button.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN)\n"
47044"            self.fullscreen()\n"
47045"        else:\n"
47046"            self.fullscreen_button.set_stock_id(Gtk.STOCK_FULLSCREEN)\n"
47047"            self.unfullscreen()\n"
47048"\n"
47049"\n"
47050"class MyApplication(Gtk.Application):\n"
47051"\n"
47052"    def __init__(self):\n"
47053"        Gtk.Application.__init__(self)\n"
47054"\n"
47055"    def do_activate(self):\n"
47056"        win = MyWindow(self)\n"
47057"        win.show_all()\n"
47058"\n"
47059"    def do_startup(self):\n"
47060"        Gtk.Application.do_startup(self)\n"
47061"\n"
47062"        # create the actions that control the window and connect their signal to a\n"
47063"        # callback method (see below):\n"
47064"\n"
47065"        # new\n"
47066"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
47067"        new_action.connect(\"activate\", self.new_callback)\n"
47068"        app.add_action(new_action)\n"
47069"\n"
47070"        # open\n"
47071"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
47072"        open_action.connect(\"activate\", self.open_callback)\n"
47073"        app.add_action(open_action)\n"
47074"\n"
47075"    # callback method for new\n"
47076"    def new_callback(self, action, parameter):\n"
47077"        print(\"You clicked \\\"New\\\".\")\n"
47078"\n"
47079"    # callback method for open\n"
47080"    def open_callback(self, action, parameter):\n"
47081"        print(\"You clicked \\\"Open\\\".\")\n"
47082"\n"
47083"app = MyApplication()\n"
47084"exit_status = app.run(sys.argv)\n"
47085"sys.exit(exit_status)\n"
47086msgstr ""
47087"from gi.repository import Gtk\n"
47088"from gi.repository import Gdk\n"
47089"from gi.repository import Gio\n"
47090"import sys\n"
47091"\n"
47092"\n"
47093"class MyWindow(Gtk.ApplicationWindow):\n"
47094"\n"
47095"    def __init__(self, app):\n"
47096"        Gtk.Window.__init__(self, title=\"Toolbar Example\", application=app)\n"
47097"        self.set_default_size(400, 200)\n"
47098"\n"
47099"        # a grid to attach the toolbar\n"
47100"        grid = Gtk.Grid()\n"
47101"\n"
47102"        # a toolbar created in the method create_toolbar (see below)\n"
47103"        toolbar = self.create_toolbar()\n"
47104"        # with extra horizontal space\n"
47105"        toolbar.set_hexpand(True)\n"
47106"        # show the toolbar\n"
47107"        toolbar.show()\n"
47108"\n"
47109"        # attach the toolbar to the grid\n"
47110"        grid.attach(toolbar, 0, 0, 1, 1)\n"
47111"\n"
47112"        # add the grid to the window\n"
47113"        self.add(grid)\n"
47114"\n"
47115"        # create the actions that control the window and connect their signal to a\n"
47116"        # callback method (see below):\n"
47117"\n"
47118"        # undo\n"
47119"        undo_action = Gio.SimpleAction.new(\"undo\", None)\n"
47120"        undo_action.connect(\"activate\", self.undo_callback)\n"
47121"        self.add_action(undo_action)\n"
47122"\n"
47123"        # fullscreen\n"
47124"        fullscreen_action = Gio.SimpleAction.new(\"fullscreen\", None)\n"
47125"        fullscreen_action.connect(\"activate\", self.fullscreen_callback)\n"
47126"        self.add_action(fullscreen_action)\n"
47127"\n"
47128"    # a method to create the toolbar\n"
47129"    def create_toolbar(self):\n"
47130"        # a toolbar\n"
47131"        toolbar = Gtk.Toolbar()\n"
47132"\n"
47133"        # which is the primary toolbar of the application\n"
47134"        toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)\n"
47135"\n"
47136"        # create a button for the \"new\" action, with a stock image\n"
47137"        new_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW)\n"
47138"        # label is shown\n"
47139"        new_button.set_is_important(True)\n"
47140"        # insert the button at position in the toolbar\n"
47141"        toolbar.insert(new_button, 0)\n"
47142"        # show the button\n"
47143"        new_button.show()\n"
47144"        # set the name of the action associated with the button.\n"
47145"        # The action controls the application (app)\n"
47146"        new_button.set_action_name(\"app.new\")\n"
47147"\n"
47148"        # button for the \"open\" action\n"
47149"        open_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN)\n"
47150"        open_button.set_is_important(True)\n"
47151"        toolbar.insert(open_button, 1)\n"
47152"        open_button.show()\n"
47153"        open_button.set_action_name(\"app.open\")\n"
47154"\n"
47155"        # button for the \"undo\" action\n"
47156"        undo_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO)\n"
47157"        undo_button.set_is_important(True)\n"
47158"        toolbar.insert(undo_button, 2)\n"
47159"        undo_button.show()\n"
47160"        undo_button.set_action_name(\"win.undo\")\n"
47161"\n"
47162"        # button for the \"fullscreen/leave fullscreen\" action\n"
47163"        self.fullscreen_button = Gtk.ToolButton.new_from_stock(\n"
47164"            Gtk.STOCK_FULLSCREEN)\n"
47165"        self.fullscreen_button.set_is_important(True)\n"
47166"        toolbar.insert(self.fullscreen_button, 3)\n"
47167"        self.fullscreen_button.set_action_name(\"win.fullscreen\")\n"
47168"\n"
47169"        # return the complete toolbar\n"
47170"        return toolbar\n"
47171"\n"
47172"    # callback method for undo\n"
47173"    def undo_callback(self, action, parameter):\n"
47174"        print(\"You clicked \\\"Undo\\\".\")\n"
47175"\n"
47176"    # callback method for fullscreen / leave fullscreen\n"
47177"    def fullscreen_callback(self, action, parameter):\n"
47178"        # check if the state is the same as Gdk.WindowState.FULLSCREEN, which\n"
47179"        # is a bit flag\n"
47180"        is_fullscreen = self.get_window().get_state(\n"
47181"        ) &amp; Gdk.WindowState.FULLSCREEN != 0\n"
47182"        if not is_fullscreen:\n"
47183"            self.fullscreen_button.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN)\n"
47184"            self.fullscreen()\n"
47185"        else:\n"
47186"            self.fullscreen_button.set_stock_id(Gtk.STOCK_FULLSCREEN)\n"
47187"            self.unfullscreen()\n"
47188"\n"
47189"\n"
47190"class MyApplication(Gtk.Application):\n"
47191"\n"
47192"    def __init__(self):\n"
47193"        Gtk.Application.__init__(self)\n"
47194"\n"
47195"    def do_activate(self):\n"
47196"        win = MyWindow(self)\n"
47197"        win.show_all()\n"
47198"\n"
47199"    def do_startup(self):\n"
47200"        Gtk.Application.do_startup(self)\n"
47201"\n"
47202"        # create the actions that control the window and connect their signal to a\n"
47203"        # callback method (see below):\n"
47204"\n"
47205"        # new\n"
47206"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
47207"        new_action.connect(\"activate\", self.new_callback)\n"
47208"        app.add_action(new_action)\n"
47209"\n"
47210"        # open\n"
47211"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
47212"        open_action.connect(\"activate\", self.open_callback)\n"
47213"        app.add_action(open_action)\n"
47214"\n"
47215"    # callback method for new\n"
47216"    def new_callback(self, action, parameter):\n"
47217"        print(\"You clicked \\\"New\\\".\")\n"
47218"\n"
47219"    # callback method for open\n"
47220"    def open_callback(self, action, parameter):\n"
47221"        print(\"You clicked \\\"Open\\\".\")\n"
47222"\n"
47223"app = MyApplication()\n"
47224"exit_status = app.run(sys.argv)\n"
47225"sys.exit(exit_status)\n"
47226
47227#. (itstool) path: section/title
47228#: C/toolbar.py.page:37
47229msgid "Useful methods for a Toolbar widget"
47230msgstr "Toolbar 위젯에 쓸만한 메서드"
47231
47232#. (itstool) path: section/p
47233#: C/toolbar.py.page:38
47234msgid ""
47235"In line 32 the signal <code>\"activate\"</code> from the action <code>undo_action</code> is connected to the "
47236"callback function <code>undo_callback()</code> using <code><var>action</var>.connect(<var>signal</var>, "
47237"<var>callback function</var>)</code>. See <link xref=\"signals-callbacks.py\"/> for a more detailed explanation."
47238msgstr ""
47239"32번째 줄에서 <code>undo_action</code> 동작의 <code>\"activate\"</code> 시그널은 <code><var>action</var>."
47240"connect(<var>signal</var>, <var>callback function</var>)</code> 함수로 <code>undo_callback()</code> 콜백 함수에 연"
47241"결했습니다. 더 자세한 설명은 <link xref=\"signals-callbacks.py\"/>를 참조하십시오."
47242
47243#. (itstool) path: item/p
47244#: C/toolbar.py.page:41
47245msgid ""
47246"Use <code>insert(tool_item, position)</code> to insert the <code>tool_item</code> at <code>position</code>. If "
47247"<code>position</code> is negative, the item is appended at the end of the toolbar."
47248msgstr ""
47249"<code>position</code> 위치에 <code>tool_item</code>을 넣으려면 <code>insert(tool_item, position)</code> 함수를 사용"
47250"하십시오. <code>position</code> 값이 음수면 해당 항목을 도구 모음 마지막에 붙여넣습니다."
47251
47252#. (itstool) path: item/p
47253#: C/toolbar.py.page:42
47254msgid "<code>get_item_index(tool_item)</code> retrieves the position of <code>tool_item</code> on the toolbar."
47255msgstr "<code>get_item_index(tool_item)</code> 함수는 도구 모음에서 <code>tool_item</code> 항목의 위치를 가져옵니다."
47256
47257#. (itstool) path: item/p
47258#: C/toolbar.py.page:43
47259msgid ""
47260"<code>get_n_items()</code> returns the number of items on the toolbar; <code>get_nth_item(position)</code> returns "
47261"the item in position <code>position</code>."
47262msgstr ""
47263"<code>get_n_items()</code> 함수는 도구 모음의 항목 갯수를 가져옵니다. <code>get_nth_item(position)</code> 함수는 "
47264"<code>position</code> 위치의 항목을 반환합니다."
47265
47266#. (itstool) path: item/p
47267#: C/toolbar.py.page:44
47268msgid ""
47269"If the toolbar does not have room for all the menu items, and <code>set_show_arrow(True)</code>, the items that do "
47270"not have room are shown through an overflow menu."
47271msgstr ""
47272"모든 메뉴 항목에 대해 ToolBar에서 공간을 가지고 있지 않고, <code>set_show_arrow(True)</code> 함수를 실행했다면, 공"
47273"간이 없는 항목은 오버플로우 메뉴에 나타납니다."
47274
47275#. (itstool) path: item/p
47276#: C/toolbar.py.page:45
47277msgid ""
47278"<code>set_icon_size(icon_size)</code> sets the size of icons in the toolbar; <code>icon_size</code> can be one of "
47279"<code>Gtk.IconSize.INVALID, Gtk.IconSize.MENU, Gtk.IconSize.SMALL_TOOLBAR, Gtk.IconSize.LARGE_TOOLBAR, Gtk."
47280"IconSize.BUTTON, Gtk.IconSize.DND, Gtk.IconSize.DIALOG</code>. This should be used only for special-purpose "
47281"toolbars, normal application toolbars should respect user preferences for the size of icons. "
47282"<code>unset_icon_size()</code> unsets the preferences set with <code>set_icon_size(icon_size)</code>, so that user "
47283"preferences are used to determine the icon size."
47284msgstr ""
47285"<code>set_icon_size(icon_size)</code> 함수는 도구 모음의 아이콘 크기를 설정합니다. <code>icon_size</code> 값은 "
47286"<code>Gtk.IconSize.INVALID, Gtk.IconSize.MENU, Gtk.IconSize.SMALL_TOOLBAR, Gtk.IconSize.LARGE_TOOLBAR, Gtk."
47287"IconSize.BUTTON, Gtk.IconSize.DND, Gtk.IconSize.DIALOG</code> 중 하나가 될 수 있습니다. 도구 모음에 지정 목적을 위"
47288"해서만 사용해야 하며 일반 프로그램 도구 모음에서는 사용자가 원하는 아이콘 크기 설정을 따라야합니다. "
47289"<code>unset_icon_size()</code> 함수는 <code>set_icon_size(icon_size)</code> 함수로 설정한 항목의 설정을 취소하므로 "
47290"아이콘 크기를 결정할 때 사용자 설정 값을 사용합니다."
47291
47292#. (itstool) path: item/p
47293#: C/toolbar.py.page:46
47294msgid ""
47295"<code>set_style(style)</code>, where <code>style</code> is one of <code>Gtk.ToolbarStyle.ICONS, Gtk.ToolbarStyle."
47296"TEXT, Gtk.ToolbarStyle.BOTH, Gtk.ToolbarStyle.BOTH_HORIZ</code>, sets if the toolbar shows only icons, only text, "
47297"or both (vertically stacked or alongside each other). To let user preferences determine the toolbar style, and "
47298"unset a toolbar style so set, use <code>unset_style()</code>."
47299msgstr ""
47300"<code>style</code> 값을 <code>Gtk.ToolbarStyle.ICONS, Gtk.ToolbarStyle.TEXT, Gtk.ToolbarStyle.BOTH, Gtk."
47301"ToolbarStyle.BOTH_HORIZ</code> 중 하나로 사용하는 <code>set_style(style)</code> 함수는 도구 모음에 아이콘만 나타낼 "
47302"지, 텍스트만 나타낼 지, 아니면 둘 다(수직 방향, 수평 방향) 나타낼 지를 설정합니다. 사용자 설정으로 도구 모음 모양새"
47303"를 결정하게 하고, 도구 모음 모양새 설정을 취소하려면 <code>unset_style()</code> 함수를 사용하십시오."
47304
47305#. (itstool) path: item/p
47306#: C/toolbar.py.page:55
47307msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToolbar.html\">GtkToolbar</link>"
47308msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToolbar.html\">GtkToolbar</link>"
47309
47310#. (itstool) path: item/p
47311#: C/toolbar.py.page:56
47312msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToolButton.html\">GtkToolButton</link>"
47313msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToolButton.html\">GtkToolButton</link>"
47314
47315#. (itstool) path: item/p
47316#: C/toolbar.py.page:57
47317msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToolItem.html\">GtkToolItem</link>"
47318msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkToolItem.html\">GtkToolItem</link>"
47319
47320#. (itstool) path: item/p
47321#: C/toolbar.py.page:59
47322msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkActionable.html\">GtkActionable</link>"
47323msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkActionable.html\">GtkActionable</link>"
47324
47325#. (itstool) path: item/p
47326#: C/toolbar.py.page:61 C/toolbar_builder.py.page:199
47327msgid ""
47328"<link href=\"http://developer.gnome.org/gdk3/unstable/gdk3-Event-Structures.html#GdkEventWindowState\">Event "
47329"Structures</link>"
47330msgstr ""
47331"<link href=\"http://developer.gnome.org/gdk3/unstable/gdk3-Event-Structures.html#GdkEventWindowState\">이벤트 구조"
47332"체</link>"
47333
47334#. (itstool) path: info/title
47335#: C/toolbar.vala.page:8
47336msgctxt "text"
47337msgid "Toolbar (Vala)"
47338msgstr "Toolbar (Vala)"
47339
47340#. (itstool) path: page/code
47341#: C/toolbar.vala.page:28
47342#, no-wrap
47343msgid ""
47344"/* This is the Window */\n"
47345"class MyWindow : Gtk.ApplicationWindow {\n"
47346"\n"
47347"\t/* Instance variables belonging to the window */\n"
47348"\tGtk.Toolbar toolbar;\n"
47349"\tGtk.ToolButton new_button;\n"
47350"\tGtk.ToolButton open_button;\n"
47351"\tGtk.ToolButton undo_button;\n"
47352"\tGtk.ToolButton fullscreen_button;\n"
47353"\tGtk.ToolButton leave_fullscreen_button;\n"
47354"\n"
47355"\t/* Constructor */\n"
47356"\tinternal MyWindow (MyApplication app) {\n"
47357"\t\tObject (application: app, title: \"Toolbar Example\");\n"
47358"\n"
47359"\t\tthis.set_default_size (400, 200);\n"
47360"\t\tvar grid = new Gtk.Grid ();\n"
47361"\t\tthis.add (grid);\n"
47362"\t\tgrid.show ();\n"
47363"\n"
47364"\t\tcreate_toolbar ();\n"
47365"\t\ttoolbar.set_hexpand (true);\n"
47366"\t\tgrid.attach (toolbar, 0, 0, 1, 1);\n"
47367"\t\ttoolbar.show ();\n"
47368"\n"
47369"\t\t/* create the \"undo\" window action action */\n"
47370"\t\tvar undo_action = new SimpleAction (\"undo\", null);\n"
47371"\t\tundo_action.activate.connect (undo_callback);\n"
47372"\t\tthis.add_action (undo_action);\n"
47373"\n"
47374"\t\t/* create the \"fullscreen\" window action */\n"
47375"\t\tvar fullscreen_action = new SimpleAction (\"fullscreen\", null);\n"
47376"\t\tfullscreen_action.activate.connect (fullscreen_callback);\n"
47377"\t\tthis.add_action (fullscreen_action);\n"
47378"\t}\n"
47379"\n"
47380"\t/* This function creates the toolbar, its  ToolButtons,\n"
47381"\t * and assigns the actions names to the ToolButtons.*/\n"
47382"\tvoid create_toolbar () {\n"
47383"\t\ttoolbar = new Gtk.Toolbar ();\n"
47384"\t\ttoolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
47385"\n"
47386"\t\tnew_button = new Gtk.ToolButton.from_stock (Gtk.Stock.NEW);\n"
47387"\t\tnew_button.is_important = true; //decides whether to show the label\n"
47388"\t\ttoolbar.add (new_button);\n"
47389"\t\tnew_button.show ();\n"
47390"\t\tnew_button.action_name = \"app.new\";\n"
47391"\n"
47392"\t\topen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.OPEN);\n"
47393"\t\topen_button.is_important = true;\n"
47394"\t\ttoolbar.add (open_button);\n"
47395"\t\topen_button.show ();\n"
47396"\t\topen_button.action_name = \"app.open\";\n"
47397"\n"
47398"\t\tundo_button = new Gtk.ToolButton.from_stock (Gtk.Stock.UNDO);\n"
47399"\t\tundo_button.is_important = true;\n"
47400"\t\ttoolbar.add (undo_button);\n"
47401"\t\tundo_button.show ();\n"
47402"\t\tundo_button.action_name = \"win.undo\";\n"
47403"\n"
47404"\t\tfullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.FULLSCREEN);\n"
47405"\t\tfullscreen_button.is_important = true;\n"
47406"\t\ttoolbar.add (fullscreen_button);\n"
47407"\t\tfullscreen_button.show ();\n"
47408"\t\tfullscreen_button.action_name = \"win.fullscreen\";\n"
47409"\n"
47410"\t\tleave_fullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.LEAVE_FULLSCREEN)\n"
47411";\n"
47412"\t\tleave_fullscreen_button.is_important = true;\n"
47413"\t\ttoolbar.add (leave_fullscreen_button);\n"
47414"\n"
47415"\t\tleave_fullscreen_button.action_name = \"win.fullscreen\";\n"
47416"\t}\n"
47417"\n"
47418"\tvoid undo_callback (SimpleAction simple, Variant? parameter) {\n"
47419"\t\t\tprint (\"You clicked \\\"Undo\\\".\\n\");\n"
47420"\t}\n"
47421"\n"
47422"\tvoid fullscreen_callback (SimpleAction simple, Variant? parameter) {\n"
47423"\t\tif ((this.get_window ().get_state () &amp; Gdk.WindowState.FULLSCREEN) != 0) {\n"
47424"\t\t\tthis.unfullscreen ();\n"
47425"\t\t\tleave_fullscreen_button.hide ();\n"
47426"\t\t\tfullscreen_button.show ();\n"
47427"\t\t}\n"
47428"\t\telse {\n"
47429"\t\t\tthis.fullscreen ();\n"
47430"\t\t\tfullscreen_button.hide ();\n"
47431"\t\t\tleave_fullscreen_button.show ();\n"
47432"\t\t}\n"
47433"\t}\n"
47434"}\n"
47435"\n"
47436"/* This is the application */\n"
47437"class MyApplication : Gtk.Application {\n"
47438"\tprotected override void activate () {\n"
47439"\t\tnew MyWindow (this).show ();\n"
47440"\t}\n"
47441"\n"
47442"\tprotected override void startup () {\n"
47443"\t\tbase.startup ();\n"
47444"\n"
47445"\t\t/* Create the \"new\" action and add it to the app*/\n"
47446"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
47447"\t\tnew_action.activate.connect (new_callback);\n"
47448"\t\tthis.add_action (new_action);\n"
47449"\n"
47450"\t\t/* Create the \"open\" action, and add it to the app */\n"
47451"\t\tvar open_action = new SimpleAction (\"open\", null);\n"
47452"\t\topen_action.activate.connect (open_callback);\n"
47453"\t\tthis.add_action (open_action);\n"
47454"\n"
47455"\t\t/* You could also add the action to the app menu\n"
47456"\t\t * if you wanted to.\n"
47457"\t\t */\n"
47458"\t\t//var menu = new Menu ();\n"
47459"\t\t//menu.append (\"New\", \"app.new\");\n"
47460"\t\t//this.app_menu = menu;\n"
47461"\t}\n"
47462"\n"
47463"\tvoid new_callback (SimpleAction action, Variant? parameter) {\n"
47464"\t\tprint (\"You clicked \\\"New\\\".\\n\");\n"
47465"\t}\n"
47466"\n"
47467"\tvoid open_callback (SimpleAction action, Variant? parameter) {\n"
47468"\t\t\tprint (\"You clicked \\\"Open\\\".\\n\");\n"
47469"\t}\n"
47470"}\n"
47471"\n"
47472"/* The main function creates the application and runs it. */\n"
47473"int main (string[] args) {\n"
47474"\treturn new MyApplication ().run (args);\n"
47475"}\n"
47476msgstr ""
47477"/* This is the Window */\n"
47478"class MyWindow : Gtk.ApplicationWindow {\n"
47479"\n"
47480"\t/* Instance variables belonging to the window */\n"
47481"\tGtk.Toolbar toolbar;\n"
47482"\tGtk.ToolButton new_button;\n"
47483"\tGtk.ToolButton open_button;\n"
47484"\tGtk.ToolButton undo_button;\n"
47485"\tGtk.ToolButton fullscreen_button;\n"
47486"\tGtk.ToolButton leave_fullscreen_button;\n"
47487"\n"
47488"\t/* Constructor */\n"
47489"\tinternal MyWindow (MyApplication app) {\n"
47490"\t\tObject (application: app, title: \"Toolbar Example\");\n"
47491"\n"
47492"\t\tthis.set_default_size (400, 200);\n"
47493"\t\tvar grid = new Gtk.Grid ();\n"
47494"\t\tthis.add (grid);\n"
47495"\t\tgrid.show ();\n"
47496"\n"
47497"\t\tcreate_toolbar ();\n"
47498"\t\ttoolbar.set_hexpand (true);\n"
47499"\t\tgrid.attach (toolbar, 0, 0, 1, 1);\n"
47500"\t\ttoolbar.show ();\n"
47501"\n"
47502"\t\t/* create the \"undo\" window action action */\n"
47503"\t\tvar undo_action = new SimpleAction (\"undo\", null);\n"
47504"\t\tundo_action.activate.connect (undo_callback);\n"
47505"\t\tthis.add_action (undo_action);\n"
47506"\n"
47507"\t\t/* create the \"fullscreen\" window action */\n"
47508"\t\tvar fullscreen_action = new SimpleAction (\"fullscreen\", null);\n"
47509"\t\tfullscreen_action.activate.connect (fullscreen_callback);\n"
47510"\t\tthis.add_action (fullscreen_action);\n"
47511"\t}\n"
47512"\n"
47513"\t/* This function creates the toolbar, its  ToolButtons,\n"
47514"\t * and assigns the actions names to the ToolButtons.*/\n"
47515"\tvoid create_toolbar () {\n"
47516"\t\ttoolbar = new Gtk.Toolbar ();\n"
47517"\t\ttoolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
47518"\n"
47519"\t\tnew_button = new Gtk.ToolButton.from_stock (Gtk.Stock.NEW);\n"
47520"\t\tnew_button.is_important = true; //decides whether to show the label\n"
47521"\t\ttoolbar.add (new_button);\n"
47522"\t\tnew_button.show ();\n"
47523"\t\tnew_button.action_name = \"app.new\";\n"
47524"\n"
47525"\t\topen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.OPEN);\n"
47526"\t\topen_button.is_important = true;\n"
47527"\t\ttoolbar.add (open_button);\n"
47528"\t\topen_button.show ();\n"
47529"\t\topen_button.action_name = \"app.open\";\n"
47530"\n"
47531"\t\tundo_button = new Gtk.ToolButton.from_stock (Gtk.Stock.UNDO);\n"
47532"\t\tundo_button.is_important = true;\n"
47533"\t\ttoolbar.add (undo_button);\n"
47534"\t\tundo_button.show ();\n"
47535"\t\tundo_button.action_name = \"win.undo\";\n"
47536"\n"
47537"\t\tfullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.FULLSCREEN);\n"
47538"\t\tfullscreen_button.is_important = true;\n"
47539"\t\ttoolbar.add (fullscreen_button);\n"
47540"\t\tfullscreen_button.show ();\n"
47541"\t\tfullscreen_button.action_name = \"win.fullscreen\";\n"
47542"\n"
47543"\t\tleave_fullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.LEAVE_FULLSCREEN)\n"
47544";\n"
47545"\t\tleave_fullscreen_button.is_important = true;\n"
47546"\t\ttoolbar.add (leave_fullscreen_button);\n"
47547"\n"
47548"\t\tleave_fullscreen_button.action_name = \"win.fullscreen\";\n"
47549"\t}\n"
47550"\n"
47551"\tvoid undo_callback (SimpleAction simple, Variant? parameter) {\n"
47552"\t\t\tprint (\"You clicked \\\"Undo\\\".\\n\");\n"
47553"\t}\n"
47554"\n"
47555"\tvoid fullscreen_callback (SimpleAction simple, Variant? parameter) {\n"
47556"\t\tif ((this.get_window ().get_state () &amp; Gdk.WindowState.FULLSCREEN) != 0) {\n"
47557"\t\t\tthis.unfullscreen ();\n"
47558"\t\t\tleave_fullscreen_button.hide ();\n"
47559"\t\t\tfullscreen_button.show ();\n"
47560"\t\t}\n"
47561"\t\telse {\n"
47562"\t\t\tthis.fullscreen ();\n"
47563"\t\t\tfullscreen_button.hide ();\n"
47564"\t\t\tleave_fullscreen_button.show ();\n"
47565"\t\t}\n"
47566"\t}\n"
47567"}\n"
47568"\n"
47569"/* This is the application */\n"
47570"class MyApplication : Gtk.Application {\n"
47571"\tprotected override void activate () {\n"
47572"\t\tnew MyWindow (this).show ();\n"
47573"\t}\n"
47574"\n"
47575"\tprotected override void startup () {\n"
47576"\t\tbase.startup ();\n"
47577"\n"
47578"\t\t/* Create the \"new\" action and add it to the app*/\n"
47579"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
47580"\t\tnew_action.activate.connect (new_callback);\n"
47581"\t\tthis.add_action (new_action);\n"
47582"\n"
47583"\t\t/* Create the \"open\" action, and add it to the app */\n"
47584"\t\tvar open_action = new SimpleAction (\"open\", null);\n"
47585"\t\topen_action.activate.connect (open_callback);\n"
47586"\t\tthis.add_action (open_action);\n"
47587"\n"
47588"\t\t/* You could also add the action to the app menu\n"
47589"\t\t * if you wanted to.\n"
47590"\t\t */\n"
47591"\t\t//var menu = new Menu ();\n"
47592"\t\t//menu.append (\"New\", \"app.new\");\n"
47593"\t\t//this.app_menu = menu;\n"
47594"\t}\n"
47595"\n"
47596"\tvoid new_callback (SimpleAction action, Variant? parameter) {\n"
47597"\t\tprint (\"You clicked \\\"New\\\".\\n\");\n"
47598"\t}\n"
47599"\n"
47600"\tvoid open_callback (SimpleAction action, Variant? parameter) {\n"
47601"\t\t\tprint (\"You clicked \\\"Open\\\".\\n\");\n"
47602"\t}\n"
47603"}\n"
47604"\n"
47605"/* The main function creates the application and runs it. */\n"
47606"int main (string[] args) {\n"
47607"\treturn new MyApplication ().run (args);\n"
47608"}\n"
47609
47610#. (itstool) path: item/p
47611#: C/toolbar.vala.page:34 C/toolbar_builder.vala.page:151 C/tooltip.vala.page:40
47612msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Toolbar.html\">Gtk.Toolbar</link>"
47613msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Toolbar.html\">Gtk.Toolbar</link>"
47614
47615#. (itstool) path: item/p
47616#: C/toolbar.vala.page:35 C/toolbar_builder.vala.page:152
47617msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ToolButton.html\">Gtk.Toolbutton</link>"
47618msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.ToolButton.html\">Gtk.Toolbutton</link>"
47619
47620#. (itstool) path: item/p
47621#: C/toolbar.vala.page:36 C/toolbar_builder.vala.page:153
47622msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Stock.html\">Gtk.Stock</link>"
47623msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Stock.html\">Gtk.Stock</link>"
47624
47625#. (itstool) path: info/title
47626#: C/toolbar_builder.py.page:8
47627msgctxt "text"
47628msgid "Toolbar created using Glade (Python)"
47629msgstr "글레이드로 만든 도구 모음(Python)"
47630
47631#. (itstool) path: page/title
47632#: C/toolbar_builder.py.page:36 C/toolbar_builder.vala.page:23
47633msgid "Toolbar created using Glade"
47634msgstr "글레이드로 만든 도구 모음"
47635
47636#. (itstool) path: page/p
47637#: C/toolbar_builder.py.page:39
47638msgid ""
47639"This example is similar to <link xref=\"toolbar.py\"/>, except we use Glade to create the toolbar in an XML .ui "
47640"file."
47641msgstr "이 예제는 XML .ui 파일을 만들 때 글레이드를 사용한다는 점만 빼면 <link xref=\"toolbar.py\"/>와 유사합니다."
47642
47643#. (itstool) path: section/title
47644#: C/toolbar_builder.py.page:44
47645msgid "Creating the toolbar with Glade"
47646msgstr "글레이드로 도구 모음 만들기"
47647
47648#. (itstool) path: section/p
47649#. (itstool) path: page/p
47650#: C/toolbar_builder.py.page:45 C/toolbar_builder.vala.page:28
47651msgid "To create the toolbar using the <link href=\"http://glade.gnome.org/\">Glade Interface Designer</link>:"
47652msgstr "<link href=\"http://glade.gnome.org/\">글레이드 인터페이스 디자이너</link>로 도구 모음을 만들려면:"
47653
47654#. (itstool) path: item/p
47655#: C/toolbar_builder.py.page:49 C/toolbar_builder.vala.page:32
47656msgid "Open Glade, and save the file as <file>toolbar_builder.ui</file>"
47657msgstr "글레이드를 열고 <file>toolbar_builder.ui</file> 파일로 저장하십시오"
47658
47659#. (itstool) path: p/media
47660#. This is a reference to an external file such as an image or video. When
47661#. the file changes, the md5 hash will change to let you know you need to
47662#. update your localized copy. The msgstr is not used at all. Set it to
47663#. whatever you like once you have updated your copy of the file.
47664#: C/toolbar_builder.py.page:50 C/toolbar_builder.vala.page:33
47665msgctxt "_"
47666msgid "external ref='media/glade_ui.png' md5='baea74fe213bc12ea934f64f6977215a'"
47667msgstr ""
47668
47669#. (itstool) path: item/p
47670#: C/toolbar_builder.py.page:50 C/toolbar_builder.vala.page:33
47671msgid "<media type=\"image\" src=\"media/glade_ui.png\" width=\"900\"> Screenshot of Glade ui </media>"
47672msgstr "<media type=\"image\" src=\"media/glade_ui.png\" width=\"900\"> 글레이드 사용자 인터페이스 스크린샷 </media>"
47673
47674#. (itstool) path: item/p
47675#: C/toolbar_builder.py.page:55 C/toolbar_builder.vala.page:38
47676msgid ""
47677"Under <gui>Containers</gui> on the left hand side, right click on the toolbar icon and select <gui>Add widget as "
47678"toplevel</gui>."
47679msgstr ""
47680"왼편의 <gui>컨테이너</gui>에서, 도구모음 아이콘에 마우스 커서를 올려둔 후 오른쪽 단추를 누르고 <gui>최상위에 위젯 "
47681"추가</gui>를 선택하십시오."
47682
47683#. (itstool) path: p/media
47684#. This is a reference to an external file such as an image or video. When
47685#. the file changes, the md5 hash will change to let you know you need to
47686#. update your localized copy. The msgstr is not used at all. Set it to
47687#. whatever you like once you have updated your copy of the file.
47688#: C/toolbar_builder.py.page:56 C/toolbar_builder.vala.page:39
47689msgctxt "_"
47690msgid "external ref='media/glade_select_toolbar.png' md5='f7b5b224050b2e387eb04362fc99df00'"
47691msgstr ""
47692
47693#. (itstool) path: item/p
47694#: C/toolbar_builder.py.page:56 C/toolbar_builder.vala.page:39
47695msgid "<media type=\"image\" src=\"media/glade_select_toolbar.png\"> Screenshot of toolbar icon in Glade ui </media>"
47696msgstr "<media type=\"image\" src=\"media/glade_select_toolbar.png\"> 글레이드 UI 도구 모음 아이콘 스크린샷 </media>"
47697
47698#. (itstool) path: item/p
47699#: C/toolbar_builder.py.page:61 C/toolbar_builder.vala.page:44
47700msgid ""
47701"Under the <gui>General</gui> tab on the bottom right, change the <gui>Name</gui> to <input>toolbar</input> and "
47702"<gui>Show Arrow</gui> to <gui>No</gui>."
47703msgstr ""
47704"하단 우측의 <gui>일반</gui> 탭에서 , <gui>이름</gui>을 <input>toolbar</input>로 바꾸고 <gui>Show Arrow</gui>는 "
47705"<gui>No</gui>로 바꾸십시오."
47706
47707#. (itstool) path: p/media
47708#. This is a reference to an external file such as an image or video. When
47709#. the file changes, the md5 hash will change to let you know you need to
47710#. update your localized copy. The msgstr is not used at all. Set it to
47711#. whatever you like once you have updated your copy of the file.
47712#: C/toolbar_builder.py.page:62 C/toolbar_builder.vala.page:45
47713msgctxt "_"
47714msgid "external ref='media/glade_toolbar_general.png' md5='e31daba6e8a3e526aca89d5f1622edaa'"
47715msgstr ""
47716
47717#. (itstool) path: item/p
47718#: C/toolbar_builder.py.page:62 C/toolbar_builder.vala.page:45
47719msgid "<media type=\"image\" src=\"media/glade_toolbar_general.png\"> Screenshot of General tab </media>"
47720msgstr "<media type=\"image\" src=\"media/glade_toolbar_general.png\"> 일반 탭 스크린샷 </media>"
47721
47722#. (itstool) path: item/p
47723#: C/toolbar_builder.py.page:67 C/toolbar_builder.vala.page:50
47724msgid "Under the <gui>Common</gui> tab, set <gui>Horizontal Expand</gui> to <gui>Yes</gui>."
47725msgstr "<gui>공통 사항</gui> 탭에서, <gui>수평 확장</gui>을 <gui>Yes</gui>로 설정하십시오."
47726
47727#. (itstool) path: p/media
47728#. This is a reference to an external file such as an image or video. When
47729#. the file changes, the md5 hash will change to let you know you need to
47730#. update your localized copy. The msgstr is not used at all. Set it to
47731#. whatever you like once you have updated your copy of the file.
47732#: C/toolbar_builder.py.page:68 C/toolbar_builder.vala.page:51
47733msgctxt "_"
47734msgid "external ref='media/glade_toolbar_common.png' md5='d5ec6cc0218ca98e195dbd033feb9ac5'"
47735msgstr ""
47736
47737#. (itstool) path: item/p
47738#: C/toolbar_builder.py.page:68 C/toolbar_builder.vala.page:51
47739msgid "<media type=\"image\" src=\"media/glade_toolbar_common.png\"> Screenshot of Common tab </media>"
47740msgstr "<media type=\"image\" src=\"media/glade_toolbar_common.png\"> 공통 사항 탭 스크린샷 </media>"
47741
47742#. (itstool) path: item/p
47743#: C/toolbar_builder.py.page:73 C/toolbar_builder.vala.page:56
47744msgid ""
47745"Right click on the toolbar in the top right and select <gui>Edit</gui>. The <gui>Tool Bar Editor</gui> window will "
47746"appear."
47747msgstr ""
47748"우측 상단의 도구 모음에서 마우스 오른쪽 단추를 누른후 <gui>편집</gui>을 선택하십시오. <gui>도구 모음 편집기</gui> "
47749"창이 뜹니다."
47750
47751#. (itstool) path: p/media
47752#. This is a reference to an external file such as an image or video. When
47753#. the file changes, the md5 hash will change to let you know you need to
47754#. update your localized copy. The msgstr is not used at all. Set it to
47755#. whatever you like once you have updated your copy of the file.
47756#: C/toolbar_builder.py.page:74 C/toolbar_builder.vala.page:57
47757msgctxt "_"
47758msgid "external ref='media/glade_toolbar_edit.png' md5='feb1e2b7040d24a4d030f94cf07c81fd'"
47759msgstr ""
47760
47761#. (itstool) path: item/p
47762#: C/toolbar_builder.py.page:74 C/toolbar_builder.vala.page:57
47763msgid ""
47764"<media type=\"image\" src=\"media/glade_toolbar_edit.png\"> Screenshot of where to right click to edit toolbar. </"
47765"media>"
47766msgstr ""
47767"<media type=\"image\" src=\"media/glade_toolbar_edit.png\"> 도구 모음을 편집할 때 오른쪽 단추를 누를 부분의 스크린"
47768"샷. </media>"
47769
47770#. (itstool) path: item/p
47771#: C/toolbar_builder.py.page:79 C/toolbar_builder.vala.page:62
47772msgid ""
47773"We want to add 5 ToolButtons: New, Open, Undo, Fullscreen and Leave Fullscreen. First, we will add the New "
47774"ToolButton."
47775msgstr ""
47776"새 파일, 열기, 실행 취소, 전체 화면, 전체 화면 나가기 도구 단추 5개를 추가하겠습니다. 우선 새 도구 단추를 추가하겠"
47777"습니다."
47778
47779#. (itstool) path: item/p
47780#: C/toolbar_builder.py.page:82 C/toolbar_builder.vala.page:65
47781msgid "Under <gui>Hierarchy</gui> tab, click <gui>Add</gui>."
47782msgstr "<gui>계층 구조</gui> 탭에서, <gui>추가</gui>를 누르십시오."
47783
47784#. (itstool) path: item/p
47785#: C/toolbar_builder.py.page:83 C/toolbar_builder.vala.page:66
47786msgid "Change the name of the ToolItem to <input>new_button</input>."
47787msgstr "ToolItem 이름을 <input>new_button</input>으로 바꾸십시오."
47788
47789#. (itstool) path: item/p
47790#: C/toolbar_builder.py.page:84 C/toolbar_builder.vala.page:67
47791msgid ""
47792"Scroll down and set <gui>Is important</gui> to <gui>Yes</gui>. This will cause the label of the ToolButton to be "
47793"shown, when you view the toolbar."
47794msgstr ""
47795"스크롤을 내린 후 <gui>Is important</gui>를 <gui>Yes</gui>로 설정하십시오. 이렇게 설정하면, 도구 모음에서 도구 단추 "
47796"레이블이 나타납니다."
47797
47798#. (itstool) path: item/p
47799#: C/toolbar_builder.py.page:85 C/toolbar_builder.vala.page:68
47800msgid "Enter the <gui>action name</gui>: <input>app.new</input>."
47801msgstr "<gui>동작 이름</gui>을 <input>app.new</input>로 입력하십시오."
47802
47803#. (itstool) path: item/p
47804#: C/toolbar_builder.py.page:86 C/toolbar_builder.vala.page:69
47805msgid "Change the <gui>Label</gui> to <input>New</input>."
47806msgstr "<gui>레이블</gui>을 <input>New</input>로 바꾸십시오."
47807
47808#. (itstool) path: item/p
47809#: C/toolbar_builder.py.page:87 C/toolbar_builder.vala.page:70
47810msgid "Select the <gui>New</gui> Stock Id from the drop down menu, or type <input>gtk-new</input>."
47811msgstr "드롭 다운 메뉴에서 <gui>새로 만들기</gui>의 스톡 ID를 선택하거나 <input>gtk-new</input>를 입력하십시오."
47812
47813#. (itstool) path: item/p
47814#: C/toolbar_builder.py.page:89 C/toolbar_builder.vala.page:72
47815msgid "Repeat the above steps for the remaining ToolButtons, with the following properties:"
47816msgstr "나머지 ToolButton에 대해 위 단계를 반복하시고, 다음 속성을 설정하십시오:"
47817
47818#. (itstool) path: td/p
47819#: C/toolbar_builder.py.page:96 C/toolbar_builder.vala.page:79
47820msgid "Is important"
47821msgstr "중요 여부"
47822
47823#. (itstool) path: td/p
47824#: C/toolbar_builder.py.page:97 C/toolbar_builder.vala.page:80
47825msgid "Action name"
47826msgstr "동작 이름"
47827
47828#. (itstool) path: td/p
47829#: C/toolbar_builder.py.page:99 C/toolbar_builder.vala.page:82
47830msgid "Stock Id"
47831msgstr "스톡 ID"
47832
47833#. (itstool) path: td/p
47834#: C/toolbar_builder.py.page:104 C/toolbar_builder.vala.page:87
47835msgid "open_button"
47836msgstr "open_button"
47837
47838#. (itstool) path: td/p
47839#: C/toolbar_builder.py.page:105 C/toolbar_builder.py.page:112 C/toolbar_builder.py.page:119
47840#: C/toolbar_builder.py.page:126 C/toolbar_builder.vala.page:88 C/toolbar_builder.vala.page:95
47841#: C/toolbar_builder.vala.page:102 C/toolbar_builder.vala.page:109
47842msgid "Yes"
47843msgstr "예"
47844
47845#. (itstool) path: td/p
47846#: C/toolbar_builder.py.page:106 C/toolbar_builder.vala.page:89
47847msgid "app.open"
47848msgstr "app.open"
47849
47850#. (itstool) path: td/p
47851#: C/toolbar_builder.py.page:107 C/toolbar_builder.vala.page:90
47852msgid "Open"
47853msgstr "열기"
47854
47855#. (itstool) path: td/p
47856#: C/toolbar_builder.py.page:108 C/toolbar_builder.vala.page:91
47857msgid "gtk-open"
47858msgstr "gtk-open"
47859
47860#. (itstool) path: td/p
47861#: C/toolbar_builder.py.page:111 C/toolbar_builder.vala.page:94
47862msgid "undo_button"
47863msgstr "undo_button"
47864
47865#. (itstool) path: td/p
47866#: C/toolbar_builder.py.page:113 C/toolbar_builder.vala.page:96
47867msgid "win.undo"
47868msgstr "win.undo"
47869
47870#. (itstool) path: td/p
47871#: C/toolbar_builder.py.page:114 C/toolbar_builder.vala.page:97
47872msgid "Undo"
47873msgstr "실행 취소"
47874
47875#. (itstool) path: td/p
47876#: C/toolbar_builder.py.page:115 C/toolbar_builder.vala.page:98
47877msgid "gtk-undo"
47878msgstr "gtk-undo"
47879
47880#. (itstool) path: td/p
47881#: C/toolbar_builder.py.page:118 C/toolbar_builder.vala.page:101
47882msgid "fullscreen_button"
47883msgstr "fullscreen_button"
47884
47885#. (itstool) path: td/p
47886#: C/toolbar_builder.py.page:120 C/toolbar_builder.py.page:127 C/toolbar_builder.vala.page:103
47887#: C/toolbar_builder.vala.page:110
47888msgid "win.fullscreen"
47889msgstr "win.fullscreen"
47890
47891#. (itstool) path: td/p
47892#: C/toolbar_builder.py.page:121 C/toolbar_builder.vala.page:104
47893msgid "Fullscreen"
47894msgstr "최대 화면"
47895
47896#. (itstool) path: td/p
47897#: C/toolbar_builder.py.page:122 C/toolbar_builder.vala.page:105
47898msgid "gtk-fullscreen"
47899msgstr "gtk-fullscreen"
47900
47901#. (itstool) path: td/p
47902#: C/toolbar_builder.py.page:125 C/toolbar_builder.vala.page:108
47903msgid "leave_fullscreen_button"
47904msgstr "leave_fullscreen_button"
47905
47906#. (itstool) path: td/p
47907#: C/toolbar_builder.py.page:128 C/toolbar_builder.vala.page:111
47908msgid "Leave Fullscreen"
47909msgstr "전체 화면 나가기"
47910
47911#. (itstool) path: td/p
47912#: C/toolbar_builder.py.page:129 C/toolbar_builder.vala.page:112
47913msgid "gtk-leave-fullscreen"
47914msgstr "gtk-leave-fullscreen"
47915
47916#. (itstool) path: item/media
47917#. This is a reference to an external file such as an image or video. When
47918#. the file changes, the md5 hash will change to let you know you need to
47919#. update your localized copy. The msgstr is not used at all. Set it to
47920#. whatever you like once you have updated your copy of the file.
47921#: C/toolbar_builder.py.page:133 C/toolbar_builder.vala.page:116
47922msgctxt "_"
47923msgid "external ref='media/glade_toolbar_editor.png' md5='8af65241e5ca47d5494a7b36640e6f1c'"
47924msgstr ""
47925
47926#. (itstool) path: item/p
47927#: C/toolbar_builder.py.page:138 C/toolbar_builder.vala.page:121
47928msgid "Close the <gui>Tool Bar Editor</gui>."
47929msgstr "<gui>도구 모음 편집기</gui>를 닫으십시오."
47930
47931#. (itstool) path: item/p
47932#: C/toolbar_builder.py.page:141
47933msgid ""
47934"When our program will first start, we do not want the <gui>Leave Fullscreen</gui> ToolButton to be visible, since "
47935"the application will not be in fullscreen mode. You can set this in the <gui>Common</gui> tab, by clicking the "
47936"<gui>Visible</gui> property to <gui>No</gui>. The ToolButton will still appear in the interface designer, but will "
47937"behave correctly when the file is loaded into your program code. Note that the method <code>show_all()</code> "
47938"would override this setting - so in the code we have to use <code>show()</code> separately on all the elements."
47939msgstr ""
47940"프로그램을 처음 시작할 때, 프로그램이 전체 화면 모드가 아니기에 <gui>전체 화면 나가기</gui> ToolButton을 나타내고 "
47941"싶진 않습니다. 이 설정은 <gui>일반</gui>  탭에서 <gui>Visible</gui>을 누르고 <gui>No</gui>로 설정할 수 있습니다. "
47942"ToolButton은 인터페이스 디자이너에서 여전히 나타나겠지만 프로그램 코드에 파일을 불러올 때, 상태에 따라 올바르게 나"
47943"타납니다. 참고로 <code>show_all()</code> 메서드는 이 설정을 무시한 채로 적용합니다. 따라서, 코드에서는 모든 구성요"
47944"소에 <code>show()</code> 함수를 각각 적용해야합니다."
47945
47946#. (itstool) path: p/media
47947#. This is a reference to an external file such as an image or video. When
47948#. the file changes, the md5 hash will change to let you know you need to
47949#. update your localized copy. The msgstr is not used at all. Set it to
47950#. whatever you like once you have updated your copy of the file.
47951#: C/toolbar_builder.py.page:142 C/toolbar_builder.vala.page:125
47952msgctxt "_"
47953msgid "external ref='media/glade_visible_no.png' md5='dc6c025aa825f4d772fbd283d6330026'"
47954msgstr ""
47955
47956#. (itstool) path: item/p
47957#: C/toolbar_builder.py.page:142 C/toolbar_builder.vala.page:125
47958msgid "<media type=\"image\" src=\"media/glade_visible_no.png\"> Setting the visible property to No </media>"
47959msgstr "<media type=\"image\" src=\"media/glade_visible_no.png\"> visible 속성을 No로 설정 </media>"
47960
47961#. (itstool) path: item/p
47962#: C/toolbar_builder.py.page:147 C/toolbar_builder.vala.page:130
47963msgid "Save your work, and close Glade."
47964msgstr "작업을 저장하고 글레이드를 닫으십시오."
47965
47966#. (itstool) path: item/p
47967#: C/toolbar_builder.py.page:150 C/toolbar_builder.vala.page:133
47968msgid ""
47969"The XML file created by Glade is shown below. This is the description of the toolbar. At the time of this writing, "
47970"the option to add the class Gtk.STYLE_CLASS_PRIMARY_TOOLBAR in the Glade Interface did not exist. We can manually "
47971"add this to the XML file. To do this, add the following XML code at line 9 of <file>toolbar_builder.ui</file>:"
47972msgstr ""
47973"글레이드에서 만든 XML 파일은 아래와 같습니다. 도구 모음의 설명 부분입니다. 이 글을 쓰는 시점에서는 글레이드 인터페"
47974"이스에서 추가할 Gtk.STYLE_CLASS_PRIMARY_TOOLBAR 옵션 클래스가 없습니다. 이 옵션 클래스를 XML 파일에 직접 추가할 수 "
47975"있습니다. 이렇게 하려면, 다음 <file>toolbar_builder.ui</file> XML 코드 9번째 줄에  추가하십시오:"
47976
47977#. (itstool) path: item/code
47978#: C/toolbar_builder.py.page:151 C/toolbar_builder.vala.page:134
47979#, no-wrap
47980msgid ""
47981"\n"
47982"  &lt;style&gt;\n"
47983"     &lt;class name=\"primary-toolbar\"/&gt;\n"
47984"  &lt;/style&gt;\n"
47985"  "
47986msgstr ""
47987"\n"
47988"  &lt;style&gt;\n"
47989"     &lt;class name=\"primary-toolbar\"/&gt;\n"
47990"  &lt;/style&gt;\n"
47991"  "
47992
47993#. (itstool) path: item/p
47994#: C/toolbar_builder.py.page:156 C/toolbar_builder.vala.page:139
47995msgid ""
47996"If you do not add this, the program will still work fine. The resulting toolbar will however look slightly "
47997"different then the screenshot at the top of this page."
47998msgstr ""
47999"추가하지 않았더라도 프로그램은 여전히 멀쩡하게 동작합니다. Toolbar의 결과는 이 페이지 상단의 스크린샷보다는 약간 다"
48000"르게 보일 수도 있습니다."
48001
48002#. (itstool) path: section/code
48003#. (itstool) path: page/code
48004#: C/toolbar_builder.py.page:159 C/toolbar_builder.vala.page:142
48005#, no-wrap
48006msgid ""
48007"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
48008"&lt;interface&gt;\n"
48009"  &lt;!-- interface-requires gtk+ 3.0 --&gt;\n"
48010"  &lt;object class=\"GtkToolbar\" id=\"toolbar\"&gt;\n"
48011"    &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48012"    &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48013"    &lt;property name=\"hexpand\"&gt;True&lt;/property&gt;\n"
48014"    &lt;property name=\"show_arrow\"&gt;False&lt;/property&gt;\n"
48015"    &lt;child&gt;\n"
48016"      &lt;object class=\"GtkToolButton\" id=\"new_button\"&gt;\n"
48017"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48018"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48019"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48020"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48021"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48022"        &lt;property name=\"action_name\"&gt;app.new&lt;/property&gt;\n"
48023"        &lt;property name=\"label\" translatable=\"yes\"&gt;New&lt;/property&gt;\n"
48024"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48025"        &lt;property name=\"stock_id\"&gt;gtk-new&lt;/property&gt;\n"
48026"      &lt;/object&gt;\n"
48027"      &lt;packing&gt;\n"
48028"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48029"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48030"      &lt;/packing&gt;\n"
48031"    &lt;/child&gt;\n"
48032"    &lt;child&gt;\n"
48033"      &lt;object class=\"GtkToolButton\" id=\"open_button\"&gt;\n"
48034"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48035"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48036"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48037"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48038"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48039"        &lt;property name=\"action_name\"&gt;app.open&lt;/property&gt;\n"
48040"        &lt;property name=\"label\" translatable=\"yes\"&gt;Open&lt;/property&gt;\n"
48041"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48042"        &lt;property name=\"stock_id\"&gt;gtk-open&lt;/property&gt;\n"
48043"      &lt;/object&gt;\n"
48044"      &lt;packing&gt;\n"
48045"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48046"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48047"      &lt;/packing&gt;\n"
48048"    &lt;/child&gt;\n"
48049"    &lt;child&gt;\n"
48050"      &lt;object class=\"GtkToolButton\" id=\"undo_button\"&gt;\n"
48051"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48052"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48053"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48054"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48055"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48056"        &lt;property name=\"action_name\"&gt;win.undo&lt;/property&gt;\n"
48057"        &lt;property name=\"label\" translatable=\"yes\"&gt;Undo&lt;/property&gt;\n"
48058"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48059"        &lt;property name=\"stock_id\"&gt;gtk-undo&lt;/property&gt;\n"
48060"      &lt;/object&gt;\n"
48061"      &lt;packing&gt;\n"
48062"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48063"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48064"      &lt;/packing&gt;\n"
48065"    &lt;/child&gt;\n"
48066"    &lt;child&gt;\n"
48067"      &lt;object class=\"GtkToolButton\" id=\"fullscreen_button\"&gt;\n"
48068"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48069"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48070"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48071"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48072"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48073"        &lt;property name=\"action_name\"&gt;win.fullscreen&lt;/property&gt;\n"
48074"        &lt;property name=\"label\" translatable=\"yes\"&gt;Fullscreen&lt;/property&gt;\n"
48075"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48076"        &lt;property name=\"stock_id\"&gt;gtk-fullscreen&lt;/property&gt;\n"
48077"      &lt;/object&gt;\n"
48078"      &lt;packing&gt;\n"
48079"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48080"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48081"      &lt;/packing&gt;\n"
48082"    &lt;/child&gt;\n"
48083"    &lt;child&gt;\n"
48084"      &lt;object class=\"GtkToolButton\" id=\"leave_fullscreen_button\"&gt;\n"
48085"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48086"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48087"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48088"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48089"        &lt;property name=\"action_name\"&gt;win.fullscreen&lt;/property&gt;\n"
48090"        &lt;property name=\"label\" translatable=\"yes\"&gt;Leave Fullscreen&lt;/property&gt;\n"
48091"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48092"        &lt;property name=\"stock_id\"&gt;gtk-leave-fullscreen&lt;/property&gt;\n"
48093"      &lt;/object&gt;\n"
48094"      &lt;packing&gt;\n"
48095"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48096"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48097"      &lt;/packing&gt;\n"
48098"    &lt;/child&gt;\n"
48099"  &lt;/object&gt;\n"
48100"&lt;/interface&gt;\n"
48101msgstr ""
48102"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
48103"&lt;interface&gt;\n"
48104"  &lt;!-- interface-requires gtk+ 3.0 --&gt;\n"
48105"  &lt;object class=\"GtkToolbar\" id=\"toolbar\"&gt;\n"
48106"    &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48107"    &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48108"    &lt;property name=\"hexpand\"&gt;True&lt;/property&gt;\n"
48109"    &lt;property name=\"show_arrow\"&gt;False&lt;/property&gt;\n"
48110"    &lt;child&gt;\n"
48111"      &lt;object class=\"GtkToolButton\" id=\"new_button\"&gt;\n"
48112"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48113"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48114"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48115"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48116"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48117"        &lt;property name=\"action_name\"&gt;app.new&lt;/property&gt;\n"
48118"        &lt;property name=\"label\" translatable=\"yes\"&gt;New&lt;/property&gt;\n"
48119"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48120"        &lt;property name=\"stock_id\"&gt;gtk-new&lt;/property&gt;\n"
48121"      &lt;/object&gt;\n"
48122"      &lt;packing&gt;\n"
48123"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48124"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48125"      &lt;/packing&gt;\n"
48126"    &lt;/child&gt;\n"
48127"    &lt;child&gt;\n"
48128"      &lt;object class=\"GtkToolButton\" id=\"open_button\"&gt;\n"
48129"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48130"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48131"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48132"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48133"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48134"        &lt;property name=\"action_name\"&gt;app.open&lt;/property&gt;\n"
48135"        &lt;property name=\"label\" translatable=\"yes\"&gt;Open&lt;/property&gt;\n"
48136"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48137"        &lt;property name=\"stock_id\"&gt;gtk-open&lt;/property&gt;\n"
48138"      &lt;/object&gt;\n"
48139"      &lt;packing&gt;\n"
48140"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48141"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48142"      &lt;/packing&gt;\n"
48143"    &lt;/child&gt;\n"
48144"    &lt;child&gt;\n"
48145"      &lt;object class=\"GtkToolButton\" id=\"undo_button\"&gt;\n"
48146"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48147"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48148"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48149"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48150"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48151"        &lt;property name=\"action_name\"&gt;win.undo&lt;/property&gt;\n"
48152"        &lt;property name=\"label\" translatable=\"yes\"&gt;Undo&lt;/property&gt;\n"
48153"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48154"        &lt;property name=\"stock_id\"&gt;gtk-undo&lt;/property&gt;\n"
48155"      &lt;/object&gt;\n"
48156"      &lt;packing&gt;\n"
48157"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48158"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48159"      &lt;/packing&gt;\n"
48160"    &lt;/child&gt;\n"
48161"    &lt;child&gt;\n"
48162"      &lt;object class=\"GtkToolButton\" id=\"fullscreen_button\"&gt;\n"
48163"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48164"        &lt;property name=\"visible\"&gt;True&lt;/property&gt;\n"
48165"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48166"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48167"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48168"        &lt;property name=\"action_name\"&gt;win.fullscreen&lt;/property&gt;\n"
48169"        &lt;property name=\"label\" translatable=\"yes\"&gt;Fullscreen&lt;/property&gt;\n"
48170"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48171"        &lt;property name=\"stock_id\"&gt;gtk-fullscreen&lt;/property&gt;\n"
48172"      &lt;/object&gt;\n"
48173"      &lt;packing&gt;\n"
48174"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48175"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48176"      &lt;/packing&gt;\n"
48177"    &lt;/child&gt;\n"
48178"    &lt;child&gt;\n"
48179"      &lt;object class=\"GtkToolButton\" id=\"leave_fullscreen_button\"&gt;\n"
48180"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48181"        &lt;property name=\"can_focus\"&gt;False&lt;/property&gt;\n"
48182"        &lt;property name=\"use_action_appearance\"&gt;False&lt;/property&gt;\n"
48183"        &lt;property name=\"is_important\"&gt;True&lt;/property&gt;\n"
48184"        &lt;property name=\"action_name\"&gt;win.fullscreen&lt;/property&gt;\n"
48185"        &lt;property name=\"label\" translatable=\"yes\"&gt;Leave Fullscreen&lt;/property&gt;\n"
48186"        &lt;property name=\"use_underline\"&gt;True&lt;/property&gt;\n"
48187"        &lt;property name=\"stock_id\"&gt;gtk-leave-fullscreen&lt;/property&gt;\n"
48188"      &lt;/object&gt;\n"
48189"      &lt;packing&gt;\n"
48190"        &lt;property name=\"expand\"&gt;False&lt;/property&gt;\n"
48191"        &lt;property name=\"homogeneous\"&gt;True&lt;/property&gt;\n"
48192"      &lt;/packing&gt;\n"
48193"    &lt;/child&gt;\n"
48194"  &lt;/object&gt;\n"
48195"&lt;/interface&gt;\n"
48196
48197#. (itstool) path: section/p
48198#. (itstool) path: page/p
48199#: C/toolbar_builder.py.page:166 C/toolbar_builder.vala.page:144
48200msgid "We now create the code below, which adds the toolbar from the file we just created."
48201msgstr "이제 앞서 만들었던 파일로 Toolbar를 추가하는 아래 코드를 작성하겠습니다."
48202
48203#. (itstool) path: section/code
48204#: C/toolbar_builder.py.page:167
48205#, no-wrap
48206msgid ""
48207"from gi.repository import Gtk\n"
48208"from gi.repository import Gdk\n"
48209"from gi.repository import Gio\n"
48210"import sys\n"
48211"\n"
48212"\n"
48213"class MyWindow(Gtk.ApplicationWindow):\n"
48214"\n"
48215"    def __init__(self, app):\n"
48216"        Gtk.Window.__init__(self, title=\"Toolbar Example\", application=app)\n"
48217"        self.set_default_size(400, 200)\n"
48218"\n"
48219"        # a grid to attach the toolbar (see below)\n"
48220"        grid = Gtk.Grid()\n"
48221"        self.add(grid)\n"
48222"        # we have to show the grid (and therefore the toolbar) with show(),\n"
48223"        # as show_all() would show also the buttons in the toolbar that we want to\n"
48224"        # be hidden (such as the leave_fullscreen button)\n"
48225"        grid.show()\n"
48226"\n"
48227"        # a builder to add the UI designed with Glade to the grid:\n"
48228"        builder = Gtk.Builder()\n"
48229"        # get the file (if it is there)\n"
48230"        try:\n"
48231"            builder.add_from_file(\"toolbar_builder.ui\")\n"
48232"        except:\n"
48233"            print(\"file not found\")\n"
48234"            sys.exit()\n"
48235"        # and attach it to the grid\n"
48236"        grid.attach(builder.get_object(\"toolbar\"), 0, 0, 1, 1)\n"
48237"\n"
48238"        # two buttons that will be used later in a method\n"
48239"        self.fullscreen_button = builder.get_object(\"fullscreen_button\")\n"
48240"        self.leave_fullscreen_button = builder.get_object(\n"
48241"            \"leave_fullscreen_button\")\n"
48242"\n"
48243"        # create the actions that control the window, connect their signal to a\n"
48244"        # callback method (see below), add the action to the window:\n"
48245"\n"
48246"        # undo\n"
48247"        undo_action = Gio.SimpleAction.new(\"undo\", None)\n"
48248"        undo_action.connect(\"activate\", self.undo_callback)\n"
48249"        self.add_action(undo_action)\n"
48250"\n"
48251"        # and fullscreen\n"
48252"        fullscreen_action = Gio.SimpleAction.new(\"fullscreen\", None)\n"
48253"        fullscreen_action.connect(\"activate\", self.fullscreen_callback)\n"
48254"        self.add_action(fullscreen_action)\n"
48255"\n"
48256"    # callback for undo\n"
48257"    def undo_callback(self, action, parameter):\n"
48258"        print(\"You clicked \\\"Undo\\\".\")\n"
48259"\n"
48260"    # callback for fullscreen\n"
48261"    def fullscreen_callback(self, action, parameter):\n"
48262"        # check if the state is the same as Gdk.WindowState.FULLSCREEN, which\n"
48263"        # is a bit flag\n"
48264"        is_fullscreen = self.get_window().get_state(\n"
48265"        ) &amp; Gdk.WindowState.FULLSCREEN != 0\n"
48266"        if is_fullscreen:\n"
48267"            self.unfullscreen()\n"
48268"            self.leave_fullscreen_button.hide()\n"
48269"            self.fullscreen_button.show()\n"
48270"        else:\n"
48271"            self.fullscreen()\n"
48272"            self.fullscreen_button.hide()\n"
48273"            self.leave_fullscreen_button.show()\n"
48274"\n"
48275"\n"
48276"class MyApplication(Gtk.Application):\n"
48277"\n"
48278"    def __init__(self):\n"
48279"        Gtk.Application.__init__(self)\n"
48280"\n"
48281"    def do_activate(self):\n"
48282"        win = MyWindow(self)\n"
48283"        # show the window - with show() not show_all() because that would show also\n"
48284"        # the leave_fullscreen button\n"
48285"        win.show()\n"
48286"\n"
48287"    def do_startup(self):\n"
48288"        Gtk.Application.do_startup(self)\n"
48289"\n"
48290"        # actions that control the application: create, connect their signal to a\n"
48291"        # callback method (see below), add the action to the application\n"
48292"\n"
48293"        # new\n"
48294"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
48295"        new_action.connect(\"activate\", self.new_callback)\n"
48296"        app.add_action(new_action)\n"
48297"\n"
48298"        # open\n"
48299"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
48300"        open_action.connect(\"activate\", self.open_callback)\n"
48301"        app.add_action(open_action)\n"
48302"\n"
48303"    # callback for new\n"
48304"    def new_callback(self, action, parameter):\n"
48305"        print(\"You clicked \\\"New\\\".\")\n"
48306"\n"
48307"    # callback for open\n"
48308"    def open_callback(self, action, parameter):\n"
48309"        print(\"You clicked \\\"Open\\\".\")\n"
48310"\n"
48311"app = MyApplication()\n"
48312"exit_status = app.run(sys.argv)\n"
48313"sys.exit(exit_status)\n"
48314msgstr ""
48315"from gi.repository import Gtk\n"
48316"from gi.repository import Gdk\n"
48317"from gi.repository import Gio\n"
48318"import sys\n"
48319"\n"
48320"\n"
48321"class MyWindow(Gtk.ApplicationWindow):\n"
48322"\n"
48323"    def __init__(self, app):\n"
48324"        Gtk.Window.__init__(self, title=\"Toolbar Example\", application=app)\n"
48325"        self.set_default_size(400, 200)\n"
48326"\n"
48327"        # a grid to attach the toolbar (see below)\n"
48328"        grid = Gtk.Grid()\n"
48329"        self.add(grid)\n"
48330"        # we have to show the grid (and therefore the toolbar) with show(),\n"
48331"        # as show_all() would show also the buttons in the toolbar that we want to\n"
48332"        # be hidden (such as the leave_fullscreen button)\n"
48333"        grid.show()\n"
48334"\n"
48335"        # a builder to add the UI designed with Glade to the grid:\n"
48336"        builder = Gtk.Builder()\n"
48337"        # get the file (if it is there)\n"
48338"        try:\n"
48339"            builder.add_from_file(\"toolbar_builder.ui\")\n"
48340"        except:\n"
48341"            print(\"file not found\")\n"
48342"            sys.exit()\n"
48343"        # and attach it to the grid\n"
48344"        grid.attach(builder.get_object(\"toolbar\"), 0, 0, 1, 1)\n"
48345"\n"
48346"        # two buttons that will be used later in a method\n"
48347"        self.fullscreen_button = builder.get_object(\"fullscreen_button\")\n"
48348"        self.leave_fullscreen_button = builder.get_object(\n"
48349"            \"leave_fullscreen_button\")\n"
48350"\n"
48351"        # create the actions that control the window, connect their signal to a\n"
48352"        # callback method (see below), add the action to the window:\n"
48353"\n"
48354"        # undo\n"
48355"        undo_action = Gio.SimpleAction.new(\"undo\", None)\n"
48356"        undo_action.connect(\"activate\", self.undo_callback)\n"
48357"        self.add_action(undo_action)\n"
48358"\n"
48359"        # and fullscreen\n"
48360"        fullscreen_action = Gio.SimpleAction.new(\"fullscreen\", None)\n"
48361"        fullscreen_action.connect(\"activate\", self.fullscreen_callback)\n"
48362"        self.add_action(fullscreen_action)\n"
48363"\n"
48364"    # callback for undo\n"
48365"    def undo_callback(self, action, parameter):\n"
48366"        print(\"You clicked \\\"Undo\\\".\")\n"
48367"\n"
48368"    # callback for fullscreen\n"
48369"    def fullscreen_callback(self, action, parameter):\n"
48370"        # check if the state is the same as Gdk.WindowState.FULLSCREEN, which\n"
48371"        # is a bit flag\n"
48372"        is_fullscreen = self.get_window().get_state(\n"
48373"        ) &amp; Gdk.WindowState.FULLSCREEN != 0\n"
48374"        if is_fullscreen:\n"
48375"            self.unfullscreen()\n"
48376"            self.leave_fullscreen_button.hide()\n"
48377"            self.fullscreen_button.show()\n"
48378"        else:\n"
48379"            self.fullscreen()\n"
48380"            self.fullscreen_button.hide()\n"
48381"            self.leave_fullscreen_button.show()\n"
48382"\n"
48383"\n"
48384"class MyApplication(Gtk.Application):\n"
48385"\n"
48386"    def __init__(self):\n"
48387"        Gtk.Application.__init__(self)\n"
48388"\n"
48389"    def do_activate(self):\n"
48390"        win = MyWindow(self)\n"
48391"        # show the window - with show() not show_all() because that would show also\n"
48392"        # the leave_fullscreen button\n"
48393"        win.show()\n"
48394"\n"
48395"    def do_startup(self):\n"
48396"        Gtk.Application.do_startup(self)\n"
48397"\n"
48398"        # actions that control the application: create, connect their signal to a\n"
48399"        # callback method (see below), add the action to the application\n"
48400"\n"
48401"        # new\n"
48402"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
48403"        new_action.connect(\"activate\", self.new_callback)\n"
48404"        app.add_action(new_action)\n"
48405"\n"
48406"        # open\n"
48407"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
48408"        open_action.connect(\"activate\", self.open_callback)\n"
48409"        app.add_action(open_action)\n"
48410"\n"
48411"    # callback for new\n"
48412"    def new_callback(self, action, parameter):\n"
48413"        print(\"You clicked \\\"New\\\".\")\n"
48414"\n"
48415"    # callback for open\n"
48416"    def open_callback(self, action, parameter):\n"
48417"        print(\"You clicked \\\"Open\\\".\")\n"
48418"\n"
48419"app = MyApplication()\n"
48420"exit_status = app.run(sys.argv)\n"
48421"sys.exit(exit_status)\n"
48422
48423#. (itstool) path: section/title
48424#: C/toolbar_builder.py.page:172
48425msgid "Useful methods for Gtk.Builder"
48426msgstr "Gtk.Builder에 쓸만한 메서드"
48427
48428#. (itstool) path: section/p
48429#: C/toolbar_builder.py.page:173
48430msgid "For the useful methods for a Toolbar widget, see <link xref=\"toolbar.py\"/>"
48431msgstr "Toolbar 위젯의 쓸만한 메서드를 찾아보려면 <link xref=\"toolbar.py\"/>를 참고하십시오"
48432
48433#. (itstool) path: section/p
48434#: C/toolbar_builder.py.page:175
48435msgid "Gtk.Builder builds an interface from an XML UI definition."
48436msgstr "Gtk.Builder는 XML UI 정의로 인터페이스를 만듭니다."
48437
48438#. (itstool) path: item/p
48439#: C/toolbar_builder.py.page:178
48440msgid ""
48441"<code>add_from_file(filename)</code> loads and parses the given file and merges it with the current contents of "
48442"the Gtk.Builder."
48443msgstr ""
48444"<code>add_from_file(filename)</code> 함수는 주어진 파일을 불러오고 해석한 다음 Gtk.Builder의 현재 내용과 합칩니다."
48445
48446#. (itstool) path: item/p
48447#: C/toolbar_builder.py.page:179
48448msgid ""
48449"<code>add_from_string(string)</code> parses the given string and merges it with the current contents of the Gtk."
48450"Builder."
48451msgstr "<code>add_from_string(string)</code> 함수는 주어진 문자열을 해석하고 Gtk.Builder의 현재 내용과 합칩니다."
48452
48453#. (itstool) path: item/p
48454#: C/toolbar_builder.py.page:180
48455msgid ""
48456"<code>add_objects_from_file(filename, object_ids)</code> is the same as <code>add_from_file()</code>, but it loads "
48457"only the objects with the ids given in the <code>object_id</code>s list."
48458msgstr ""
48459"<code>add_objects_from_file(filename, object_ids)</code> 함수는 <code>add_from_file()</code> 함수와 동일하지만, "
48460"<code>object_id</code> 목록에 주어진 ID가 딸린 객체만을 불러옵니다."
48461
48462#. (itstool) path: item/p
48463#: C/toolbar_builder.py.page:181
48464msgid ""
48465"<code>add_objects_from_string(string, object_ids)</code> is the same as <code>add_from_string()</code>, but it "
48466"loads only the objects with the ids given in the <code>object_id</code>s list."
48467msgstr ""
48468"<code>add_objects_from_string(string, object_ids)</code> 함수는 <code>add_from_string()</code>함수와 동일하지만, "
48469"<code>object_id</code> 목록에 주어진 ID의 객체만을 불러옵니다."
48470
48471#. (itstool) path: item/p
48472#: C/toolbar_builder.py.page:182
48473msgid ""
48474"<code>get_object(object_id)</code> retrieves the widget with the id <code>object_id</code> from the loaded objects "
48475"in the builder."
48476msgstr ""
48477"<code>get_object(object_id)</code> 함수는 빌더에서 불러온 객체의 <code>object_id</code> ID를 가진 위젯을 가져옵니"
48478"다."
48479
48480#. (itstool) path: item/p
48481#: C/toolbar_builder.py.page:183
48482msgid "<code>get_objects()</code> returns all loaded objects."
48483msgstr "<code>get_objects()</code> 함수는 불러온 모든 객체를 반환합니다."
48484
48485#. (itstool) path: item/p
48486#: C/toolbar_builder.py.page:184
48487msgid ""
48488"<code>connect_signals(handler_object)</code> connects the signals to the methods given in the "
48489"<code>handler_object</code>. This can be any object which contains keys or attributes that are called like the "
48490"signal handler names given in the interface description, e.g. a class or a dict. In line 39 the signal <code>"
48491"\"activate\"</code> from the action <code>undo_action</code> is connected to the callback function "
48492"<code>undo_callback()</code> using <code><var>action</var>.connect(<var>signal</var>, <var>callback function</"
48493"var>)</code>. See <link xref=\"signals-callbacks.py\"/> for a more detailed explanation."
48494msgstr ""
48495"<code>connect_signals(handler_object)</code> 함수는 <code>handler_object</code>로 지정한 메서드에 시그널을 연결합니"
48496"다. 이 함수에는 class 또는 dict 처럼 인터페이스 설명에 주어진 시그널 핸들러 이름처럼 키 또는 속성이 들어간 객체가 "
48497"될 수 있습니다. 39번째 줄에서 <code>undo_action</code> 동작의 <code>\"activate\"</code> 시그널은 "
48498"<code><var>action</var>.connect(<var>signal</var>, <var>callback function</var>)</code> 함수로 "
48499"<code>undo_callback()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref=\"signals-callbacks.py\"/>를 참"
48500"조하십시오."
48501
48502#. (itstool) path: info/title
48503#: C/toolbar_builder.vala.page:8
48504msgctxt "text"
48505msgid "Toolbar created using Glade (Vala)"
48506msgstr "글레이드로 만든 도구 모음(Vala)"
48507
48508#. (itstool) path: page/p
48509#: C/toolbar_builder.vala.page:26
48510msgid ""
48511"This example is similar to <link xref=\"toolbar.vala\"/>, except we use Glade to create the toolbar in an XML ui "
48512"file."
48513msgstr ""
48514"이 예제는 XML UI 파일을 사용해 도구 모음을 만들 때 글레이드를 사용할 수 있다는 점은 빼고 <link xref=\"toolbar.vala"
48515"\"/>와 유사합니다."
48516
48517#. (itstool) path: item/p
48518#: C/toolbar_builder.vala.page:124
48519msgid ""
48520"When our program will first start, we don't want the <gui>Leave Fullscreen</gui> ToolButton to be visible, since "
48521"the application will not be in fullscreen mode. You can set this in the <gui>Common</gui> tab, by clicking the "
48522"<gui>Visible</gui> property to <gui>No</gui>. The ToolButton will still appear in the interface designer, but will "
48523"behave correctly when the file is loaded into your program code."
48524msgstr ""
48525"프로그램을 처음 시작할 때, 프로그램이 전체 화면 모드가 아니기에 <gui>전체 화면 나가기</gui> ToolButton을 나타내고 "
48526"싶진 않습니다. 이 설정은 <gui>일반</gui>  탭에서 <gui>Visible</gui>을 누르고 <gui>No</gui>로 설정할 수 있습니다. "
48527"ToolButton은 인터페이스 디자이너에서 여전히 나타나겠지만 프로그램 코드에 파일을 불러올 때, 상태에 따라 올바르게 나"
48528"타납니다."
48529
48530#. (itstool) path: page/code
48531#: C/toolbar_builder.vala.page:145
48532#, no-wrap
48533msgid ""
48534"/* This is the Window */\n"
48535"class MyWindow : Gtk.ApplicationWindow {\n"
48536"\n"
48537"\t/* Declare these two ToolButtons, as we will get them\n"
48538"\t * from the ui file (see lines 32 and 33), so we can\n"
48539"\t * hide() and show() them as needed.*/\n"
48540"\tGtk.ToolButton fullscreen_button;\n"
48541"\tGtk.ToolButton leave_fullscreen_button;\n"
48542"\n"
48543"\t/* Constructor */\n"
48544"\tinternal MyWindow (MyApplication app) {\n"
48545"\t\tObject (application: app, title: \"Toolbar Example\");\n"
48546"\n"
48547"\t\tthis.set_default_size (400, 200);\n"
48548"\t\tvar grid = new Gtk.Grid ();\n"
48549"\t\tthis.add (grid);\n"
48550"\t\tgrid.show ();\n"
48551"\n"
48552"\t\t/* add the toolbar from the ui file */\n"
48553"\t\tvar builder = new Gtk.Builder ();\n"
48554"\t\ttry {\n"
48555"\t\t\tbuilder.add_from_file (\"toolbar_builder.ui\");\n"
48556"\t\t}\n"
48557"\t\t/* Handle the exception */\n"
48558"\t\tcatch (Error e) {\n"
48559"\t\t\terror (\"Unable to load file: %s\", e.message);\n"
48560"\t\t}\n"
48561"\n"
48562"\t\tgrid.attach (builder.get_object (\"toolbar\") as Gtk.Toolbar, 0, 0, 1, 1);\n"
48563"\n"
48564"\t\t/* get these objects from the ui file so we can toggle between them */\n"
48565"\t\tfullscreen_button = builder.get_object (\"fullscreen_button\") as Gtk.ToolButton;\n"
48566"\t\tleave_fullscreen_button = builder.get_object (\"leave_fullscreen_button\") as Gtk.ToolButton;\n"
48567"\n"
48568"\t\t/* create the \"undo\" window action action */\n"
48569"\t\tvar undo_action = new SimpleAction (\"undo\", null);\n"
48570"\t\tundo_action.activate.connect (undo_callback);\n"
48571"\t\tthis.add_action (undo_action);\n"
48572"\n"
48573"\t\t/* create the \"fullscreen\" window action */\n"
48574"\t\tvar fullscreen_action = new SimpleAction (\"fullscreen\", null);\n"
48575"\t\tfullscreen_action.activate.connect (fullscreen_callback);\n"
48576"\t\tthis.add_action (fullscreen_action);\n"
48577"\t}\n"
48578"\n"
48579"\tvoid undo_callback (SimpleAction simple, Variant? parameter) {\n"
48580"\t\t\tprint (\"You clicked \\\"Undo\\\".\\n\");\n"
48581"\t}\n"
48582"\n"
48583"\tvoid fullscreen_callback (SimpleAction simple, Variant? parameter) {\n"
48584"\t\tif ((this.get_window ().get_state () &amp; Gdk.WindowState.FULLSCREEN) != 0) {\n"
48585"\t\t\tthis.unfullscreen ();\n"
48586"\t\t\tleave_fullscreen_button.hide ();\n"
48587"\t\t\tfullscreen_button.show ();\n"
48588"\t\t}\n"
48589"\t\telse {\n"
48590"\t\t\tthis.fullscreen ();\n"
48591"\t\t\tfullscreen_button.hide ();\n"
48592"\t\t\tleave_fullscreen_button.show ();\n"
48593"\t\t}\n"
48594"\t}\n"
48595"}\n"
48596"\n"
48597"/* This is the application */\n"
48598"class MyApplication : Gtk.Application {\n"
48599"\tprotected override void activate () {\n"
48600"\t\tnew MyWindow (this).show ();\n"
48601"\t}\n"
48602"\n"
48603"\tprotected override void startup () {\n"
48604"\t\tbase.startup ();\n"
48605"\n"
48606"\t\t/* Create the \"new\" action and add it to the app*/\n"
48607"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
48608"\t\tnew_action.activate.connect (new_callback);\n"
48609"\t\tthis.add_action (new_action);\n"
48610"\n"
48611"\t\t/* Create the \"open\" action, and add it to the app */\n"
48612"\t\tvar open_action = new SimpleAction (\"open\", null);\n"
48613"\t\topen_action.activate.connect (open_callback);\n"
48614"\t\tthis.add_action (open_action);\n"
48615"\n"
48616"\t\t/* You could also add the action to the app menu\n"
48617"\t\t * if you wanted to.\n"
48618"\t\t */\n"
48619"\t\t//var menu = new Menu ();\n"
48620"\t\t//menu.append (\"New\", \"app.new\");\n"
48621"\t\t//this.app_menu = menu;\n"
48622"\t}\n"
48623"\n"
48624"\tvoid new_callback (SimpleAction action, Variant? parameter) {\n"
48625"\t\tprint (\"You clicked \\\"New\\\".\\n\");\n"
48626"\t}\n"
48627"\n"
48628"\tvoid open_callback (SimpleAction action, Variant? parameter) {\n"
48629"\t\t\tprint (\"You clicked \\\"Open\\\".\\n\");\n"
48630"\t}\n"
48631"}\n"
48632"\n"
48633"/* The main function creates the application and runs it. */\n"
48634"int main (string[] args) {\n"
48635"\treturn new MyApplication ().run (args);\n"
48636"}\n"
48637msgstr ""
48638"/* This is the Window */\n"
48639"class MyWindow : Gtk.ApplicationWindow {\n"
48640"\n"
48641"\t/* Declare these two ToolButtons, as we will get them\n"
48642"\t * from the ui file (see lines 32 and 33), so we can\n"
48643"\t * hide() and show() them as needed.*/\n"
48644"\tGtk.ToolButton fullscreen_button;\n"
48645"\tGtk.ToolButton leave_fullscreen_button;\n"
48646"\n"
48647"\t/* Constructor */\n"
48648"\tinternal MyWindow (MyApplication app) {\n"
48649"\t\tObject (application: app, title: \"Toolbar Example\");\n"
48650"\n"
48651"\t\tthis.set_default_size (400, 200);\n"
48652"\t\tvar grid = new Gtk.Grid ();\n"
48653"\t\tthis.add (grid);\n"
48654"\t\tgrid.show ();\n"
48655"\n"
48656"\t\t/* add the toolbar from the ui file */\n"
48657"\t\tvar builder = new Gtk.Builder ();\n"
48658"\t\ttry {\n"
48659"\t\t\tbuilder.add_from_file (\"toolbar_builder.ui\");\n"
48660"\t\t}\n"
48661"\t\t/* Handle the exception */\n"
48662"\t\tcatch (Error e) {\n"
48663"\t\t\terror (\"Unable to load file: %s\", e.message);\n"
48664"\t\t}\n"
48665"\n"
48666"\t\tgrid.attach (builder.get_object (\"toolbar\") as Gtk.Toolbar, 0, 0, 1, 1);\n"
48667"\n"
48668"\t\t/* get these objects from the ui file so we can toggle between them */\n"
48669"\t\tfullscreen_button = builder.get_object (\"fullscreen_button\") as Gtk.ToolButton;\n"
48670"\t\tleave_fullscreen_button = builder.get_object (\"leave_fullscreen_button\") as Gtk.ToolButton;\n"
48671"\n"
48672"\t\t/* create the \"undo\" window action action */\n"
48673"\t\tvar undo_action = new SimpleAction (\"undo\", null);\n"
48674"\t\tundo_action.activate.connect (undo_callback);\n"
48675"\t\tthis.add_action (undo_action);\n"
48676"\n"
48677"\t\t/* create the \"fullscreen\" window action */\n"
48678"\t\tvar fullscreen_action = new SimpleAction (\"fullscreen\", null);\n"
48679"\t\tfullscreen_action.activate.connect (fullscreen_callback);\n"
48680"\t\tthis.add_action (fullscreen_action);\n"
48681"\t}\n"
48682"\n"
48683"\tvoid undo_callback (SimpleAction simple, Variant? parameter) {\n"
48684"\t\t\tprint (\"You clicked \\\"Undo\\\".\\n\");\n"
48685"\t}\n"
48686"\n"
48687"\tvoid fullscreen_callback (SimpleAction simple, Variant? parameter) {\n"
48688"\t\tif ((this.get_window ().get_state () &amp; Gdk.WindowState.FULLSCREEN) != 0) {\n"
48689"\t\t\tthis.unfullscreen ();\n"
48690"\t\t\tleave_fullscreen_button.hide ();\n"
48691"\t\t\tfullscreen_button.show ();\n"
48692"\t\t}\n"
48693"\t\telse {\n"
48694"\t\t\tthis.fullscreen ();\n"
48695"\t\t\tfullscreen_button.hide ();\n"
48696"\t\t\tleave_fullscreen_button.show ();\n"
48697"\t\t}\n"
48698"\t}\n"
48699"}\n"
48700"\n"
48701"/* This is the application */\n"
48702"class MyApplication : Gtk.Application {\n"
48703"\tprotected override void activate () {\n"
48704"\t\tnew MyWindow (this).show ();\n"
48705"\t}\n"
48706"\n"
48707"\tprotected override void startup () {\n"
48708"\t\tbase.startup ();\n"
48709"\n"
48710"\t\t/* Create the \"new\" action and add it to the app*/\n"
48711"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
48712"\t\tnew_action.activate.connect (new_callback);\n"
48713"\t\tthis.add_action (new_action);\n"
48714"\n"
48715"\t\t/* Create the \"open\" action, and add it to the app */\n"
48716"\t\tvar open_action = new SimpleAction (\"open\", null);\n"
48717"\t\topen_action.activate.connect (open_callback);\n"
48718"\t\tthis.add_action (open_action);\n"
48719"\n"
48720"\t\t/* You could also add the action to the app menu\n"
48721"\t\t * if you wanted to.\n"
48722"\t\t */\n"
48723"\t\t//var menu = new Menu ();\n"
48724"\t\t//menu.append (\"New\", \"app.new\");\n"
48725"\t\t//this.app_menu = menu;\n"
48726"\t}\n"
48727"\n"
48728"\tvoid new_callback (SimpleAction action, Variant? parameter) {\n"
48729"\t\tprint (\"You clicked \\\"New\\\".\\n\");\n"
48730"\t}\n"
48731"\n"
48732"\tvoid open_callback (SimpleAction action, Variant? parameter) {\n"
48733"\t\t\tprint (\"You clicked \\\"Open\\\".\\n\");\n"
48734"\t}\n"
48735"}\n"
48736"\n"
48737"/* The main function creates the application and runs it. */\n"
48738"int main (string[] args) {\n"
48739"\treturn new MyApplication ().run (args);\n"
48740"}\n"
48741
48742#. (itstool) path: info/title
48743#: C/tooltip.c.page:8
48744msgctxt "text"
48745msgid "Tooltip (C)"
48746msgstr "Tooltip (C)"
48747
48748#. (itstool) path: info/desc
48749#: C/tooltip.c.page:19 C/tooltip.js.page:19 C/tooltip.py.page:20 C/tooltip.vala.page:19
48750msgid "Add tips to your widgets"
48751msgstr "위젯에 도움말을 추가합니다"
48752
48753#. (itstool) path: page/title
48754#: C/tooltip.c.page:22 C/tooltip.js.page:22 C/tooltip.py.page:23 C/tooltip.vala.page:22
48755msgid "Tooltip"
48756msgstr "Tooltip"
48757
48758#. (itstool) path: page/media
48759#. This is a reference to an external file such as an image or video. When
48760#. the file changes, the md5 hash will change to let you know you need to
48761#. update your localized copy. The msgstr is not used at all. Set it to
48762#. whatever you like once you have updated your copy of the file.
48763#: C/tooltip.c.page:23 C/tooltip.js.page:23 C/tooltip.py.page:24 C/tooltip.vala.page:23
48764msgctxt "_"
48765msgid "external ref='media/tooltip.png' md5='41e35860a51e39cb48c71e57bb8fb1d0'"
48766msgstr ""
48767
48768#. (itstool) path: page/p
48769#: C/tooltip.c.page:24 C/tooltip.js.page:24 C/tooltip.py.page:25 C/tooltip.vala.page:24
48770msgid "A toolbar with a tooltip (with an image) for a button."
48771msgstr "단추에 풍선 도움말(및 그림)을 넣은 도구 모음입니다."
48772
48773#. (itstool) path: note/p
48774#: C/tooltip.c.page:26
48775msgid "This example builds on the <link xref=\"toolbar.c\">Toolbar</link> example."
48776msgstr "이 예제는 <link xref=\"toolbar.c\">도구 모음</link> 예제로 만듭니다."
48777
48778#. (itstool) path: section/code
48779#: C/tooltip.c.page:31
48780#, no-wrap
48781#| msgid ""
48782#| "#include &lt;gtk/gtk.h&gt;\n"
48783#| "\n"
48784#| "static gboolean \n"
48785#| "undo_tooltip_callback (GtkStatusIcon *status_icon,\n"
48786#| "                       gint           x,\n"
48787#| "                       gint           y,\n"
48788#| "                       gboolean       keyboard_mode,\n"
48789#| "                       GtkTooltip    *tooltip,\n"
48790#| "                       gpointer       user_data)\n"
48791#| "{\n"
48792#| "  /* set the text for the tooltip */\n"
48793#| "  gtk_tooltip_set_text (tooltip, \"Undo your last action\");\n"
48794#| "   \n"
48795#| "  /* set an icon fot the tooltip */\n"
48796#| "  gtk_tooltip_set_icon_from_stock(tooltip, \"gtk-undo\", GTK_ICON_SIZE_MENU);\n"
48797#| "\n"
48798#| "  /* show the tooltip */\n"
48799#| "  return TRUE;\n"
48800#| "}\n"
48801#| "\n"
48802#| "\n"
48803#| "static void\n"
48804#| "undo_callback (GSimpleAction *simple,\n"
48805#| "               GVariant      *parameter,\n"
48806#| "               gpointer       user_data)\n"
48807#| "{\n"
48808#| "  g_print (\"You clicked \\\"Undo\\\".\\n\");\n"
48809#| "}\n"
48810#| "\n"
48811#| "\n"
48812#| "static void\n"
48813#| "activate (GtkApplication *app,\n"
48814#| "          gpointer        user_data)\n"
48815#| "{\n"
48816#| "  GtkWidget *grid;\n"
48817#| "  GtkWidget *window;\n"
48818#| "  GtkWidget *toolbar;\n"
48819#| "\n"
48820#| "  GtkToolItem *new_button;\n"
48821#| "  GtkToolItem *open_button;\n"
48822#| "  GtkToolItem *undo_button;\n"
48823#| "\n"
48824#| "  GtkStyleContext *style_context;\n"
48825#| "\n"
48826#| "  GSimpleAction *undo_action;\n"
48827#| "\n"
48828#| "  window = gtk_application_window_new (app);\n"
48829#| "  gtk_window_set_title (GTK_WINDOW (window), \"Toolbar with Tooltips Example\");\n"
48830#| "  gtk_window_set_default_size (GTK_WINDOW (window), 400, 200);\n"
48831#| "\n"
48832#| "  /* Here we begin to create the toolbar */\n"
48833#| "  toolbar = gtk_toolbar_new ();\n"
48834#| "\n"
48835#| "  /* Set the toolbar to be the primary toolbar of the application */\n"
48836#| "  style_context = gtk_widget_get_style_context (toolbar);\n"
48837#| "  gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);\n"
48838#| "\n"
48839#| "  /* Create a button for the \"new\" action, with a stock image */\n"
48840#| "  new_button = gtk_tool_button_new_from_stock (GTK_STOCK_NEW);\n"
48841#| "  gtk_tool_item_set_is_important (new_button, TRUE);\n"
48842#| "  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), new_button, 0);\n"
48843#| "  gtk_widget_show (GTK_WIDGET (new_button));\n"
48844#| "\n"
48845#| "  /* Set the action name for the \"new\" action. We use \"app.new\" to\n"
48846#| "   * indicate that the action controls the application.\n"
48847#| "   */\n"
48848#| "  gtk_actionable_set_action_name (GTK_ACTIONABLE (new_button), \"app.new\");\n"
48849#| "\n"
48850#| "  /*******************************\n"
48851#| "   * Tooltip for the New ToolItem:\n"
48852#| "   * a tooltip with text\n"
48853#| "   *******************************/\n"
48854#| "   gtk_tool_item_set_tooltip_text (new_button, \"Create a new file\");  \n"
48855#| "\n"
48856#| "  /* \"Open\" */\n"
48857#| "  open_button = gtk_tool_button_new_from_stock (GTK_STOCK_OPEN);\n"
48858#| "  gtk_tool_item_set_is_important (open_button, TRUE);\n"
48859#| "  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), open_button, 1);\n"
48860#| "  gtk_widget_show (GTK_WIDGET (open_button));\n"
48861#| "  gtk_actionable_set_action_name (GTK_ACTIONABLE (open_button), \"app.open\");\n"
48862#| "\n"
48863#| "  /*******************************\n"
48864#| "   * Tooltip for the Open ToolItem:\n"
48865#| "   * a tooltip using Pango markup \n"
48866#| "   * language\n"
48867#| "   *******************************/\n"
48868#| "  gtk_tool_item_set_tooltip_text (open_button, \"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
48869#| "\n"
48870#| "  /* \"Undo\" */\n"
48871#| "  undo_button = gtk_tool_button_new_from_stock (GTK_STOCK_UNDO);\n"
48872#| "  gtk_tool_item_set_is_important (undo_button, TRUE);\n"
48873#| "  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), undo_button, 2);\n"
48874#| "  gtk_widget_show (GTK_WIDGET (undo_button));\n"
48875#| "\n"
48876#| "  /* In this case, we use \"win.undo\" to indicate that\n"
48877#| "   * the action controls only the window\n"
48878#| "   */\n"
48879#| "  gtk_actionable_set_action_name (GTK_ACTIONABLE (undo_button), \"win.undo\");\n"
48880#| "\n"
48881#| "  /*******************************\n"
48882#| "   * Tooltip for the Undo ToolItem:\n"
48883#| "   * a tooltip with an image\n"
48884#| "   *******************************/\n"
48885#| "  gtk_widget_set_has_tooltip (GTK_WIDGET (undo_button), TRUE);\n"
48886#| "\n"
48887#| "  // Next, we connect the query_tooltip signal\n"
48888#| "  g_signal_connect (undo_button, \"query-tooltip\", G_CALLBACK (undo_tooltip_callback), NULL);\n"
48889#| "\n"
48890#| "  gtk_widget_set_hexpand (toolbar, TRUE);\n"
48891#| "  gtk_widget_show (toolbar);\n"
48892#| "\n"
48893#| "  grid = gtk_grid_new ();\n"
48894#| "  gtk_grid_attach (GTK_GRID (grid), toolbar, 0, 0, 1, 1);\n"
48895#| "  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
48896#| "  gtk_widget_show (GTK_WIDGET (grid));\n"
48897#| "\n"
48898#| "  /* Use the action names to create the actions that control the window, and\n"
48899#| "   * connect them to the appropriate callbackfunctions.\n"
48900#| "   */\n"
48901#| "  undo_action = g_simple_action_new (\"undo\", NULL);\n"
48902#| "  g_signal_connect (undo_action, \"activate\", G_CALLBACK (undo_callback),\n"
48903#| "                    GTK_WINDOW (window));\n"
48904#| "  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (undo_action));\n"
48905#| "\n"
48906#| "  gtk_widget_show (window);\n"
48907#| "}\n"
48908#| "\n"
48909#| "\n"
48910#| "/* Callback function for the new action */\n"
48911#| "static void\n"
48912#| "new_callback (GSimpleAction *simple,\n"
48913#| "              GVariant      *parameter,\n"
48914#| "              gpointer       user_data)\n"
48915#| "{\n"
48916#| "  g_print (\"You clicked \\\"New\\\".\\n\");\n"
48917#| "}\n"
48918#| "\n"
48919#| "\n"
48920#| "/* Callback function for the open action */\n"
48921#| "static void\n"
48922#| "open_callback (GSimpleAction *simple,\n"
48923#| "               GVariant      *parameter,\n"
48924#| "               gpointer       user_data)\n"
48925#| "{\n"
48926#| "  g_print (\"You clicked \\\"Open\\\".\\n\");\n"
48927#| "}\n"
48928#| "\n"
48929#| "\n"
48930#| "/* In this function, we create the actions in which control the window, and\n"
48931#| " * connect their signals to the appropriate callback function.\n"
48932#| " */\n"
48933#| "static void\n"
48934#| "startup (GApplication *app,\n"
48935#| "         gpointer      user_data)\n"
48936#| "{\n"
48937#| "  GSimpleAction *new_action;\n"
48938#| "  GSimpleAction *open_action;\n"
48939#| "\n"
48940#| "  new_action = g_simple_action_new (\"new\", NULL);\n"
48941#| "  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
48942#| "  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
48943#| "\n"
48944#| "  open_action = g_simple_action_new (\"open\", NULL);\n"
48945#| "  g_signal_connect (open_action, \"activate\", G_CALLBACK (open_callback), app);\n"
48946#| "  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (open_action));\n"
48947#| "}\n"
48948#| "\n"
48949#| "\n"
48950#| "\n"
48951#| "/* Startup function for the application */\n"
48952#| "int\n"
48953#| "main (int argc, char **argv)\n"
48954#| "{\n"
48955#| "  GtkApplication *app;\n"
48956#| "  int status;\n"
48957#| "\n"
48958#| "  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
48959#| "  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
48960#| "  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
48961#| "  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
48962#| "  g_object_unref (app);\n"
48963#| "\n"
48964#| "  return status;\n"
48965#| "}\n"
48966msgid ""
48967"#include &lt;gtk/gtk.h&gt;\n"
48968"\n"
48969"static gboolean \n"
48970"undo_tooltip_callback (GtkStatusIcon *status_icon,\n"
48971"                       gint           x,\n"
48972"                       gint           y,\n"
48973"                       gboolean       keyboard_mode,\n"
48974"                       GtkTooltip    *tooltip,\n"
48975"                       gpointer       user_data)\n"
48976"{\n"
48977"  /* set the text for the tooltip */\n"
48978"  gtk_tooltip_set_text (tooltip, \"Undo your last action\");\n"
48979"   \n"
48980"  /* set an icon for the tooltip */\n"
48981"  gtk_tooltip_set_icon_from_stock(tooltip, \"gtk-undo\", GTK_ICON_SIZE_MENU);\n"
48982"\n"
48983"  /* show the tooltip */\n"
48984"  return TRUE;\n"
48985"}\n"
48986"\n"
48987"\n"
48988"static void\n"
48989"undo_callback (GSimpleAction *simple,\n"
48990"               GVariant      *parameter,\n"
48991"               gpointer       user_data)\n"
48992"{\n"
48993"  g_print (\"You clicked \\\"Undo\\\".\\n\");\n"
48994"}\n"
48995"\n"
48996"\n"
48997"static void\n"
48998"activate (GtkApplication *app,\n"
48999"          gpointer        user_data)\n"
49000"{\n"
49001"  GtkWidget *grid;\n"
49002"  GtkWidget *window;\n"
49003"  GtkWidget *toolbar;\n"
49004"\n"
49005"  GtkToolItem *new_button;\n"
49006"  GtkToolItem *open_button;\n"
49007"  GtkToolItem *undo_button;\n"
49008"\n"
49009"  GtkStyleContext *style_context;\n"
49010"\n"
49011"  GSimpleAction *undo_action;\n"
49012"\n"
49013"  window = gtk_application_window_new (app);\n"
49014"  gtk_window_set_title (GTK_WINDOW (window), \"Toolbar with Tooltips Example\");\n"
49015"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 200);\n"
49016"\n"
49017"  /* Here we begin to create the toolbar */\n"
49018"  toolbar = gtk_toolbar_new ();\n"
49019"\n"
49020"  /* Set the toolbar to be the primary toolbar of the application */\n"
49021"  style_context = gtk_widget_get_style_context (toolbar);\n"
49022"  gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);\n"
49023"\n"
49024"  /* Create a button for the \"new\" action, with a stock image */\n"
49025"  new_button = gtk_tool_button_new_from_stock (GTK_STOCK_NEW);\n"
49026"  gtk_tool_item_set_is_important (new_button, TRUE);\n"
49027"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), new_button, 0);\n"
49028"  gtk_widget_show (GTK_WIDGET (new_button));\n"
49029"\n"
49030"  /* Set the action name for the \"new\" action. We use \"app.new\" to\n"
49031"   * indicate that the action controls the application.\n"
49032"   */\n"
49033"  gtk_actionable_set_action_name (GTK_ACTIONABLE (new_button), \"app.new\");\n"
49034"\n"
49035"  /*******************************\n"
49036"   * Tooltip for the New ToolItem:\n"
49037"   * a tooltip with text\n"
49038"   *******************************/\n"
49039"   gtk_tool_item_set_tooltip_text (new_button, \"Create a new file\");  \n"
49040"\n"
49041"  /* \"Open\" */\n"
49042"  open_button = gtk_tool_button_new_from_stock (GTK_STOCK_OPEN);\n"
49043"  gtk_tool_item_set_is_important (open_button, TRUE);\n"
49044"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), open_button, 1);\n"
49045"  gtk_widget_show (GTK_WIDGET (open_button));\n"
49046"  gtk_actionable_set_action_name (GTK_ACTIONABLE (open_button), \"app.open\");\n"
49047"\n"
49048"  /*******************************\n"
49049"   * Tooltip for the Open ToolItem:\n"
49050"   * a tooltip using Pango markup \n"
49051"   * language\n"
49052"   *******************************/\n"
49053"  gtk_tool_item_set_tooltip_text (open_button, \"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
49054"\n"
49055"  /* \"Undo\" */\n"
49056"  undo_button = gtk_tool_button_new_from_stock (GTK_STOCK_UNDO);\n"
49057"  gtk_tool_item_set_is_important (undo_button, TRUE);\n"
49058"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), undo_button, 2);\n"
49059"  gtk_widget_show (GTK_WIDGET (undo_button));\n"
49060"\n"
49061"  /* In this case, we use \"win.undo\" to indicate that\n"
49062"   * the action controls only the window\n"
49063"   */\n"
49064"  gtk_actionable_set_action_name (GTK_ACTIONABLE (undo_button), \"win.undo\");\n"
49065"\n"
49066"  /*******************************\n"
49067"   * Tooltip for the Undo ToolItem:\n"
49068"   * a tooltip with an image\n"
49069"   *******************************/\n"
49070"  gtk_widget_set_has_tooltip (GTK_WIDGET (undo_button), TRUE);\n"
49071"\n"
49072"  // Next, we connect the query_tooltip signal\n"
49073"  g_signal_connect (undo_button, \"query-tooltip\", G_CALLBACK (undo_tooltip_callback), NULL);\n"
49074"\n"
49075"  gtk_widget_set_hexpand (toolbar, TRUE);\n"
49076"  gtk_widget_show (toolbar);\n"
49077"\n"
49078"  grid = gtk_grid_new ();\n"
49079"  gtk_grid_attach (GTK_GRID (grid), toolbar, 0, 0, 1, 1);\n"
49080"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
49081"  gtk_widget_show (GTK_WIDGET (grid));\n"
49082"\n"
49083"  /* Use the action names to create the actions that control the window, and\n"
49084"   * connect them to the appropriate callbackfunctions.\n"
49085"   */\n"
49086"  undo_action = g_simple_action_new (\"undo\", NULL);\n"
49087"  g_signal_connect (undo_action, \"activate\", G_CALLBACK (undo_callback),\n"
49088"                    GTK_WINDOW (window));\n"
49089"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (undo_action));\n"
49090"\n"
49091"  gtk_widget_show (window);\n"
49092"}\n"
49093"\n"
49094"\n"
49095"/* Callback function for the new action */\n"
49096"static void\n"
49097"new_callback (GSimpleAction *simple,\n"
49098"              GVariant      *parameter,\n"
49099"              gpointer       user_data)\n"
49100"{\n"
49101"  g_print (\"You clicked \\\"New\\\".\\n\");\n"
49102"}\n"
49103"\n"
49104"\n"
49105"/* Callback function for the open action */\n"
49106"static void\n"
49107"open_callback (GSimpleAction *simple,\n"
49108"               GVariant      *parameter,\n"
49109"               gpointer       user_data)\n"
49110"{\n"
49111"  g_print (\"You clicked \\\"Open\\\".\\n\");\n"
49112"}\n"
49113"\n"
49114"\n"
49115"/* In this function, we create the actions in which control the window, and\n"
49116" * connect their signals to the appropriate callback function.\n"
49117" */\n"
49118"static void\n"
49119"startup (GApplication *app,\n"
49120"         gpointer      user_data)\n"
49121"{\n"
49122"  GSimpleAction *new_action;\n"
49123"  GSimpleAction *open_action;\n"
49124"\n"
49125"  new_action = g_simple_action_new (\"new\", NULL);\n"
49126"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
49127"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
49128"\n"
49129"  open_action = g_simple_action_new (\"open\", NULL);\n"
49130"  g_signal_connect (open_action, \"activate\", G_CALLBACK (open_callback), app);\n"
49131"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (open_action));\n"
49132"}\n"
49133"\n"
49134"\n"
49135"\n"
49136"/* Startup function for the application */\n"
49137"int\n"
49138"main (int argc, char **argv)\n"
49139"{\n"
49140"  GtkApplication *app;\n"
49141"  int status;\n"
49142"\n"
49143"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
49144"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
49145"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
49146"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
49147"  g_object_unref (app);\n"
49148"\n"
49149"  return status;\n"
49150"}\n"
49151msgstr ""
49152"#include &lt;gtk/gtk.h&gt;\n"
49153"\n"
49154"static gboolean \n"
49155"undo_tooltip_callback (GtkStatusIcon *status_icon,\n"
49156"                       gint           x,\n"
49157"                       gint           y,\n"
49158"                       gboolean       keyboard_mode,\n"
49159"                       GtkTooltip    *tooltip,\n"
49160"                       gpointer       user_data)\n"
49161"{\n"
49162"  /* set the text for the tooltip */\n"
49163"  gtk_tooltip_set_text (tooltip, \"Undo your last action\");\n"
49164"   \n"
49165"  /* set an icon for the tooltip */\n"
49166"  gtk_tooltip_set_icon_from_stock(tooltip, \"gtk-undo\", GTK_ICON_SIZE_MENU);\n"
49167"\n"
49168"  /* show the tooltip */\n"
49169"  return TRUE;\n"
49170"}\n"
49171"\n"
49172"\n"
49173"static void\n"
49174"undo_callback (GSimpleAction *simple,\n"
49175"               GVariant      *parameter,\n"
49176"               gpointer       user_data)\n"
49177"{\n"
49178"  g_print (\"You clicked \\\"Undo\\\".\\n\");\n"
49179"}\n"
49180"\n"
49181"\n"
49182"static void\n"
49183"activate (GtkApplication *app,\n"
49184"          gpointer        user_data)\n"
49185"{\n"
49186"  GtkWidget *grid;\n"
49187"  GtkWidget *window;\n"
49188"  GtkWidget *toolbar;\n"
49189"\n"
49190"  GtkToolItem *new_button;\n"
49191"  GtkToolItem *open_button;\n"
49192"  GtkToolItem *undo_button;\n"
49193"\n"
49194"  GtkStyleContext *style_context;\n"
49195"\n"
49196"  GSimpleAction *undo_action;\n"
49197"\n"
49198"  window = gtk_application_window_new (app);\n"
49199"  gtk_window_set_title (GTK_WINDOW (window), \"Toolbar with Tooltips Example\");\n"
49200"  gtk_window_set_default_size (GTK_WINDOW (window), 400, 200);\n"
49201"\n"
49202"  /* Here we begin to create the toolbar */\n"
49203"  toolbar = gtk_toolbar_new ();\n"
49204"\n"
49205"  /* Set the toolbar to be the primary toolbar of the application */\n"
49206"  style_context = gtk_widget_get_style_context (toolbar);\n"
49207"  gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR);\n"
49208"\n"
49209"  /* Create a button for the \"new\" action, with a stock image */\n"
49210"  new_button = gtk_tool_button_new_from_stock (GTK_STOCK_NEW);\n"
49211"  gtk_tool_item_set_is_important (new_button, TRUE);\n"
49212"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), new_button, 0);\n"
49213"  gtk_widget_show (GTK_WIDGET (new_button));\n"
49214"\n"
49215"  /* Set the action name for the \"new\" action. We use \"app.new\" to\n"
49216"   * indicate that the action controls the application.\n"
49217"   */\n"
49218"  gtk_actionable_set_action_name (GTK_ACTIONABLE (new_button), \"app.new\");\n"
49219"\n"
49220"  /*******************************\n"
49221"   * Tooltip for the New ToolItem:\n"
49222"   * a tooltip with text\n"
49223"   *******************************/\n"
49224"   gtk_tool_item_set_tooltip_text (new_button, \"Create a new file\");  \n"
49225"\n"
49226"  /* \"Open\" */\n"
49227"  open_button = gtk_tool_button_new_from_stock (GTK_STOCK_OPEN);\n"
49228"  gtk_tool_item_set_is_important (open_button, TRUE);\n"
49229"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), open_button, 1);\n"
49230"  gtk_widget_show (GTK_WIDGET (open_button));\n"
49231"  gtk_actionable_set_action_name (GTK_ACTIONABLE (open_button), \"app.open\");\n"
49232"\n"
49233"  /*******************************\n"
49234"   * Tooltip for the Open ToolItem:\n"
49235"   * a tooltip using Pango markup \n"
49236"   * language\n"
49237"   *******************************/\n"
49238"  gtk_tool_item_set_tooltip_text (open_button, \"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
49239"\n"
49240"  /* \"Undo\" */\n"
49241"  undo_button = gtk_tool_button_new_from_stock (GTK_STOCK_UNDO);\n"
49242"  gtk_tool_item_set_is_important (undo_button, TRUE);\n"
49243"  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), undo_button, 2);\n"
49244"  gtk_widget_show (GTK_WIDGET (undo_button));\n"
49245"\n"
49246"  /* In this case, we use \"win.undo\" to indicate that\n"
49247"   * the action controls only the window\n"
49248"   */\n"
49249"  gtk_actionable_set_action_name (GTK_ACTIONABLE (undo_button), \"win.undo\");\n"
49250"\n"
49251"  /*******************************\n"
49252"   * Tooltip for the Undo ToolItem:\n"
49253"   * a tooltip with an image\n"
49254"   *******************************/\n"
49255"  gtk_widget_set_has_tooltip (GTK_WIDGET (undo_button), TRUE);\n"
49256"\n"
49257"  // Next, we connect the query_tooltip signal\n"
49258"  g_signal_connect (undo_button, \"query-tooltip\", G_CALLBACK (undo_tooltip_callback), NULL);\n"
49259"\n"
49260"  gtk_widget_set_hexpand (toolbar, TRUE);\n"
49261"  gtk_widget_show (toolbar);\n"
49262"\n"
49263"  grid = gtk_grid_new ();\n"
49264"  gtk_grid_attach (GTK_GRID (grid), toolbar, 0, 0, 1, 1);\n"
49265"  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (grid));\n"
49266"  gtk_widget_show (GTK_WIDGET (grid));\n"
49267"\n"
49268"  /* Use the action names to create the actions that control the window, and\n"
49269"   * connect them to the appropriate callbackfunctions.\n"
49270"   */\n"
49271"  undo_action = g_simple_action_new (\"undo\", NULL);\n"
49272"  g_signal_connect (undo_action, \"activate\", G_CALLBACK (undo_callback),\n"
49273"                    GTK_WINDOW (window));\n"
49274"  g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (undo_action));\n"
49275"\n"
49276"  gtk_widget_show (window);\n"
49277"}\n"
49278"\n"
49279"\n"
49280"/* Callback function for the new action */\n"
49281"static void\n"
49282"new_callback (GSimpleAction *simple,\n"
49283"              GVariant      *parameter,\n"
49284"              gpointer       user_data)\n"
49285"{\n"
49286"  g_print (\"You clicked \\\"New\\\".\\n\");\n"
49287"}\n"
49288"\n"
49289"\n"
49290"/* Callback function for the open action */\n"
49291"static void\n"
49292"open_callback (GSimpleAction *simple,\n"
49293"               GVariant      *parameter,\n"
49294"               gpointer       user_data)\n"
49295"{\n"
49296"  g_print (\"You clicked \\\"Open\\\".\\n\");\n"
49297"}\n"
49298"\n"
49299"\n"
49300"/* In this function, we create the actions in which control the window, and\n"
49301" * connect their signals to the appropriate callback function.\n"
49302" */\n"
49303"static void\n"
49304"startup (GApplication *app,\n"
49305"         gpointer      user_data)\n"
49306"{\n"
49307"  GSimpleAction *new_action;\n"
49308"  GSimpleAction *open_action;\n"
49309"\n"
49310"  new_action = g_simple_action_new (\"new\", NULL);\n"
49311"  g_signal_connect (new_action, \"activate\", G_CALLBACK (new_callback), app);\n"
49312"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (new_action));\n"
49313"\n"
49314"  open_action = g_simple_action_new (\"open\", NULL);\n"
49315"  g_signal_connect (open_action, \"activate\", G_CALLBACK (open_callback), app);\n"
49316"  g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (open_action));\n"
49317"}\n"
49318"\n"
49319"\n"
49320"\n"
49321"/* Startup function for the application */\n"
49322"int\n"
49323"main (int argc, char **argv)\n"
49324"{\n"
49325"  GtkApplication *app;\n"
49326"  int status;\n"
49327"\n"
49328"  app = gtk_application_new (\"org.gtk.example\", G_APPLICATION_FLAGS_NONE);\n"
49329"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
49330"  g_signal_connect (app, \"startup\", G_CALLBACK (startup), NULL);\n"
49331"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
49332"  g_object_unref (app);\n"
49333"\n"
49334"  return status;\n"
49335"}\n"
49336
49337#. (itstool) path: item/p
49338#: C/tooltip.c.page:38 C/tooltip.py.page:59
49339msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkTooltip.html\">GtkTooltip</link>"
49340msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkTooltip.html\">GtkTooltip</link>"
49341
49342#. (itstool) path: item/p
49343#: C/tooltip.c.page:40 C/tooltip.py.page:61
49344msgid "<link href=\"http://developer.gnome.org/gtk3/stable/GtkWidget.html\">GtkWidget</link>"
49345msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/GtkWidget.html\">GtkWidget</link>"
49346
49347#. (itstool) path: item/p
49348#: C/tooltip.c.page:41 C/tooltip.js.page:40 C/tooltip.py.page:62
49349msgid "<link href=\"http://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html\">Stock Items</link>"
49350msgstr "<link href=\"http://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html\">취급 항목</link>"
49351
49352#. (itstool) path: info/title
49353#: C/tooltip.js.page:8
49354msgctxt "text"
49355msgid "Tooltip (JavaScript)"
49356msgstr "Tooltip (JavaScript)"
49357
49358#. (itstool) path: note/p
49359#: C/tooltip.js.page:25
49360msgid "This example builds on the <link xref=\"toolbar.js\">Toolbar</link> example."
49361msgstr "이 예제는 <link xref=\"toolbar.js\">도구 모음</link> 예제로 만듭니다."
49362
49363#. (itstool) path: section/code
49364#: C/tooltip.js.page:30
49365#, no-wrap
49366#| msgid ""
49367#| "//!/usr/bin/gjs\n"
49368#| "\n"
49369#| "imports.gi.versions.Gdk = '3.0';\n"
49370#| "imports.gi.versions.Gtk = '3.0';\n"
49371#| "\n"
49372#| "const Gdk = imports.gi.Gdk;\n"
49373#| "const GLib = imports.gi.GLib;\n"
49374#| "const Gio = imports.gi.Gio;\n"
49375#| "const Gtk = imports.gi.Gtk; \n"
49376#| "\n"
49377#| "class TooltipExample {\n"
49378#| "    // Create the application \n"
49379#| "    constructor() {\n"
49380#| "        this.application = new Gtk.Application({\n"
49381#| "            application_id: 'org.example.jstooltip'\n"
49382#| "        });\n"
49383#| "\n"
49384#| "        // Connect 'activate' and 'startup' signals to the callback functions\n"
49385#| "        this.application.connect('activate', this._onActivate.bind(this));\n"
49386#| "        this.application.connect('startup', this._onStartup.bind(this));\n"
49387#| "    }\n"
49388#| "\n"
49389#| "    // Callback function for 'activate' signal presents windows when active\n"
49390#| "    _onActivate() {\n"
49391#| "        this.window.present();\n"
49392#| "    }\n"
49393#| "\n"
49394#| "    // Callback function for 'startup' signal builds the UI\n"
49395#| "    _onStartup() {\n"
49396#| "        this._buildUI();\n"
49397#| "    }\n"
49398#| "\n"
49399#| "    // Build the application's UI\n"
49400#| "    _buildUI() {\n"
49401#| "\n"
49402#| "        // Create the application window\n"
49403#| "        this.window = new Gtk.ApplicationWindow({\n"
49404#| "            application: this.application,\n"
49405#| "            window_position: Gtk.WindowPosition.CENTER,\n"
49406#| "            title: \"Toolbar with Tooltips Example\",\n"
49407#| "            default_width: 400,\n"
49408#| "            default_height: 200,\n"
49409#| "            border_width: 10\n"
49410#| "        });\n"
49411#| "\n"
49412#| "        this.grid = new Gtk.Grid();\n"
49413#| "\n"
49414#| "        this.toolbar = this._createToolbar();\n"
49415#| "        this.toolbar.set_hexpand(true);\n"
49416#| "        this.toolbar.show();\n"
49417#| "\n"
49418#| "        this.grid.attach(this.toolbar, 0, 0, 1, 1);\n"
49419#| "\n"
49420#| "        this.window.add(this.grid);\n"
49421#| "\n"
49422#| "        this._newAction = new Gio.SimpleAction({ name: \"new\" });\n"
49423#| "        this._newAction.connect(\"activate\", this._newCallback.bind(this));\n"
49424#| "        this.window.add_action(this._newAction);\n"
49425#| "\n"
49426#| "        this._openAction = new Gio.SimpleAction({ name: \"open\" });\n"
49427#| "        this._openAction.connect(\"activate\", this._openCallback.bind(this));\n"
49428#| "        this.window.add_action(this._openAction);\n"
49429#| "\n"
49430#| "        this._undoAction = new Gio.SimpleAction({ name: \"undo\" });\n"
49431#| "        this._undoAction.connect(\"activate\", this._undoCallback.bind(this));\n"
49432#| "        this.window.add_action(this._undoAction);\n"
49433#| "\n"
49434#| "        this._fullScreenAction = new Gio.SimpleAction({ name: \"fullscreenToggle\" });\n"
49435#| "        this._fullScreenAction.connect(\"activate\",\n"
49436#| "                                       this._fullScreenCallback.bind(this));\n"
49437#| "        this.window.add_action(this._fullScreenAction);\n"
49438#| "\n"
49439#| "        this.window.show_all();\n"
49440#| "    }\n"
49441#| "\n"
49442#| "    _createToolbar() {\n"
49443#| "        this.toolbar = new Gtk.Toolbar();\n"
49444#| "        this.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
49445#| "\n"
49446#| "        // button for the \"new\" action\n"
49447#| "        this.newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
49448#| "        // with a tooltip with a given text        \n"
49449#| "        this.newButton.set_tooltip_text(\"Create a new file\");\n"
49450#| "        this.newButton.set_is_important(true);\n"
49451#| "        this.toolbar.insert(this.newButton, 0);\n"
49452#| "        this.newButton.show();\n"
49453#| "        this.newButton.set_action_name(\"win.new\");\n"
49454#| "\n"
49455#| "        // button for the \"open\" action\n"
49456#| "        this.openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
49457#| "        // with a tooltip with a given text in the Pango markup language        \n"
49458#| "        this.openButton.set_tooltip_markup(\"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
49459#| "        this.openButton.set_is_important(true);\n"
49460#| "        this.toolbar.insert(this.openButton, 1);\n"
49461#| "        this.openButton.show();\n"
49462#| "        this.openButton.set_action_name(\"win.open\");\n"
49463#| "\n"
49464#| "        // button for the \"undo\" action\n"
49465#| "        this.undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
49466#| "        // with a tooltip with an image\n"
49467#| "        // set true the property \"has-tooltip\"        \n"
49468#| "        this.undoButton.set_property(\"has-tooltip\", true);\n"
49469#| "        // connect to the callback function that for the tooltip\n"
49470#| "        // with the signal \"query-tooltip\"\n"
49471#| "        this.undoButton.connect(\"query-tooltip\", this._undoTooltipCallback.bind(this));\n"
49472#| "        this.undoButton.set_is_important(true);\n"
49473#| "        this.toolbar.insert(this.undoButton, 2);\n"
49474#| "        this.undoButton.show();\n"
49475#| "        this.undoButton.set_action_name(\"win.undo\");\n"
49476#| "\n"
49477#| "        // button for the \"fullscreen/leave fullscreen\" action\n"
49478#| "        this.fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
49479#| "        this.fullscreenButton.set_is_important(true);\n"
49480#| "        this.toolbar.insert(this.fullscreenButton, 3);\n"
49481#| "        this.fullscreenButton.set_action_name(\"win.fullscreenToggle\");\n"
49482#| "\n"
49483#| "        return this.toolbar;\n"
49484#| "    }\n"
49485#| "\n"
49486#| "    _newCallback(action, parameter) {\n"
49487#| "        print(\"You clicked \\\"New\\\".\");\n"
49488#| "    }\n"
49489#| "\n"
49490#| "    _openCallback(action, parameter) {\n"
49491#| "        print(\"You clicked \\\"Open\\\".\");\n"
49492#| "    }\n"
49493#| "\n"
49494#| "    // the callback function for the tooltip of the \"undo\" button\n"
49495#| "    _undoTooltipCallback(widget, x, y, keyboard_mode, tooltip) {\n"
49496#| "        // set the text for the tooltip\n"
49497#| "        tooltip.set_text(\"Undo your last action\");\n"
49498#| "        // set an icon fot the tooltip\n"
49499#| "        tooltip.set_icon_from_stock(Gtk.STOCK_UNDO, Gtk.IconSize.MENU);\n"
49500#| "        // show the tooltip\n"
49501#| "        return true;\n"
49502#| "    }\n"
49503#| "\n"
49504#| "    _undoCallback(action, parameter) {\n"
49505#| "        print(\"You clicked \\\"Undo\\\".\");\n"
49506#| "    }\n"
49507#| "\n"
49508#| "    _fullScreenCallback() {\n"
49509#| "        if ((this.window.get_window().get_state() &amp; Gdk.WindowState.FULLSCREEN) != 0 ){\n"
49510#| "            this.fullscreenButton.set_stock_id(Gtk.STOCK_FULLSCREEN);\n"
49511#| "            this.fullscreenButton.set_tooltip_text(\"Make your window fullscreen\");\n"
49512#| "            this.window.unfullscreen();\n"
49513#| "        } else {\n"
49514#| "            this.fullscreenButton.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
49515#| "            this.fullscreenButton.set_tooltip_text(\"Leave fullscreen\");\n"
49516#| "            this.window.fullscreen();\n"
49517#| "        }\n"
49518#| "    }\n"
49519#| "};\n"
49520#| "\n"
49521#| "// Run the application\n"
49522#| "let app = new TooltipExample ();\n"
49523#| "app.application.run (ARGV);\n"
49524msgid ""
49525"//!/usr/bin/gjs\n"
49526"\n"
49527"imports.gi.versions.Gdk = '3.0';\n"
49528"imports.gi.versions.Gtk = '3.0';\n"
49529"\n"
49530"const Gdk = imports.gi.Gdk;\n"
49531"const GLib = imports.gi.GLib;\n"
49532"const Gio = imports.gi.Gio;\n"
49533"const Gtk = imports.gi.Gtk; \n"
49534"\n"
49535"class TooltipExample {\n"
49536"    // Create the application \n"
49537"    constructor() {\n"
49538"        this.application = new Gtk.Application({\n"
49539"            application_id: 'org.example.jstooltip'\n"
49540"        });\n"
49541"\n"
49542"        // Connect 'activate' and 'startup' signals to the callback functions\n"
49543"        this.application.connect('activate', this._onActivate.bind(this));\n"
49544"        this.application.connect('startup', this._onStartup.bind(this));\n"
49545"    }\n"
49546"\n"
49547"    // Callback function for 'activate' signal presents windows when active\n"
49548"    _onActivate() {\n"
49549"        this.window.present();\n"
49550"    }\n"
49551"\n"
49552"    // Callback function for 'startup' signal builds the UI\n"
49553"    _onStartup() {\n"
49554"        this._buildUI();\n"
49555"    }\n"
49556"\n"
49557"    // Build the application's UI\n"
49558"    _buildUI() {\n"
49559"\n"
49560"        // Create the application window\n"
49561"        this.window = new Gtk.ApplicationWindow({\n"
49562"            application: this.application,\n"
49563"            window_position: Gtk.WindowPosition.CENTER,\n"
49564"            title: \"Toolbar with Tooltips Example\",\n"
49565"            default_width: 400,\n"
49566"            default_height: 200,\n"
49567"            border_width: 10\n"
49568"        });\n"
49569"\n"
49570"        this.grid = new Gtk.Grid();\n"
49571"\n"
49572"        this.toolbar = this._createToolbar();\n"
49573"        this.toolbar.set_hexpand(true);\n"
49574"        this.toolbar.show();\n"
49575"\n"
49576"        this.grid.attach(this.toolbar, 0, 0, 1, 1);\n"
49577"\n"
49578"        this.window.add(this.grid);\n"
49579"\n"
49580"        this._newAction = new Gio.SimpleAction({ name: \"new\" });\n"
49581"        this._newAction.connect(\"activate\", this._newCallback.bind(this));\n"
49582"        this.window.add_action(this._newAction);\n"
49583"\n"
49584"        this._openAction = new Gio.SimpleAction({ name: \"open\" });\n"
49585"        this._openAction.connect(\"activate\", this._openCallback.bind(this));\n"
49586"        this.window.add_action(this._openAction);\n"
49587"\n"
49588"        this._undoAction = new Gio.SimpleAction({ name: \"undo\" });\n"
49589"        this._undoAction.connect(\"activate\", this._undoCallback.bind(this));\n"
49590"        this.window.add_action(this._undoAction);\n"
49591"\n"
49592"        this._fullScreenAction = new Gio.SimpleAction({ name: \"fullscreenToggle\" });\n"
49593"        this._fullScreenAction.connect(\"activate\",\n"
49594"                                       this._fullScreenCallback.bind(this));\n"
49595"        this.window.add_action(this._fullScreenAction);\n"
49596"\n"
49597"        this.window.show_all();\n"
49598"    }\n"
49599"\n"
49600"    _createToolbar() {\n"
49601"        this.toolbar = new Gtk.Toolbar();\n"
49602"        this.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
49603"\n"
49604"        // button for the \"new\" action\n"
49605"        this.newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
49606"        // with a tooltip with a given text        \n"
49607"        this.newButton.set_tooltip_text(\"Create a new file\");\n"
49608"        this.newButton.set_is_important(true);\n"
49609"        this.toolbar.insert(this.newButton, 0);\n"
49610"        this.newButton.show();\n"
49611"        this.newButton.set_action_name(\"win.new\");\n"
49612"\n"
49613"        // button for the \"open\" action\n"
49614"        this.openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
49615"        // with a tooltip with a given text in the Pango markup language        \n"
49616"        this.openButton.set_tooltip_markup(\"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
49617"        this.openButton.set_is_important(true);\n"
49618"        this.toolbar.insert(this.openButton, 1);\n"
49619"        this.openButton.show();\n"
49620"        this.openButton.set_action_name(\"win.open\");\n"
49621"\n"
49622"        // button for the \"undo\" action\n"
49623"        this.undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
49624"        // with a tooltip with an image\n"
49625"        // set true the property \"has-tooltip\"        \n"
49626"        this.undoButton.set_property(\"has-tooltip\", true);\n"
49627"        // connect to the callback function that for the tooltip\n"
49628"        // with the signal \"query-tooltip\"\n"
49629"        this.undoButton.connect(\"query-tooltip\", this._undoTooltipCallback.bind(this));\n"
49630"        this.undoButton.set_is_important(true);\n"
49631"        this.toolbar.insert(this.undoButton, 2);\n"
49632"        this.undoButton.show();\n"
49633"        this.undoButton.set_action_name(\"win.undo\");\n"
49634"\n"
49635"        // button for the \"fullscreen/leave fullscreen\" action\n"
49636"        this.fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
49637"        this.fullscreenButton.set_is_important(true);\n"
49638"        this.toolbar.insert(this.fullscreenButton, 3);\n"
49639"        this.fullscreenButton.set_action_name(\"win.fullscreenToggle\");\n"
49640"\n"
49641"        return this.toolbar;\n"
49642"    }\n"
49643"\n"
49644"    _newCallback(action, parameter) {\n"
49645"        print(\"You clicked \\\"New\\\".\");\n"
49646"    }\n"
49647"\n"
49648"    _openCallback(action, parameter) {\n"
49649"        print(\"You clicked \\\"Open\\\".\");\n"
49650"    }\n"
49651"\n"
49652"    // the callback function for the tooltip of the \"undo\" button\n"
49653"    _undoTooltipCallback(widget, x, y, keyboard_mode, tooltip) {\n"
49654"        // set the text for the tooltip\n"
49655"        tooltip.set_text(\"Undo your last action\");\n"
49656"        // set an icon for the tooltip\n"
49657"        tooltip.set_icon_from_stock(Gtk.STOCK_UNDO, Gtk.IconSize.MENU);\n"
49658"        // show the tooltip\n"
49659"        return true;\n"
49660"    }\n"
49661"\n"
49662"    _undoCallback(action, parameter) {\n"
49663"        print(\"You clicked \\\"Undo\\\".\");\n"
49664"    }\n"
49665"\n"
49666"    _fullScreenCallback() {\n"
49667"        if ((this.window.get_window().get_state() &amp; Gdk.WindowState.FULLSCREEN) != 0 ){\n"
49668"            this.fullscreenButton.set_stock_id(Gtk.STOCK_FULLSCREEN);\n"
49669"            this.fullscreenButton.set_tooltip_text(\"Make your window fullscreen\");\n"
49670"            this.window.unfullscreen();\n"
49671"        } else {\n"
49672"            this.fullscreenButton.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
49673"            this.fullscreenButton.set_tooltip_text(\"Leave fullscreen\");\n"
49674"            this.window.fullscreen();\n"
49675"        }\n"
49676"    }\n"
49677"};\n"
49678"\n"
49679"// Run the application\n"
49680"let app = new TooltipExample ();\n"
49681"app.application.run (ARGV);\n"
49682msgstr ""
49683"//!/usr/bin/gjs\n"
49684"\n"
49685"imports.gi.versions.Gdk = '3.0';\n"
49686"imports.gi.versions.Gtk = '3.0';\n"
49687"\n"
49688"const Gdk = imports.gi.Gdk;\n"
49689"const GLib = imports.gi.GLib;\n"
49690"const Gio = imports.gi.Gio;\n"
49691"const Gtk = imports.gi.Gtk; \n"
49692"\n"
49693"class TooltipExample {\n"
49694"    // Create the application \n"
49695"    constructor() {\n"
49696"        this.application = new Gtk.Application({\n"
49697"            application_id: 'org.example.jstooltip'\n"
49698"        });\n"
49699"\n"
49700"        // Connect 'activate' and 'startup' signals to the callback functions\n"
49701"        this.application.connect('activate', this._onActivate.bind(this));\n"
49702"        this.application.connect('startup', this._onStartup.bind(this));\n"
49703"    }\n"
49704"\n"
49705"    // Callback function for 'activate' signal presents windows when active\n"
49706"    _onActivate() {\n"
49707"        this.window.present();\n"
49708"    }\n"
49709"\n"
49710"    // Callback function for 'startup' signal builds the UI\n"
49711"    _onStartup() {\n"
49712"        this._buildUI();\n"
49713"    }\n"
49714"\n"
49715"    // Build the application's UI\n"
49716"    _buildUI() {\n"
49717"\n"
49718"        // Create the application window\n"
49719"        this.window = new Gtk.ApplicationWindow({\n"
49720"            application: this.application,\n"
49721"            window_position: Gtk.WindowPosition.CENTER,\n"
49722"            title: \"Toolbar with Tooltips Example\",\n"
49723"            default_width: 400,\n"
49724"            default_height: 200,\n"
49725"            border_width: 10\n"
49726"        });\n"
49727"\n"
49728"        this.grid = new Gtk.Grid();\n"
49729"\n"
49730"        this.toolbar = this._createToolbar();\n"
49731"        this.toolbar.set_hexpand(true);\n"
49732"        this.toolbar.show();\n"
49733"\n"
49734"        this.grid.attach(this.toolbar, 0, 0, 1, 1);\n"
49735"\n"
49736"        this.window.add(this.grid);\n"
49737"\n"
49738"        this._newAction = new Gio.SimpleAction({ name: \"new\" });\n"
49739"        this._newAction.connect(\"activate\", this._newCallback.bind(this));\n"
49740"        this.window.add_action(this._newAction);\n"
49741"\n"
49742"        this._openAction = new Gio.SimpleAction({ name: \"open\" });\n"
49743"        this._openAction.connect(\"activate\", this._openCallback.bind(this));\n"
49744"        this.window.add_action(this._openAction);\n"
49745"\n"
49746"        this._undoAction = new Gio.SimpleAction({ name: \"undo\" });\n"
49747"        this._undoAction.connect(\"activate\", this._undoCallback.bind(this));\n"
49748"        this.window.add_action(this._undoAction);\n"
49749"\n"
49750"        this._fullScreenAction = new Gio.SimpleAction({ name: \"fullscreenToggle\" });\n"
49751"        this._fullScreenAction.connect(\"activate\",\n"
49752"                                       this._fullScreenCallback.bind(this));\n"
49753"        this.window.add_action(this._fullScreenAction);\n"
49754"\n"
49755"        this.window.show_all();\n"
49756"    }\n"
49757"\n"
49758"    _createToolbar() {\n"
49759"        this.toolbar = new Gtk.Toolbar();\n"
49760"        this.toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
49761"\n"
49762"        // button for the \"new\" action\n"
49763"        this.newButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW);\n"
49764"        // with a tooltip with a given text        \n"
49765"        this.newButton.set_tooltip_text(\"Create a new file\");\n"
49766"        this.newButton.set_is_important(true);\n"
49767"        this.toolbar.insert(this.newButton, 0);\n"
49768"        this.newButton.show();\n"
49769"        this.newButton.set_action_name(\"win.new\");\n"
49770"\n"
49771"        // button for the \"open\" action\n"
49772"        this.openButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN);\n"
49773"        // with a tooltip with a given text in the Pango markup language        \n"
49774"        this.openButton.set_tooltip_markup(\"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
49775"        this.openButton.set_is_important(true);\n"
49776"        this.toolbar.insert(this.openButton, 1);\n"
49777"        this.openButton.show();\n"
49778"        this.openButton.set_action_name(\"win.open\");\n"
49779"\n"
49780"        // button for the \"undo\" action\n"
49781"        this.undoButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO);\n"
49782"        // with a tooltip with an image\n"
49783"        // set true the property \"has-tooltip\"        \n"
49784"        this.undoButton.set_property(\"has-tooltip\", true);\n"
49785"        // connect to the callback function that for the tooltip\n"
49786"        // with the signal \"query-tooltip\"\n"
49787"        this.undoButton.connect(\"query-tooltip\", this._undoTooltipCallback.bind(this));\n"
49788"        this.undoButton.set_is_important(true);\n"
49789"        this.toolbar.insert(this.undoButton, 2);\n"
49790"        this.undoButton.show();\n"
49791"        this.undoButton.set_action_name(\"win.undo\");\n"
49792"\n"
49793"        // button for the \"fullscreen/leave fullscreen\" action\n"
49794"        this.fullscreenButton = Gtk.ToolButton.new_from_stock(Gtk.STOCK_FULLSCREEN);\n"
49795"        this.fullscreenButton.set_is_important(true);\n"
49796"        this.toolbar.insert(this.fullscreenButton, 3);\n"
49797"        this.fullscreenButton.set_action_name(\"win.fullscreenToggle\");\n"
49798"\n"
49799"        return this.toolbar;\n"
49800"    }\n"
49801"\n"
49802"    _newCallback(action, parameter) {\n"
49803"        print(\"You clicked \\\"New\\\".\");\n"
49804"    }\n"
49805"\n"
49806"    _openCallback(action, parameter) {\n"
49807"        print(\"You clicked \\\"Open\\\".\");\n"
49808"    }\n"
49809"\n"
49810"    // the callback function for the tooltip of the \"undo\" button\n"
49811"    _undoTooltipCallback(widget, x, y, keyboard_mode, tooltip) {\n"
49812"        // set the text for the tooltip\n"
49813"        tooltip.set_text(\"Undo your last action\");\n"
49814"        // set an icon for the tooltip\n"
49815"        tooltip.set_icon_from_stock(Gtk.STOCK_UNDO, Gtk.IconSize.MENU);\n"
49816"        // show the tooltip\n"
49817"        return true;\n"
49818"    }\n"
49819"\n"
49820"    _undoCallback(action, parameter) {\n"
49821"        print(\"You clicked \\\"Undo\\\".\");\n"
49822"    }\n"
49823"\n"
49824"    _fullScreenCallback() {\n"
49825"        if ((this.window.get_window().get_state() &amp; Gdk.WindowState.FULLSCREEN) != 0 ){\n"
49826"            this.fullscreenButton.set_stock_id(Gtk.STOCK_FULLSCREEN);\n"
49827"            this.fullscreenButton.set_tooltip_text(\"Make your window fullscreen\");\n"
49828"            this.window.unfullscreen();\n"
49829"        } else {\n"
49830"            this.fullscreenButton.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN);\n"
49831"            this.fullscreenButton.set_tooltip_text(\"Leave fullscreen\");\n"
49832"            this.window.fullscreen();\n"
49833"        }\n"
49834"    }\n"
49835"};\n"
49836"\n"
49837"// Run the application\n"
49838"let app = new TooltipExample ();\n"
49839"app.application.run (ARGV);\n"
49840
49841#. (itstool) path: item/p
49842#: C/tooltip.js.page:37
49843msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Tooltip.html\">GtkTooltip</link>"
49844msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Tooltip.html\">GtkTooltip</link>"
49845
49846#. (itstool) path: item/p
49847#: C/tooltip.js.page:38
49848msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Toolbar.html\">GtkToolbar</link>"
49849msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Toolbar.html\">GtkToolbar</link>"
49850
49851#. (itstool) path: item/p
49852#: C/tooltip.js.page:39
49853msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Widget.html\">GtkWidget</link>"
49854msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Widget.html\">GtkWidget</link>"
49855
49856#. (itstool) path: info/title
49857#: C/tooltip.py.page:8
49858msgctxt "text"
49859msgid "Tooltip (Python)"
49860msgstr "Tooltip (Python)"
49861
49862#. (itstool) path: note/p
49863#: C/tooltip.py.page:26
49864msgid "This example builds on the <link xref=\"toolbar.py\">Toolbar</link> example."
49865msgstr "이 예제는 <link xref=\"toolbar.py\">도구 모음</link> 예제로 만듭니다."
49866
49867#. (itstool) path: section/code
49868#: C/tooltip.py.page:32
49869#, no-wrap
49870#| msgid ""
49871#| "from gi.repository import Gtk\n"
49872#| "from gi.repository import Gdk\n"
49873#| "from gi.repository import Gio\n"
49874#| "import sys\n"
49875#| "\n"
49876#| "\n"
49877#| "class MyWindow(Gtk.ApplicationWindow):\n"
49878#| "\n"
49879#| "    def __init__(self, app):\n"
49880#| "        Gtk.Window.__init__(\n"
49881#| "            self, title=\"Toolbar with Tooltips Example\", application=app)\n"
49882#| "        self.set_default_size(400, 200)\n"
49883#| "\n"
49884#| "        grid = Gtk.Grid()\n"
49885#| "\n"
49886#| "        toolbar = self.create_toolbar()\n"
49887#| "        toolbar.set_hexpand(True)\n"
49888#| "        toolbar.show()\n"
49889#| "\n"
49890#| "        grid.attach(toolbar, 0, 0, 1, 1)\n"
49891#| "\n"
49892#| "        self.add(grid)\n"
49893#| "\n"
49894#| "        undo_action = Gio.SimpleAction.new(\"undo\", None)\n"
49895#| "        undo_action.connect(\"activate\", self.undo_callback)\n"
49896#| "        self.add_action(undo_action)\n"
49897#| "\n"
49898#| "        fullscreen_action = Gio.SimpleAction.new(\"fullscreen\", None)\n"
49899#| "        fullscreen_action.connect(\"activate\", self.fullscreen_callback)\n"
49900#| "        self.add_action(fullscreen_action)\n"
49901#| "\n"
49902#| "    def create_toolbar(self):\n"
49903#| "        toolbar = Gtk.Toolbar()\n"
49904#| "        toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)\n"
49905#| "\n"
49906#| "        # button for the \"new\" action\n"
49907#| "        new_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW)\n"
49908#| "        # with a tooltip with a given text\n"
49909#| "        new_button.set_tooltip_text(\"Create a new file\")\n"
49910#| "        new_button.set_is_important(True)\n"
49911#| "        toolbar.insert(new_button, 0)\n"
49912#| "        new_button.show()\n"
49913#| "        new_button.set_action_name(\"app.new\")\n"
49914#| "\n"
49915#| "        # button for the \"open\" action\n"
49916#| "        open_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN)\n"
49917#| "        # with a tooltip with a given text in the Pango markup language\n"
49918#| "        open_button.set_tooltip_markup(\"Open an &lt;i&gt;existing&lt;/i&gt; file\")\n"
49919#| "        open_button.set_is_important(True)\n"
49920#| "        toolbar.insert(open_button, 1)\n"
49921#| "        open_button.show()\n"
49922#| "        open_button.set_action_name(\"app.open\")\n"
49923#| "\n"
49924#| "        # button for the \"undo\" action\n"
49925#| "        undo_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO)\n"
49926#| "        # with a tooltip with an image\n"
49927#| "        # set True the property \"has-tooltip\"\n"
49928#| "        undo_button.set_property(\"has-tooltip\", True)\n"
49929#| "        # connect to the callback function that for the tooltip\n"
49930#| "        # with the signal \"query-tooltip\"\n"
49931#| "        undo_button.connect(\"query-tooltip\", self.undo_tooltip_callback)\n"
49932#| "        undo_button.set_is_important(True)\n"
49933#| "        toolbar.insert(undo_button, 2)\n"
49934#| "        undo_button.show()\n"
49935#| "        undo_button.set_action_name(\"win.undo\")\n"
49936#| "\n"
49937#| "        # button for the \"fullscreen/leave fullscreen\" action\n"
49938#| "        self.fullscreen_button = Gtk.ToolButton.new_from_stock(\n"
49939#| "            Gtk.STOCK_FULLSCREEN)\n"
49940#| "        self.fullscreen_button.set_is_important(True)\n"
49941#| "        toolbar.insert(self.fullscreen_button, 3)\n"
49942#| "        self.fullscreen_button.set_action_name(\"win.fullscreen\")\n"
49943#| "\n"
49944#| "        return toolbar\n"
49945#| "\n"
49946#| "    # the callback function for the tooltip of the \"undo\" button\n"
49947#| "    def undo_tooltip_callback(self, widget, x, y, keyboard_mode, tooltip):\n"
49948#| "        # set the text for the tooltip\n"
49949#| "        tooltip.set_text(\"Undo your last action\")\n"
49950#| "        # set an icon fot the tooltip\n"
49951#| "        tooltip.set_icon_from_stock(\"gtk-undo\", Gtk.IconSize.MENU)\n"
49952#| "        # show the tooltip\n"
49953#| "        return True\n"
49954#| "\n"
49955#| "    def undo_callback(self, action, parameter):\n"
49956#| "        print(\"You clicked \\\"Undo\\\".\")\n"
49957#| "\n"
49958#| "    def fullscreen_callback(self, action, parameter):\n"
49959#| "        is_fullscreen = self.get_window().get_state(\n"
49960#| "        ) &amp; Gdk.WindowState.FULLSCREEN != 0\n"
49961#| "        if not is_fullscreen:\n"
49962#| "            self.fullscreen_button.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN)\n"
49963#| "            self.fullscreen()\n"
49964#| "        else:\n"
49965#| "            self.fullscreen_button.set_stock_id(Gtk.STOCK_FULLSCREEN)\n"
49966#| "            self.unfullscreen()\n"
49967#| "\n"
49968#| "\n"
49969#| "class MyApplication(Gtk.Application):\n"
49970#| "\n"
49971#| "    def __init__(self):\n"
49972#| "        Gtk.Application.__init__(self)\n"
49973#| "\n"
49974#| "    def do_activate(self):\n"
49975#| "        win = MyWindow(self)\n"
49976#| "        win.show_all()\n"
49977#| "\n"
49978#| "    def do_startup(self):\n"
49979#| "        Gtk.Application.do_startup(self)\n"
49980#| "\n"
49981#| "        new_action = Gio.SimpleAction.new(\"new\", None)\n"
49982#| "        new_action.connect(\"activate\", self.new_callback)\n"
49983#| "        app.add_action(new_action)\n"
49984#| "\n"
49985#| "        open_action = Gio.SimpleAction.new(\"open\", None)\n"
49986#| "        open_action.connect(\"activate\", self.open_callback)\n"
49987#| "        app.add_action(open_action)\n"
49988#| "\n"
49989#| "    def new_callback(self, action, parameter):\n"
49990#| "        print(\"You clicked \\\"New\\\".\")\n"
49991#| "\n"
49992#| "    def open_callback(self, action, parameter):\n"
49993#| "        print(\"You clicked \\\"Open\\\".\")\n"
49994#| "\n"
49995#| "app = MyApplication()\n"
49996#| "exit_status = app.run(sys.argv)\n"
49997#| "sys.exit(exit_status)\n"
49998msgid ""
49999"from gi.repository import Gtk\n"
50000"from gi.repository import Gdk\n"
50001"from gi.repository import Gio\n"
50002"import sys\n"
50003"\n"
50004"\n"
50005"class MyWindow(Gtk.ApplicationWindow):\n"
50006"\n"
50007"    def __init__(self, app):\n"
50008"        Gtk.Window.__init__(\n"
50009"            self, title=\"Toolbar with Tooltips Example\", application=app)\n"
50010"        self.set_default_size(400, 200)\n"
50011"\n"
50012"        grid = Gtk.Grid()\n"
50013"\n"
50014"        toolbar = self.create_toolbar()\n"
50015"        toolbar.set_hexpand(True)\n"
50016"        toolbar.show()\n"
50017"\n"
50018"        grid.attach(toolbar, 0, 0, 1, 1)\n"
50019"\n"
50020"        self.add(grid)\n"
50021"\n"
50022"        undo_action = Gio.SimpleAction.new(\"undo\", None)\n"
50023"        undo_action.connect(\"activate\", self.undo_callback)\n"
50024"        self.add_action(undo_action)\n"
50025"\n"
50026"        fullscreen_action = Gio.SimpleAction.new(\"fullscreen\", None)\n"
50027"        fullscreen_action.connect(\"activate\", self.fullscreen_callback)\n"
50028"        self.add_action(fullscreen_action)\n"
50029"\n"
50030"    def create_toolbar(self):\n"
50031"        toolbar = Gtk.Toolbar()\n"
50032"        toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)\n"
50033"\n"
50034"        # button for the \"new\" action\n"
50035"        new_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW)\n"
50036"        # with a tooltip with a given text\n"
50037"        new_button.set_tooltip_text(\"Create a new file\")\n"
50038"        new_button.set_is_important(True)\n"
50039"        toolbar.insert(new_button, 0)\n"
50040"        new_button.show()\n"
50041"        new_button.set_action_name(\"app.new\")\n"
50042"\n"
50043"        # button for the \"open\" action\n"
50044"        open_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN)\n"
50045"        # with a tooltip with a given text in the Pango markup language\n"
50046"        open_button.set_tooltip_markup(\"Open an &lt;i&gt;existing&lt;/i&gt; file\")\n"
50047"        open_button.set_is_important(True)\n"
50048"        toolbar.insert(open_button, 1)\n"
50049"        open_button.show()\n"
50050"        open_button.set_action_name(\"app.open\")\n"
50051"\n"
50052"        # button for the \"undo\" action\n"
50053"        undo_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO)\n"
50054"        # with a tooltip with an image\n"
50055"        # set True the property \"has-tooltip\"\n"
50056"        undo_button.set_property(\"has-tooltip\", True)\n"
50057"        # connect to the callback function that for the tooltip\n"
50058"        # with the signal \"query-tooltip\"\n"
50059"        undo_button.connect(\"query-tooltip\", self.undo_tooltip_callback)\n"
50060"        undo_button.set_is_important(True)\n"
50061"        toolbar.insert(undo_button, 2)\n"
50062"        undo_button.show()\n"
50063"        undo_button.set_action_name(\"win.undo\")\n"
50064"\n"
50065"        # button for the \"fullscreen/leave fullscreen\" action\n"
50066"        self.fullscreen_button = Gtk.ToolButton.new_from_stock(\n"
50067"            Gtk.STOCK_FULLSCREEN)\n"
50068"        self.fullscreen_button.set_is_important(True)\n"
50069"        toolbar.insert(self.fullscreen_button, 3)\n"
50070"        self.fullscreen_button.set_action_name(\"win.fullscreen\")\n"
50071"\n"
50072"        return toolbar\n"
50073"\n"
50074"    # the callback function for the tooltip of the \"undo\" button\n"
50075"    def undo_tooltip_callback(self, widget, x, y, keyboard_mode, tooltip):\n"
50076"        # set the text for the tooltip\n"
50077"        tooltip.set_text(\"Undo your last action\")\n"
50078"        # set an icon for the tooltip\n"
50079"        tooltip.set_icon_from_stock(\"gtk-undo\", Gtk.IconSize.MENU)\n"
50080"        # show the tooltip\n"
50081"        return True\n"
50082"\n"
50083"    def undo_callback(self, action, parameter):\n"
50084"        print(\"You clicked \\\"Undo\\\".\")\n"
50085"\n"
50086"    def fullscreen_callback(self, action, parameter):\n"
50087"        is_fullscreen = self.get_window().get_state(\n"
50088"        ) &amp; Gdk.WindowState.FULLSCREEN != 0\n"
50089"        if not is_fullscreen:\n"
50090"            self.fullscreen_button.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN)\n"
50091"            self.fullscreen()\n"
50092"        else:\n"
50093"            self.fullscreen_button.set_stock_id(Gtk.STOCK_FULLSCREEN)\n"
50094"            self.unfullscreen()\n"
50095"\n"
50096"\n"
50097"class MyApplication(Gtk.Application):\n"
50098"\n"
50099"    def __init__(self):\n"
50100"        Gtk.Application.__init__(self)\n"
50101"\n"
50102"    def do_activate(self):\n"
50103"        win = MyWindow(self)\n"
50104"        win.show_all()\n"
50105"\n"
50106"    def do_startup(self):\n"
50107"        Gtk.Application.do_startup(self)\n"
50108"\n"
50109"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
50110"        new_action.connect(\"activate\", self.new_callback)\n"
50111"        app.add_action(new_action)\n"
50112"\n"
50113"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
50114"        open_action.connect(\"activate\", self.open_callback)\n"
50115"        app.add_action(open_action)\n"
50116"\n"
50117"    def new_callback(self, action, parameter):\n"
50118"        print(\"You clicked \\\"New\\\".\")\n"
50119"\n"
50120"    def open_callback(self, action, parameter):\n"
50121"        print(\"You clicked \\\"Open\\\".\")\n"
50122"\n"
50123"app = MyApplication()\n"
50124"exit_status = app.run(sys.argv)\n"
50125"sys.exit(exit_status)\n"
50126msgstr ""
50127"from gi.repository import Gtk\n"
50128"from gi.repository import Gdk\n"
50129"from gi.repository import Gio\n"
50130"import sys\n"
50131"\n"
50132"\n"
50133"class MyWindow(Gtk.ApplicationWindow):\n"
50134"\n"
50135"    def __init__(self, app):\n"
50136"        Gtk.Window.__init__(\n"
50137"            self, title=\"Toolbar with Tooltips Example\", application=app)\n"
50138"        self.set_default_size(400, 200)\n"
50139"\n"
50140"        grid = Gtk.Grid()\n"
50141"\n"
50142"        toolbar = self.create_toolbar()\n"
50143"        toolbar.set_hexpand(True)\n"
50144"        toolbar.show()\n"
50145"\n"
50146"        grid.attach(toolbar, 0, 0, 1, 1)\n"
50147"\n"
50148"        self.add(grid)\n"
50149"\n"
50150"        undo_action = Gio.SimpleAction.new(\"undo\", None)\n"
50151"        undo_action.connect(\"activate\", self.undo_callback)\n"
50152"        self.add_action(undo_action)\n"
50153"\n"
50154"        fullscreen_action = Gio.SimpleAction.new(\"fullscreen\", None)\n"
50155"        fullscreen_action.connect(\"activate\", self.fullscreen_callback)\n"
50156"        self.add_action(fullscreen_action)\n"
50157"\n"
50158"    def create_toolbar(self):\n"
50159"        toolbar = Gtk.Toolbar()\n"
50160"        toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)\n"
50161"\n"
50162"        # button for the \"new\" action\n"
50163"        new_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_NEW)\n"
50164"        # with a tooltip with a given text\n"
50165"        new_button.set_tooltip_text(\"Create a new file\")\n"
50166"        new_button.set_is_important(True)\n"
50167"        toolbar.insert(new_button, 0)\n"
50168"        new_button.show()\n"
50169"        new_button.set_action_name(\"app.new\")\n"
50170"\n"
50171"        # button for the \"open\" action\n"
50172"        open_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_OPEN)\n"
50173"        # with a tooltip with a given text in the Pango markup language\n"
50174"        open_button.set_tooltip_markup(\"Open an &lt;i&gt;existing&lt;/i&gt; file\")\n"
50175"        open_button.set_is_important(True)\n"
50176"        toolbar.insert(open_button, 1)\n"
50177"        open_button.show()\n"
50178"        open_button.set_action_name(\"app.open\")\n"
50179"\n"
50180"        # button for the \"undo\" action\n"
50181"        undo_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_UNDO)\n"
50182"        # with a tooltip with an image\n"
50183"        # set True the property \"has-tooltip\"\n"
50184"        undo_button.set_property(\"has-tooltip\", True)\n"
50185"        # connect to the callback function that for the tooltip\n"
50186"        # with the signal \"query-tooltip\"\n"
50187"        undo_button.connect(\"query-tooltip\", self.undo_tooltip_callback)\n"
50188"        undo_button.set_is_important(True)\n"
50189"        toolbar.insert(undo_button, 2)\n"
50190"        undo_button.show()\n"
50191"        undo_button.set_action_name(\"win.undo\")\n"
50192"\n"
50193"        # button for the \"fullscreen/leave fullscreen\" action\n"
50194"        self.fullscreen_button = Gtk.ToolButton.new_from_stock(\n"
50195"            Gtk.STOCK_FULLSCREEN)\n"
50196"        self.fullscreen_button.set_is_important(True)\n"
50197"        toolbar.insert(self.fullscreen_button, 3)\n"
50198"        self.fullscreen_button.set_action_name(\"win.fullscreen\")\n"
50199"\n"
50200"        return toolbar\n"
50201"\n"
50202"    # the callback function for the tooltip of the \"undo\" button\n"
50203"    def undo_tooltip_callback(self, widget, x, y, keyboard_mode, tooltip):\n"
50204"        # set the text for the tooltip\n"
50205"        tooltip.set_text(\"Undo your last action\")\n"
50206"        # set an icon for the tooltip\n"
50207"        tooltip.set_icon_from_stock(\"gtk-undo\", Gtk.IconSize.MENU)\n"
50208"        # show the tooltip\n"
50209"        return True\n"
50210"\n"
50211"    def undo_callback(self, action, parameter):\n"
50212"        print(\"You clicked \\\"Undo\\\".\")\n"
50213"\n"
50214"    def fullscreen_callback(self, action, parameter):\n"
50215"        is_fullscreen = self.get_window().get_state(\n"
50216"        ) &amp; Gdk.WindowState.FULLSCREEN != 0\n"
50217"        if not is_fullscreen:\n"
50218"            self.fullscreen_button.set_stock_id(Gtk.STOCK_LEAVE_FULLSCREEN)\n"
50219"            self.fullscreen()\n"
50220"        else:\n"
50221"            self.fullscreen_button.set_stock_id(Gtk.STOCK_FULLSCREEN)\n"
50222"            self.unfullscreen()\n"
50223"\n"
50224"\n"
50225"class MyApplication(Gtk.Application):\n"
50226"\n"
50227"    def __init__(self):\n"
50228"        Gtk.Application.__init__(self)\n"
50229"\n"
50230"    def do_activate(self):\n"
50231"        win = MyWindow(self)\n"
50232"        win.show_all()\n"
50233"\n"
50234"    def do_startup(self):\n"
50235"        Gtk.Application.do_startup(self)\n"
50236"\n"
50237"        new_action = Gio.SimpleAction.new(\"new\", None)\n"
50238"        new_action.connect(\"activate\", self.new_callback)\n"
50239"        app.add_action(new_action)\n"
50240"\n"
50241"        open_action = Gio.SimpleAction.new(\"open\", None)\n"
50242"        open_action.connect(\"activate\", self.open_callback)\n"
50243"        app.add_action(open_action)\n"
50244"\n"
50245"    def new_callback(self, action, parameter):\n"
50246"        print(\"You clicked \\\"New\\\".\")\n"
50247"\n"
50248"    def open_callback(self, action, parameter):\n"
50249"        print(\"You clicked \\\"Open\\\".\")\n"
50250"\n"
50251"app = MyApplication()\n"
50252"exit_status = app.run(sys.argv)\n"
50253"sys.exit(exit_status)\n"
50254
50255#. (itstool) path: section/title
50256#: C/tooltip.py.page:36
50257msgid "Useful methods for a Tooltip widget"
50258msgstr "Tooltip 위젯에 쓸만한 메서드"
50259
50260#. (itstool) path: section/p
50261#: C/tooltip.py.page:38
50262msgid ""
50263"<code>set_tooltip_text(text)</code> and <code>set_tooltip_markup(text)</code> can be used to add a tooltip of "
50264"plain text (or text in the Pango Markup Language) to a widget."
50265msgstr ""
50266"<code>set_tooltip_text(text)</code> 함수와 <code>set_tooltip_markup(text)</code> 함수는 일반 텍스트(또는 팡고 마크"
50267"업 언어 텍스트) 풍선 도움말을 위젯에 추가할 때 활용할 수 있습니다."
50268
50269#. (itstool) path: section/p
50270#: C/tooltip.py.page:39
50271msgid "For more complex tooltips, for instance for a tooltip with an image:"
50272msgstr "더 복잡한 풍선 도움말은, 그림 위의 풍선 도움말을 예로 들 수 있습니다:"
50273
50274#. (itstool) path: item/p
50275#: C/tooltip.py.page:41
50276msgid ""
50277"Set the <code>\"has-tooltip\"</code> property of the widget to <code>True</code>; this will make GTK+ monitor the "
50278"widget for motion and related events which are needed to determine when and where to show a tooltip."
50279msgstr ""
50280"위젯의 <code>\"has-tooltip\"</code> 속성을 <code>True</code> 값으로 설정하십시오. GTK+에서 풍선 도움말을 보여줄 때"
50281"와 위치를 결정할 때 필요한 위젯의 움직임과 관련 이벤트를 지겨보게합니다."
50282
50283#. (itstool) path: item/p
50284#: C/tooltip.py.page:42
50285msgid ""
50286"Connect to the <code>\"query-tooltip\"</code> signal. This signal will be emitted when a tooltip is supposed to be "
50287"shown. One of the arguments passed to the signal handler is a GtkTooltip object. This is the object that we are "
50288"about to display as a tooltip, and can be manipulated in your callback using functions like <code>set_icon()</"
50289"code>. There are functions for setting the tooltip's markup (<code>set_markup(text)</code>), setting an image from "
50290"a stock icon (<code>set_icon_from_stock(stock_id, size)</code>), or even putting in a custom widget "
50291"(<code>set_custom(widget)</code>)."
50292msgstr ""
50293"<code>\"query-tooltip\"</code> 시그널에 연결하십시오. 이 시그널은 풍선 도움말을 나타낼 때 내보냅니다. 시그널 핸들러"
50294"에 보내는 인자 중 하나는 GtkTooptip 객체입니다. 우리가 풍선 도움말로 나타내려는 객체고, <code>set_icon()</code> 같"
50295"은 함수로 다룰 수 있습니다. 풍선 도움말의 마크업을 설정(<code>set_markup(text)</code>), 스톡 아이콘으로 그림을 설정"
50296"(<code>set_icon_from_stock(stock_id, size)</code>), 또는 개별 위젯을 두는(<code>set_custom(widget)</code>) 몇가지 "
50297"함수가 있습니다."
50298
50299#. (itstool) path: item/p
50300#: C/tooltip.py.page:43
50301msgid ""
50302"Return <code>True</code> from your query-tooltip handler. This causes the tooltip to be show. If you return "
50303"<code>False</code>, it will not be shown."
50304msgstr ""
50305"query-tooltip 핸들러에서 <code>True</code> 값을 반환하십시오. 풍선 도움말을 나타냅니다. <code>False</code> 값을 반"
50306"환하면 풍선 도움말이 나타나지 않습니다."
50307
50308#. (itstool) path: section/p
50309#: C/tooltip.py.page:46
50310msgid ""
50311"In the probably rare case where you want to have even more control over the tooltip that is about to be shown, you "
50312"can set your own GtkWindow which will be used as tooltip window. This works as follows:"
50313msgstr ""
50314"풍선 도움말이 나타날 때 즈음에 풍선 도움말에 대해 뭔가를 더 다루는 경우는 흔하지 않는데, 이 경우 풍선 도움말 창으"
50315"로 활용할 GtkWindow를 설정할 수 있습니다. 다음과 같이 하시면 됩니다:"
50316
50317#. (itstool) path: item/p
50318#: C/tooltip.py.page:48
50319msgid "Set <code>\"has-tooltip\"</code> and connect to <code>\"query-tooltip\"</code> as before."
50320msgstr "<code>\"has-tooltip\"</code>을 설정하고 이전과 같이 <code>\"query-tooltip\"</code> 에 연결하십시오."
50321
50322#. (itstool) path: item/p
50323#: C/tooltip.py.page:49
50324msgid "Use <code>set_tooltip_window()</code> on the widget to set a GtkWindow created by you as tooltip window."
50325msgstr ""
50326"풍선 도움말 창으로 만든 GTKWindow를 설정하려면 <code>set_tooltip_window()</code> 함수를 위젯에서 사용하십시오."
50327
50328#. (itstool) path: item/p
50329#: C/tooltip.py.page:50
50330msgid ""
50331"In the <code>\"query-tooltip\"</code> callback you can access your window using <code>get_tooltip_window()</code> "
50332"and manipulate as you wish. The semantics of the return value are exactly as before, return <code>True</code> to "
50333"show the window, <code>False</code> to not show it."
50334msgstr ""
50335"<code>\"query-tooltip\"</code> 콜백에서는 <code>get_tooltip_window()</code> 함수로 창에 접근할 수 있고 원하는대로 "
50336"조절할 수 있습니다. 반환값 의미는 이전에 언급한 바와 같습니다. <code>True</code> 반환 값은 창을 나타내고 "
50337"<code>False</code>값은 창을 나타내지 않습니다."
50338
50339#. (itstool) path: info/title
50340#: C/tooltip.vala.page:8
50341msgctxt "text"
50342msgid "Tooltip (Vala)"
50343msgstr "Tooltip (Vala)"
50344
50345#. (itstool) path: note/p
50346#: C/tooltip.vala.page:25
50347msgid "This example builds on the <link xref=\"toolbar.vala\">Toolbar</link> example."
50348msgstr "이 예제는 <link xref=\"toolbar.vala\">도구 모음</link> 예제로 만듭니다."
50349
50350#. (itstool) path: section/code
50351#: C/tooltip.vala.page:31
50352#, no-wrap
50353#| msgid ""
50354#| "/* This is the Window */\n"
50355#| "class MyWindow : Gtk.ApplicationWindow {\n"
50356#| "\n"
50357#| "\t/* Instance variables belonging to the window */\n"
50358#| "\tGtk.Toolbar toolbar;\n"
50359#| "\tGtk.ToolButton new_button;\n"
50360#| "\tGtk.ToolButton open_button;\n"
50361#| "\tGtk.ToolButton undo_button;\n"
50362#| "\tGtk.ToolButton fullscreen_button;\n"
50363#| "\tGtk.ToolButton leave_fullscreen_button;\n"
50364#| "\n"
50365#| "\t/* Constructor */\n"
50366#| "\tinternal MyWindow (MyApplication app) {\n"
50367#| "\t\tObject (application: app, title: \"Toolbar with Tooltips Example\");\n"
50368#| "\n"
50369#| "\t\tthis.set_default_size (400, 200);\n"
50370#| "\t\tvar grid = new Gtk.Grid ();\n"
50371#| "\t\tthis.add (grid);\n"
50372#| "\t\tgrid.show ();\n"
50373#| "\n"
50374#| "\t\tcreate_toolbar ();\n"
50375#| "\t\ttoolbar.set_hexpand (true);\n"
50376#| "\t\tgrid.attach (toolbar, 0, 0, 1, 1);\n"
50377#| "\t\ttoolbar.show ();\n"
50378#| "\n"
50379#| "\t\t/* create the \"undo\" window action action */\n"
50380#| "\t\tvar undo_action = new SimpleAction (\"undo\", null);\n"
50381#| "\t\tundo_action.activate.connect (undo_callback);\n"
50382#| "\t\tthis.add_action (undo_action);\n"
50383#| "\n"
50384#| "\t\t/* create the \"fullscreen\" window action */\n"
50385#| "\t\tvar fullscreen_action = new SimpleAction (\"fullscreen\", null);\n"
50386#| "\t\tfullscreen_action.activate.connect (fullscreen_callback);\n"
50387#| "\t\tthis.add_action (fullscreen_action);\n"
50388#| "\t}\n"
50389#| "\n"
50390#| "\t/* Callback for query_tooltip signal */\n"
50391#| "\tbool undo_tooltip_callback (int x, int y, bool keyboard_tooltip, Gtk.Tooltip tooltip) {\n"
50392#| "\n"
50393#| "\t\t/* set the text for the tooltip */\n"
50394#| "        \ttooltip.set_text (\"Undo your last action\");\n"
50395#| "\t\t\n"
50396#| "\t\t/* set an icon fot the tooltip */\n"
50397#| "\t\ttooltip.set_icon_from_stock(\"gtk-undo\", Gtk.IconSize.MENU);\n"
50398#| "\n"
50399#| "        \t/* show the tooltip */\n"
50400#| "        \treturn true;\n"
50401#| "\t}\n"
50402#| "\n"
50403#| "\t/* This function creates the toolbar, its  ToolButtons,\n"
50404#| "\t * and assigns the actions names to the ToolButtons.*/\n"
50405#| "\tvoid create_toolbar () {\n"
50406#| "\t\ttoolbar = new Gtk.Toolbar ();\n"
50407#| "\t\ttoolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
50408#| "\n"
50409#| "\t\tnew_button = new Gtk.ToolButton.from_stock (Gtk.Stock.NEW);\n"
50410#| "\n"
50411#| "\t\t/* tooltip with text */\n"
50412#| "\t\tnew_button.set_tooltip_text (\"Create a new file\");\n"
50413#| "\n"
50414#| "\t\tnew_button.is_important = true; //decides whether to show the label\n"
50415#| "\t\ttoolbar.add (new_button);\n"
50416#| "\t\tnew_button.show ();\n"
50417#| "\t\tnew_button.action_name = \"app.new\";\n"
50418#| "\n"
50419#| "\t\topen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.OPEN);\n"
50420#| "\n"
50421#| "\t\t/* a tooltip using Pango markup language */\n"
50422#| "\t\topen_button.set_tooltip_markup (\"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
50423#| "\n"
50424#| "\t\topen_button.is_important = true;\n"
50425#| "\t\ttoolbar.add (open_button);\n"
50426#| "\t\topen_button.show ();\n"
50427#| "\t\topen_button.action_name = \"app.open\";\n"
50428#| "\n"
50429#| "\t\tundo_button = new Gtk.ToolButton.from_stock (Gtk.Stock.UNDO);\n"
50430#| "\t\n"
50431#| "\t\t/* For a tooltip to have an image, first we must set_has_tooltip to be 'true' */\t\n"
50432#| "\t\t(undo_button as Gtk.Widget).set_has_tooltip (true);\n"
50433#| "\n"
50434#| "\t\t/* Connect the query_tooltip signal to the callback */\n"
50435#| "\t\tundo_button.query_tooltip.connect (undo_tooltip_callback);\n"
50436#| "\t\n"
50437#| "\t\tundo_button.is_important = true;\n"
50438#| "\t\ttoolbar.add (undo_button);\n"
50439#| "\t\tundo_button.show ();\n"
50440#| "\t\tundo_button.action_name = \"win.undo\";\n"
50441#| "\n"
50442#| "\t\tfullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.FULLSCREEN);\n"
50443#| "\t\tfullscreen_button.is_important = true;\n"
50444#| "\t\ttoolbar.add (fullscreen_button);\n"
50445#| "\t\tfullscreen_button.show ();\n"
50446#| "\t\tfullscreen_button.action_name = \"win.fullscreen\";\n"
50447#| "\n"
50448#| "\t\tleave_fullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.LEAVE_FULLSCREEN)\n"
50449#| ";\n"
50450#| "\t\tleave_fullscreen_button.is_important = true;\n"
50451#| "\t\ttoolbar.add (leave_fullscreen_button);\n"
50452#| "\n"
50453#| "\t\tleave_fullscreen_button.action_name = \"win.fullscreen\";\n"
50454#| "\t}\n"
50455#| "\n"
50456#| "\tvoid undo_callback (SimpleAction simple, Variant? parameter) {\n"
50457#| "\t\t\tprint (\"You clicked \\\"Undo\\\".\\n\");\n"
50458#| "\t}\n"
50459#| "\n"
50460#| "\tvoid fullscreen_callback (SimpleAction simple, Variant? parameter) {\n"
50461#| "\t\tif ((this.get_window ().get_state () &amp; Gdk.WindowState.FULLSCREEN) != 0) {\n"
50462#| "\t\t\tthis.unfullscreen ();\n"
50463#| "\t\t\tleave_fullscreen_button.hide ();\n"
50464#| "\t\t\tfullscreen_button.show ();\n"
50465#| "\t\t}\n"
50466#| "\t\telse {\n"
50467#| "\t\t\tthis.fullscreen ();\n"
50468#| "\t\t\tfullscreen_button.hide ();\n"
50469#| "\t\t\tleave_fullscreen_button.show ();\n"
50470#| "\t\t}\n"
50471#| "\t}\n"
50472#| "}\n"
50473#| "\n"
50474#| "/* This is the application */\n"
50475#| "class MyApplication : Gtk.Application {\n"
50476#| "\tprotected override void activate () {\n"
50477#| "\t\tnew MyWindow (this).show ();\n"
50478#| "\t}\n"
50479#| "\n"
50480#| "\tprotected override void startup () {\n"
50481#| "\t\tbase.startup ();\n"
50482#| "\n"
50483#| "\t\t/* Create the \"new\" action and add it to the app*/\n"
50484#| "\t\tvar new_action = new SimpleAction (\"new\", null);\n"
50485#| "\t\tnew_action.activate.connect (new_callback);\n"
50486#| "\t\tthis.add_action (new_action);\n"
50487#| "\n"
50488#| "\t\t/* Create the \"open\" action, and add it to the app */\n"
50489#| "\t\tvar open_action = new SimpleAction (\"open\", null);\n"
50490#| "\t\topen_action.activate.connect (open_callback);\n"
50491#| "\t\tthis.add_action (open_action);\n"
50492#| "\n"
50493#| "\t\t/* You could also add the action to the app menu\n"
50494#| "\t\t * if you wanted to.\n"
50495#| "\t\t */\n"
50496#| "\t\t//var menu = new Menu ();\n"
50497#| "\t\t//menu.append (\"New\", \"app.new\");\n"
50498#| "\t\t//this.app_menu = menu;\n"
50499#| "\t}\n"
50500#| "\n"
50501#| "\tvoid new_callback (SimpleAction action, Variant? parameter) {\n"
50502#| "\t\tprint (\"You clicked \\\"New\\\".\\n\");\n"
50503#| "\t}\n"
50504#| "\n"
50505#| "\tvoid open_callback (SimpleAction action, Variant? parameter) {\n"
50506#| "\t\t\tprint (\"You clicked \\\"Open\\\".\\n\");\n"
50507#| "\t}\n"
50508#| "}\n"
50509#| "\n"
50510#| "/* The main function creates the application and runs it. */\n"
50511#| "int main (string[] args) {\n"
50512#| "\treturn new MyApplication ().run (args);\n"
50513#| "}\n"
50514msgid ""
50515"/* This is the Window */\n"
50516"class MyWindow : Gtk.ApplicationWindow {\n"
50517"\n"
50518"\t/* Instance variables belonging to the window */\n"
50519"\tGtk.Toolbar toolbar;\n"
50520"\tGtk.ToolButton new_button;\n"
50521"\tGtk.ToolButton open_button;\n"
50522"\tGtk.ToolButton undo_button;\n"
50523"\tGtk.ToolButton fullscreen_button;\n"
50524"\tGtk.ToolButton leave_fullscreen_button;\n"
50525"\n"
50526"\t/* Constructor */\n"
50527"\tinternal MyWindow (MyApplication app) {\n"
50528"\t\tObject (application: app, title: \"Toolbar with Tooltips Example\");\n"
50529"\n"
50530"\t\tthis.set_default_size (400, 200);\n"
50531"\t\tvar grid = new Gtk.Grid ();\n"
50532"\t\tthis.add (grid);\n"
50533"\t\tgrid.show ();\n"
50534"\n"
50535"\t\tcreate_toolbar ();\n"
50536"\t\ttoolbar.set_hexpand (true);\n"
50537"\t\tgrid.attach (toolbar, 0, 0, 1, 1);\n"
50538"\t\ttoolbar.show ();\n"
50539"\n"
50540"\t\t/* create the \"undo\" window action action */\n"
50541"\t\tvar undo_action = new SimpleAction (\"undo\", null);\n"
50542"\t\tundo_action.activate.connect (undo_callback);\n"
50543"\t\tthis.add_action (undo_action);\n"
50544"\n"
50545"\t\t/* create the \"fullscreen\" window action */\n"
50546"\t\tvar fullscreen_action = new SimpleAction (\"fullscreen\", null);\n"
50547"\t\tfullscreen_action.activate.connect (fullscreen_callback);\n"
50548"\t\tthis.add_action (fullscreen_action);\n"
50549"\t}\n"
50550"\n"
50551"\t/* Callback for query_tooltip signal */\n"
50552"\tbool undo_tooltip_callback (int x, int y, bool keyboard_tooltip, Gtk.Tooltip tooltip) {\n"
50553"\n"
50554"\t\t/* set the text for the tooltip */\n"
50555"        \ttooltip.set_text (\"Undo your last action\");\n"
50556"\t\t\n"
50557"\t\t/* set an icon for the tooltip */\n"
50558"\t\ttooltip.set_icon_from_stock(\"gtk-undo\", Gtk.IconSize.MENU);\n"
50559"\n"
50560"        \t/* show the tooltip */\n"
50561"        \treturn true;\n"
50562"\t}\n"
50563"\n"
50564"\t/* This function creates the toolbar, its  ToolButtons,\n"
50565"\t * and assigns the actions names to the ToolButtons.*/\n"
50566"\tvoid create_toolbar () {\n"
50567"\t\ttoolbar = new Gtk.Toolbar ();\n"
50568"\t\ttoolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
50569"\n"
50570"\t\tnew_button = new Gtk.ToolButton.from_stock (Gtk.Stock.NEW);\n"
50571"\n"
50572"\t\t/* tooltip with text */\n"
50573"\t\tnew_button.set_tooltip_text (\"Create a new file\");\n"
50574"\n"
50575"\t\tnew_button.is_important = true; //decides whether to show the label\n"
50576"\t\ttoolbar.add (new_button);\n"
50577"\t\tnew_button.show ();\n"
50578"\t\tnew_button.action_name = \"app.new\";\n"
50579"\n"
50580"\t\topen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.OPEN);\n"
50581"\n"
50582"\t\t/* a tooltip using Pango markup language */\n"
50583"\t\topen_button.set_tooltip_markup (\"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
50584"\n"
50585"\t\topen_button.is_important = true;\n"
50586"\t\ttoolbar.add (open_button);\n"
50587"\t\topen_button.show ();\n"
50588"\t\topen_button.action_name = \"app.open\";\n"
50589"\n"
50590"\t\tundo_button = new Gtk.ToolButton.from_stock (Gtk.Stock.UNDO);\n"
50591"\t\n"
50592"\t\t/* For a tooltip to have an image, first we must set_has_tooltip to be 'true' */\t\n"
50593"\t\t(undo_button as Gtk.Widget).set_has_tooltip (true);\n"
50594"\n"
50595"\t\t/* Connect the query_tooltip signal to the callback */\n"
50596"\t\tundo_button.query_tooltip.connect (undo_tooltip_callback);\n"
50597"\t\n"
50598"\t\tundo_button.is_important = true;\n"
50599"\t\ttoolbar.add (undo_button);\n"
50600"\t\tundo_button.show ();\n"
50601"\t\tundo_button.action_name = \"win.undo\";\n"
50602"\n"
50603"\t\tfullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.FULLSCREEN);\n"
50604"\t\tfullscreen_button.is_important = true;\n"
50605"\t\ttoolbar.add (fullscreen_button);\n"
50606"\t\tfullscreen_button.show ();\n"
50607"\t\tfullscreen_button.action_name = \"win.fullscreen\";\n"
50608"\n"
50609"\t\tleave_fullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.LEAVE_FULLSCREEN)\n"
50610";\n"
50611"\t\tleave_fullscreen_button.is_important = true;\n"
50612"\t\ttoolbar.add (leave_fullscreen_button);\n"
50613"\n"
50614"\t\tleave_fullscreen_button.action_name = \"win.fullscreen\";\n"
50615"\t}\n"
50616"\n"
50617"\tvoid undo_callback (SimpleAction simple, Variant? parameter) {\n"
50618"\t\t\tprint (\"You clicked \\\"Undo\\\".\\n\");\n"
50619"\t}\n"
50620"\n"
50621"\tvoid fullscreen_callback (SimpleAction simple, Variant? parameter) {\n"
50622"\t\tif ((this.get_window ().get_state () &amp; Gdk.WindowState.FULLSCREEN) != 0) {\n"
50623"\t\t\tthis.unfullscreen ();\n"
50624"\t\t\tleave_fullscreen_button.hide ();\n"
50625"\t\t\tfullscreen_button.show ();\n"
50626"\t\t}\n"
50627"\t\telse {\n"
50628"\t\t\tthis.fullscreen ();\n"
50629"\t\t\tfullscreen_button.hide ();\n"
50630"\t\t\tleave_fullscreen_button.show ();\n"
50631"\t\t}\n"
50632"\t}\n"
50633"}\n"
50634"\n"
50635"/* This is the application */\n"
50636"class MyApplication : Gtk.Application {\n"
50637"\tprotected override void activate () {\n"
50638"\t\tnew MyWindow (this).show ();\n"
50639"\t}\n"
50640"\n"
50641"\tprotected override void startup () {\n"
50642"\t\tbase.startup ();\n"
50643"\n"
50644"\t\t/* Create the \"new\" action and add it to the app*/\n"
50645"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
50646"\t\tnew_action.activate.connect (new_callback);\n"
50647"\t\tthis.add_action (new_action);\n"
50648"\n"
50649"\t\t/* Create the \"open\" action, and add it to the app */\n"
50650"\t\tvar open_action = new SimpleAction (\"open\", null);\n"
50651"\t\topen_action.activate.connect (open_callback);\n"
50652"\t\tthis.add_action (open_action);\n"
50653"\n"
50654"\t\t/* You could also add the action to the app menu\n"
50655"\t\t * if you wanted to.\n"
50656"\t\t */\n"
50657"\t\t//var menu = new Menu ();\n"
50658"\t\t//menu.append (\"New\", \"app.new\");\n"
50659"\t\t//this.app_menu = menu;\n"
50660"\t}\n"
50661"\n"
50662"\tvoid new_callback (SimpleAction action, Variant? parameter) {\n"
50663"\t\tprint (\"You clicked \\\"New\\\".\\n\");\n"
50664"\t}\n"
50665"\n"
50666"\tvoid open_callback (SimpleAction action, Variant? parameter) {\n"
50667"\t\t\tprint (\"You clicked \\\"Open\\\".\\n\");\n"
50668"\t}\n"
50669"}\n"
50670"\n"
50671"/* The main function creates the application and runs it. */\n"
50672"int main (string[] args) {\n"
50673"\treturn new MyApplication ().run (args);\n"
50674"}\n"
50675msgstr ""
50676"/* This is the Window */\n"
50677"class MyWindow : Gtk.ApplicationWindow {\n"
50678"\n"
50679"\t/* Instance variables belonging to the window */\n"
50680"\tGtk.Toolbar toolbar;\n"
50681"\tGtk.ToolButton new_button;\n"
50682"\tGtk.ToolButton open_button;\n"
50683"\tGtk.ToolButton undo_button;\n"
50684"\tGtk.ToolButton fullscreen_button;\n"
50685"\tGtk.ToolButton leave_fullscreen_button;\n"
50686"\n"
50687"\t/* Constructor */\n"
50688"\tinternal MyWindow (MyApplication app) {\n"
50689"\t\tObject (application: app, title: \"Toolbar with Tooltips Example\");\n"
50690"\n"
50691"\t\tthis.set_default_size (400, 200);\n"
50692"\t\tvar grid = new Gtk.Grid ();\n"
50693"\t\tthis.add (grid);\n"
50694"\t\tgrid.show ();\n"
50695"\n"
50696"\t\tcreate_toolbar ();\n"
50697"\t\ttoolbar.set_hexpand (true);\n"
50698"\t\tgrid.attach (toolbar, 0, 0, 1, 1);\n"
50699"\t\ttoolbar.show ();\n"
50700"\n"
50701"\t\t/* create the \"undo\" window action action */\n"
50702"\t\tvar undo_action = new SimpleAction (\"undo\", null);\n"
50703"\t\tundo_action.activate.connect (undo_callback);\n"
50704"\t\tthis.add_action (undo_action);\n"
50705"\n"
50706"\t\t/* create the \"fullscreen\" window action */\n"
50707"\t\tvar fullscreen_action = new SimpleAction (\"fullscreen\", null);\n"
50708"\t\tfullscreen_action.activate.connect (fullscreen_callback);\n"
50709"\t\tthis.add_action (fullscreen_action);\n"
50710"\t}\n"
50711"\n"
50712"\t/* Callback for query_tooltip signal */\n"
50713"\tbool undo_tooltip_callback (int x, int y, bool keyboard_tooltip, Gtk.Tooltip tooltip) {\n"
50714"\n"
50715"\t\t/* set the text for the tooltip */\n"
50716"        \ttooltip.set_text (\"Undo your last action\");\n"
50717"\t\t\n"
50718"\t\t/* set an icon for the tooltip */\n"
50719"\t\ttooltip.set_icon_from_stock(\"gtk-undo\", Gtk.IconSize.MENU);\n"
50720"\n"
50721"        \t/* show the tooltip */\n"
50722"        \treturn true;\n"
50723"\t}\n"
50724"\n"
50725"\t/* This function creates the toolbar, its  ToolButtons,\n"
50726"\t * and assigns the actions names to the ToolButtons.*/\n"
50727"\tvoid create_toolbar () {\n"
50728"\t\ttoolbar = new Gtk.Toolbar ();\n"
50729"\t\ttoolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);\n"
50730"\n"
50731"\t\tnew_button = new Gtk.ToolButton.from_stock (Gtk.Stock.NEW);\n"
50732"\n"
50733"\t\t/* tooltip with text */\n"
50734"\t\tnew_button.set_tooltip_text (\"Create a new file\");\n"
50735"\n"
50736"\t\tnew_button.is_important = true; //decides whether to show the label\n"
50737"\t\ttoolbar.add (new_button);\n"
50738"\t\tnew_button.show ();\n"
50739"\t\tnew_button.action_name = \"app.new\";\n"
50740"\n"
50741"\t\topen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.OPEN);\n"
50742"\n"
50743"\t\t/* a tooltip using Pango markup language */\n"
50744"\t\topen_button.set_tooltip_markup (\"Open an &lt;i&gt;existing&lt;/i&gt; file\");\n"
50745"\n"
50746"\t\topen_button.is_important = true;\n"
50747"\t\ttoolbar.add (open_button);\n"
50748"\t\topen_button.show ();\n"
50749"\t\topen_button.action_name = \"app.open\";\n"
50750"\n"
50751"\t\tundo_button = new Gtk.ToolButton.from_stock (Gtk.Stock.UNDO);\n"
50752"\t\n"
50753"\t\t/* For a tooltip to have an image, first we must set_has_tooltip to be 'true' */\t\n"
50754"\t\t(undo_button as Gtk.Widget).set_has_tooltip (true);\n"
50755"\n"
50756"\t\t/* Connect the query_tooltip signal to the callback */\n"
50757"\t\tundo_button.query_tooltip.connect (undo_tooltip_callback);\n"
50758"\t\n"
50759"\t\tundo_button.is_important = true;\n"
50760"\t\ttoolbar.add (undo_button);\n"
50761"\t\tundo_button.show ();\n"
50762"\t\tundo_button.action_name = \"win.undo\";\n"
50763"\n"
50764"\t\tfullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.FULLSCREEN);\n"
50765"\t\tfullscreen_button.is_important = true;\n"
50766"\t\ttoolbar.add (fullscreen_button);\n"
50767"\t\tfullscreen_button.show ();\n"
50768"\t\tfullscreen_button.action_name = \"win.fullscreen\";\n"
50769"\n"
50770"\t\tleave_fullscreen_button = new Gtk.ToolButton.from_stock (Gtk.Stock.LEAVE_FULLSCREEN)\n"
50771";\n"
50772"\t\tleave_fullscreen_button.is_important = true;\n"
50773"\t\ttoolbar.add (leave_fullscreen_button);\n"
50774"\n"
50775"\t\tleave_fullscreen_button.action_name = \"win.fullscreen\";\n"
50776"\t}\n"
50777"\n"
50778"\tvoid undo_callback (SimpleAction simple, Variant? parameter) {\n"
50779"\t\t\tprint (\"You clicked \\\"Undo\\\".\\n\");\n"
50780"\t}\n"
50781"\n"
50782"\tvoid fullscreen_callback (SimpleAction simple, Variant? parameter) {\n"
50783"\t\tif ((this.get_window ().get_state () &amp; Gdk.WindowState.FULLSCREEN) != 0) {\n"
50784"\t\t\tthis.unfullscreen ();\n"
50785"\t\t\tleave_fullscreen_button.hide ();\n"
50786"\t\t\tfullscreen_button.show ();\n"
50787"\t\t}\n"
50788"\t\telse {\n"
50789"\t\t\tthis.fullscreen ();\n"
50790"\t\t\tfullscreen_button.hide ();\n"
50791"\t\t\tleave_fullscreen_button.show ();\n"
50792"\t\t}\n"
50793"\t}\n"
50794"}\n"
50795"\n"
50796"/* This is the application */\n"
50797"class MyApplication : Gtk.Application {\n"
50798"\tprotected override void activate () {\n"
50799"\t\tnew MyWindow (this).show ();\n"
50800"\t}\n"
50801"\n"
50802"\tprotected override void startup () {\n"
50803"\t\tbase.startup ();\n"
50804"\n"
50805"\t\t/* Create the \"new\" action and add it to the app*/\n"
50806"\t\tvar new_action = new SimpleAction (\"new\", null);\n"
50807"\t\tnew_action.activate.connect (new_callback);\n"
50808"\t\tthis.add_action (new_action);\n"
50809"\n"
50810"\t\t/* Create the \"open\" action, and add it to the app */\n"
50811"\t\tvar open_action = new SimpleAction (\"open\", null);\n"
50812"\t\topen_action.activate.connect (open_callback);\n"
50813"\t\tthis.add_action (open_action);\n"
50814"\n"
50815"\t\t/* You could also add the action to the app menu\n"
50816"\t\t * if you wanted to.\n"
50817"\t\t */\n"
50818"\t\t//var menu = new Menu ();\n"
50819"\t\t//menu.append (\"New\", \"app.new\");\n"
50820"\t\t//this.app_menu = menu;\n"
50821"\t}\n"
50822"\n"
50823"\tvoid new_callback (SimpleAction action, Variant? parameter) {\n"
50824"\t\tprint (\"You clicked \\\"New\\\".\\n\");\n"
50825"\t}\n"
50826"\n"
50827"\tvoid open_callback (SimpleAction action, Variant? parameter) {\n"
50828"\t\t\tprint (\"You clicked \\\"Open\\\".\\n\");\n"
50829"\t}\n"
50830"}\n"
50831"\n"
50832"/* The main function creates the application and runs it. */\n"
50833"int main (string[] args) {\n"
50834"\treturn new MyApplication ().run (args);\n"
50835"}\n"
50836
50837#. (itstool) path: item/p
50838#: C/tooltip.vala.page:39
50839msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Tooltip.html\">Gtk.Tooltip</link>"
50840msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Tooltip.html\">Gtk.Tooltip</link>"
50841
50842#. (itstool) path: item/p
50843#: C/tooltip.vala.page:41
50844msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Widget.query_tooltip.html\">Gtk.Widget.query_tooltip</link>"
50845msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Widget.query_tooltip.html\">Gtk.Widget.query_tooltip</link>"
50846
50847#. (itstool) path: item/p
50848#: C/tooltip.vala.page:42
50849msgid ""
50850"<link href=\"https://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html#GTK-STOCK-UNDO:CAPS\">Stock Items</link>"
50851msgstr ""
50852"<link href=\"https://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html#GTK-STOCK-UNDO:CAPS\">취급 항목</link>"
50853
50854#. (itstool) path: info/title
50855#: C/treeview_advanced_liststore.py.page:8
50856msgctxt "text"
50857msgid "Simple Treeview with ListStore (Python)"
50858msgstr "간단한 TreeView와 ListStore(Python)"
50859
50860#. (itstool) path: info/desc
50861#: C/treeview_advanced_liststore.py.page:19
50862msgid "A TreeView displaying a ListStore (more complex example)"
50863msgstr "ListStore를 표시하는 TreeView(더 복잡한 예제)"
50864
50865#. (itstool) path: page/title
50866#: C/treeview_advanced_liststore.py.page:22
50867msgid "More Complex Treeview with ListStore"
50868msgstr "좀 더 복잡한 TreeView와 ListStore"
50869
50870#. (itstool) path: page/media
50871#. This is a reference to an external file such as an image or video. When
50872#. the file changes, the md5 hash will change to let you know you need to
50873#. update your localized copy. The msgstr is not used at all. Set it to
50874#. whatever you like once you have updated your copy of the file.
50875#: C/treeview_advanced_liststore.py.page:23
50876msgctxt "_"
50877msgid "external ref='media/treeview_advanced_liststore.png' md5='102b512197fb9aa4ed9a16462f6af911'"
50878msgstr ""
50879
50880#. (itstool) path: page/p
50881#: C/treeview_advanced_liststore.py.page:24 C/treeview_simple_liststore.py.page:25
50882msgid "This TreeView displays a simple ListStore with the selection \"changed\" signal connected."
50883msgstr "이 TreeView에서는 선택 \"changed\" 시그널을 연결한 간단한 ListStore를 보여줍니다."
50884
50885#. (itstool) path: section/code
50886#: C/treeview_advanced_liststore.py.page:31
50887#, no-wrap
50888msgid ""
50889"from gi.repository import Gtk\n"
50890"from gi.repository import Pango\n"
50891"import sys\n"
50892"\n"
50893"list_of_dvd = [[\"The Usual Suspects\"],\n"
50894"               [\"Gilda\"],\n"
50895"               [\"The Godfather\"],\n"
50896"               [\"Pulp Fiction\"],\n"
50897"               [\"Once Upon a Time in the West\"],\n"
50898"               [\"Rear Window\"]]\n"
50899"\n"
50900"\n"
50901"class MyWindow(Gtk.ApplicationWindow):\n"
50902"\n"
50903"    def __init__(self, app):\n"
50904"        Gtk.Window.__init__(self, title=\"My DVDs\", application=app)\n"
50905"        self.set_default_size(250, 100)\n"
50906"        self.set_border_width(10)\n"
50907"\n"
50908"        # the data are stored in the model\n"
50909"        # create a liststore with one column\n"
50910"        self.listmodel = Gtk.ListStore(str)\n"
50911"        for i in range(len(list_of_dvd)):\n"
50912"            self.listmodel.append(list_of_dvd[i])\n"
50913"\n"
50914"        # a treeview to see the data stored in the model\n"
50915"        view = Gtk.TreeView(model=self.listmodel)\n"
50916"\n"
50917"        # cellrenderer for the first column\n"
50918"        cell = Gtk.CellRendererText()\n"
50919"        # the first column is created\n"
50920"        col = Gtk.TreeViewColumn(\"Title\", cell, text=0)\n"
50921"        # and it is appended to the treeview\n"
50922"        view.append_column(col)\n"
50923"\n"
50924"        # when a row of the treeview is selected, it emits a signal\n"
50925"        self.selection = view.get_selection()\n"
50926"        self.selection.connect(\"changed\", self.on_changed)\n"
50927"\n"
50928"        # the label we use to show the selection\n"
50929"        self.label = Gtk.Label()\n"
50930"        self.label.set_text(\"\")\n"
50931"\n"
50932"        # a button to add new titles, connected to a callback function\n"
50933"        self.button_add = Gtk.Button(label=\"Add\")\n"
50934"        self.button_add.connect(\"clicked\", self.add_cb)\n"
50935"\n"
50936"        # an entry to enter titles\n"
50937"        self.entry = Gtk.Entry()\n"
50938"\n"
50939"        # a button to remove titles, connected to a callback function\n"
50940"        self.button_remove = Gtk.Button(label=\"Remove\")\n"
50941"        self.button_remove.connect(\"clicked\", self.remove_cb)\n"
50942"\n"
50943"        # a button to remove all titles, connected to a callback function\n"
50944"        self.button_remove_all = Gtk.Button(label=\"Remove All\")\n"
50945"        self.button_remove_all.connect(\"clicked\", self.remove_all_cb)\n"
50946"\n"
50947"        # a grid to attach the widgets\n"
50948"        grid = Gtk.Grid()\n"
50949"        grid.attach(view, 0, 0, 4, 1)\n"
50950"        grid.attach(self.label, 0, 1, 4, 1)\n"
50951"        grid.attach(self.button_add, 0, 2, 1, 1)\n"
50952"        grid.attach_next_to(\n"
50953"            self.entry, self.button_add, Gtk.PositionType.RIGHT, 1, 1)\n"
50954"        grid.attach_next_to(\n"
50955"            self.button_remove, self.entry, Gtk.PositionType.RIGHT, 1, 1)\n"
50956"        grid.attach_next_to(\n"
50957"            self.button_remove_all, self.button_remove, Gtk.PositionType.RIGHT, 1, 1)\n"
50958"\n"
50959"        # add the grid to the window\n"
50960"        self.add(grid)\n"
50961"\n"
50962"    def on_changed(self, selection):\n"
50963"        # get the model and the iterator that points at the data in the model\n"
50964"        (model, iter) = selection.get_selected()\n"
50965"        # set the label to a new value depending on the selection, if there is\n"
50966"        # one\n"
50967"        if iter is not None:\n"
50968"            self.label.set_text(\"\\n %s\" % (model[iter][0]))\n"
50969"        else:\n"
50970"            self.label.set_text(\"\")\n"
50971"        return True\n"
50972"\n"
50973"    # callback function for the \"Add\" button\n"
50974"    def add_cb(self, button):\n"
50975"        # append to the model the title that is in the entry\n"
50976"        title = self.entry.get_text()\n"
50977"        self.listmodel.append([title])\n"
50978"        # and print a message in the terminal\n"
50979"        print(\"%s has been added\" % (title))\n"
50980"\n"
50981"    def remove_cb(self, button):\n"
50982"        # if there is still an entry in the model\n"
50983"        if len(self.listmodel) != 0:\n"
50984"            # get the selection\n"
50985"            (model, iter) = self.selection.get_selected()\n"
50986"            # if there is a selection, print a message in the terminal\n"
50987"            # and remove it from the model\n"
50988"            if iter is not None:\n"
50989"                print(\"%s has been removed\" % (model[iter][0]))\n"
50990"                self.listmodel.remove(iter)\n"
50991"            # otherwise, ask the user to select something to remove\n"
50992"            else:\n"
50993"                print(\"Select a title to remove\")\n"
50994"        # else, if there are no entries in the model, print \"Empty list\"\n"
50995"        # in the terminal\n"
50996"        else:\n"
50997"            print(\"Empty list\")\n"
50998"\n"
50999"    def remove_all_cb(self, button):\n"
51000"        # if there is still an entry in the model\n"
51001"        if len(self.listmodel) != 0:\n"
51002"            # remove all the entries in the model\n"
51003"            for i in range(len(self.listmodel)):\n"
51004"                iter = self.listmodel.get_iter(0)\n"
51005"                self.listmodel.remove(iter)\n"
51006"        # print a message in the terminal alerting that the model is empty\n"
51007"        print(\"Empty list\")\n"
51008"\n"
51009"\n"
51010"class MyApplication(Gtk.Application):\n"
51011"\n"
51012"    def __init__(self):\n"
51013"        Gtk.Application.__init__(self)\n"
51014"\n"
51015"    def do_activate(self):\n"
51016"        win = MyWindow(self)\n"
51017"        win.show_all()\n"
51018"\n"
51019"    def do_startup(self):\n"
51020"        Gtk.Application.do_startup(self)\n"
51021"\n"
51022"app = MyApplication()\n"
51023"exit_status = app.run(sys.argv)\n"
51024"sys.exit(exit_status)\n"
51025msgstr ""
51026"from gi.repository import Gtk\n"
51027"from gi.repository import Pango\n"
51028"import sys\n"
51029"\n"
51030"list_of_dvd = [[\"The Usual Suspects\"],\n"
51031"               [\"Gilda\"],\n"
51032"               [\"The Godfather\"],\n"
51033"               [\"Pulp Fiction\"],\n"
51034"               [\"Once Upon a Time in the West\"],\n"
51035"               [\"Rear Window\"]]\n"
51036"\n"
51037"\n"
51038"class MyWindow(Gtk.ApplicationWindow):\n"
51039"\n"
51040"    def __init__(self, app):\n"
51041"        Gtk.Window.__init__(self, title=\"My DVDs\", application=app)\n"
51042"        self.set_default_size(250, 100)\n"
51043"        self.set_border_width(10)\n"
51044"\n"
51045"        # the data are stored in the model\n"
51046"        # create a liststore with one column\n"
51047"        self.listmodel = Gtk.ListStore(str)\n"
51048"        for i in range(len(list_of_dvd)):\n"
51049"            self.listmodel.append(list_of_dvd[i])\n"
51050"\n"
51051"        # a treeview to see the data stored in the model\n"
51052"        view = Gtk.TreeView(model=self.listmodel)\n"
51053"\n"
51054"        # cellrenderer for the first column\n"
51055"        cell = Gtk.CellRendererText()\n"
51056"        # the first column is created\n"
51057"        col = Gtk.TreeViewColumn(\"Title\", cell, text=0)\n"
51058"        # and it is appended to the treeview\n"
51059"        view.append_column(col)\n"
51060"\n"
51061"        # when a row of the treeview is selected, it emits a signal\n"
51062"        self.selection = view.get_selection()\n"
51063"        self.selection.connect(\"changed\", self.on_changed)\n"
51064"\n"
51065"        # the label we use to show the selection\n"
51066"        self.label = Gtk.Label()\n"
51067"        self.label.set_text(\"\")\n"
51068"\n"
51069"        # a button to add new titles, connected to a callback function\n"
51070"        self.button_add = Gtk.Button(label=\"Add\")\n"
51071"        self.button_add.connect(\"clicked\", self.add_cb)\n"
51072"\n"
51073"        # an entry to enter titles\n"
51074"        self.entry = Gtk.Entry()\n"
51075"\n"
51076"        # a button to remove titles, connected to a callback function\n"
51077"        self.button_remove = Gtk.Button(label=\"Remove\")\n"
51078"        self.button_remove.connect(\"clicked\", self.remove_cb)\n"
51079"\n"
51080"        # a button to remove all titles, connected to a callback function\n"
51081"        self.button_remove_all = Gtk.Button(label=\"Remove All\")\n"
51082"        self.button_remove_all.connect(\"clicked\", self.remove_all_cb)\n"
51083"\n"
51084"        # a grid to attach the widgets\n"
51085"        grid = Gtk.Grid()\n"
51086"        grid.attach(view, 0, 0, 4, 1)\n"
51087"        grid.attach(self.label, 0, 1, 4, 1)\n"
51088"        grid.attach(self.button_add, 0, 2, 1, 1)\n"
51089"        grid.attach_next_to(\n"
51090"            self.entry, self.button_add, Gtk.PositionType.RIGHT, 1, 1)\n"
51091"        grid.attach_next_to(\n"
51092"            self.button_remove, self.entry, Gtk.PositionType.RIGHT, 1, 1)\n"
51093"        grid.attach_next_to(\n"
51094"            self.button_remove_all, self.button_remove, Gtk.PositionType.RIGHT, 1, 1)\n"
51095"\n"
51096"        # add the grid to the window\n"
51097"        self.add(grid)\n"
51098"\n"
51099"    def on_changed(self, selection):\n"
51100"        # get the model and the iterator that points at the data in the model\n"
51101"        (model, iter) = selection.get_selected()\n"
51102"        # set the label to a new value depending on the selection, if there is\n"
51103"        # one\n"
51104"        if iter is not None:\n"
51105"            self.label.set_text(\"\\n %s\" % (model[iter][0]))\n"
51106"        else:\n"
51107"            self.label.set_text(\"\")\n"
51108"        return True\n"
51109"\n"
51110"    # callback function for the \"Add\" button\n"
51111"    def add_cb(self, button):\n"
51112"        # append to the model the title that is in the entry\n"
51113"        title = self.entry.get_text()\n"
51114"        self.listmodel.append([title])\n"
51115"        # and print a message in the terminal\n"
51116"        print(\"%s has been added\" % (title))\n"
51117"\n"
51118"    def remove_cb(self, button):\n"
51119"        # if there is still an entry in the model\n"
51120"        if len(self.listmodel) != 0:\n"
51121"            # get the selection\n"
51122"            (model, iter) = self.selection.get_selected()\n"
51123"            # if there is a selection, print a message in the terminal\n"
51124"            # and remove it from the model\n"
51125"            if iter is not None:\n"
51126"                print(\"%s has been removed\" % (model[iter][0]))\n"
51127"                self.listmodel.remove(iter)\n"
51128"            # otherwise, ask the user to select something to remove\n"
51129"            else:\n"
51130"                print(\"Select a title to remove\")\n"
51131"        # else, if there are no entries in the model, print \"Empty list\"\n"
51132"        # in the terminal\n"
51133"        else:\n"
51134"            print(\"Empty list\")\n"
51135"\n"
51136"    def remove_all_cb(self, button):\n"
51137"        # if there is still an entry in the model\n"
51138"        if len(self.listmodel) != 0:\n"
51139"            # remove all the entries in the model\n"
51140"            for i in range(len(self.listmodel)):\n"
51141"                iter = self.listmodel.get_iter(0)\n"
51142"                self.listmodel.remove(iter)\n"
51143"        # print a message in the terminal alerting that the model is empty\n"
51144"        print(\"Empty list\")\n"
51145"\n"
51146"\n"
51147"class MyApplication(Gtk.Application):\n"
51148"\n"
51149"    def __init__(self):\n"
51150"        Gtk.Application.__init__(self)\n"
51151"\n"
51152"    def do_activate(self):\n"
51153"        win = MyWindow(self)\n"
51154"        win.show_all()\n"
51155"\n"
51156"    def do_startup(self):\n"
51157"        Gtk.Application.do_startup(self)\n"
51158"\n"
51159"app = MyApplication()\n"
51160"exit_status = app.run(sys.argv)\n"
51161"sys.exit(exit_status)\n"
51162
51163#. (itstool) path: section/title
51164#: C/treeview_advanced_liststore.py.page:35 C/treeview_cellrenderertoggle.py.page:35
51165#: C/treeview_simple_liststore.py.page:36 C/treeview_treestore.py.page:36
51166msgid "Useful methods for a TreeView widget"
51167msgstr "TreeView 위젯에 쓸만한 메서드"
51168
51169#. (itstool) path: section/p
51170#: C/treeview_advanced_liststore.py.page:36 C/treeview_cellrenderertoggle.py.page:36 C/treeview_treestore.py.page:37
51171msgid ""
51172"The TreeView widget is designed around a <em>Model/View/Controller</em> design: the <em>Model</em> stores the "
51173"data; the <em>View</em> gets change notifications and displays the content of the model; the <em>Controller</em>, "
51174"finally, changes the state of the model and notifies the view of these changes. For more information and for a "
51175"list of useful methods for TreeModel see <link xref=\"model-view-controller.py\"/>."
51176msgstr ""
51177"TreeView 위젯은 <em>Model/View/Controller</em>  방식으로 설계했습니다. <em>Model</em>은 데이터를, <em>View</em>는 "
51178"바뀐 내용 알림을 받은 후의 모델의 내용을, 마지막으로 <em>Controller</em>는 모델의 상태를 바꾸고 뷰에게 바뀐 모델의 "
51179"상태를 알리는 코드를 담습니다. 자세한 내용과 TreeModel에 대한 쓸만한 메서드 목록을 보시려면 <link xref=\"model-"
51180"view-controller.py\"/>를 참고하십시오."
51181
51182#. (itstool) path: section/p
51183#: C/treeview_advanced_liststore.py.page:37
51184msgid ""
51185"In line 36 the <code>\"changed\"</code> signal is connected to the callback function <code>on_changed()</code> "
51186"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
51187"\"signals-callbacks.py\"/> for a more detailed explanation."
51188msgstr ""
51189"36번째 줄에서 <code>\"changed\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
51190"function</var>)</code> 함수로  <code>on_changed()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
51191"\"signals-callbacks.py\"/>를 참조하십시오."
51192
51193#. (itstool) path: info/title
51194#: C/treeview_cellrenderertoggle.py.page:8 C/treeview_treestore.py.page:8
51195msgctxt "text"
51196msgid "TreeView with TreeStore (Python)"
51197msgstr "TreeView와 TreeStore(Python)"
51198
51199#. (itstool) path: info/desc
51200#: C/treeview_cellrenderertoggle.py.page:19
51201msgid "A TreeView displaying a TreeStore (more complex example, with CellRendererToggle)"
51202msgstr "TreeStore를 보여주는 TreeView(CellRendererToggle이 들어간 더 복잡한 예제)"
51203
51204#. (itstool) path: page/title
51205#: C/treeview_cellrenderertoggle.py.page:22
51206msgid "More Complex TreeView with TreeStore"
51207msgstr "좀 더 복잡한 TreeView와 TreeStore"
51208
51209#. (itstool) path: page/media
51210#. This is a reference to an external file such as an image or video. When
51211#. the file changes, the md5 hash will change to let you know you need to
51212#. update your localized copy. The msgstr is not used at all. Set it to
51213#. whatever you like once you have updated your copy of the file.
51214#: C/treeview_cellrenderertoggle.py.page:23
51215msgctxt "_"
51216msgid "external ref='media/treeview_cellrenderertoggle.png' md5='ade9b9437f8f83150acf37610dab834d'"
51217msgstr ""
51218
51219#. (itstool) path: page/p
51220#: C/treeview_cellrenderertoggle.py.page:24
51221msgid "This TreeView displays a TreeStore with two columns, one of which is rendered as a toggle."
51222msgstr "이 TreeView에서는 두 열을 TreeStore로 나타내는데, 두 열 중 하나는 상태 반전 방식으로 보여줍니다."
51223
51224#. (itstool) path: section/code
51225#: C/treeview_cellrenderertoggle.py.page:31
51226#, no-wrap
51227msgid ""
51228"from gi.repository import Gtk\n"
51229"from gi.repository import Pango\n"
51230"import sys\n"
51231"\n"
51232"books = [[\"Tolstoy, Leo\", [\"War and Peace\", True], [\"Anna Karenina\", False]],\n"
51233"         [\"Shakespeare, William\", [\"Hamlet\", False],\n"
51234"             [\"Macbeth\", True], [\"Othello\", False]],\n"
51235"         [\"Tolkien, J.R.R.\", [\"The Lord of the Rings\", False]]]\n"
51236"\n"
51237"\n"
51238"class MyWindow(Gtk.ApplicationWindow):\n"
51239"\n"
51240"    def __init__(self, app):\n"
51241"        Gtk.Window.__init__(self, title=\"Library\", application=app)\n"
51242"        self.set_default_size(250, 100)\n"
51243"        self.set_border_width(10)\n"
51244"\n"
51245"        # the data are stored in the model\n"
51246"        # create a treestore with two columns\n"
51247"        self.store = Gtk.TreeStore(str, bool)\n"
51248"        # fill in the model\n"
51249"        for i in range(len(books)):\n"
51250"            # the iter piter is returned when appending the author in the first column\n"
51251"            # and False in the second\n"
51252"            piter = self.store.append(None, [books[i][0], False])\n"
51253"            # append the books and the associated boolean value as children of\n"
51254"            # the author\n"
51255"            j = 1\n"
51256"            while j &lt; len(books[i]):\n"
51257"                self.store.append(piter, books[i][j])\n"
51258"                j += 1\n"
51259"\n"
51260"        # the treeview shows the model\n"
51261"        # create a treeview on the model self.store\n"
51262"        view = Gtk.TreeView()\n"
51263"        view.set_model(self.store)\n"
51264"\n"
51265"        # the cellrenderer for the first column - text\n"
51266"        renderer_books = Gtk.CellRendererText()\n"
51267"        # the first column is created\n"
51268"        column_books = Gtk.TreeViewColumn(\"Books\", renderer_books, text=0)\n"
51269"        # and it is appended to the treeview\n"
51270"        view.append_column(column_books)\n"
51271"\n"
51272"        # the cellrenderer for the second column - boolean rendered as a toggle\n"
51273"        renderer_in_out = Gtk.CellRendererToggle()\n"
51274"        # the second column is created\n"
51275"        column_in_out = Gtk.TreeViewColumn(\"Out?\", renderer_in_out, active=1)\n"
51276"        # and it is appended to the treeview\n"
51277"        view.append_column(column_in_out)\n"
51278"        # connect the cellrenderertoggle with a callback function\n"
51279"        renderer_in_out.connect(\"toggled\", self.on_toggled)\n"
51280"\n"
51281"        # add the treeview to the window\n"
51282"        self.add(view)\n"
51283"\n"
51284"    # callback function for the signal emitted by the cellrenderertoggle\n"
51285"    def on_toggled(self, widget, path):\n"
51286"        # the boolean value of the selected row\n"
51287"        current_value = self.store[path][1]\n"
51288"        # change the boolean value of the selected row in the model\n"
51289"        self.store[path][1] = not current_value\n"
51290"        # new current value!\n"
51291"        current_value = not current_value\n"
51292"        # if length of the path is 1 (that is, if we are selecting an author)\n"
51293"        if len(path) == 1:\n"
51294"            # get the iter associated with the path\n"
51295"            piter = self.store.get_iter(path)\n"
51296"            # get the iter associated with its first child\n"
51297"            citer = self.store.iter_children(piter)\n"
51298"            # while there are children, change the state of their boolean value\n"
51299"            # to the value of the author\n"
51300"            while citer is not None:\n"
51301"                self.store[citer][1] = current_value\n"
51302"                citer = self.store.iter_next(citer)\n"
51303"        # if the length of the path is not 1 (that is, if we are selecting a\n"
51304"        # book)\n"
51305"        elif len(path) != 1:\n"
51306"            # get the first child of the parent of the book (the first book of\n"
51307"            # the author)\n"
51308"            citer = self.store.get_iter(path)\n"
51309"            piter = self.store.iter_parent(citer)\n"
51310"            citer = self.store.iter_children(piter)\n"
51311"            # check if all the children are selected\n"
51312"            all_selected = True\n"
51313"            while citer is not None:\n"
51314"                if self.store[citer][1] == False:\n"
51315"                    all_selected = False\n"
51316"                    break\n"
51317"                citer = self.store.iter_next(citer)\n"
51318"            # if they do, the author as well is selected; otherwise it is not\n"
51319"            self.store[piter][1] = all_selected\n"
51320"\n"
51321"\n"
51322"class MyApplication(Gtk.Application):\n"
51323"\n"
51324"    def __init__(self):\n"
51325"        Gtk.Application.__init__(self)\n"
51326"\n"
51327"    def do_activate(self):\n"
51328"        win = MyWindow(self)\n"
51329"        win.show_all()\n"
51330"\n"
51331"    def do_startup(self):\n"
51332"        Gtk.Application.do_startup(self)\n"
51333"\n"
51334"app = MyApplication()\n"
51335"exit_status = app.run(sys.argv)\n"
51336"sys.exit(exit_status)\n"
51337msgstr ""
51338"from gi.repository import Gtk\n"
51339"from gi.repository import Pango\n"
51340"import sys\n"
51341"\n"
51342"books = [[\"Tolstoy, Leo\", [\"War and Peace\", True], [\"Anna Karenina\", False]],\n"
51343"         [\"Shakespeare, William\", [\"Hamlet\", False],\n"
51344"             [\"Macbeth\", True], [\"Othello\", False]],\n"
51345"         [\"Tolkien, J.R.R.\", [\"The Lord of the Rings\", False]]]\n"
51346"\n"
51347"\n"
51348"class MyWindow(Gtk.ApplicationWindow):\n"
51349"\n"
51350"    def __init__(self, app):\n"
51351"        Gtk.Window.__init__(self, title=\"Library\", application=app)\n"
51352"        self.set_default_size(250, 100)\n"
51353"        self.set_border_width(10)\n"
51354"\n"
51355"        # the data are stored in the model\n"
51356"        # create a treestore with two columns\n"
51357"        self.store = Gtk.TreeStore(str, bool)\n"
51358"        # fill in the model\n"
51359"        for i in range(len(books)):\n"
51360"            # the iter piter is returned when appending the author in the first column\n"
51361"            # and False in the second\n"
51362"            piter = self.store.append(None, [books[i][0], False])\n"
51363"            # append the books and the associated boolean value as children of\n"
51364"            # the author\n"
51365"            j = 1\n"
51366"            while j &lt; len(books[i]):\n"
51367"                self.store.append(piter, books[i][j])\n"
51368"                j += 1\n"
51369"\n"
51370"        # the treeview shows the model\n"
51371"        # create a treeview on the model self.store\n"
51372"        view = Gtk.TreeView()\n"
51373"        view.set_model(self.store)\n"
51374"\n"
51375"        # the cellrenderer for the first column - text\n"
51376"        renderer_books = Gtk.CellRendererText()\n"
51377"        # the first column is created\n"
51378"        column_books = Gtk.TreeViewColumn(\"Books\", renderer_books, text=0)\n"
51379"        # and it is appended to the treeview\n"
51380"        view.append_column(column_books)\n"
51381"\n"
51382"        # the cellrenderer for the second column - boolean rendered as a toggle\n"
51383"        renderer_in_out = Gtk.CellRendererToggle()\n"
51384"        # the second column is created\n"
51385"        column_in_out = Gtk.TreeViewColumn(\"Out?\", renderer_in_out, active=1)\n"
51386"        # and it is appended to the treeview\n"
51387"        view.append_column(column_in_out)\n"
51388"        # connect the cellrenderertoggle with a callback function\n"
51389"        renderer_in_out.connect(\"toggled\", self.on_toggled)\n"
51390"\n"
51391"        # add the treeview to the window\n"
51392"        self.add(view)\n"
51393"\n"
51394"    # callback function for the signal emitted by the cellrenderertoggle\n"
51395"    def on_toggled(self, widget, path):\n"
51396"        # the boolean value of the selected row\n"
51397"        current_value = self.store[path][1]\n"
51398"        # change the boolean value of the selected row in the model\n"
51399"        self.store[path][1] = not current_value\n"
51400"        # new current value!\n"
51401"        current_value = not current_value\n"
51402"        # if length of the path is 1 (that is, if we are selecting an author)\n"
51403"        if len(path) == 1:\n"
51404"            # get the iter associated with the path\n"
51405"            piter = self.store.get_iter(path)\n"
51406"            # get the iter associated with its first child\n"
51407"            citer = self.store.iter_children(piter)\n"
51408"            # while there are children, change the state of their boolean value\n"
51409"            # to the value of the author\n"
51410"            while citer is not None:\n"
51411"                self.store[citer][1] = current_value\n"
51412"                citer = self.store.iter_next(citer)\n"
51413"        # if the length of the path is not 1 (that is, if we are selecting a\n"
51414"        # book)\n"
51415"        elif len(path) != 1:\n"
51416"            # get the first child of the parent of the book (the first book of\n"
51417"            # the author)\n"
51418"            citer = self.store.get_iter(path)\n"
51419"            piter = self.store.iter_parent(citer)\n"
51420"            citer = self.store.iter_children(piter)\n"
51421"            # check if all the children are selected\n"
51422"            all_selected = True\n"
51423"            while citer is not None:\n"
51424"                if self.store[citer][1] == False:\n"
51425"                    all_selected = False\n"
51426"                    break\n"
51427"                citer = self.store.iter_next(citer)\n"
51428"            # if they do, the author as well is selected; otherwise it is not\n"
51429"            self.store[piter][1] = all_selected\n"
51430"\n"
51431"\n"
51432"class MyApplication(Gtk.Application):\n"
51433"\n"
51434"    def __init__(self):\n"
51435"        Gtk.Application.__init__(self)\n"
51436"\n"
51437"    def do_activate(self):\n"
51438"        win = MyWindow(self)\n"
51439"        win.show_all()\n"
51440"\n"
51441"    def do_startup(self):\n"
51442"        Gtk.Application.do_startup(self)\n"
51443"\n"
51444"app = MyApplication()\n"
51445"exit_status = app.run(sys.argv)\n"
51446"sys.exit(exit_status)\n"
51447
51448#. (itstool) path: section/p
51449#: C/treeview_cellrenderertoggle.py.page:37
51450msgid ""
51451"In line 48 the <code>\"toggled\"</code> signal is connected to the callback function <code>on_toggled()</code> "
51452"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
51453"\"signals-callbacks.py\"/> for a more detailed explanation."
51454msgstr ""
51455"48번째 줄에서 <code>\"toggled\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
51456"function</var>)</code> 함수로  <code>on_toggled()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
51457"\"signals-callbacks.py\"/>를 참조하십시오."
51458
51459#. (itstool) path: item/p
51460#: C/treeview_cellrenderertoggle.py.page:46 C/treeview_treestore.py.page:46
51461msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeStore.html\">GtkTreeStore</link>"
51462msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkTreeStore.html\">GtkTreeStore</link>"
51463
51464#. (itstool) path: item/p
51465#: C/treeview_cellrenderertoggle.py.page:48
51466msgid ""
51467"<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRendererToggle.html\">GtkCellRendererToggle</link>"
51468msgstr ""
51469"<link href=\"http://developer.gnome.org/gtk3/unstable/GtkCellRendererToggle.html\">GtkCellRendererToggle</link>"
51470
51471#. (itstool) path: info/title
51472#: C/treeview_simple_liststore.js.page:8
51473msgctxt "text"
51474msgid "TreeView with ListStore (JavaScript)"
51475msgstr "TreeView와 ListStore(JavaScript)"
51476
51477#. (itstool) path: info/desc
51478#: C/treeview_simple_liststore.js.page:21
51479msgid "A widget that shows a separate list of items"
51480msgstr "각각의 항목 목록을 보여주는 위젯"
51481
51482#. (itstool) path: page/title
51483#: C/treeview_simple_liststore.js.page:24
51484msgid "TreeView with ListStore"
51485msgstr "TreeView와 ListStore"
51486
51487#. (itstool) path: page/media
51488#. This is a reference to an external file such as an image or video. When
51489#. the file changes, the md5 hash will change to let you know you need to
51490#. update your localized copy. The msgstr is not used at all. Set it to
51491#. whatever you like once you have updated your copy of the file.
51492#: C/treeview_simple_liststore.js.page:25
51493msgctxt "_"
51494msgid "external ref='media/treeview_simple_liststore_penguins.png' md5='d750a0b9fddf8e508753cc639839871d'"
51495msgstr ""
51496
51497#. (itstool) path: page/p
51498#: C/treeview_simple_liststore.js.page:26
51499msgid ""
51500"A TreeView is like a window onto the contents of either a ListStore or a TreeStore. A ListStore is like a "
51501"spreadsheet: a \"flat\", two-dimensional list of things broken up into rows and columns. A TreeStore, meanwhile, "
51502"can branch out in different directions like a tree can. In this example, we create a TreeView that shows the "
51503"contents of a ListStore with (fictitious) names and phone numbers in it, and set it so that the <link xref=\"label."
51504"js\">Label</link> at the bottom of the window shows more information about whichever name you click on."
51505msgstr ""
51506"TreeView는 ListStore 또는 TreeStore의 내용을 보여주는 창입니다. ListStore는 스프레드 시트와 같습니다. 2차원 평면 자"
51507"료구조이며 행과 열로 나뉩니다. 반면에 TreeStore는 트리로 할 수 있듯이 자료 묶음 방향을 가지로 쪼갤 수 있습니다. 이 "
51508"예제에서는 TreeView로 가상의 이름과 전화번호가 들어간 ListStore의 내용을 보여주고, 누른 항목의 이름이 무엇인지 자세"
51509"한 정보를 보여주도록 창 하단의 <link xref=\"label.js\">Label</link>에 설정하겠습니다."
51510
51511#. (itstool) path: page/p
51512#: C/treeview_simple_liststore.js.page:27
51513msgid "The TreeView is not just a single widget, but contains a number of smaller ones:"
51514msgstr "TreeView는 단일 위젯이 아니지만 여러 작은 부분을 담고 있습니다:"
51515
51516#. (itstool) path: item/p
51517#: C/treeview_simple_liststore.js.page:29
51518msgid ""
51519"TreeViewColumn widgets show each (vertical) column of information from the ListStore. Each one has a title which "
51520"can be shown at the top of the column, like in the screenshot."
51521msgstr ""
51522"TreeViewColumn 위젯은 ListStore의 각(수직) 열 정보를 보여줍니다. 각각의 TreeViewWidget은 스크린샷에서 보시는 바와 "
51523"같이 열 상단에 나타낼 제목을 지니고 있습니다."
51524
51525#. (itstool) path: item/p
51526#: C/treeview_simple_liststore.js.page:30
51527msgid ""
51528"CellRenderer widgets are \"packed\" into each TreeViewColumn, and contain the instructions for how to display each "
51529"individual \"cell\", or item from the ListStore. There are multiple different types, including the "
51530"CellRendererText used here and the CellRendererPixbuf, which displays a picture (\"pixel buffer\")."
51531msgstr ""
51532"CellRenderer 위젯은 각 TreeViewColumn에 \"패킹\" 처리하고, 각 \"셀\" 또는 ListStore의 항목을 표시하는 방식의 지시 "
51533"사항을 담습니다. 여기서 사용하는 CellRendererText 그리고 그림(\"픽셀 버퍼\")를 나타내는 CellRendererPixBuf 같은 다"
51534"양한 형식이 있습니다."
51535
51536#. (itstool) path: page/p
51537#: C/treeview_simple_liststore.js.page:32
51538msgid ""
51539"Finally, we're going to use an object called a TreeIter, which isn't a widget so much as an invisible cursor which "
51540"points to a (horizontal) row in the ListStore. Whenever you click on a name in the phonebook, for instance, we "
51541"create a TreeIter pointing to the row that's selected, and then use that to tell the ListStore which entry we want "
51542"the Label to show more information about."
51543msgstr ""
51544"마지막으로 ListStore에서 (가로 방향) 행을 가리키는 보이지 않는 커서로 위젯이 아닌 TreeIter 객체를 활용하겠습니다. "
51545"예를 들어 전화번호부에 이름을 누르면, 선택한 줄을 가리키는 TreeIter를 만드는데, TreeIter는 레이블에 더 많은 정보를 "
51546"보여줄 항목이 무엇인지 ListStore에 지시할 때 활용합니다."
51547
51548#. (itstool) path: note/p
51549#: C/treeview_simple_liststore.js.page:33
51550msgid ""
51551"The TreeView is probably the most complicated Gtk widget, because of how many parts it has and how they all have "
51552"to work together. Give yourself time to learn how it works and experiment with it, or try something easier first "
51553"if you're having trouble."
51554msgstr ""
51555"TreeView는 아마도 Gtk 위젯 중에 제일 복잡한 gtk 위젯이 아닐까 하는데, 위젯이 지닌 부분의 양과 함께 동작하는 방식 때"
51556"문입니다. 동작 방식과 실험을 배울 시간을 확보하시든지, 하다가 문제 생기면 쉬운 부분 부터 먼저 진행하십시오."
51557
51558#. (itstool) path: section/code
51559#: C/treeview_simple_liststore.js.page:38
51560#, no-wrap
51561msgid ""
51562"\n"
51563"#!/usr/bin/gjs\n"
51564"\n"
51565"const GObject = imports.gi.GObject;\n"
51566"const Gtk = imports.gi.Gtk;\n"
51567"const Lang = imports.lang;\n"
51568"const Pango = imports.gi.Pango;\n"
51569msgstr ""
51570"\n"
51571"#!/usr/bin/gjs\n"
51572"\n"
51573"const GObject = imports.gi.GObject;\n"
51574"const Gtk = imports.gi.Gtk;\n"
51575"const Lang = imports.lang;\n"
51576"const Pango = imports.gi.Pango;\n"
51577
51578#. (itstool) path: section/code
51579#: C/treeview_simple_liststore.js.page:51
51580#, no-wrap
51581msgid ""
51582"\n"
51583"const TreeViewExample = new Lang.Class({\n"
51584"    Name: 'TreeView Example with Simple ListStore',\n"
51585"\n"
51586"    // Create the application itself\n"
51587"    _init: function() {\n"
51588"        this.application = new Gtk.Application({\n"
51589"            application_id: 'org.example.jstreeviewsimpleliststore'\n"
51590"        });\n"
51591"\n"
51592"    // Connect 'activate' and 'startup' signals to the callback functions\n"
51593"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
51594"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
51595"    },\n"
51596"\n"
51597"    // Callback function for 'activate' signal presents window when active\n"
51598"    _onActivate: function() {\n"
51599"        this._window.present();\n"
51600"    },\n"
51601"\n"
51602"    // Callback function for 'startup' signal builds the UI\n"
51603"    _onStartup: function() {\n"
51604"        this._buildUI ();\n"
51605"    },\n"
51606msgstr ""
51607"\n"
51608"const TreeViewExample = new Lang.Class({\n"
51609"    Name: 'TreeView Example with Simple ListStore',\n"
51610"\n"
51611"    // Create the application itself\n"
51612"    _init: function() {\n"
51613"        this.application = new Gtk.Application({\n"
51614"            application_id: 'org.example.jstreeviewsimpleliststore'\n"
51615"        });\n"
51616"\n"
51617"    // Connect 'activate' and 'startup' signals to the callback functions\n"
51618"    this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
51619"    this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
51620"    },\n"
51621"\n"
51622"    // Callback function for 'activate' signal presents window when active\n"
51623"    _onActivate: function() {\n"
51624"        this._window.present();\n"
51625"    },\n"
51626"\n"
51627"    // Callback function for 'startup' signal builds the UI\n"
51628"    _onStartup: function() {\n"
51629"        this._buildUI ();\n"
51630"    },\n"
51631
51632#. (itstool) path: section/p
51633#: C/treeview_simple_liststore.js.page:76
51634msgid ""
51635"All the code for this sample goes in the TreeViewExample class. The above code creates a <link href=\"http://www."
51636"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link> for our widgets and window to go "
51637"in."
51638msgstr ""
51639"이 예제의 모든 코드는 TreeViewExample 클래스에 들어갑니다. 위 코드는 위젯과 창이 들어갈 <link href=\"http://www."
51640"roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Application.html\">Gtk.Application</link>을 만듭니다."
51641
51642#. (itstool) path: section/code
51643#: C/treeview_simple_liststore.js.page:77
51644#, no-wrap
51645msgid ""
51646"\n"
51647"    // Build the application's UI\n"
51648"    _buildUI: function() {\n"
51649"\n"
51650"        // Create the application window\n"
51651"        this._window = new Gtk.ApplicationWindow({\n"
51652"            application: this.application,\n"
51653"            window_position: Gtk.WindowPosition.CENTER,\n"
51654"            default_height: 250,\n"
51655"            default_width: 100,\n"
51656"            border_width: 20,\n"
51657"            title: \"My Phone Book\"});\n"
51658msgstr ""
51659"\n"
51660"    // Build the application's UI\n"
51661"    _buildUI: function() {\n"
51662"\n"
51663"        // Create the application window\n"
51664"        this._window = new Gtk.ApplicationWindow({\n"
51665"            application: this.application,\n"
51666"            window_position: Gtk.WindowPosition.CENTER,\n"
51667"            default_height: 250,\n"
51668"            default_width: 100,\n"
51669"            border_width: 20,\n"
51670"            title: \"My Phone Book\"});\n"
51671
51672#. (itstool) path: section/code
51673#: C/treeview_simple_liststore.js.page:95
51674#, no-wrap
51675msgid ""
51676"\n"
51677"        // Create the underlying liststore for the phonebook\n"
51678"        this._listStore = new Gtk.ListStore ();\n"
51679"        this._listStore.set_column_types ([\n"
51680"            GObject.TYPE_STRING,\n"
51681"            GObject.TYPE_STRING,\n"
51682"            GObject.TYPE_STRING,\n"
51683"            GObject.TYPE_STRING]);\n"
51684msgstr ""
51685"\n"
51686"        // Create the underlying liststore for the phonebook\n"
51687"        this._listStore = new Gtk.ListStore ();\n"
51688"        this._listStore.set_column_types ([\n"
51689"            GObject.TYPE_STRING,\n"
51690"            GObject.TYPE_STRING,\n"
51691"            GObject.TYPE_STRING,\n"
51692"            GObject.TYPE_STRING]);\n"
51693"읽\n"
51694
51695#. (itstool) path: section/p
51696#: C/treeview_simple_liststore.js.page:104
51697msgid ""
51698"We first create the ListStore like we would any widget. Then we call its set_column_types method, and pass it an "
51699"array of GObject data types. (We could have put the types all on one line, but here we are breaking them up to "
51700"make it easier to read.)"
51701msgstr ""
51702"우선 어떤 위젯도 다룰 수 있도록 ListStore를 만들겠습니다. 그 다음 set_column_types 메서드를 호출하여 GObject 데이"
51703"터 형식의 배열에 전달하겠습니다(한 줄에 모든 형식을 넣을 수 있지만, 보기 쉽게 하려는 목적으로 쪼갰습니다)."
51704
51705#. (itstool) path: section/p
51706#: C/treeview_simple_liststore.js.page:105
51707msgid "The GObject data types you can use include:"
51708msgstr "여러분이 사용할 수 있는 GObject 데이터 형식은 다음과 같습니다:"
51709
51710#. (itstool) path: item/p
51711#: C/treeview_simple_liststore.js.page:110
51712msgid "<file>gtk.gdk.Pixbuf</file> -- A picture"
51713msgstr "<file>gtk.gdk.Pixbuf</file> -- 그림"
51714
51715#. (itstool) path: section/p
51716#: C/treeview_simple_liststore.js.page:112
51717msgid "In this case, we're making a ListStore of four columns, each one containing string values."
51718msgstr "이 경우, 각 칸마다 문자열 값이 들어가는 4칸을 지닌 ListStore를 만듭니다."
51719
51720#. (itstool) path: section/code
51721#: C/treeview_simple_liststore.js.page:115
51722#, no-wrap
51723msgid ""
51724"\n"
51725"        // Data to go in the phonebook\n"
51726"        this.phonebook =\n"
51727"        let phonebook =\n"
51728"            [{ name: \"Jurg\", surname: \"Billeter\", phone: \"555-0123\",\n"
51729"                description: \"A friendly person.\"},\n"
51730"             { name: \"Johannes\", surname: \"Schmid\", phone: \"555-1234\",\n"
51731"                description: \"Easy phone number to remember.\"},\n"
51732"             { name: \"Julita\", surname: \"Inca\", phone: \"555-2345\",\n"
51733"                description: \"Another friendly person.\"},\n"
51734"             { name: \"Javier\", surname: \"Jardon\", phone: \"555-3456\",\n"
51735"                description: \"Bring fish for his penguins.\"},\n"
51736"             { name: \"Jason\", surname: \"Clinton\", phone: \"555-4567\",\n"
51737"                description: \"His cake's not a lie.\"},\n"
51738"             { name: \"Random J.\", surname: \"Hacker\", phone: \"555-5678\",\n"
51739"                description: \"Very random!\"}];\n"
51740msgstr ""
51741"\n"
51742"        // Data to go in the phonebook\n"
51743"        this.phonebook =\n"
51744"        let phonebook =\n"
51745"            [{ name: \"Jurg\", surname: \"Billeter\", phone: \"555-0123\",\n"
51746"                description: \"A friendly person.\"},\n"
51747"             { name: \"Johannes\", surname: \"Schmid\", phone: \"555-1234\",\n"
51748"                description: \"Easy phone number to remember.\"},\n"
51749"             { name: \"Julita\", surname: \"Inca\", phone: \"555-2345\",\n"
51750"                description: \"Another friendly person.\"},\n"
51751"             { name: \"Javier\", surname: \"Jardon\", phone: \"555-3456\",\n"
51752"                description: \"Bring fish for his penguins.\"},\n"
51753"             { name: \"Jason\", surname: \"Clinton\", phone: \"555-4567\",\n"
51754"                description: \"His cake's not a lie.\"},\n"
51755"             { name: \"Random J.\", surname: \"Hacker\", phone: \"555-5678\",\n"
51756"                description: \"Very random!\"}];\n"
51757
51758#. (itstool) path: section/p
51759#: C/treeview_simple_liststore.js.page:132
51760msgid ""
51761"Here we have the information to go in the ListStore. It's an array of objects, each one corresponding to a single "
51762"entry in our phone book."
51763msgstr "ListStore에 정보를 넣었습니다. 전화번호부의 단일 항목에 해당하는 객체 배열입니다."
51764
51765#. (itstool) path: section/p
51766#: C/treeview_simple_liststore.js.page:133
51767msgid ""
51768"Note that the TreeView in the screenshot doesn't actually show the data from the \"description\" properties. "
51769"Instead, that information's shown in the Label beneath it, for whichever row that you click on. That's because the "
51770"TreeView and ListStore are two separate things, and a TreeView can show all or part of a ListStore, and display "
51771"what's in it in different ways. You can even have multiple widgets show things from the same ListStore, like the "
51772"Label in our example or even a second TreeView."
51773msgstr ""
51774"참고로 스크린샷의 TreeView는 실제로 \"description\" 속성의 데이터를 보여주지 않습니다. 대신 레이블 아래 여러분이 클"
51775"릭해서 나타난 정보를 보여줍니다. 왜냐면 TreeView와 ListStore는 별개의 존재고, TreeView는 ListStore의 모든 부분을 보"
51776"여줄 수 있으며, 무엇이 들어있는지 보여주는 방식이 다르기 때문입니다. 우리 예제의 레이블 내지는 두번째 TreeView 처"
51777"럼 동일한 ListStore의 내용을 여러 위젯으로 보여줄 수 있습니다."
51778
51779#. (itstool) path: section/code
51780#: C/treeview_simple_liststore.js.page:135
51781#, no-wrap
51782msgid ""
51783"\n"
51784"        for (i = 0; i &lt; phonebook.length; i++ ) {\n"
51785"            let contact = phonebook [i];\n"
51786"            this._listStore.set (this._listStore.append(), [0, 1, 2, 3],\n"
51787"                [contact.name, contact.surname, contact.phone, contact.description]);\n"
51788"        }\n"
51789msgstr ""
51790"\n"
51791"        for (i = 0; i &lt; phonebook.length; i++ ) {\n"
51792"            let contact = phonebook [i];\n"
51793"            this._listStore.set (this._listStore.append(), [0, 1, 2, 3],\n"
51794"                [contact.name, contact.surname, contact.phone, contact.description]);\n"
51795"        }\n"
51796
51797#. (itstool) path: section/p
51798#: C/treeview_simple_liststore.js.page:142
51799msgid ""
51800"This <file>for</file> loop puts the strings from our phonebook into our ListStore in order. In order, we pass the "
51801"ListStore's set method the iter that points to the correct row, an array which says which columns we want to set, "
51802"and an array which contains the data we want to put into those columns."
51803msgstr ""
51804"<file>for</file> 루프로 전화번호부에서 가져온 문자열을 ListStore에 순서대로 넣습니다. 순서대로 ListStore의 set 메서"
51805"드로 설정하고자 하는 열의 배열, 각 열에 넣어두고나 하는 데이터가 들어간 배열, 올바른 열을 가리키는 iter 값을 전달합"
51806"니다."
51807
51808#. (itstool) path: section/p
51809#: C/treeview_simple_liststore.js.page:143
51810msgid ""
51811"A ListStore's <file>append</file> method adds a horizontal row onto it (it starts out with none), and returns a "
51812"TreeIter pointing to that row like a cursor. So by passing <file>this._listStore.append()</file> to the ListStore "
51813"as a property, we're creating a new row and telling the <file>set</file> method which row to set data for at the "
51814"same time."
51815msgstr ""
51816"ListStore의 <file>append</file> 메서드로 수평줄을 추가하고(아무것도 없는 상태에서 시작),  커서와 같은 해당 줄에 대"
51817"한 TreeIter 포인터를 반환합니다. 따라서 ListStore에 <file>this._listStore.append()</file> 함수 값을 속성으로 전달하"
51818"여 새 줄을 만들고 <file>set</file> 메서드를 통해 방금 만든 새 줄에 통시에 데이터를 넣도록 하겠습니다."
51819
51820#. (itstool) path: section/title
51821#: C/treeview_simple_liststore.js.page:148
51822msgid "Creating the TreeView"
51823msgstr "TreeView 만들기"
51824
51825#. (itstool) path: section/code
51826#: C/treeview_simple_liststore.js.page:149
51827#, no-wrap
51828msgid ""
51829"\n"
51830"        // Create the treeview\n"
51831"        this._treeView = new Gtk.TreeView ({\n"
51832"            expand: true,\n"
51833"            model: this._listStore });\n"
51834msgstr ""
51835"\n"
51836"        // Create the treeview\n"
51837"        this._treeView = new Gtk.TreeView ({\n"
51838"            expand: true,\n"
51839"            model: this._listStore });\n"
51840
51841#. (itstool) path: section/p
51842#: C/treeview_simple_liststore.js.page:155
51843msgid ""
51844"Here we create a basic TreeView widget, that expands both horizontally and vertically to use as much space as "
51845"needed. We set it to use the ListStore we created as its \"model\", or the thing it'll show us stuff from."
51846msgstr ""
51847"여기서는 기본적인 TreeView 위젯을 만들어, 가로 세로 방향으로 필요한 만큼 충분한 공간을 늘릴수 있게 하겠습니다. 우리"
51848"가 만든 ListStore를 \"모델\"로 사용하거나, 어딘가로부터 가져온 내용을 활용하게 하겠습니다."
51849
51850#. (itstool) path: section/code
51851#: C/treeview_simple_liststore.js.page:157
51852#, no-wrap
51853msgid ""
51854"\n"
51855"        // Create the columns for the address book\n"
51856"        let firstName = new Gtk.TreeViewColumn ({ title: \"First Name\" });\n"
51857"        let lastName = new Gtk.TreeViewColumn ({ title: \"Last Name\" });\n"
51858"        let phone = new Gtk.TreeViewColumn ({ title: \"Phone Number\" });\n"
51859msgstr ""
51860"\n"
51861"        // Create the columns for the address book\n"
51862"        let firstName = new Gtk.TreeViewColumn ({ title: \"First Name\" });\n"
51863"        let lastName = new Gtk.TreeViewColumn ({ title: \"Last Name\" });\n"
51864"        let phone = new Gtk.TreeViewColumn ({ title: \"Phone Number\" });\n"
51865
51866#. (itstool) path: section/p
51867#: C/treeview_simple_liststore.js.page:163
51868msgid ""
51869"Now we create each of the vertical TreeViewColumns we'll see in the TreeView. The title for each one goes at the "
51870"top, as you can see in the screenshot."
51871msgstr ""
51872"이제 TreeView에서 볼 각각의 TreeViewColumn을 만들겠습니다. 각 TreeViewColumn의 제목은, 스크린샷에서 보시는 대로 상"
51873"단에 올라갑니다."
51874
51875#. (itstool) path: section/code
51876#: C/treeview_simple_liststore.js.page:165
51877#, no-wrap
51878msgid ""
51879"\n"
51880"        // Create a cell renderer for when bold text is needed\n"
51881"        let bold = new Gtk.CellRendererText ({\n"
51882"            weight: Pango.Weight.BOLD });\n"
51883"\n"
51884"        // Create a cell renderer for normal text\n"
51885"        let normal = new Gtk.CellRendererText ();\n"
51886"\n"
51887"        // Pack the cell renderers into the columns\n"
51888"        firstName.pack_start (bold, true);\n"
51889"        lastName.pack_start (normal, true);\n"
51890"        phone.pack_start (normal, true);\n"
51891msgstr ""
51892"\n"
51893"        // Create a cell renderer for when bold text is needed\n"
51894"        let bold = new Gtk.CellRendererText ({\n"
51895"            weight: Pango.Weight.BOLD });\n"
51896"\n"
51897"        // Create a cell renderer for normal text\n"
51898"        let normal = new Gtk.CellRendererText ();\n"
51899"\n"
51900"        // Pack the cell renderers into the columns\n"
51901"        firstName.pack_start (bold, true);\n"
51902"        lastName.pack_start (normal, true);\n"
51903"        phone.pack_start (normal, true);\n"
51904
51905#. (itstool) path: section/p
51906#: C/treeview_simple_liststore.js.page:178
51907msgid ""
51908"Here we create the CellRenderers that we'll use to display the text from our ListStore, and pack them into the "
51909"TreeViewColumns. Each CellRendererText is used for all the entries in that column. Our normal CellRendererText "
51910"just creates plain text, while our bold one uses heavier-weight text. We put it into the first name column, and "
51911"tell the other two to use copies of the normal one. The \"true\" used as the second parameter for the "
51912"<file>pack_start</file> method tells it to expand the cells when possible, instead of keeping them compact."
51913msgstr ""
51914"여기서 ListStore의 텍스트를 나타내는데 활용할 CellRenderer를 만들었고 TreeViewColumns에 감쌌습니다. 각 "
51915"CellRendererText는 칸에 들어간 모든 항목에 사용합니다. 굵은 글씨에는 더 굵은 텍스트를 사용하지만, 일반적인 "
51916"CellRendererText는 그냥 텍스트를 만듭니다. 일단 이름 열에 넣고, 다른 두 부분은 일반 CellRendererText로 넣으라고 하"
51917"겠습니다. <file>pack_start</file> 메서드 두번째 매개변수 값으로 사용하는 \"true\" 값은 가능할 경우 작은 상태로 유지"
51918"하지 말고 셀 크기를 확장하라고 지시합니다."
51919
51920#. (itstool) path: note/p
51921#: C/treeview_simple_liststore.js.page:179
51922msgid ""
51923"<link href=\"http://www.pygtk.org/docs/pygtk/pango-constants.html\">Here is a list</link> of other text properties "
51924"you can use. In order to use these Pango constants, make sure to put the line <file>const Pango = imports.gi.Pango;"
51925"</file> at the beginning of your code like we did."
51926msgstr ""
51927"여러분이 활용할 수 있는 다른 텍스트 속성 <link href=\"http://www.pygtk.org/docs/pygtk/pango-constants.html\">목록</"
51928"link> 입니다. 팡고 상수를 활용하려면, 우리가 했던 바와 같이 <file>const Pango = imports.gi.Pango;</file> 줄을 코드 "
51929"앞부분에 넣었는지 확인하십시오."
51930
51931#. (itstool) path: section/code
51932#: C/treeview_simple_liststore.js.page:181
51933#, no-wrap
51934msgid ""
51935"\n"
51936"        firstName.add_attribute (bold, \"text\", 0);\n"
51937"        lastName.add_attribute (normal, \"text\", 1);\n"
51938"        phone.add_attribute (normal, \"text\", 2);\n"
51939"\n"
51940"        // Insert the columns into the treeview\n"
51941"        this._treeView.insert_column (firstName, 0);\n"
51942"        this._treeView.insert_column (lastName, 1);\n"
51943"        this._treeView.insert_column (phone, 2);\n"
51944msgstr ""
51945"\n"
51946"        firstName.add_attribute (bold, \"text\", 0);\n"
51947"        lastName.add_attribute (normal, \"text\", 1);\n"
51948"        phone.add_attribute (normal, \"text\", 2);\n"
51949"\n"
51950"        // Insert the columns into the treeview\n"
51951"        this._treeView.insert_column (firstName, 0);\n"
51952"        this._treeView.insert_column (lastName, 1);\n"
51953"        this._treeView.insert_column (phone, 2);\n"
51954
51955#. (itstool) path: section/p
51956#: C/treeview_simple_liststore.js.page:191
51957msgid ""
51958"Now that we've put the CellRenderers into the TreeViewColumns, we use the <file>add_attribute</file> method to "
51959"tell each column to pull in text from the model our TreeView is set to use; in this case, the ListStore with the "
51960"phonebook."
51961msgstr ""
51962"이제 CellRenderer를 TreeViewColumns에 넣었습니다. <file>add_attribute</file> 메서드를 활용하여 활용하기로 설정한 "
51963"TreeView 모델에서 텍스트를 가져와서 각 칸에 뿌리도록 하겠습니다. 이 경우 전화번호부가 들어간 ListStore가 되겠습니"
51964"다."
51965
51966#. (itstool) path: item/p
51967#: C/treeview_simple_liststore.js.page:193
51968msgid "The first parameter is which CellRenderer we're going to use to render what we're pulling in."
51969msgstr "첫번째 매개변수는 우리가 렌더러에 데이터를 가져다 넣을때 활용할 CellRenderer입니다."
51970
51971#. (itstool) path: item/p
51972#: C/treeview_simple_liststore.js.page:194
51973msgid ""
51974"The second parameter is what kind of information we're going to pull in. In this case, we're letting it know that "
51975"we're rendering text."
51976msgstr "두번째 매개변수는 가져다젛을 정보의 종류입니다. 여기서는 텍스트를 렌더링하라고 알려줍니다."
51977
51978#. (itstool) path: item/p
51979#: C/treeview_simple_liststore.js.page:195
51980msgid "The third parameter is which of the ListStore's columns we're pulling that information in from."
51981msgstr "세번째 매개변수는 우리가 가져올 정보가 들어간 ListStore의 열 위치를 말합니다."
51982
51983#. (itstool) path: section/p
51984#: C/treeview_simple_liststore.js.page:197
51985msgid ""
51986"After we've set that up, we use the TreeView's <file>insert_column</file> method to put our TreeViewColumns inside "
51987"it in order. Our TreeView is now complete."
51988msgstr ""
51989"설정하고 나면 TreeView의 <file>insert_column</file> 메서드를 활용하여 TreeViewColumns 네 순서대로 넣겠습니다. 이제 "
51990"TreeView 구현이 끝났습니다."
51991
51992#. (itstool) path: note/p
51993#: C/treeview_simple_liststore.js.page:198
51994msgid ""
51995"Normally, you might want to use a loop to initialize your TreeView, but in this example we're spelling things out "
51996"step by step for the sake of making it easier to understand."
51997msgstr ""
51998"보통 TreeView를 초기화하려고 루프를 사용하고 싶을지도 모릅니다만, 이 예제에서는 이해를 쉽게 하기 위한 단계별로 하나"
51999"하나 설명하겠습니다."
52000
52001#. (itstool) path: section/title
52002#: C/treeview_simple_liststore.js.page:202
52003msgid "Building the rest of the UI"
52004msgstr "나머지 사용자 인터페이스 구성"
52005
52006#. (itstool) path: section/code
52007#: C/treeview_simple_liststore.js.page:203
52008#, no-wrap
52009msgid ""
52010"\n"
52011"        // Create the label that shows details for the name you select\n"
52012"        this._label = new Gtk.Label ({ label: \"\" });\n"
52013"\n"
52014"        // Get which item is selected\n"
52015"        this.selection = this._treeView.get_selection();\n"
52016"\n"
52017"        // When something new is selected, call _on_changed\n"
52018"        this.selection.connect ('changed', Lang.bind (this, this._onSelectionChanged));\n"
52019msgstr ""
52020"\n"
52021"        // Create the label that shows details for the name you select\n"
52022"        this._label = new Gtk.Label ({ label: \"\" });\n"
52023"\n"
52024"        // Get which item is selected\n"
52025"        this.selection = this._treeView.get_selection();\n"
52026"\n"
52027"        // When something new is selected, call _on_changed\n"
52028"        this.selection.connect ('changed', Lang.bind (this, this._onSelectionChanged));\n"
52029
52030#. (itstool) path: section/p
52031#: C/treeview_simple_liststore.js.page:213
52032msgid ""
52033"The TreeView's <file>get_selection</file> method returns an object called a TreeSelection. A TreeSelection is like "
52034"a TreeIter in that it's basically a cursor that points at a particular row, except that the one it points to is "
52035"the one that's visibly highlighted as selected."
52036msgstr ""
52037"TreeView의 <file>get_selection</file> 메서드는 TreeSelection 객체를 반환합니다. TreeSelection은 행 일부를 가리키는 "
52038"근본 커서로서 TreeIter와 유사하지만, TreeSelection에는 선택한 부분을 눈에 띄게 강조하는 차이점을 안고 있습니다."
52039
52040#. (itstool) path: section/p
52041#: C/treeview_simple_liststore.js.page:214
52042msgid ""
52043"After we get the TreeSelection that goes with our TreeView, we ask it to tell us when it changes which row it's "
52044"pointing to. We do this by connecting its <file>changed</file> signal to the _onSelectionChanged function we "
52045"wrote. This function changes the text displayed by the Label we just made."
52046msgstr ""
52047"TreeSelection을 TreeView에서 가져오고 난 후, TreeSelection에 가리키는 행이 어디인지 요청할 수 있습니다. "
52048"<file>changed</file> 시그널을 우리가 작성한 _onSelectionChanged 함수에 연결하면 됩니다. 이 함수는 우리가 만든 Label"
52049"의 텍스트를 바꿉니다."
52050
52051#. (itstool) path: section/code
52052#: C/treeview_simple_liststore.js.page:216
52053#, no-wrap
52054msgid ""
52055"\n"
52056"        // Create a grid to organize everything in\n"
52057"        this._grid = new Gtk.Grid;\n"
52058"\n"
52059"        // Attach the treeview and label to the grid\n"
52060"        this._grid.attach (this._treeView, 0, 0, 1, 1);\n"
52061"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
52062"\n"
52063"        // Add the grid to the window\n"
52064"        this._window.add (this._grid);\n"
52065"\n"
52066"        // Show the window and all child widgets\n"
52067"        this._window.show_all();\n"
52068"    },\n"
52069msgstr ""
52070"\n"
52071"        // Create a grid to organize everything in\n"
52072"        this._grid = new Gtk.Grid;\n"
52073"\n"
52074"        // Attach the treeview and label to the grid\n"
52075"        this._grid.attach (this._treeView, 0, 0, 1, 1);\n"
52076"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
52077"\n"
52078"        // Add the grid to the window\n"
52079"        this._window.add (this._grid);\n"
52080"\n"
52081"        // Show the window and all child widgets\n"
52082"        this._window.show_all();\n"
52083"    },\n"
52084
52085#. (itstool) path: section/p
52086#: C/treeview_simple_liststore.js.page:231
52087msgid ""
52088"After we've gotten that out of the way, we create a <link xref=\"grid.js\">Grid</link> to put everything in, then "
52089"add it to our window and tell the window to show itself and its contents."
52090msgstr ""
52091"위 과정을 끝내고 나면, 모든 위젯을 넣을 <link xref=\"grid.js\">Grid</link>를 만들고, Grid를 창에 추가하여 창과 창"
52092"에 있는 내용을 표시하도록 합니다."
52093
52094#. (itstool) path: section/title
52095#: C/treeview_simple_liststore.js.page:235
52096msgid "Function which handles a changed selection"
52097msgstr "바뀐 선택을 처리하는 함수"
52098
52099#. (itstool) path: section/code
52100#: C/treeview_simple_liststore.js.page:237
52101#, no-wrap
52102msgid ""
52103"\n"
52104"    _onSelectionChanged: function () {\n"
52105"\n"
52106"        // Grab a treeiter pointing to the current selection\n"
52107"        let [ isSelected, model, iter ] = this.selection.get_selected();\n"
52108"\n"
52109"        // Set the label to read off the values stored in the current selection\n"
52110"        this._label.set_label (\"\\n\" +\n"
52111"            this._listStore.get_value (iter, 0) + \" \" +\n"
52112"            this._listStore.get_value (iter, 1) + \" \" +\n"
52113"            this._listStore.get_value (iter, 2) + \"\\n\" +\n"
52114"            this._listStore.get_value (iter, 3));\n"
52115"\n"
52116"    }\n"
52117"\n"
52118"});\n"
52119msgstr ""
52120"\n"
52121"    _onSelectionChanged: function () {\n"
52122"\n"
52123"        // Grab a treeiter pointing to the current selection\n"
52124"        let [ isSelected, model, iter ] = this.selection.get_selected();\n"
52125"\n"
52126"        // Set the label to read off the values stored in the current selection\n"
52127"        this._label.set_label (\"\\n\" +\n"
52128"            this._listStore.get_value (iter, 0) + \" \" +\n"
52129"            this._listStore.get_value (iter, 1) + \" \" +\n"
52130"            this._listStore.get_value (iter, 2) + \"\\n\" +\n"
52131"            this._listStore.get_value (iter, 3));\n"
52132"\n"
52133"    }\n"
52134"\n"
52135"});\n"
52136
52137#. (itstool) path: section/p
52138#: C/treeview_simple_liststore.js.page:254
52139msgid ""
52140"The line of code with the let statement is a little convoluted, but it's nonetheless the best way to get a "
52141"TreeIter pointing to the same row as our TreeSelection. It has to create a couple of other object references, but "
52142"<file>iter</file> is the only one we need."
52143msgstr ""
52144"let 문 코드 줄은 조금 복잡하긴 하지만, 그래도 TreeSelection에서 동일한 줄을 가리키는 TreeIter를 가져오는 최상의 수"
52145"단입니다. 다른 수많은 객체 참조를 들고 있긴 하지만, <file>iter</file>만 필요합니다."
52146
52147#. (itstool) path: section/p
52148#: C/treeview_simple_liststore.js.page:255
52149msgid ""
52150"After we've done that, we call the Label's <file>set_label</file> function, and use the ListStore's "
52151"<file>get_value</file> function a handful of times to fill in the data we want to put in it. Its parameters are a "
52152"TreeIter pointing to the row we want to get data from, and the column."
52153msgstr ""
52154"이 과정이 끝나면 레이블의 <file>set_label</file> 함수를 호출하고 ListStore의 <file>get_value</file>  함수를 활용하"
52155"여 짦은 시간 내에 원하는 데이터를 채워넣겠습니다. 매개 변수는 우리가 가져온 줄 위치와 열을 가리키는 TreeIter입니다."
52156
52157#. (itstool) path: section/p
52158#: C/treeview_simple_liststore.js.page:256
52159msgid ""
52160"Here, we want to get data from all four columns, including the \"hidden\" one that's not part of the TreeView. "
52161"This way, we can use our Label to show strings that are too large to fit in the TreeView, and that we don't need "
52162"to see at a glance."
52163msgstr ""
52164"TreeView의 일부가 아닌 \"hidden\"을 네 열의 데이터와 가져오려합니다. 여기서 TreeView에 맞추긴 너무 긴 문자열을 "
52165"Label에 표시하여 굳이 살펴볼 필요가 없게 하겠습니다."
52166
52167#. (itstool) path: section/code
52168#: C/treeview_simple_liststore.js.page:258
52169#, no-wrap
52170msgid ""
52171"\n"
52172"// Run the application\n"
52173"let app = new TreeViewExample ();\n"
52174"app.application.run (ARGV);\n"
52175msgstr ""
52176"\n"
52177"// Run the application\n"
52178"let app = new TreeViewExample ();\n"
52179"app.application.run (ARGV);\n"
52180
52181#. (itstool) path: section/p
52182#: C/treeview_simple_liststore.js.page:263
52183msgid "Finally, we create a new instance of the finished TreeViewExample class, and set the application running."
52184msgstr "마지막으로 TreeViewExample 클래스의 새 인스턴스를 만들고 프로그램 실행을 설정하겠습니다."
52185
52186#. (itstool) path: section/code
52187#: C/treeview_simple_liststore.js.page:268
52188#, no-wrap
52189msgid ""
52190"#!/usr/bin/gjs\n"
52191"\n"
52192"imports.gi.versions.Gtk = '3.0';\n"
52193"\n"
52194"const GObject = imports.gi.GObject;\n"
52195"const Gtk = imports.gi.Gtk;\n"
52196"const Pango = imports.gi.Pango;\n"
52197"\n"
52198"class TreeViewExample {\n"
52199"    // Create the application itself\n"
52200"    constructor() {\n"
52201"        this.application = new Gtk.Application({\n"
52202"            application_id: 'org.example.jstreeviewsimpleliststore'\n"
52203"        });\n"
52204"\n"
52205"        // Connect 'activate' and 'startup' signals to the callback functions\n"
52206"        this.application.connect('activate', this._onActivate.bind(this));\n"
52207"        this.application.connect('startup', this._onStartup.bind(this));\n"
52208"    }\n"
52209"\n"
52210"    // Callback function for 'activate' signal presents window when active\n"
52211"    _onActivate() {\n"
52212"        this._window.present();\n"
52213"    }\n"
52214"\n"
52215"    // Callback function for 'startup' signal builds the UI\n"
52216"    _onStartup() {\n"
52217"        this._buildUI();\n"
52218"    }\n"
52219"\n"
52220"    // Build the application's UI\n"
52221"    _buildUI() {\n"
52222"        // Create the application window\n"
52223"        this._window = new Gtk.ApplicationWindow({\n"
52224"            application: this.application,\n"
52225"            window_position: Gtk.WindowPosition.CENTER,\n"
52226"            default_height: 250,\n"
52227"            default_width: 100,\n"
52228"            border_width: 20,\n"
52229"            title: \"My Phone Book\"});\n"
52230"\n"
52231"        // Create the underlying liststore for the phonebook\n"
52232"        this._listStore = new Gtk.ListStore ();\n"
52233"        this._listStore.set_column_types ([\n"
52234"            GObject.TYPE_STRING,\n"
52235"            GObject.TYPE_STRING,\n"
52236"            GObject.TYPE_STRING,\n"
52237"            GObject.TYPE_STRING]);\n"
52238"\n"
52239"        // Data to go in the phonebook\n"
52240"        let phonebook =\n"
52241"            [{ name: \"Jurg\", surname: \"Billeter\", phone: \"555-0123\",\n"
52242"                description: \"A friendly person.\"},\n"
52243"             { name: \"Johannes\", surname: \"Schmid\", phone: \"555-1234\",\n"
52244"                description: \"Easy phone number to remember.\"},\n"
52245"             { name: \"Julita\", surname: \"Inca\", phone: \"555-2345\",\n"
52246"                description: \"Another friendly person.\"},\n"
52247"             { name: \"Javier\", surname: \"Jardon\", phone: \"555-3456\",\n"
52248"                description: \"Bring fish for his penguins.\"},\n"
52249"             { name: \"Jason\", surname: \"Clinton\", phone: \"555-4567\",\n"
52250"                description: \"His cake's not a lie.\"},\n"
52251"             { name: \"Random J.\", surname: \"Hacker\", phone: \"555-5678\",\n"
52252"                description: \"Very random!\"}];\n"
52253"\n"
52254"        // Put the data in the phonebook\n"
52255"        for (let i = 0; i &lt; phonebook.length; i++ ) {\n"
52256"            let contact = phonebook [i];\n"
52257"            this._listStore.set (this._listStore.append(), [0, 1, 2, 3],\n"
52258"                [contact.name, contact.surname, contact.phone, contact.description]);\n"
52259"        }\n"
52260"\n"
52261"        // Create the treeview\n"
52262"        this._treeView = new Gtk.TreeView ({\n"
52263"            expand: true,\n"
52264"            model: this._listStore });\n"
52265"\n"
52266"        // Create the columns for the address book\n"
52267"        let firstName = new Gtk.TreeViewColumn ({ title: \"First Name\" });\n"
52268"        let lastName = new Gtk.TreeViewColumn ({ title: \"Last Name\" });\n"
52269"        let phone = new Gtk.TreeViewColumn ({ title: \"Phone Number\" });\n"
52270"\n"
52271"        // Create a cell renderer for when bold text is needed\n"
52272"        let bold = new Gtk.CellRendererText ({\n"
52273"            weight: Pango.Weight.BOLD });\n"
52274"\n"
52275"        // Create a cell renderer for normal text\n"
52276"        let normal = new Gtk.CellRendererText ();\n"
52277"\n"
52278"        // Pack the cell renderers into the columns\n"
52279"        firstName.pack_start (bold, true);\n"
52280"        lastName.pack_start (normal, true);\n"
52281"        phone.pack_start (normal, true);\n"
52282"\n"
52283"        // Set each column to pull text from the TreeView's model\n"
52284"        firstName.add_attribute (bold, \"text\", 0);\n"
52285"        lastName.add_attribute (normal, \"text\", 1);\n"
52286"        phone.add_attribute (normal, \"text\", 2);\n"
52287"\n"
52288"        // Insert the columns into the treeview\n"
52289"        this._treeView.insert_column (firstName, 0);\n"
52290"        this._treeView.insert_column (lastName, 1);\n"
52291"        this._treeView.insert_column (phone, 2);\n"
52292"\n"
52293"        // Create the label that shows details for the name you select\n"
52294"        this._label = new Gtk.Label ({ label: \"\" });\n"
52295"\n"
52296"        // Get which item is selected\n"
52297"        this.selection = this._treeView.get_selection();\n"
52298"\n"
52299"        // When something new is selected, call _on_changed\n"
52300"        this.selection.connect ('changed', this._onSelectionChanged.bind(this));\n"
52301"\n"
52302"        // Create a grid to organize everything in\n"
52303"        this._grid = new Gtk.Grid;\n"
52304"\n"
52305"        // Attach the treeview and label to the grid\n"
52306"        this._grid.attach (this._treeView, 0, 0, 1, 1);\n"
52307"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
52308"\n"
52309"        // Add the grid to the window\n"
52310"        this._window.add (this._grid);\n"
52311"\n"
52312"        // Show the window and all child widgets\n"
52313"        this._window.show_all();\n"
52314"    }\n"
52315"\n"
52316"    _onSelectionChanged() {\n"
52317"        // Grab a treeiter pointing to the current selection\n"
52318"        let [ isSelected, model, iter ] = this.selection.get_selected();\n"
52319"\n"
52320"        // Set the label to read off the values stored in the current selection\n"
52321"        this._label.set_label (\"\\n\" +\n"
52322"            this._listStore.get_value (iter, 0) + \" \" +\n"
52323"            this._listStore.get_value (iter, 1) + \" \" +\n"
52324"            this._listStore.get_value (iter, 2) + \"\\n\" +\n"
52325"            this._listStore.get_value (iter, 3)\n"
52326"        );\n"
52327"    }\n"
52328"};\n"
52329"\n"
52330"// Run the application\n"
52331"let app = new TreeViewExample ();\n"
52332"app.application.run (ARGV);\n"
52333msgstr ""
52334"#!/usr/bin/gjs\n"
52335"\n"
52336"imports.gi.versions.Gtk = '3.0';\n"
52337"\n"
52338"const GObject = imports.gi.GObject;\n"
52339"const Gtk = imports.gi.Gtk;\n"
52340"const Pango = imports.gi.Pango;\n"
52341"\n"
52342"class TreeViewExample {\n"
52343"    // Create the application itself\n"
52344"    constructor() {\n"
52345"        this.application = new Gtk.Application({\n"
52346"            application_id: 'org.example.jstreeviewsimpleliststore'\n"
52347"        });\n"
52348"\n"
52349"        // Connect 'activate' and 'startup' signals to the callback functions\n"
52350"        this.application.connect('activate', this._onActivate.bind(this));\n"
52351"        this.application.connect('startup', this._onStartup.bind(this));\n"
52352"    }\n"
52353"\n"
52354"    // Callback function for 'activate' signal presents window when active\n"
52355"    _onActivate() {\n"
52356"        this._window.present();\n"
52357"    }\n"
52358"\n"
52359"    // Callback function for 'startup' signal builds the UI\n"
52360"    _onStartup() {\n"
52361"        this._buildUI();\n"
52362"    }\n"
52363"\n"
52364"    // Build the application's UI\n"
52365"    _buildUI() {\n"
52366"        // Create the application window\n"
52367"        this._window = new Gtk.ApplicationWindow({\n"
52368"            application: this.application,\n"
52369"            window_position: Gtk.WindowPosition.CENTER,\n"
52370"            default_height: 250,\n"
52371"            default_width: 100,\n"
52372"            border_width: 20,\n"
52373"            title: \"My Phone Book\"});\n"
52374"\n"
52375"        // Create the underlying liststore for the phonebook\n"
52376"        this._listStore = new Gtk.ListStore ();\n"
52377"        this._listStore.set_column_types ([\n"
52378"            GObject.TYPE_STRING,\n"
52379"            GObject.TYPE_STRING,\n"
52380"            GObject.TYPE_STRING,\n"
52381"            GObject.TYPE_STRING]);\n"
52382"\n"
52383"        // Data to go in the phonebook\n"
52384"        let phonebook =\n"
52385"            [{ name: \"Jurg\", surname: \"Billeter\", phone: \"555-0123\",\n"
52386"                description: \"A friendly person.\"},\n"
52387"             { name: \"Johannes\", surname: \"Schmid\", phone: \"555-1234\",\n"
52388"                description: \"Easy phone number to remember.\"},\n"
52389"             { name: \"Julita\", surname: \"Inca\", phone: \"555-2345\",\n"
52390"                description: \"Another friendly person.\"},\n"
52391"             { name: \"Javier\", surname: \"Jardon\", phone: \"555-3456\",\n"
52392"                description: \"Bring fish for his penguins.\"},\n"
52393"             { name: \"Jason\", surname: \"Clinton\", phone: \"555-4567\",\n"
52394"                description: \"His cake's not a lie.\"},\n"
52395"             { name: \"Random J.\", surname: \"Hacker\", phone: \"555-5678\",\n"
52396"                description: \"Very random!\"}];\n"
52397"\n"
52398"        // Put the data in the phonebook\n"
52399"        for (let i = 0; i &lt; phonebook.length; i++ ) {\n"
52400"            let contact = phonebook [i];\n"
52401"            this._listStore.set (this._listStore.append(), [0, 1, 2, 3],\n"
52402"                [contact.name, contact.surname, contact.phone, contact.description]);\n"
52403"        }\n"
52404"\n"
52405"        // Create the treeview\n"
52406"        this._treeView = new Gtk.TreeView ({\n"
52407"            expand: true,\n"
52408"            model: this._listStore });\n"
52409"\n"
52410"        // Create the columns for the address book\n"
52411"        let firstName = new Gtk.TreeViewColumn ({ title: \"First Name\" });\n"
52412"        let lastName = new Gtk.TreeViewColumn ({ title: \"Last Name\" });\n"
52413"        let phone = new Gtk.TreeViewColumn ({ title: \"Phone Number\" });\n"
52414"\n"
52415"        // Create a cell renderer for when bold text is needed\n"
52416"        let bold = new Gtk.CellRendererText ({\n"
52417"            weight: Pango.Weight.BOLD });\n"
52418"\n"
52419"        // Create a cell renderer for normal text\n"
52420"        let normal = new Gtk.CellRendererText ();\n"
52421"\n"
52422"        // Pack the cell renderers into the columns\n"
52423"        firstName.pack_start (bold, true);\n"
52424"        lastName.pack_start (normal, true);\n"
52425"        phone.pack_start (normal, true);\n"
52426"\n"
52427"        // Set each column to pull text from the TreeView's model\n"
52428"        firstName.add_attribute (bold, \"text\", 0);\n"
52429"        lastName.add_attribute (normal, \"text\", 1);\n"
52430"        phone.add_attribute (normal, \"text\", 2);\n"
52431"\n"
52432"        // Insert the columns into the treeview\n"
52433"        this._treeView.insert_column (firstName, 0);\n"
52434"        this._treeView.insert_column (lastName, 1);\n"
52435"        this._treeView.insert_column (phone, 2);\n"
52436"\n"
52437"        // Create the label that shows details for the name you select\n"
52438"        this._label = new Gtk.Label ({ label: \"\" });\n"
52439"\n"
52440"        // Get which item is selected\n"
52441"        this.selection = this._treeView.get_selection();\n"
52442"\n"
52443"        // When something new is selected, call _on_changed\n"
52444"        this.selection.connect ('changed', this._onSelectionChanged.bind(this));\n"
52445"\n"
52446"        // Create a grid to organize everything in\n"
52447"        this._grid = new Gtk.Grid;\n"
52448"\n"
52449"        // Attach the treeview and label to the grid\n"
52450"        this._grid.attach (this._treeView, 0, 0, 1, 1);\n"
52451"        this._grid.attach (this._label, 0, 1, 1, 1);\n"
52452"\n"
52453"        // Add the grid to the window\n"
52454"        this._window.add (this._grid);\n"
52455"\n"
52456"        // Show the window and all child widgets\n"
52457"        this._window.show_all();\n"
52458"    }\n"
52459"\n"
52460"    _onSelectionChanged() {\n"
52461"        // Grab a treeiter pointing to the current selection\n"
52462"        let [ isSelected, model, iter ] = this.selection.get_selected();\n"
52463"\n"
52464"        // Set the label to read off the values stored in the current selection\n"
52465"        this._label.set_label (\"\\n\" +\n"
52466"            this._listStore.get_value (iter, 0) + \" \" +\n"
52467"            this._listStore.get_value (iter, 1) + \" \" +\n"
52468"            this._listStore.get_value (iter, 2) + \"\\n\" +\n"
52469"            this._listStore.get_value (iter, 3)\n"
52470"        );\n"
52471"    }\n"
52472"};\n"
52473"\n"
52474"// Run the application\n"
52475"let app = new TreeViewExample ();\n"
52476"app.application.run (ARGV);\n"
52477
52478#. (itstool) path: item/p
52479#: C/treeview_simple_liststore.js.page:282
52480msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeSelection.html\">Gtk.TreeSelection</link>"
52481msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeSelection.html\">Gtk.TreeSelection</link>"
52482
52483#. (itstool) path: item/p
52484#: C/treeview_simple_liststore.js.page:283
52485msgid "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeView.html\">Gtk.TreeView</link>"
52486msgstr "<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeView.html\">Gtk.TreeView</link>"
52487
52488#. (itstool) path: item/p
52489#: C/treeview_simple_liststore.js.page:284
52490msgid ""
52491"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeViewColumn.html\">Gtk.TreeViewColumn</link>"
52492msgstr ""
52493"<link href=\"http://www.roojs.org/seed/gir-1.2-gtk-3.0/gjs/Gtk.TreeViewColumn.html\">Gtk.TreeViewColumn</link>"
52494
52495#. (itstool) path: info/title
52496#: C/treeview_simple_liststore.py.page:8
52497msgctxt "text"
52498msgid "Simple TreeView with ListStore (Python)"
52499msgstr "간단한 TreeView와 ListStore(Python)"
52500
52501#. (itstool) path: info/desc
52502#: C/treeview_simple_liststore.py.page:20
52503msgid "A TreeView displaying a ListStore (simpler example)"
52504msgstr "ListStore를 표시하는 TreeView(더 간단한 예제)"
52505
52506#. (itstool) path: page/title
52507#: C/treeview_simple_liststore.py.page:23
52508msgid "Simple TreeView with ListStore"
52509msgstr "간단한 TreeView와 ListStore"
52510
52511#. (itstool) path: page/media
52512#. This is a reference to an external file such as an image or video. When
52513#. the file changes, the md5 hash will change to let you know you need to
52514#. update your localized copy. The msgstr is not used at all. Set it to
52515#. whatever you like once you have updated your copy of the file.
52516#: C/treeview_simple_liststore.py.page:24 C/treeview_simple_liststore.vala.page:24
52517msgctxt "_"
52518msgid "external ref='media/treeview_simple_liststore.png' md5='2dc501a2b95b094da985d37b66aee90c'"
52519msgstr ""
52520
52521#. (itstool) path: section/code
52522#: C/treeview_simple_liststore.py.page:32
52523#, no-wrap
52524msgid ""
52525"from gi.repository import Gtk\n"
52526"from gi.repository import Pango\n"
52527"import sys\n"
52528"\n"
52529"columns = [\"First Name\",\n"
52530"           \"Last Name\",\n"
52531"           \"Phone Number\"]\n"
52532"\n"
52533"phonebook = [[\"Jurg\", \"Billeter\", \"555-0123\"],\n"
52534"             [\"Johannes\", \"Schmid\", \"555-1234\"],\n"
52535"             [\"Julita\", \"Inca\", \"555-2345\"],\n"
52536"             [\"Javier\", \"Jardon\", \"555-3456\"],\n"
52537"             [\"Jason\", \"Clinton\", \"555-4567\"],\n"
52538"             [\"Random J.\", \"Hacker\", \"555-5678\"]]\n"
52539"\n"
52540"\n"
52541"class MyWindow(Gtk.ApplicationWindow):\n"
52542"\n"
52543"    def __init__(self, app):\n"
52544"        Gtk.Window.__init__(self, title=\"My Phone Book\", application=app)\n"
52545"        self.set_default_size(250, 100)\n"
52546"        self.set_border_width(10)\n"
52547"\n"
52548"        # the data in the model (three strings for each row, one for each\n"
52549"        # column)\n"
52550"        listmodel = Gtk.ListStore(str, str, str)\n"
52551"        # append the values in the model\n"
52552"        for i in range(len(phonebook)):\n"
52553"            listmodel.append(phonebook[i])\n"
52554"\n"
52555"        # a treeview to see the data stored in the model\n"
52556"        view = Gtk.TreeView(model=listmodel)\n"
52557"        # for each column\n"
52558"        for i, column in enumerate(columns):\n"
52559"            # cellrenderer to render the text\n"
52560"            cell = Gtk.CellRendererText()\n"
52561"            # the text in the first column should be in boldface\n"
52562"            if i == 0:\n"
52563"                cell.props.weight_set = True\n"
52564"                cell.props.weight = Pango.Weight.BOLD\n"
52565"            # the column is created\n"
52566"            col = Gtk.TreeViewColumn(column, cell, text=i)\n"
52567"            # and it is appended to the treeview\n"
52568"            view.append_column(col)\n"
52569"\n"
52570"        # when a row is selected, it emits a signal\n"
52571"        view.get_selection().connect(\"changed\", self.on_changed)\n"
52572"\n"
52573"        # the label we use to show the selection\n"
52574"        self.label = Gtk.Label()\n"
52575"        self.label.set_text(\"\")\n"
52576"\n"
52577"        # a grid to attach the widgets\n"
52578"        grid = Gtk.Grid()\n"
52579"        grid.attach(view, 0, 0, 1, 1)\n"
52580"        grid.attach(self.label, 0, 1, 1, 1)\n"
52581"\n"
52582"        # attach the grid to the window\n"
52583"        self.add(grid)\n"
52584"\n"
52585"    def on_changed(self, selection):\n"
52586"        # get the model and the iterator that points at the data in the model\n"
52587"        (model, iter) = selection.get_selected()\n"
52588"        # set the label to a new value depending on the selection\n"
52589"        self.label.set_text(\"\\n %s %s %s\" %\n"
52590"                            (model[iter][0],  model[iter][1], model[iter][2]))\n"
52591"        return True\n"
52592"\n"
52593"\n"
52594"class MyApplication(Gtk.Application):\n"
52595"\n"
52596"    def __init__(self):\n"
52597"        Gtk.Application.__init__(self)\n"
52598"\n"
52599"    def do_activate(self):\n"
52600"        win = MyWindow(self)\n"
52601"        win.show_all()\n"
52602"\n"
52603"    def do_startup(self):\n"
52604"        Gtk.Application.do_startup(self)\n"
52605"\n"
52606"app = MyApplication()\n"
52607"exit_status = app.run(sys.argv)\n"
52608"sys.exit(exit_status)\n"
52609msgstr ""
52610"from gi.repository import Gtk\n"
52611"from gi.repository import Pango\n"
52612"import sys\n"
52613"\n"
52614"columns = [\"First Name\",\n"
52615"           \"Last Name\",\n"
52616"           \"Phone Number\"]\n"
52617"\n"
52618"phonebook = [[\"Jurg\", \"Billeter\", \"555-0123\"],\n"
52619"             [\"Johannes\", \"Schmid\", \"555-1234\"],\n"
52620"             [\"Julita\", \"Inca\", \"555-2345\"],\n"
52621"             [\"Javier\", \"Jardon\", \"555-3456\"],\n"
52622"             [\"Jason\", \"Clinton\", \"555-4567\"],\n"
52623"             [\"Random J.\", \"Hacker\", \"555-5678\"]]\n"
52624"\n"
52625"\n"
52626"class MyWindow(Gtk.ApplicationWindow):\n"
52627"\n"
52628"    def __init__(self, app):\n"
52629"        Gtk.Window.__init__(self, title=\"My Phone Book\", application=app)\n"
52630"        self.set_default_size(250, 100)\n"
52631"        self.set_border_width(10)\n"
52632"\n"
52633"        # the data in the model (three strings for each row, one for each\n"
52634"        # column)\n"
52635"        listmodel = Gtk.ListStore(str, str, str)\n"
52636"        # append the values in the model\n"
52637"        for i in range(len(phonebook)):\n"
52638"            listmodel.append(phonebook[i])\n"
52639"\n"
52640"        # a treeview to see the data stored in the model\n"
52641"        view = Gtk.TreeView(model=listmodel)\n"
52642"        # for each column\n"
52643"        for i, column in enumerate(columns):\n"
52644"            # cellrenderer to render the text\n"
52645"            cell = Gtk.CellRendererText()\n"
52646"            # the text in the first column should be in boldface\n"
52647"            if i == 0:\n"
52648"                cell.props.weight_set = True\n"
52649"                cell.props.weight = Pango.Weight.BOLD\n"
52650"            # the column is created\n"
52651"            col = Gtk.TreeViewColumn(column, cell, text=i)\n"
52652"            # and it is appended to the treeview\n"
52653"            view.append_column(col)\n"
52654"\n"
52655"        # when a row is selected, it emits a signal\n"
52656"        view.get_selection().connect(\"changed\", self.on_changed)\n"
52657"\n"
52658"        # the label we use to show the selection\n"
52659"        self.label = Gtk.Label()\n"
52660"        self.label.set_text(\"\")\n"
52661"\n"
52662"        # a grid to attach the widgets\n"
52663"        grid = Gtk.Grid()\n"
52664"        grid.attach(view, 0, 0, 1, 1)\n"
52665"        grid.attach(self.label, 0, 1, 1, 1)\n"
52666"\n"
52667"        # attach the grid to the window\n"
52668"        self.add(grid)\n"
52669"\n"
52670"    def on_changed(self, selection):\n"
52671"        # get the model and the iterator that points at the data in the model\n"
52672"        (model, iter) = selection.get_selected()\n"
52673"        # set the label to a new value depending on the selection\n"
52674"        self.label.set_text(\"\\n %s %s %s\" %\n"
52675"                            (model[iter][0],  model[iter][1], model[iter][2]))\n"
52676"        return True\n"
52677"\n"
52678"\n"
52679"class MyApplication(Gtk.Application):\n"
52680"\n"
52681"    def __init__(self):\n"
52682"        Gtk.Application.__init__(self)\n"
52683"\n"
52684"    def do_activate(self):\n"
52685"        win = MyWindow(self)\n"
52686"        win.show_all()\n"
52687"\n"
52688"    def do_startup(self):\n"
52689"        Gtk.Application.do_startup(self)\n"
52690"\n"
52691"app = MyApplication()\n"
52692"exit_status = app.run(sys.argv)\n"
52693"sys.exit(exit_status)\n"
52694
52695#. (itstool) path: section/p
52696#: C/treeview_simple_liststore.py.page:37
52697msgid ""
52698"The TreeView widget is designed around a <em>Model/View/Controller</em> design: the <em>Model</em> stores the "
52699"data; the <em>View</em> gets change notifications and displays the content of the model; the <em>Controller</em>, "
52700"finally, changes the state of the model and notifies the view of these changes. For more information, and for a "
52701"list of useful methods for TreeModel, see <link xref=\"model-view-controller.py\"/>."
52702msgstr ""
52703"TreeView 위젯은 <em>Model/View/Controller</em>  방식으로 설계했습니다. <em>Model</em>은 데이터를, <em>View</em>는 "
52704"바뀐 내용 알림을 받은 후의 모델의 내용을, 마지막으로 <em>Controller</em>는 모델의 상태를 바꾸고 뷰에게 바뀐 모델의 "
52705"상태를 알리는 코드를 담습니다. 자세한 내용과 TreeModel에 대한 쓸만한 메서드 목록을 보시려면 <link xref=\"model-"
52706"view-controller.py\"/>를 참고하십시오."
52707
52708#. (itstool) path: section/p
52709#: C/treeview_simple_liststore.py.page:38
52710msgid ""
52711"In line 44 the <code>\"changed\"</code> signal is connected to the callback function <code>on_changed()</code> "
52712"using <code><var>widget</var>.connect(<var>signal</var>, <var>callback function</var>)</code>. See <link xref="
52713"\"signals-callbacks.py\"/> for a more detailed explanation."
52714msgstr ""
52715"44번째 줄에서 <code>\"changed\"</code> 시그널은 <code><var>widget</var>.connect(<var>signal</var>, <var>callback "
52716"function</var>)</code> 함수로 <code>on_changed()</code> 콜백 함수에 연결했습니다. 더 자세한 설명은 <link xref="
52717"\"signals-callbacks.py\"/>를 참조하십시오."
52718
52719#. (itstool) path: item/p
52720#: C/treeview_simple_liststore.py.page:51
52721msgid "<link href=\"http://developer.gnome.org/pango/stable/pango-Fonts.html\">Fonts</link>"
52722msgstr "<link href=\"http://developer.gnome.org/pango/stable/pango-Fonts.html\">Fonts</link>"
52723
52724#. (itstool) path: info/title
52725#: C/treeview_simple_liststore.vala.page:8
52726msgctxt "text"
52727msgid "Simple Treeview with ListStore (Vala)"
52728msgstr "간단한 TreeView와 ListStore(Vala)"
52729
52730#. (itstool) path: info/desc
52731#: C/treeview_simple_liststore.vala.page:20
52732msgid "A widget can display any TreeModel implementation (lists and trees)"
52733msgstr "TreeModel 구현체를 나타낼 수 있는 위젯(리스트와 트리)"
52734
52735#. (itstool) path: page/title
52736#: C/treeview_simple_liststore.vala.page:23
52737msgid "Simple Treeview with ListStore"
52738msgstr "ListStore로 구현한 간단한 TreeView"
52739
52740#. (itstool) path: page/p
52741#: C/treeview_simple_liststore.vala.page:25
52742msgid "This TreeView displays a simple ListStore with the Selection \"changed\" signal connected."
52743msgstr "이 트리뷰에서는 선택 \"changed\" 시그널을 연결하여 간단한 ListStore를 보여드립니다."
52744
52745#. (itstool) path: page/code
52746#: C/treeview_simple_liststore.vala.page:27
52747#, no-wrap
52748msgid ""
52749"public class PhoneBookEntry {\n"
52750"\tpublic string firstname;\n"
52751"\tpublic string lastname;\n"
52752"\tpublic string phone;\n"
52753"\n"
52754"\tpublic PhoneBookEntry (string f, string l, string p) {\n"
52755"\t\tthis.firstname = f;\n"
52756"\t\tthis.lastname = l;\n"
52757"\t\tthis.phone = p;\n"
52758"\t}\n"
52759"}\n"
52760"\n"
52761"class TreeViewSimpleListStore : Gtk.ApplicationWindow {\n"
52762"\n"
52763"\tGtk.Label label;\n"
52764"\n"
52765"\tPhoneBookEntry[] phonebook = {\n"
52766"\t\tnew PhoneBookEntry (\"Jurg\", \"Billeter\", \"555-0123\"),\n"
52767"\t\tnew PhoneBookEntry (\"Johannes\", \"Schmid\", \"555-1234\"),\n"
52768"\t\tnew PhoneBookEntry (\"Julita\", \"Inca\", \"555-2345\"),\n"
52769"\t\tnew PhoneBookEntry (\"Javier\", \"Jardon\", \"555-3456\"),\n"
52770"\t\tnew PhoneBookEntry (\"Jason\", \"Clinton\", \"555-4567\"),\n"
52771"\t\tnew PhoneBookEntry (\"Random J.\", \"Hacker\", \"555-5678\")\n"
52772"\t};\n"
52773"\n"
52774"\tenum Column {\n"
52775"\t\tFIRSTNAME,\n"
52776"\t\tLASTNAME,\n"
52777"\t\tPHONE\n"
52778"\t}\n"
52779"\n"
52780"\tinternal TreeViewSimpleListStore (MyApplication app) {\n"
52781"\t\tObject (application: app, title: \"My Phone Book\");\n"
52782"\n"
52783"\t\tthis.set_default_size (250, 100);\n"
52784"\t\tthis.border_width = 10;\n"
52785"\n"
52786"\t\tvar view = new Gtk.TreeView ();\n"
52787"\t\tthis.setup_treeview (view);\n"
52788"\t\tview.expand = true;\n"
52789"\n"
52790"\t\tlabel = new Gtk.Label (\"\");\n"
52791"\n"
52792"\t\tvar grid = new Gtk.Grid ();\n"
52793"\n"
52794"\t\tgrid.attach (view, 0, 0, 1, 1);\n"
52795"\t\tgrid.attach (label, 0, 1, 1, 1);\n"
52796"\t\tthis.add (grid);\n"
52797"\n"
52798"\t\tvar selection = view.get_selection ();\n"
52799"\t\tselection.changed.connect (this.on_changed);\n"
52800"\t}\n"
52801"\n"
52802"\tvoid setup_treeview (Gtk.TreeView view) {\n"
52803"\t\tvar listmodel = new Gtk.ListStore (3, typeof (string),\n"
52804"                                              typeof (string),\n"
52805"                                              typeof (string));\n"
52806"\t\tview.set_model (listmodel);\n"
52807"\n"
52808"\t\tvar cell = new Gtk.CellRendererText ();\n"
52809"\n"
52810"\t\t/* 'weight' refers to font boldness.\n"
52811"\t\t *  400 is normal.\n"
52812"\t\t *  700 is bold.\n"
52813"\t\t */\n"
52814"\t\tcell.set (\"weight_set\", true);\n"
52815"\t\tcell.set (\"weight\", 700);\n"
52816"\n"
52817"\t\t/*columns*/\n"
52818"\t\tview.insert_column_with_attributes (-1, \"First Name\",\n"
52819"                                                cell, \"text\",\n"
52820"                                                Column.FIRSTNAME);\n"
52821"\n"
52822"\t\tview.insert_column_with_attributes (-1, \"Last Name\",\n"
52823"                                                new Gtk.CellRendererText (),\n"
52824"                                                \"text\", Column.LASTNAME);\n"
52825"\n"
52826"\t\tview.insert_column_with_attributes (-1, \"Phone Number\",\n"
52827"                                                new Gtk.CellRendererText (),\n"
52828"                                                \"text\", Column.PHONE);\n"
52829"\n"
52830"\t\t/* Insert the phonebook into the ListStore */\n"
52831"\t\tGtk.TreeIter iter;\n"
52832"\t\tfor (int i = 0; i &lt; phonebook.length; i++) {\n"
52833"\t\t\tlistmodel.append (out iter);\n"
52834"\t\t\tlistmodel.set (iter, Column.FIRSTNAME,\n"
52835"                                 phonebook[i].firstname,\n"
52836"                                 Column.LASTNAME, phonebook[i].lastname,\n"
52837"                                 Column.PHONE, phonebook[i].phone);\n"
52838"\t\t}\n"
52839"\t}\n"
52840"\n"
52841"\tvoid on_changed (Gtk.TreeSelection selection) {\n"
52842"\t\tGtk.TreeModel model;\n"
52843"\t\tGtk.TreeIter iter;\n"
52844"\t\tstring name;\n"
52845"\t\tstring lastname;\n"
52846"\t\tstring phone;\n"
52847"\n"
52848"\t\tif (selection.get_selected (out model, out iter)) {\n"
52849"\t\t\tmodel.get (iter,\n"
52850"                                   Column.FIRSTNAME, out name,\n"
52851"                                   Column.LASTNAME, out lastname,\n"
52852"                                   Column.PHONE, out phone);\n"
52853"\n"
52854"\t\t\tlabel.set_text (\"\\n\" + name + \" \" + lastname + \" \" + phone);\n"
52855"\t\t}\n"
52856"\t}\n"
52857"}\n"
52858"\n"
52859"class MyApplication : Gtk.Application {\n"
52860"\tprotected override void activate () {\n"
52861"\n"
52862"\t\t/* Create new Window and show all the things. */\n"
52863"\t\tnew TreeViewSimpleListStore (this).show_all ();\n"
52864"\t}\n"
52865"\n"
52866"\tinternal MyApplication () {\n"
52867"\t\tObject (application_id: \"example.liststore.simple.treeview\");\n"
52868"\t}\n"
52869"}\n"
52870"\n"
52871"int main (string[] args) {\n"
52872"\treturn new MyApplication ().run (args);\n"
52873"}\n"
52874msgstr ""
52875"public class PhoneBookEntry {\n"
52876"\tpublic string firstname;\n"
52877"\tpublic string lastname;\n"
52878"\tpublic string phone;\n"
52879"\n"
52880"\tpublic PhoneBookEntry (string f, string l, string p) {\n"
52881"\t\tthis.firstname = f;\n"
52882"\t\tthis.lastname = l;\n"
52883"\t\tthis.phone = p;\n"
52884"\t}\n"
52885"}\n"
52886"\n"
52887"class TreeViewSimpleListStore : Gtk.ApplicationWindow {\n"
52888"\n"
52889"\tGtk.Label label;\n"
52890"\n"
52891"\tPhoneBookEntry[] phonebook = {\n"
52892"\t\tnew PhoneBookEntry (\"Jurg\", \"Billeter\", \"555-0123\"),\n"
52893"\t\tnew PhoneBookEntry (\"Johannes\", \"Schmid\", \"555-1234\"),\n"
52894"\t\tnew PhoneBookEntry (\"Julita\", \"Inca\", \"555-2345\"),\n"
52895"\t\tnew PhoneBookEntry (\"Javier\", \"Jardon\", \"555-3456\"),\n"
52896"\t\tnew PhoneBookEntry (\"Jason\", \"Clinton\", \"555-4567\"),\n"
52897"\t\tnew PhoneBookEntry (\"Random J.\", \"Hacker\", \"555-5678\")\n"
52898"\t};\n"
52899"\n"
52900"\tenum Column {\n"
52901"\t\tFIRSTNAME,\n"
52902"\t\tLASTNAME,\n"
52903"\t\tPHONE\n"
52904"\t}\n"
52905"\n"
52906"\tinternal TreeViewSimpleListStore (MyApplication app) {\n"
52907"\t\tObject (application: app, title: \"My Phone Book\");\n"
52908"\n"
52909"\t\tthis.set_default_size (250, 100);\n"
52910"\t\tthis.border_width = 10;\n"
52911"\n"
52912"\t\tvar view = new Gtk.TreeView ();\n"
52913"\t\tthis.setup_treeview (view);\n"
52914"\t\tview.expand = true;\n"
52915"\n"
52916"\t\tlabel = new Gtk.Label (\"\");\n"
52917"\n"
52918"\t\tvar grid = new Gtk.Grid ();\n"
52919"\n"
52920"\t\tgrid.attach (view, 0, 0, 1, 1);\n"
52921"\t\tgrid.attach (label, 0, 1, 1, 1);\n"
52922"\t\tthis.add (grid);\n"
52923"\n"
52924"\t\tvar selection = view.get_selection ();\n"
52925"\t\tselection.changed.connect (this.on_changed);\n"
52926"\t}\n"
52927"\n"
52928"\tvoid setup_treeview (Gtk.TreeView view) {\n"
52929"\t\tvar listmodel = new Gtk.ListStore (3, typeof (string),\n"
52930"                                              typeof (string),\n"
52931"                                              typeof (string));\n"
52932"\t\tview.set_model (listmodel);\n"
52933"\n"
52934"\t\tvar cell = new Gtk.CellRendererText ();\n"
52935"\n"
52936"\t\t/* 'weight' refers to font boldness.\n"
52937"\t\t *  400 is normal.\n"
52938"\t\t *  700 is bold.\n"
52939"\t\t */\n"
52940"\t\tcell.set (\"weight_set\", true);\n"
52941"\t\tcell.set (\"weight\", 700);\n"
52942"\n"
52943"\t\t/*columns*/\n"
52944"\t\tview.insert_column_with_attributes (-1, \"First Name\",\n"
52945"                                                cell, \"text\",\n"
52946"                                                Column.FIRSTNAME);\n"
52947"\n"
52948"\t\tview.insert_column_with_attributes (-1, \"Last Name\",\n"
52949"                                                new Gtk.CellRendererText (),\n"
52950"                                                \"text\", Column.LASTNAME);\n"
52951"\n"
52952"\t\tview.insert_column_with_attributes (-1, \"Phone Number\",\n"
52953"                                                new Gtk.CellRendererText (),\n"
52954"                                                \"text\", Column.PHONE);\n"
52955"\n"
52956"\t\t/* Insert the phonebook into the ListStore */\n"
52957"\t\tGtk.TreeIter iter;\n"
52958"\t\tfor (int i = 0; i &lt; phonebook.length; i++) {\n"
52959"\t\t\tlistmodel.append (out iter);\n"
52960"\t\t\tlistmodel.set (iter, Column.FIRSTNAME,\n"
52961"                                 phonebook[i].firstname,\n"
52962"                                 Column.LASTNAME, phonebook[i].lastname,\n"
52963"                                 Column.PHONE, phonebook[i].phone);\n"
52964"\t\t}\n"
52965"\t}\n"
52966"\n"
52967"\tvoid on_changed (Gtk.TreeSelection selection) {\n"
52968"\t\tGtk.TreeModel model;\n"
52969"\t\tGtk.TreeIter iter;\n"
52970"\t\tstring name;\n"
52971"\t\tstring lastname;\n"
52972"\t\tstring phone;\n"
52973"\n"
52974"\t\tif (selection.get_selected (out model, out iter)) {\n"
52975"\t\t\tmodel.get (iter,\n"
52976"                                   Column.FIRSTNAME, out name,\n"
52977"                                   Column.LASTNAME, out lastname,\n"
52978"                                   Column.PHONE, out phone);\n"
52979"\n"
52980"\t\t\tlabel.set_text (\"\\n\" + name + \" \" + lastname + \" \" + phone);\n"
52981"\t\t}\n"
52982"\t}\n"
52983"}\n"
52984"\n"
52985"class MyApplication : Gtk.Application {\n"
52986"\tprotected override void activate () {\n"
52987"\n"
52988"\t\t/* Create new Window and show all the things. */\n"
52989"\t\tnew TreeViewSimpleListStore (this).show_all ();\n"
52990"\t}\n"
52991"\n"
52992"\tinternal MyApplication () {\n"
52993"\t\tObject (application_id: \"example.liststore.simple.treeview\");\n"
52994"\t}\n"
52995"}\n"
52996"\n"
52997"int main (string[] args) {\n"
52998"\treturn new MyApplication ().run (args);\n"
52999"}\n"
53000
53001#. (itstool) path: item/p
53002#: C/treeview_simple_liststore.vala.page:32
53003msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TreeView.html\">Gtk.TreeView</link>"
53004msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TreeView.html\">Gtk.TreeView</link>"
53005
53006#. (itstool) path: item/p
53007#: C/treeview_simple_liststore.vala.page:34
53008msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TreeSelection.html\">Gtk.TreeSelection</link>"
53009msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.TreeSelection.html\">Gtk.TreeSelection</link>"
53010
53011#. (itstool) path: info/desc
53012#: C/treeview_treestore.py.page:20
53013msgid "A TreeView displaying a TreeStore (simpler example)"
53014msgstr "TreeStore를 표시하는 TreeView(더 간단한 예제)"
53015
53016#. (itstool) path: page/title
53017#: C/treeview_treestore.py.page:23
53018msgid "Simpler TreeView with TreeStore"
53019msgstr "더 간단한 TreeView와 TreeStore"
53020
53021#. (itstool) path: page/media
53022#. This is a reference to an external file such as an image or video. When
53023#. the file changes, the md5 hash will change to let you know you need to
53024#. update your localized copy. The msgstr is not used at all. Set it to
53025#. whatever you like once you have updated your copy of the file.
53026#: C/treeview_treestore.py.page:24
53027msgctxt "_"
53028msgid "external ref='media/treeview_treestore.png' md5='5ca87bc4acd55c527b3fb5fd46779d85'"
53029msgstr ""
53030
53031#. (itstool) path: page/p
53032#: C/treeview_treestore.py.page:25
53033msgid "This TreeView displays a TreeStore."
53034msgstr "이 TreeView에서는 TreeStore의 내용을 표시합니다."
53035
53036#. (itstool) path: section/code
53037#: C/treeview_treestore.py.page:32
53038#, no-wrap
53039msgid ""
53040"from gi.repository import Gtk\n"
53041"from gi.repository import Pango\n"
53042"import sys\n"
53043"\n"
53044"books = [[\"Tolstoy, Leo\", \"War and Peace\", \"Anna Karenina\"],\n"
53045"         [\"Shakespeare, William\", \"Hamlet\", \"Macbeth\", \"Othello\"],\n"
53046"         [\"Tolkien, J.R.R.\", \"The Lord of the Rings\"]]\n"
53047"\n"
53048"\n"
53049"class MyWindow(Gtk.ApplicationWindow):\n"
53050"\n"
53051"    def __init__(self, app):\n"
53052"        Gtk.Window.__init__(self, title=\"Library\", application=app)\n"
53053"        self.set_default_size(250, 100)\n"
53054"        self.set_border_width(10)\n"
53055"\n"
53056"        # the data are stored in the model\n"
53057"        # create a treestore with one column\n"
53058"        store = Gtk.TreeStore(str)\n"
53059"        for i in range(len(books)):\n"
53060"            # the iter piter is returned when appending the author\n"
53061"            piter = store.append(None, [books[i][0]])\n"
53062"            # append the books as children of the author\n"
53063"            j = 1\n"
53064"            while j &lt; len(books[i]):\n"
53065"                store.append(piter, [books[i][j]])\n"
53066"                j += 1\n"
53067"\n"
53068"        # the treeview shows the model\n"
53069"        # create a treeview on the model store\n"
53070"        view = Gtk.TreeView()\n"
53071"        view.set_model(store)\n"
53072"\n"
53073"        # the cellrenderer for the column - text\n"
53074"        renderer_books = Gtk.CellRendererText()\n"
53075"        # the column is created\n"
53076"        column_books = Gtk.TreeViewColumn(\n"
53077"            \"Books by Author\", renderer_books, text=0)\n"
53078"        # and it is appended to the treeview\n"
53079"        view.append_column(column_books)\n"
53080"\n"
53081"        # the books are sortable by author\n"
53082"        column_books.set_sort_column_id(0)\n"
53083"\n"
53084"        # add the treeview to the window\n"
53085"        self.add(view)\n"
53086"\n"
53087"\n"
53088"class MyApplication(Gtk.Application):\n"
53089"\n"
53090"    def __init__(self):\n"
53091"        Gtk.Application.__init__(self)\n"
53092"\n"
53093"    def do_activate(self):\n"
53094"        win = MyWindow(self)\n"
53095"        win.show_all()\n"
53096"\n"
53097"    def do_startup(self):\n"
53098"        Gtk.Application.do_startup(self)\n"
53099"\n"
53100"app = MyApplication()\n"
53101"exit_status = app.run(sys.argv)\n"
53102"sys.exit(exit_status)\n"
53103msgstr ""
53104"from gi.repository import Gtk\n"
53105"from gi.repository import Pango\n"
53106"import sys\n"
53107"\n"
53108"books = [[\"Tolstoy, Leo\", \"War and Peace\", \"Anna Karenina\"],\n"
53109"         [\"Shakespeare, William\", \"Hamlet\", \"Macbeth\", \"Othello\"],\n"
53110"         [\"Tolkien, J.R.R.\", \"The Lord of the Rings\"]]\n"
53111"\n"
53112"\n"
53113"class MyWindow(Gtk.ApplicationWindow):\n"
53114"\n"
53115"    def __init__(self, app):\n"
53116"        Gtk.Window.__init__(self, title=\"Library\", application=app)\n"
53117"        self.set_default_size(250, 100)\n"
53118"        self.set_border_width(10)\n"
53119"\n"
53120"        # the data are stored in the model\n"
53121"        # create a treestore with one column\n"
53122"        store = Gtk.TreeStore(str)\n"
53123"        for i in range(len(books)):\n"
53124"            # the iter piter is returned when appending the author\n"
53125"            piter = store.append(None, [books[i][0]])\n"
53126"            # append the books as children of the author\n"
53127"            j = 1\n"
53128"            while j &lt; len(books[i]):\n"
53129"                store.append(piter, [books[i][j]])\n"
53130"                j += 1\n"
53131"\n"
53132"        # the treeview shows the model\n"
53133"        # create a treeview on the model store\n"
53134"        view = Gtk.TreeView()\n"
53135"        view.set_model(store)\n"
53136"\n"
53137"        # the cellrenderer for the column - text\n"
53138"        renderer_books = Gtk.CellRendererText()\n"
53139"        # the column is created\n"
53140"        column_books = Gtk.TreeViewColumn(\n"
53141"            \"Books by Author\", renderer_books, text=0)\n"
53142"        # and it is appended to the treeview\n"
53143"        view.append_column(column_books)\n"
53144"\n"
53145"        # the books are sortable by author\n"
53146"        column_books.set_sort_column_id(0)\n"
53147"\n"
53148"        # add the treeview to the window\n"
53149"        self.add(view)\n"
53150"\n"
53151"\n"
53152"class MyApplication(Gtk.Application):\n"
53153"\n"
53154"    def __init__(self):\n"
53155"        Gtk.Application.__init__(self)\n"
53156"\n"
53157"    def do_activate(self):\n"
53158"        win = MyWindow(self)\n"
53159"        win.show_all()\n"
53160"\n"
53161"    def do_startup(self):\n"
53162"        Gtk.Application.do_startup(self)\n"
53163"\n"
53164"app = MyApplication()\n"
53165"exit_status = app.run(sys.argv)\n"
53166"sys.exit(exit_status)\n"
53167
53168#. (itstool) path: info/title
53169#: C/tutorial.py.page:9
53170msgctxt "text"
53171msgid "Tutorial for beginners (Python)"
53172msgstr "초보자 지침서(Python)"
53173
53174#. (itstool) path: info/desc
53175#: C/tutorial.py.page:13
53176msgid "A tutorial for beginners who want to learn how to program GUIs using GTK+ in Python."
53177msgstr "GTK+를 활용하여 파이썬 언어로 프로그래밍하는 방법을 배워보려는 초보자용 따라하기 지침입니다."
53178
53179#. (itstool) path: credit/years
53180#: C/tutorial.py.page:22
53181msgid "2012 2013"
53182msgstr "2012 2013"
53183
53184#. (itstool) path: credit/name
53185#: C/tutorial.py.page:25
53186msgid "Jim Campbell"
53187msgstr "Jim Campbell"
53188
53189#. (itstool) path: synopsis/p
53190#: C/tutorial.py.page:34
53191msgid "By following these tutorials you will learn the basics of GUI programming using GTK+ in Python."
53192msgstr "이 따라하기 지침서를 통해 파이썬 언어를 통한 GTK+ GUI 프로그래밍 기본을 배웁니다."
53193
53194#. (itstool) path: synopsis/p
53195#: C/tutorial.py.page:36
53196msgid ""
53197"If you have never programmed before, or are not familiar with the concepts of object oriented programming, you may "
53198"need to learn a few basics first. The book <link href=\"http://learnpythonthehardway.org/book/\">Learn Python the "
53199"Hard Way</link> or <link href=\"http://docs.python.org/tutorial/index.html\">The Python Tutorial</link> may be a "
53200"better place for you to start. You may also be interested in <link href=\"http://python-gtk-3-tutorial.readthedocs."
53201"org/en/latest/index.html\">The Python GTK+ 3 Tutorial</link>. Once you master the basics, be sure to come back and "
53202"check out these tutorials."
53203msgstr ""
53204"프로그래밍을 해본 적이 없거나 객체지향 프로그래밍에 익숙하지 않다면 우선 기본 학습이 필요합니다. <link href="
53205"\"http://learnpythonthehardway.org/book/\">Learn Python the Hard Way</link> 또는 <link href=\"http://docs.python."
53206"org/tutorial/index.html\">The Python Tutorial</link>이 시작하기에 좋은 자료입니다. <link href=\"http://python-"
53207"gtk-3-tutorial.readthedocs.org/en/latest/index.html\">The Python GTK+ 3 Tutorial</link>에도 관심있을 지도 모릅니"
53208"다. 기본을 익히고 나면 돌아와서 이 지침서를 다시 확인해보십시오."
53209
53210#. (itstool) path: section/title
53211#: C/tutorial.py.page:42
53212msgid "To run the code samples"
53213msgstr "예제 코드를 실행하려면"
53214
53215#. (itstool) path: section/p
53216#: C/tutorial.py.page:44
53217msgid "To run the code samples in the tutorial:"
53218msgstr "지침서의 예제 코드를 실행하려면:"
53219
53220#. (itstool) path: item/p
53221#: C/tutorial.py.page:46
53222msgid "Type or copy and paste the code into a file, and save the file with a name like <var>filename</var>.py"
53223msgstr "파일에 코드를 입력하거나 복사하여 붙여넣고 <var>filename</var>.py 식으로 파일을 저장하십시오"
53224
53225#. (itstool) path: item/p
53226#: C/tutorial.py.page:47
53227msgid "To execute the code, type in the terminal:"
53228msgstr "코드를 실행하려면 터미널에 다음과 같이 입력하십시오:"
53229
53230#. (itstool) path: item/screen
53231#: C/tutorial.py.page:48
53232#, no-wrap
53233msgid "python <var>filename</var>.py"
53234msgstr "python <var>filename</var>.py"
53235
53236#. (itstool) path: section/p
53237#: C/tutorial.py.page:51
53238msgid ""
53239"After executing the code, you will either see the widget on your screen, or (if you have mistyped some of the "
53240"code) you will see an error message that will help you identify the problem."
53241msgstr ""
53242"코드를 실행한 다음에는 화면에 위젯을 띄워 볼 수 있거나, (코드에 오타가 있을 경우) 문제를 확인하는데 도움을 줄 오류 "
53243"메시지를 볼 수 있습니다."
53244
53245#. (itstool) path: section/title
53246#: C/tutorial.py.page:55
53247msgid "A path through the widgets (with some theory)"
53248msgstr "위젯 활용법(과 약간의 이론 지식)"
53249
53250#. (itstool) path: section/p
53251#: C/tutorial.py.page:56
53252msgid ""
53253"The tutorial will walk you through increasingly complex examples and programming theory, but you can also feel "
53254"free to just go directly to the tutorial that is most helpful to you."
53255msgstr ""
53256"이 따라하기 지침은 여러분을 점점 복잡한 예제와 프로그래밍 이론 내용으로 안내하지만, 여러분에게 더 도움이 되는 내용"
53257"이 들어있는 다른 따라하기 지침으로 바로 건너뛰셔도 됩니다."
53258
53259#. (itstool) path: steps/title
53260#: C/tutorial.py.page:58
53261msgid "Tutorial"
53262msgstr "지침서"
53263
53264#. (itstool) path: steps/title
53265#: C/tutorial.py.page:60
53266msgid "Basic windows"
53267msgstr "기본 창"
53268
53269#. (itstool) path: steps/title
53270#: C/tutorial.py.page:65
53271msgid "Images and labels"
53272msgstr "그림 및 레이블"
53273
53274#. (itstool) path: steps/title
53275#: C/tutorial.py.page:71
53276msgid "Introduction to properties"
53277msgstr "속성 소개"
53278
53279#. (itstool) path: steps/title
53280#: C/tutorial.py.page:75
53281msgid "Grid, separator and scrolling"
53282msgstr "그리드, 구분선, 스크롤"
53283
53284#. (itstool) path: steps/title
53285#: C/tutorial.py.page:82
53286msgid "Signals, callbacks and buttons"
53287msgstr "시그널, 콜백 함수 및 단추"
53288
53289#. (itstool) path: steps/title
53290#: C/tutorial.py.page:96
53291msgid "Other display widgets"
53292msgstr "기타 표시 위젯"
53293
53294#. (itstool) path: steps/title
53295#: C/tutorial.py.page:102
53296msgid "Entry widgets"
53297msgstr "Entry 위젯"
53298
53299#. (itstool) path: steps/title
53300#: C/tutorial.py.page:108
53301msgid "A widget to write and display text"
53302msgstr "텍스트를 쓰고 표시하는 위젯"
53303
53304#. (itstool) path: steps/title
53305#: C/tutorial.py.page:112
53306msgid "Dialogs"
53307msgstr "대화상자"
53308
53309#. (itstool) path: steps/title
53310#: C/tutorial.py.page:118
53311msgid "Menus, Toolbars and Tooltips (also: using Glade and GtkBuilder)"
53312msgstr "메뉴, 도구모음, 풍선 도움말(및: 글레이드 GtkBuilder 사용)"
53313
53314#. (itstool) path: steps/title
53315#: C/tutorial.py.page:133
53316msgid "TreeViews and ComboBoxes (using the M/V/C design)"
53317msgstr "TreeViews와 ComboBox(M/V/C 설계 사용)"
53318
53319#. (itstool) path: steps/title
53320#: C/tutorial.py.page:143
53321msgid "Custom widget"
53322msgstr "개별 구성 위젯"
53323
53324#. (itstool) path: info/title
53325#: C/vala.page:7
53326msgctxt "link"
53327msgid "Vala"
53328msgstr "Vala"
53329
53330#. (itstool) path: page/title
53331#: C/vala.page:21
53332msgid "Tutorials, code samples and platform demos in Vala"
53333msgstr "Vala 언어용 따라하기 지침, 코드 예제, 플랫폼 데모"
53334
53335#. (itstool) path: section/title
53336#: C/vala.page:26
53337msgid "Code samples and tutorial"
53338msgstr "예제 코드 및 따라하기 지침"
53339
53340#. (itstool) path: info/title
53341#: C/weatherApp.js.page:7
53342msgctxt "text"
53343msgid "Weather application (JavaScript)"
53344msgstr "날씨 프로그램(JavaScript)"
53345
53346#. (itstool) path: info/desc
53347#: C/weatherApp.js.page:22
53348msgid ""
53349"How to plan an application that uses asynchronous calls. Asynchronous calls will be presented through a weather "
53350"application."
53351msgstr ""
53352"비동기 함수 호출을 활용하는 프로그램을 기획하는 방법입니다. 비동기 함수 호출은 날씨 프로그램에서 보여드리겠습니다."
53353
53354#. (itstool) path: page/title
53355#: C/weatherApp.js.page:27
53356msgid "Weather application"
53357msgstr "날씨 프로그램"
53358
53359#. (itstool) path: synopsis/p
53360#: C/weatherApp.js.page:29
53361msgid ""
53362"In this guide well construct a weather application using asynchronous calls. Weather information in this example "
53363"is fetched from geonames.org and the application is using the <link href=\"http://en.wikipedia.org/wiki/"
53364"List_of_airports_by_ICAO_code:_E\">ICAO codes </link> to place your weather request. To write and run all the code "
53365"examples yourself, you need an editor to write code in, Terminal and GNOME 3 or higher installed into your "
53366"computer. In this guide we we'll go through the following parts:"
53367msgstr ""
53368"안내서의 이 부분에서는 비동기 호출을 활용하여 로컬 라이브러리 geoNames를 만듭니다. 이 예제의 날씨 정보는 geonames."
53369"org에서 가져오며, 프로그램에서 날씨 정보를 요청할 때 <link href=\"http://en.wikipedia.org/wiki/"
53370"List_of_airports_by_ICAO_code:_E\">ICAO codes</link>를 활용합니다. 모든 코드 예제를 여러분 스스로 작성하고 실행하라"
53371"면 코드를 작성해넣을 편집기, 터미널, 그놈 3 이상을 컴퓨터에 설치해야 합니다. 이 안내서에서는 다음 내용을 진행합니"
53372"다:"
53373
53374#. (itstool) path: item/p
53375#: C/weatherApp.js.page:32
53376msgid "<link xref=\"#planningUi\">Planning the graphical user interface</link>"
53377msgstr "<link xref=\"#planningUi\">그래픽 사용자 인터페이스 기획</link>"
53378
53379#. (itstool) path: item/p
53380#: C/weatherApp.js.page:33
53381msgid "<link xref=\"#asynchronous\">Asynchronous calls</link>"
53382msgstr "<link xref=\"#asynchronous\">비동기 함수 호출</link>"
53383
53384#. (itstool) path: item/p
53385#: C/weatherApp.js.page:34
53386msgid "<link xref=\"#main\">The main program file</link>"
53387msgstr "<link xref=\"#main\">main 프로그램 파일</link>"
53388
53389#. (itstool) path: item/p
53390#: C/weatherApp.js.page:35
53391msgid "<link xref=\"#main\">Local library GeoNames</link>"
53392msgstr "<link xref=\"#main\">자체 GeoNames 라이브러리</link>"
53393
53394#. (itstool) path: item/p
53395#: C/weatherApp.js.page:36
53396msgid "<link xref=\"#main\">Autotools and Icons</link>"
53397msgstr "<link xref=\"#main\">Autotool과 아이콘</link>"
53398
53399#. (itstool) path: page/media
53400#. This is a reference to an external file such as an image or video. When
53401#. the file changes, the md5 hash will change to let you know you need to
53402#. update your localized copy. The msgstr is not used at all. Set it to
53403#. whatever you like once you have updated your copy of the file.
53404#: C/weatherApp.js.page:41
53405msgctxt "_"
53406msgid "external ref='media/weatherAppJs.png' md5='1fe859ac4854273d72ea8fc9203639b2'"
53407msgstr ""
53408
53409#. (itstool) path: section/title
53410#: C/weatherApp.js.page:44
53411msgid "Planning the graphical user interface"
53412msgstr "그래픽 사용자 인터페이스 기획"
53413
53414#. (itstool) path: section/p
53415#: C/weatherApp.js.page:45
53416msgid ""
53417"Structuring an application for GNOME 3 means you will be using <link href=\"http://developer.gnome.org/platform-"
53418"overview/stable/gtk\">GTK+</link>. The most important thing is to remember that the main window will only accept "
53419"one widget. You must plan your structure accordingly (this example is using Gtk.Grid). A useful method is to draw "
53420"out the main window and place every widget needed inside that box. By looking at an image of your future "
53421"application it is easier to tell what are the relations between widgets. For example Gtk.Grid places your widgets "
53422"in relation to other widgets, so after the first widget is in place, placing widgets can be done in relation to "
53423"any widget on the grid."
53424msgstr ""
53425"그놈 3 프로그램을 구성한다는 건 결국 <link href=\"http://developer.gnome.org/platform-overview/stable/gtk\">GTK+</"
53426"link>를 사용한다는 의미입니다. 메인 창은 하나의 위젯만 받아들일 수 있다는 점이 기억해야 할 중요한 점입니다. 이에 따"
53427"라 구조를 기횡해야 합니다(이 예제는 Gtk.Grid를 사용함). 쓸만한 메서드는 메인 창을 그리고 필요한 모든 위젯을 박스에 "
53428"넣는 함수입니다. 나중에 만들 프로그램의 그림을 살펴보면 여러 위젯에 어떤 관계가 있는지 쉽게 이야기할 수 있습니다. "
53429"예를 들어 Gtk.Grid에는 다른 위젯과의 관계에 따라 여러분의 위젯을 둡니다. 따라서 처음 위젯을 두고 나면, 그리드에서 "
53430"다른 위젯에 관계에 따라 다른 위젯을 어떤 위치에 둘 수 있습니다."
53431
53432#. (itstool) path: section/title
53433#: C/weatherApp.js.page:48
53434msgid "Asynchronous calls"
53435msgstr "비동기 호출"
53436
53437#. (itstool) path: section/p
53438#: C/weatherApp.js.page:49
53439msgid ""
53440"With many programming languages, all operations are run synchronously - you tell the program to do something, and "
53441"it will wait until that action completes before proceeding. This is however bad for graphical user interfaces, as "
53442"then the whole application will be frozen while the program waits for the operation. Going asynchronous (async) "
53443"helps here. With async calls, your UI won't be blocked with any requests. Async calls make your application more "
53444"flexible and better equipped to handle situations when calls take more time than expected or for some reason get "
53445"jammed. Async calls can be used for example file system I/O and for slower calculations in the background."
53446msgstr ""
53447"수많은 프로그래밍 언어에서는 많은 동작 처리를 동기방식으로 처리합니다. 여러분의 프로그램에 무언가를 지시하면 앞에 "
53448"진행하던 동작이 끝나기 전까지 기다립니다. 프로그램이 처리를 기다리는 동안 전체 프로그램이 멈추기에 그래픽 사용자 인"
53449"터페이스에 좋지 않습니다. 여기서 비동기 방식(async)으로 처리해보겠습니다. 비동기 호출을 수행하면, 여러분이 작성한 "
53450"사용자 인터페이스는 어떤 요청에도 동작을 멈추지 않습니다. async 호출은 프로그램 동작을 유연하게 하며, 예상 보다 더 "
53451"많은 함수 호출이 있거나 무슨 이유로 인해 동작이 꼬이는 경우를 처리할 수 있습니다. 비동기 호출은 시스템 입출력과 백"
53452"그라운드의 느린 계산처리에 활용할 수 있습니다."
53453
53454#. (itstool) path: section/p
53455#: C/weatherApp.js.page:52
53456msgid ""
53457"In this example we have to get data from geonames.org. While we do that we want the rest of our program to "
53458"continue. If we wouldn't get any information from geonames.org for the lack of internet connection and this would "
53459"be a synchronous application we would never get to the point where our main_quit() is processed correctly and the "
53460"application would have to killed from Terminal."
53461msgstr ""
53462"이 예제에서는 geonames.org에서 데이터를 가져와야합니다. 데이터를 가져오는 동안 프로그램의 나머지 동작 부분을 계속 "
53463"활용하고자 합니다. 인터넷 연결 상태가 좋지 않아 geonames.org에서 어떤 정보도 가져오지 못했고 이 프로그램이 동기 방"
53464"식 처리 프로그램이라면, main_quit()를 제대로 처리할 부분을 확인할 수 없을 뿐더러 프로그램을 터미널에서 강제로 끝내"
53465"야 할 수도 있습니다."
53466
53467#. (itstool) path: section/title
53468#: C/weatherApp.js.page:55
53469msgid "The different parts of the program"
53470msgstr "프로그램의 각 부분"
53471
53472#. (itstool) path: page/title
53473#: C/weatherAppMain.js.page:19
53474msgid "The main program file"
53475msgstr "주 프로그램 파일"
53476
53477#. (itstool) path: synopsis/p
53478#: C/weatherAppMain.js.page:21
53479msgid ""
53480"In this part of the guide well construct the main program file of the weather application. To write and run all "
53481"the code examples yourself, you need an editor to write code in, Terminal and GNOME 3 or higher installed into "
53482"your computer. In this part we we'll go through the following parts:"
53483msgstr ""
53484"안내서의 이 부분에서는 날씨 프로그램의 주 프로그램 파일을 만들어보겠습니다. 여러분이 모든 코드 예제를 작성하고 실행"
53485"하려면, 코드를 작성할 편집기, 터미널, 그놈 3 이상을 컴퓨터에 설치해야합니다. 여기서는 다음 내용을 진행합니다:"
53486
53487#. (itstool) path: item/p
53488#: C/weatherAppMain.js.page:26
53489msgid "<link xref=\"#widgets\">Adding a grid and all the necessary widgets to it</link>"
53490msgstr "<link xref=\"#widgets\">그리드를 추가하고 필요한 위젯 넣기</link>"
53491
53492#. (itstool) path: item/p
53493#: C/weatherAppMain.js.page:27
53494msgid "<link xref=\"#asynccall\">Requesting the weather information asynchronously</link>"
53495msgstr "<link xref=\"#asynccall\">날씨 정보 비동기 요청</link>"
53496
53497#. (itstool) path: item/p
53498#: C/weatherAppMain.js.page:28
53499msgid "<link xref=\"#connectingbuttons\">Connecting signals to button and entry</link>."
53500msgstr "<link xref=\"#connectingbuttons\">단추와 항목에 시그널 연결</link>."
53501
53502#. (itstool) path: item/p
53503#: C/weatherAppMain.js.page:29
53504msgid "<link xref=\"#weatherapp.js\">weatherapp.js</link>"
53505msgstr "<link xref=\"#weatherapp.js\">weatherapp.js</link>"
53506
53507#. (itstool) path: section/p
53508#: C/weatherAppMain.js.page:36
53509msgid ""
53510"This line tells how to run the script. It needs to be the first line of the code and it needs to be executable. To "
53511"get the execution rights go to Terminal and run in right folder: chmod +x scriptname. Or you can use the graphical "
53512"filemanager. Just go to the right folder where your code is, right click you code file, choose properties, click "
53513"the permissions tab and check the box for allow executing file as a program"
53514msgstr ""
53515"이 줄은 스크립트 실행 방법을 알려줍니다. 이 부분은 코드의 처음 부분에 들어가야하며, 스크립트 파일을 실행할 수 있어"
53516"야합니다. 실행 권한을 가져오려면 터미널을 열고 올바른 폴더에서 chmod +x scriptname 명령을 실행하십시오. 또는 그래"
53517"픽 파일 관리자를 활용할 수 있습니다. 코드가 있는 적절한 폴더에 들어가서 코드를 작성한 파일에 마우스 커서를 두고 오"
53518"른쪽 단추를 누른 다음, 속성, 권한 탭을 선택하시고 파일을 프로그램처럼 실행하도록 상자에 표시하십시오."
53519
53520#. (itstool) path: section/code
53521#: C/weatherAppMain.js.page:42
53522#, no-wrap
53523msgid ""
53524"\n"
53525"var Gtk = imports.gi.Gtk;\n"
53526"const WeatherService = imports.geonames;"
53527msgstr ""
53528"\n"
53529"var Gtk = imports.gi.Gtk;\n"
53530"const WeatherService = imports.geonames;"
53531
53532#. (itstool) path: section/p
53533#: C/weatherAppMain.js.page:45
53534msgid ""
53535"In order to have a working program we need to import a GObject Introspection -library to our use. For working UI, "
53536"we need Gtk. Gtk is imported in the beginning so we have it in our use everywhere. We also import our own local "
53537"JavaScript library geonames to our use here."
53538msgstr ""
53539"프로그램이 동작하려면 GObject 인트로스펙션 라이브러리를 가져와야합니다. UI를 동작하게 할 목적으로 Gtk가 필요합니"
53540"다. Gtk는 앞부분에서 임포팅해서 코드의 모든 곳에서 쓸 수 있습니다. 또한, 우리가 여기서 사용할 JavaScript geonames "
53541"자체 라이브러리를 임포티해야합니다."
53542
53543#. (itstool) path: section/code
53544#: C/weatherAppMain.js.page:50
53545#, no-wrap
53546msgid ""
53547"\n"
53548"// Initialize the gtk\n"
53549"Gtk.init(null, 0);\n"
53550"//create your window, name it and connect the x to quit function. Remember that window is a taken word\n"
53551"var weatherwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
53552"weatherwindow.title = \"Todays weather\";\n"
53553"//Window only accepts one widget and a title. Further structure with Gtk.boxes of similar\n"
53554"weatherwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
53555"\n"
53556"weatherwindow.show_all();\n"
53557"//and run it\n"
53558"Gtk.main();"
53559msgstr ""
53560"\n"
53561"// Initialize the gtk\n"
53562"Gtk.init(null, 0);\n"
53563"//create your window, name it and connect the x to quit function. Remember that window is a taken word\n"
53564"var weatherwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
53565"weatherwindow.title = \"Todays weather\";\n"
53566"//Window only accepts one widget and a title. Further structure with Gtk.boxes of similar\n"
53567"weatherwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
53568"\n"
53569"weatherwindow.show_all();\n"
53570"//and run it\n"
53571"Gtk.main();"
53572
53573#. (itstool) path: section/title
53574#: C/weatherAppMain.js.page:64
53575msgid "Adding a grid and all the necessary widgets to it"
53576msgstr "그리드를 추가하고 그리드에 필요한 모든 위젯을 넣으십시오"
53577
53578#. (itstool) path: section/code
53579#: C/weatherAppMain.js.page:65
53580#, no-wrap
53581msgid ""
53582"\n"
53583"var grid = new Gtk.Grid();\n"
53584"weatherwindow.add(grid);\n"
53585"\n"
53586"//We initialize the icon here, but deside the file later in geonames.js.\n"
53587"var weatherIcon = new Gtk.Image();\n"
53588"\n"
53589"//Set some labels to your window\n"
53590"var label1 = new Gtk.Label({label: \"\"});\n"
53591"var label2 = new Gtk.Label({label: \"Looking in the sky...\"});\n"
53592"var label3 = new Gtk.Label({label: \"\"});\n"
53593"\n"
53594"var entry = new Gtk.Entry();\n"
53595"entry.set_width_chars(4);\n"
53596"entry.set_max_length(4);\n"
53597"var label4 = new Gtk.Label({label: \"Enter ICAO station for weather: \"});\n"
53598"var button1 = new Gtk.Button({label: \"search!\"});\n"
53599"\n"
53600"grid.attach(label4, 2, 1, 1, 1);\n"
53601"grid.attach_next_to(label1,label4,3,1,1);\n"
53602"grid.attach_next_to(label2,label1,3,1,1);\n"
53603"grid.attach_next_to(label3,label2,3,1,1);\n"
53604"grid.attach_next_to(entry,label4,1,1,1);\n"
53605"grid.attach_next_to(button1,entry,1,1,1);\n"
53606"grid.attach_next_to(weatherIcon,label2,1,1,1)\n"
53607msgstr ""
53608"\n"
53609"var grid = new Gtk.Grid();\n"
53610"weatherwindow.add(grid);\n"
53611"\n"
53612"//We initialize the icon here, but deside the file later in geonames.js.\n"
53613"var weatherIcon = new Gtk.Image();\n"
53614"\n"
53615"//Set some labels to your window\n"
53616"var label1 = new Gtk.Label({label: \"\"});\n"
53617"var label2 = new Gtk.Label({label: \"Looking in the sky...\"});\n"
53618"var label3 = new Gtk.Label({label: \"\"});\n"
53619"\n"
53620"var entry = new Gtk.Entry();\n"
53621"entry.set_width_chars(4);\n"
53622"entry.set_max_length(4);\n"
53623"var label4 = new Gtk.Label({label: \"Enter ICAO station for weather: \"});\n"
53624"var button1 = new Gtk.Button({label: \"search!\"});\n"
53625"\n"
53626"grid.attach(label4, 2, 1, 1, 1);\n"
53627"grid.attach_next_to(label1,label4,3,1,1);\n"
53628"grid.attach_next_to(label2,label1,3,1,1);\n"
53629"grid.attach_next_to(label3,label2,3,1,1);\n"
53630"grid.attach_next_to(entry,label4,1,1,1);\n"
53631"grid.attach_next_to(button1,entry,1,1,1);\n"
53632"grid.attach_next_to(weatherIcon,label2,1,1,1)\n"
53633
53634#. (itstool) path: section/p
53635#: C/weatherAppMain.js.page:91
53636msgid ""
53637"In this section we create the grid we are going to use for positioning the widgets. All the buttons, labels and "
53638"entries are initialized and placed on the grid. As seen from the placing of the different widgets, they don't need "
53639"to be related only to one widget. At this point some of the labels don't have any content. The content for those "
53640"widgets is applied later. If you run the application at this stage, you have the UI ready, but the widgets are not "
53641"connected to anything. For this we need to first build the weather searching local library, and then get the "
53642"information we need asynchronously. When we have our local library ready we can connect it to the necessary "
53643"widgets."
53644msgstr ""
53645"여기서는 위젯을 적소에 배치할 때 활용할 그리드를 만들겠습니다. 모든 단추, 레이블, 항목을 초기화 하고 그리드에 배치"
53646"합니다. 각기 다른 위젯의 배치에서 보셨듯이 하나의 위젯에만 관계있는건 아닙니다. 여기서는 일부 레이블에는 어떤 내용"
53647"도 들어가지 않습니다. 이 위젯의 내용은 나중에 반영합니다. 프로그램을 이 단계에서 실행하면, UI를 준비한 상태이지만, "
53648"위젯은 그 어떤 요소와도 연결한 상태가 아닙니다. 여기서 날씨 검색 자체 라이브러리를 우선 만들고, 필요한 정보를 비동"
53649"기 방식으로 가져와야합니다. 자체 라이브러리를 준비하고 나면 필요한 위젯에 연결할 수 있습니다."
53650
53651#. (itstool) path: section/title
53652#: C/weatherAppMain.js.page:95
53653msgid "Requesting the weather information asynchronously"
53654msgstr "비동기 방식으로 날씨 정보 요청"
53655
53656#. (itstool) path: section/code
53657#: C/weatherAppMain.js.page:96
53658#, no-wrap
53659msgid ""
53660"\n"
53661"function getWeatherForStation() {\n"
53662"  var station = entry.get_text();\n"
53663"\n"
53664"  var GeoNames = new WeatherService.GeoNames(station); //\"EFHF\";\n"
53665"\n"
53666"  GeoNames.getWeather(function(error, weather) {\n"
53667"    //this here works bit like signals. This code will be run when we have weather.\n"
53668"    if (error) {\n"
53669"      label2.set_text(\"Suggested ICAO station does not exist Try EFHF\");\n"
53670"    return; }\n"
53671"    weatherIcon.file = GeoNames.getIcon(weather);\n"
53672"\n"
53673"    label1.set_text(\"Temperature is \" + weather.weatherObservation.temperature + \" degrees.\");\n"
53674"    if (weather.weatherObservation.weatherCondition !== \"n/a\"){\n"
53675"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.weatherCondition + \" in the sky.\");\n"
53676"      }\n"
53677"    else {\n"
53678"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.clouds + \" in the sky.\");\n"
53679"    }\n"
53680"    label3.set_text(\"Windspeed is \" + weather.weatherObservation.windSpeed + \" m/s\")\n"
53681"    // ...\n"
53682"  });\n"
53683"}\n"
53684msgstr ""
53685"\n"
53686"function getWeatherForStation() {\n"
53687"  var station = entry.get_text();\n"
53688"\n"
53689"  var GeoNames = new WeatherService.GeoNames(station); //\"EFHF\";\n"
53690"\n"
53691"  GeoNames.getWeather(function(error, weather) {\n"
53692"    //this here works bit like signals. This code will be run when we have weather.\n"
53693"    if (error) {\n"
53694"      label2.set_text(\"Suggested ICAO station does not exist Try EFHF\");\n"
53695"    return; }\n"
53696"    weatherIcon.file = GeoNames.getIcon(weather);\n"
53697"\n"
53698"    label1.set_text(\"Temperature is \" + weather.weatherObservation.temperature + \" degrees.\");\n"
53699"    if (weather.weatherObservation.weatherCondition !== \"n/a\"){\n"
53700"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.weatherCondition + \" in the sky.\");\n"
53701"      }\n"
53702"    else {\n"
53703"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.clouds + \" in the sky.\");\n"
53704"    }\n"
53705"    label3.set_text(\"Windspeed is \" + weather.weatherObservation.windSpeed + \" m/s\")\n"
53706"    // ...\n"
53707"  });\n"
53708"}\n"
53709
53710#. (itstool) path: section/p
53711#: C/weatherAppMain.js.page:121
53712msgid ""
53713"This function is dedicated for calling for the weather information and updating labels and icons accordingly. In "
53714"the beginning of the function we get the user input for the search. So here for the first time we use our own "
53715"library and assign it to variable GeoNames. While assigning WeatherService we give it the station. The firs thing "
53716"we do with GeoNames is to request weather. Everything after GeoNames.getWeather(function(error, weather) happens "
53717"only if we either get an error message or weather information. If either doesn't come, the rest of the program "
53718"works as normal, so main_Quit works."
53719msgstr ""
53720"이 함수는 날씨 정보를 호출하고 레이블과 아이콘을 즉시 업데이트하는 과정에 관여합니다. 함수 시작 부분을 보면 검색에 "
53721"필요한 사용자 입력을 가져옵니다. 따라서 여기서는 처음에 자체 라이브러리랄 활용하고 GeoNames 변수에 할당하겠습니다. "
53722"WeatherService를 할당하는 동안 기상대에 요청을 줍니다. GeoNames에 할 일은 날씨 정보 요청입니다. GeoNames."
53723"getWeather(function(error,weather))를 호출하고 난 다음 일은 오류 메시지를 받거나 날씨 정보를 받는 일만 있을 뿐입니"
53724"다. 두가지 경우가 모두 아닌 경우 프로그앰이 할 일은 그냥 평범하게 있을 때 와 동일하므로 main_Quit를 동작합니다."
53725
53726#. (itstool) path: section/title
53727#: C/weatherAppMain.js.page:125
53728msgid "Connecting signals to button and entry."
53729msgstr "단추와 항목에 시그널 연결."
53730
53731#. (itstool) path: section/code
53732#: C/weatherAppMain.js.page:126
53733#, no-wrap
53734msgid ""
53735"\n"
53736"entry.connect(\"key_press_event\", function(widget, event) {\n"
53737"  if (entry.get_text().length === 4) {\n"
53738"    // Enough is enough\n"
53739"    getWeatherForStation();\n"
53740"  }\n"
53741"  return false;\n"
53742"});\n"
53743"\n"
53744"button1.connect(\"clicked\", function(){\n"
53745"  getWeatherForStation();\n"
53746"});"
53747msgstr ""
53748"\n"
53749"entry.connect(\"key_press_event\", function(widget, event) {\n"
53750"  if (entry.get_text().length === 4) {\n"
53751"    // Enough is enough\n"
53752"    getWeatherForStation();\n"
53753"  }\n"
53754"  return false;\n"
53755"});\n"
53756"\n"
53757"button1.connect(\"clicked\", function(){\n"
53758"  getWeatherForStation();\n"
53759"});"
53760
53761#. (itstool) path: section/p
53762#: C/weatherAppMain.js.page:138
53763msgid ""
53764"And finally we have the connections that make the whole application run as it should. We connect both the entry "
53765"and the button to do the same thing, getting the weather. So it doesn't matter weather you press enter of click "
53766"the search button."
53767msgstr ""
53768"그리고 마지막으로 전체 프로그램이 돌아가도록 돌아가도록 연결하겠습니다. 항목과 단추를 동일한 방식으로 연결하여 날"
53769"씨 정보를 가져오겠습니다. 따라서 엔터키를 누르든 검색 단추를 누르든 상관 없이 동작합니다."
53770
53771#. (itstool) path: section/title
53772#: C/weatherAppMain.js.page:142
53773msgid "Weatherapp.js"
53774msgstr "Weatherapp.js"
53775
53776#. (itstool) path: section/p
53777#: C/weatherAppMain.js.page:143
53778msgid "Weatherapp.js file looks like this:"
53779msgstr "Weatherapp.js 파일의 내용은 다음과 같습니다:"
53780
53781#. (itstool) path: section/code
53782#: C/weatherAppMain.js.page:144
53783#, no-wrap
53784msgid ""
53785"\n"
53786"#!/usr/bin/gjs\n"
53787"//The previous line is a hash bang tells how to run the script.\n"
53788"// Note that the script has to be executable (run in terminal in the right folder: chmod +x scriptname)\n"
53789"\n"
53790"var Gtk = imports.gi.Gtk;\n"
53791"\n"
53792"const WeatherService = imports.geonames;\n"
53793"//Bring your own library from same folder (as set in GJS_PATH). If using autotools .desktop will take care of this\n"
53794"\n"
53795"// Initialize the gtk\n"
53796"Gtk.init(null, 0);\n"
53797"//create your window, name it and connect the x to quit function. Remember that window is a taken word\n"
53798"var weatherwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
53799"weatherwindow.title = \"Todays weather\";\n"
53800"//Window only accepts one widget and a title. Further structure with Gtk.boxes of similar\n"
53801"weatherwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
53802"//We initialize the icon here, but deside the file later in geonames.js.\n"
53803"\n"
53804"var weatherIcon = new Gtk.Image();\n"
53805"\n"
53806"//Set some labels to your window\n"
53807"var label1 = new Gtk.Label({label: \"\"});\n"
53808"var label2 = new Gtk.Label({label: \"Looking in the sky...\"});\n"
53809"var label3 = new Gtk.Label({label: \"\"});\n"
53810"\n"
53811"var grid = new Gtk.Grid();\n"
53812"weatherwindow.add(grid);\n"
53813"\n"
53814"var entry = new Gtk.Entry();\n"
53815"entry.set_width_chars(4);\n"
53816"entry.set_max_length(4);\n"
53817"var label4 = new Gtk.Label({label: \"Enter ICAO station for weather: \"});\n"
53818"var button1 = new Gtk.Button({label: \"search!\"});\n"
53819"\n"
53820"//some weather\n"
53821"\n"
53822"entry.connect(\"key_press_event\", function(widget, event) {\n"
53823"  // FIXME: Get weather on enter (key 13)\n"
53824"  if (entry.get_text().length === 4) {\n"
53825"    // Enough is enough\n"
53826"    getWeatherForStation();\n"
53827"  }\n"
53828"  return false;\n"
53829"});\n"
53830"\n"
53831"button1.connect(\"clicked\", function(){\n"
53832"  getWeatherForStation();\n"
53833"});\n"
53834"\n"
53835"function getWeatherForStation() {\n"
53836"  var station = entry.get_text();\n"
53837"\n"
53838"  var GeoNames = new WeatherService.GeoNames(station); //\"EFHF\";\n"
53839"\n"
53840"  GeoNames.getWeather(function(error, weather) {\n"
53841"    //this here works bit like signals. This code will be run when we have weather.\n"
53842"    if (error) {\n"
53843"      label2.set_text(\"Suggested ICAO station does not exist Try EFHF\");\n"
53844"    return; }\n"
53845"    weatherIcon.file = GeoNames.getIcon(weather);\n"
53846"\n"
53847"    label1.set_text(\"Temperature is \" + weather.weatherObservation.temperature + \" degrees.\");\n"
53848"    if (weather.weatherObservation.weatherCondition !== \"n/a\"){\n"
53849"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.weatherCondition + \" in the sky.\");\n"
53850"      }\n"
53851"    else {\n"
53852"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.clouds + \" in the sky.\");\n"
53853"    }\n"
53854"    label3.set_text(\"Windspeed is \" + weather.weatherObservation.windSpeed + \" m/s\")\n"
53855"    // ...\n"
53856"  });\n"
53857"}\n"
53858"\n"
53859"grid.attach(label4, 2, 1, 1, 1);\n"
53860"grid.attach_next_to(label1,label4,3,1,1);\n"
53861"grid.attach_next_to(label2,label1,3,1,1);\n"
53862"grid.attach_next_to(label3,label2,3,1,1);\n"
53863"grid.attach_next_to(entry,label4,1,1,1);\n"
53864"grid.attach_next_to(button1,entry,1,1,1);\n"
53865"grid.attach_next_to(weatherIcon,label2,1,1,1)\n"
53866"weatherwindow.show_all();\n"
53867"//and run it\n"
53868"Gtk.main();\n"
53869msgstr ""
53870"\n"
53871"#!/usr/bin/gjs\n"
53872"//The previous line is a hash bang tells how to run the script.\n"
53873"// Note that the script has to be executable (run in terminal in the right folder: chmod +x scriptname)\n"
53874"\n"
53875"var Gtk = imports.gi.Gtk;\n"
53876"\n"
53877"const WeatherService = imports.geonames;\n"
53878"//Bring your own library from same folder (as set in GJS_PATH). If using autotools .desktop will take care of this\n"
53879"\n"
53880"// Initialize the gtk\n"
53881"Gtk.init(null, 0);\n"
53882"//create your window, name it and connect the x to quit function. Remember that window is a taken word\n"
53883"var weatherwindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
53884"weatherwindow.title = \"Todays weather\";\n"
53885"//Window only accepts one widget and a title. Further structure with Gtk.boxes of similar\n"
53886"weatherwindow.connect(\"destroy\", function(){Gtk.main_quit()});\n"
53887"//We initialize the icon here, but deside the file later in geonames.js.\n"
53888"\n"
53889"var weatherIcon = new Gtk.Image();\n"
53890"\n"
53891"//Set some labels to your window\n"
53892"var label1 = new Gtk.Label({label: \"\"});\n"
53893"var label2 = new Gtk.Label({label: \"Looking in the sky...\"});\n"
53894"var label3 = new Gtk.Label({label: \"\"});\n"
53895"\n"
53896"var grid = new Gtk.Grid();\n"
53897"weatherwindow.add(grid);\n"
53898"\n"
53899"var entry = new Gtk.Entry();\n"
53900"entry.set_width_chars(4);\n"
53901"entry.set_max_length(4);\n"
53902"var label4 = new Gtk.Label({label: \"Enter ICAO station for weather: \"});\n"
53903"var button1 = new Gtk.Button({label: \"search!\"});\n"
53904"\n"
53905"//some weather\n"
53906"\n"
53907"entry.connect(\"key_press_event\", function(widget, event) {\n"
53908"  // FIXME: Get weather on enter (key 13)\n"
53909"  if (entry.get_text().length === 4) {\n"
53910"    // Enough is enough\n"
53911"    getWeatherForStation();\n"
53912"  }\n"
53913"  return false;\n"
53914"});\n"
53915"\n"
53916"button1.connect(\"clicked\", function(){\n"
53917"  getWeatherForStation();\n"
53918"});\n"
53919"\n"
53920"function getWeatherForStation() {\n"
53921"  var station = entry.get_text();\n"
53922"\n"
53923"  var GeoNames = new WeatherService.GeoNames(station); //\"EFHF\";\n"
53924"\n"
53925"  GeoNames.getWeather(function(error, weather) {\n"
53926"    //this here works bit like signals. This code will be run when we have weather.\n"
53927"    if (error) {\n"
53928"      label2.set_text(\"Suggested ICAO station does not exist Try EFHF\");\n"
53929"    return; }\n"
53930"    weatherIcon.file = GeoNames.getIcon(weather);\n"
53931"\n"
53932"    label1.set_text(\"Temperature is \" + weather.weatherObservation.temperature + \" degrees.\");\n"
53933"    if (weather.weatherObservation.weatherCondition !== \"n/a\"){\n"
53934"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.weatherCondition + \" in the sky.\");\n"
53935"      }\n"
53936"    else {\n"
53937"      label2.set_text(\"Looks like there is \" + weather.weatherObservation.clouds + \" in the sky.\");\n"
53938"    }\n"
53939"    label3.set_text(\"Windspeed is \" + weather.weatherObservation.windSpeed + \" m/s\")\n"
53940"    // ...\n"
53941"  });\n"
53942"}\n"
53943"\n"
53944"grid.attach(label4, 2, 1, 1, 1);\n"
53945"grid.attach_next_to(label1,label4,3,1,1);\n"
53946"grid.attach_next_to(label2,label1,3,1,1);\n"
53947"grid.attach_next_to(label3,label2,3,1,1);\n"
53948"grid.attach_next_to(entry,label4,1,1,1);\n"
53949"grid.attach_next_to(button1,entry,1,1,1);\n"
53950"grid.attach_next_to(weatherIcon,label2,1,1,1)\n"
53951"weatherwindow.show_all();\n"
53952"//and run it\n"
53953"Gtk.main();\n"
53954
53955#. (itstool) path: section/p
53956#: C/weatherAppMain.js.page:229
53957msgid "Running until you have all the autotools files ready. :"
53958msgstr "모든 autotool 파일을 준비하기 전까지 실행합니다:"
53959
53960#. (itstool) path: section/screen
53961#: C/weatherAppMain.js.page:231
53962#, no-wrap
53963msgid " <output style=\"prompt\">$ </output><input> GJS_PATH=`pwd` gjs weatherapp.js</input>"
53964msgstr " <output style=\"prompt\">$ </output><input> GJS_PATH=`pwd` gjs weatherapp.js</input>"
53965
53966#. (itstool) path: section/p
53967#: C/weatherAppMain.js.page:232
53968msgid ""
53969"Use this command on terminal while developing your modules. When calling your program in this manner it knows "
53970"where to find your custom JSlibraries, in this case geonames.js."
53971msgstr ""
53972"모듈을 개발하는 동안에는 터미널에서 이 명령을 사용하십시오. 프로그램을 이 방식으로 호출할 때, 프로그램에서 개별 JS "
53973"라이브러리 위치를 파악합니다. 이 경우는 geonames.js 입니다."
53974
53975#. (itstool) path: page/title
53976#: C/weatherAutotools.js.page:19
53977msgid "Autotools and Icons"
53978msgstr "Autotool과 아이콘"
53979
53980#. (itstool) path: synopsis/p
53981#: C/weatherAutotools.js.page:21
53982msgid ""
53983"In this part of the guide well construct the autotools and custom icons needed for weather application to be a "
53984"seamless part of your desktop. To write and run all the code examples yourself, you need an editor to write code "
53985"in, Terminal and GNOME 3 or higher installed into your computer. In this guide we we'll go through the following "
53986"parts:"
53987msgstr ""
53988"안내서의 이 부분에서는 날씨 프로그램에서 필요한 autotool와 데스크톱에서 감쪽같이 보일 개별아이콘을 구성하도록 하겠"
53989"습니다. 여러분 스스로가 모든 코드 예제를 작성하고 실행할 때는 코드를 작성할 편집기, 터미널, 그놈 3 이상을 컴퓨터에 "
53990"설치해야 합니다. 이 안내서에서는 다음 내용을 진행하겠습니다:"
53991
53992#. (itstool) path: item/p
53993#: C/weatherAutotools.js.page:24
53994msgid "<link xref=\"#autotools\"> Autotools</link>"
53995msgstr "<link xref=\"#autotools\"> Autotools</link>"
53996
53997#. (itstool) path: item/p
53998#: C/weatherAutotools.js.page:25
53999msgid "<link xref=\"#icons\">Custom icons for your application</link>"
54000msgstr "<link xref=\"#icons\">프로그램에 넣을 개별 아이콘</link>"
54001
54002#. (itstool) path: section/title
54003#: C/weatherAutotools.js.page:32
54004msgid "Autotools and necessary files"
54005msgstr "Autotools와 필요한 파일"
54006
54007#. (itstool) path: section/p
54008#: C/weatherAutotools.js.page:33
54009msgid ""
54010"Having more than one file in your folder makes using autotools a bit tricky. You need the .desktop file, autogen."
54011"sh, Makefile.am, configure.ac and as a new file: myapp.sh.in file. Hacking the autotools file is a complicated "
54012"field. More information can be found in many different sources, <link href=\"http://en.wikipedia.org/wiki/"
54013"GNU_build_system\">the Wikipedia article</link> provides a good overview on the subject."
54014msgstr ""
54015"autotools로 폴더에 여러 파일을 넣는건 조금 어렵습니다. .desktop 파일, autogen.sh, Makefile.am, configure.ac, 새 "
54016"myapp.sh.in 파일이 필요합니다. autotool 파일을 뜯어보는건 좀 복잡한 부분입니다. 자세한 내용은 여러 곳에서 찾아볼 "
54017"수 있는데, <link href=\"http://en.wikipedia.org/wiki/GNU_build_system\">위키피디아 글</link>이 내용을 살펴보기에 좋"
54018"습니다."
54019
54020#. (itstool) path: item/p
54021#. (itstool) path: section/p
54022#: C/weatherAutotools.js.page:36 C/weatherAutotools.js.page:42
54023msgid "weatherapp.desktop"
54024msgstr "weatherapp.desktop"
54025
54026#. (itstool) path: item/p
54027#. (itstool) path: section/p
54028#: C/weatherAutotools.js.page:37 C/weatherAutotools.js.page:57
54029msgid "weatherapp.sh.in"
54030msgstr "weatherapp.sh.in"
54031
54032#. (itstool) path: section/code
54033#: C/weatherAutotools.js.page:43
54034#, no-wrap
54035msgid ""
54036"\n"
54037"[Desktop Entry]\n"
54038"Version=1.0\n"
54039"Encoding=UTF-8\n"
54040"Name=Weather app\n"
54041"Comment=Weather showing application\n"
54042"Exec=weatherapp.sh\n"
54043"Icon=application-default-icon\n"
54044"Terminal=false\n"
54045"Type=Application\n"
54046"StartupNotify=true\n"
54047"Categories=GNOME;GTK;Utility;"
54048msgstr ""
54049"\n"
54050"[Desktop Entry]\n"
54051"Version=1.0\n"
54052"Encoding=UTF-8\n"
54053"Name=Weather app\n"
54054"Comment=Weather showing application\n"
54055"Exec=weatherapp.sh\n"
54056"Icon=application-default-icon\n"
54057"Terminal=false\n"
54058"Type=Application\n"
54059"StartupNotify=true\n"
54060"Categories=GNOME;GTK;Utility;"
54061
54062#. (itstool) path: section/p
54063#: C/weatherAutotools.js.page:55
54064msgid ""
54065"The thing to notice in this file is that the Exec line will make this .desktop file work only after running all "
54066"the other makefiles. Weatherapp.sh is a small shell script created with the weatherapp.sh.in."
54067msgstr ""
54068"이 파일에서 주목해 볼 부분은, 다른 makefile을 실행한 다음에야 .desktop 파일을 동작하게 하는 Exec 줄 부분입니다. "
54069"Weatherapp.shweatherapp.sh.in에서 만든 작은 쉘 스크립트입니다."
54070
54071#. (itstool) path: section/code
54072#: C/weatherAutotools.js.page:58
54073#, no-wrap
54074msgid ""
54075"\n"
54076"#!/bin/sh\n"
54077"export GJS_PATH=@bindir@\n"
54078"gjs @bindir@/weatherapp.js"
54079msgstr ""
54080"\n"
54081"#!/bin/sh\n"
54082"export GJS_PATH=@bindir@\n"
54083"gjs @bindir@/weatherapp.js"
54084
54085#. (itstool) path: section/p
54086#: C/weatherAutotools.js.page:62
54087msgid "This file is a template to the file Makefile will do to be run from .desktop."
54088msgstr "이 파일은 Makefile 파일을 통해 .desktop 파일로 실행하도록 하는 서식입니다."
54089
54090#. (itstool) path: section/code
54091#: C/weatherAutotools.js.page:65
54092#, no-wrap
54093msgid ""
54094"\n"
54095"# The actual runnable program is set to the SCRIPTS primitive. Prefix bin_ tells where to copy this\n"
54096"bin_SCRIPTS = weatherapp.js geonames.js weatherapp.sh\n"
54097"# List of files to be distributed\n"
54098"EXTRA_DIST=  \\\n"
54099"    $(bin_SCRIPTS) \\\n"
54100"    $(private_icons)\t\\\n"
54101"\t  $(NULL)\n"
54102"\n"
54103"CLEANFILES =\n"
54104"\n"
54105"# The desktop files\n"
54106"desktopdir = $(datadir)/applications\n"
54107"desktop_DATA =weatherapp.desktop\n"
54108"\n"
54109"# convenience command for doing Makefile variable substitutions in non-Makefile\n"
54110"# files (scripts, service files, etc.)\n"
54111"do_subst = sed -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \\\n"
54112"               -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \\\n"
54113"               -e 's|@localedir[@]|$(localedir)|g' \\\n"
54114"               -e 's|@bindir[@]|$(bindir)|g' \\\n"
54115"               -e 's|@libexecdir[@]|$(libexecdir)|g' \\\n"
54116"\t       -e 's|@pkglibdir[@]|$(pkglibdir)|g' \\\n"
54117"\t       -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \\\n"
54118"\t       -e 's|@have_libnotify[@]|$(HAVE_LIBNOTIFY)|g' \\\n"
54119"\t       -e 's|@have_libsoup[@]|$(HAVE_LIBSOUP)|g' \\\n"
54120"\t       -e 's|@have_cheese[@]|$(HAVE_CHEESE)|g'\n"
54121"\n"
54122"weatherapp.sh: weatherapp.sh.in\n"
54123"\t$(AM_V_GEN) $(do_subst) $&lt; &gt; $@\n"
54124"\tchmod +x $@\n"
54125"\n"
54126"CLEANFILES += weatherapp.sh\n"
54127"EXTRA_DIST += weatherapp.sh.in\n"
54128"\n"
54129"#the application icon\n"
54130"appicondir=$(datadir)/icons/hicolor/scalable/apps\n"
54131"appicon_DATA=weather-icon.svg\n"
54132"\n"
54133"#icons in the application\n"
54134"NULL =\n"
54135"\n"
54136"private_icons = \\\n"
54137"\tweather-clear.svg \\\n"
54138"  weather-few-clouds.svg \\\n"
54139"  weather-fog.svg \\\n"
54140"  weather-icon.svg \\\n"
54141"  weather-overcast.svg \\\n"
54142"  weather-showers.svg \\\n"
54143"  weather-showers-scattered.svg \\\n"
54144"  weather-snow.svg \\\n"
54145"  $(NULL)\n"
54146"\n"
54147"install-icons:\n"
54148"\tfor icon in $(private_icons); do \\\n"
54149"\t\tmkdir -p $(DESTDIR)$(pkgdatadir)/icons/; \\\n"
54150"\t\t$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/icons/; \\\n"
54151"\tdone\n"
54152"\n"
54153"install-data-local: install-icons"
54154msgstr ""
54155"\n"
54156"# The actual runnable program is set to the SCRIPTS primitive. Prefix bin_ tells where to copy this\n"
54157"bin_SCRIPTS = weatherapp.js geonames.js weatherapp.sh\n"
54158"# List of files to be distributed\n"
54159"EXTRA_DIST=  \\\n"
54160"    $(bin_SCRIPTS) \\\n"
54161"    $(private_icons)\t\\\n"
54162"\t  $(NULL)\n"
54163"\n"
54164"CLEANFILES =\n"
54165"\n"
54166"# The desktop files\n"
54167"desktopdir = $(datadir)/applications\n"
54168"desktop_DATA =weatherapp.desktop\n"
54169"\n"
54170"# convenience command for doing Makefile variable substitutions in non-Makefile\n"
54171"# files (scripts, service files, etc.)\n"
54172"do_subst = sed -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \\\n"
54173"               -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \\\n"
54174"               -e 's|@localedir[@]|$(localedir)|g' \\\n"
54175"               -e 's|@bindir[@]|$(bindir)|g' \\\n"
54176"               -e 's|@libexecdir[@]|$(libexecdir)|g' \\\n"
54177"\t       -e 's|@pkglibdir[@]|$(pkglibdir)|g' \\\n"
54178"\t       -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \\\n"
54179"\t       -e 's|@have_libnotify[@]|$(HAVE_LIBNOTIFY)|g' \\\n"
54180"\t       -e 's|@have_libsoup[@]|$(HAVE_LIBSOUP)|g' \\\n"
54181"\t       -e 's|@have_cheese[@]|$(HAVE_CHEESE)|g'\n"
54182"\n"
54183"weatherapp.sh: weatherapp.sh.in\n"
54184"\t$(AM_V_GEN) $(do_subst) $&lt; &gt; $@\n"
54185"\tchmod +x $@\n"
54186"\n"
54187"CLEANFILES += weatherapp.sh\n"
54188"EXTRA_DIST += weatherapp.sh.in\n"
54189"\n"
54190"#the application icon\n"
54191"appicondir=$(datadir)/icons/hicolor/scalable/apps\n"
54192"appicon_DATA=weather-icon.svg\n"
54193"\n"
54194"#icons in the application\n"
54195"NULL =\n"
54196"\n"
54197"private_icons = \\\n"
54198"\tweather-clear.svg \\\n"
54199"  weather-few-clouds.svg \\\n"
54200"  weather-fog.svg \\\n"
54201"  weather-icon.svg \\\n"
54202"  weather-overcast.svg \\\n"
54203"  weather-showers.svg \\\n"
54204"  weather-showers-scattered.svg \\\n"
54205"  weather-snow.svg \\\n"
54206"  $(NULL)\n"
54207"\n"
54208"install-icons:\n"
54209"\tfor icon in $(private_icons); do \\\n"
54210"\t\tmkdir -p $(DESTDIR)$(pkgdatadir)/icons/; \\\n"
54211"\t\t$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/icons/; \\\n"
54212"\tdone\n"
54213"\n"
54214"install-data-local: install-icons"
54215
54216#. (itstool) path: section/p
54217#: C/weatherAutotools.js.page:125
54218msgid ""
54219"This needs a bit more explaining. Compared to the HelloWorld Makefile.am this has changed quite a bit. Lets go "
54220"through all the new blocks:"
54221msgstr ""
54222"더 많은 설명이 필요합니다. HelloWorld Makefile.am과 비교하여 약간 바뀌었을 뿐입니다. 새 블록 부분을 살펴보겠습니다:"
54223
54224#. (itstool) path: section/p
54225#: C/weatherAutotools.js.page:126
54226msgid ""
54227"bin_scripts are the files that are needed to run your application. In thin case they are the first two files are "
54228"the program itself and the third is the script that launches the application."
54229msgstr ""
54230"bin_scripts는 프로그램을 실행하는데 필요한 파일입니다. 이 경우 처음 두 파일은 프로그램 그 자체이며, 세번째는 프로그"
54231"램을 실행하는 스크립트입니다."
54232
54233#. (itstool) path: section/p
54234#: C/weatherAutotools.js.page:127
54235msgid "EXTRA_DIST are the files that are to be distributed"
54236msgstr "EXTRA_DIST는 배포할 파일 목록입니다"
54237
54238#. (itstool) path: section/p
54239#: C/weatherAutotools.js.page:128
54240msgid "do_subst block is bits and pieces that need to be where they are"
54241msgstr "du_subst 블록은 각 파일이 각각 어디에 있어야 하는지 나타내는 부분입니다"
54242
54243#. (itstool) path: section/p
54244#: C/weatherAutotools.js.page:129
54245msgid ""
54246"after the comment #icons in the application there are all the icons that are used by the program. For them to be "
54247"useful you need to install the icons in correct places and that is done by the install-icons: bit"
54248msgstr ""
54249"#icons in the application 주석 다음에는 프로그램에서 활용할 아이콘이 있습니다. 이 항목을 쓸 수 있으려면 아이콘을 올"
54250"바른 위치에 설치해야 하는데, 이 과정은 install-icons: 부분에서 처리할 수 있습니다"
54251
54252#. (itstool) path: section/code
54253#: C/weatherAutotools.js.page:132
54254#, no-wrap
54255msgid ""
54256"\n"
54257"dnl This file is processed by autoconf to create a configure script\n"
54258"AC_INIT([Weather App], 1.0)\n"
54259"AM_INIT_AUTOMAKE([1.10 no-define foreign])\n"
54260"AC_CONFIG_FILES(Makefile)\n"
54261"AC_OUTPUT"
54262msgstr ""
54263"\n"
54264"dnl This file is processed by autoconf to create a configure script\n"
54265"AC_INIT([Weather App], 1.0)\n"
54266"AM_INIT_AUTOMAKE([1.10 no-define foreign])\n"
54267"AC_CONFIG_FILES(Makefile)\n"
54268"AC_OUTPUT"
54269
54270#. (itstool) path: section/code
54271#: C/weatherAutotools.js.page:139
54272#, no-wrap
54273msgid ""
54274"\n"
54275"#!/bin/sh\n"
54276"# This will run autoconf, automake, etc. for us\n"
54277"autoreconf --force --install"
54278msgstr ""
54279"\n"
54280"#!/bin/sh\n"
54281"# This will run autoconf, automake, etc. for us\n"
54282"autoreconf --force --install"
54283
54284#. (itstool) path: section/title
54285#: C/weatherAutotools.js.page:145
54286msgid "Custom icons for your application"
54287msgstr "프로그램 개별 아이콘"
54288
54289#. (itstool) path: section/p
54290#: C/weatherAutotools.js.page:146
54291msgid ""
54292"When thinking about custom icons a good rule of thumb is: do you expect to see that icon used elsewhere or is it "
54293"private to your app? If the first (e.g. the icons in the desktop file that are shown by the shell) then you need /"
54294"usr/share/hicolor, otherwise (e.g. the weather icons of your app) /usr/share/$application/bla/bla"
54295msgstr ""
54296"개별 아이콘에 대해 생각할 때 경험상 최고의 방법은 아이콘을 다른 곳에서도 쓸 지, 앱 그 자체로만 한정할 것인지에 대"
54297"한 고려입니다. 전자라면(쉘에서 나타나는 desktop 파일의 아이콘) /usr/share/hicolor에 넣어야 하고, 그렇지 않으면(여러"
54298"분 혼자 쓰는 앱의 날씨 아이콘) /usr/share/$application/bla/bla 같은 곳에 넣으면 됩니다"
54299
54300#. (itstool) path: section/p
54301#: C/weatherAutotools.js.page:147
54302msgid ""
54303"Using autotools you have to make some changes to your .desktop and Makefile.am files. In the desktop file you "
54304"change the Icon's name Icon=weather-icon. In the Makefile.am file you add these two lines to the end of your "
54305"application #the application icon"
54306msgstr ""
54307"autotools를 활용하면 .desktop 파일과 Makefile.am 파일을 약간 바꿔야합니다. desktop 파일에는 Icon=weather-icon으로 "
54308"아이콘 이름을 바꿔주십시오. Makefile.am 파일에는 #the application icon을 적고 그 아래에 다음 두 줄을 넣으십시오"
54309
54310#. (itstool) path: section/p
54311#: C/weatherAutotools.js.page:148
54312msgid "appicondir=$(datadir)/icons/hicolor/scalable/apps"
54313msgstr "appicondir=$(datadir)/icons/hicolor/scalable/apps"
54314
54315#. (itstool) path: section/p
54316#: C/weatherAutotools.js.page:149
54317msgid "appicon_DATA=weather-icon.svg"
54318msgstr "appicon_DATA=weather-icon.svg"
54319
54320#. (itstool) path: page/title
54321#: C/weatherGeonames.js.page:19
54322msgid "Local library geoNames"
54323msgstr "로컬 라이브러리 geoName"
54324
54325#. (itstool) path: synopsis/p
54326#: C/weatherGeonames.js.page:21
54327msgid ""
54328"In this part of the guide we'll construct the local library geoNames using asynchronous calls. Weather information "
54329"in this example is fetched from geonames.org and the application is using the <link href=\"http://en.wikipedia.org/"
54330"wiki/List_of_airports_by_ICAO_code:_E\">ICAO codes </link> to place your weather request. To write and run all the "
54331"code examples yourself, you need an editor to write code in, Terminal and GNOME 3 or higher installed into your "
54332"computer. In this guide we'll go through the following parts:"
54333msgstr ""
54334"안내서의 이 부분에서는 비동기 호출을 활용하여 로컬 라이브러리 geoNames를 만듭니다. 이 예제의 날씨 정보는 geonames."
54335"org에서 가져오며, 프로그램에서 날씨 정보를 요청할 때 <link href=\"http://en.wikipedia.org/wiki/"
54336"List_of_airports_by_ICAO_code:_E\">ICAO codes</link>를 활용합니다. 모든 코드 예제를 여러분 스스로 작성하고 실행하라"
54337"면 코드를 작성해넣을 편집기, 터미널, 그놈 3 이상을 컴퓨터에 설치해야 합니다. 이 안내서에서는 다음 내용을 진행합니"
54338"다:"
54339
54340#. (itstool) path: item/p
54341#: C/weatherGeonames.js.page:24
54342msgid "<link xref=\"#geonamesimports\">Local library for getting the weather</link>"
54343msgstr "<link xref=\"#geonamesimports\">날씨 정보를 가져올 자체 라이브러리</link>"
54344
54345#. (itstool) path: item/p
54346#: C/weatherGeonames.js.page:25
54347msgid "<link xref=\"#geonamesfunction\">Creating function geoNames</link>"
54348msgstr "<link xref=\"#geonamesfunction\">geoNames용 함수 만들기</link>"
54349
54350#. (itstool) path: item/p
54351#: C/weatherGeonames.js.page:26
54352msgid "<link xref=\"#geonamesmethods\">Methods for geoNames</link>"
54353msgstr "<link xref=\"#geonamesmethods\">geoNames용 메서드</link>"
54354
54355#. (itstool) path: item/p
54356#: C/weatherGeonames.js.page:27
54357msgid "<link xref=\"#geonames.js\">geonames.js </link>"
54358msgstr "<link xref=\"#geonames.js\">geonames.js </link>"
54359
54360#. (itstool) path: section/title
54361#: C/weatherGeonames.js.page:32
54362msgid "Local library for getting the weather"
54363msgstr "날씨 정보를 가져오는 자체 라이브러리"
54364
54365#. (itstool) path: section/p
54366#: C/weatherGeonames.js.page:33
54367msgid "For this we need a new file that will be our local library."
54368msgstr "이 동작을 처리할 때 로컬 라이브러리로 쓸 새 파일이 필요합니다."
54369
54370#. (itstool) path: section/code
54371#: C/weatherGeonames.js.page:34
54372#, no-wrap
54373msgid ""
54374"\n"
54375"const Soup = imports.gi.Soup;\n"
54376"const _httpSession = new Soup.SessionAsync();\n"
54377"Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());\n"
54378msgstr ""
54379"\n"
54380"const Soup = imports.gi.Soup;\n"
54381"const _httpSession = new Soup.SessionAsync();\n"
54382"Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());\n"
54383
54384#. (itstool) path: section/p
54385#: C/weatherGeonames.js.page:39
54386msgid ""
54387"In the first lines we'll import and initialize the libraries we need to use in this local library. Soup handles "
54388"all the requests we have to make with http."
54389msgstr ""
54390"첫번째 줄에는 로컬 라이브러리에서 필요한 라이브러리를 가져오고 초기화 합니다. Soup는 모든 http 요청을 처리합니다."
54391
54392#. (itstool) path: section/title
54393#: C/weatherGeonames.js.page:43
54394msgid "Creating function GeoNames"
54395msgstr "GeoNames 함수 만들기"
54396
54397#. (itstool) path: section/code
54398#: C/weatherGeonames.js.page:44
54399#, no-wrap
54400msgid ""
54401"\n"
54402"function GeoNames(station) {\n"
54403"  this.station = station;\n"
54404"}\n"
54405"\n"
54406"GeoNames.prototype = {\n"
54407"\n"
54408"}\n"
54409msgstr ""
54410"\n"
54411"function GeoNames(station) {\n"
54412"  this.station = station;\n"
54413"}\n"
54414"\n"
54415"GeoNames.prototype = {\n"
54416"\n"
54417"}\n"
54418
54419#. (itstool) path: section/p
54420#: C/weatherGeonames.js.page:53
54421msgid ""
54422"Here we create the function GeoNames that will handle getting weather for us. JavaScript allows us to create "
54423"functions that have little inside at first and later expand them. This will be done inside the GeoNames.prototype "
54424"curly braces{}"
54425msgstr ""
54426"날씨를 가져올 때 처리할 GeoNames 함수를 만들었습니다. JavaScript에서는 일단 안에 넣고 나중에 확장할 함수를 만들 수 "
54427"있습니다. GeoNames.prototyle 중괄호 안에 넣으면 됩니다."
54428
54429#. (itstool) path: section/title
54430#: C/weatherGeonames.js.page:57
54431msgid "Methods for GeoNames"
54432msgstr "GeoNames용 메서드"
54433
54434#. (itstool) path: section/code
54435#: C/weatherGeonames.js.page:58
54436#, no-wrap
54437msgid ""
54438"\n"
54439"getWeather: function(callback) {\n"
54440"    var request = Soup.Message.new('GET', 'http://api.geonames.org/weatherIcaoJSON?ICAO=' + this.station + '&amp;username=demo');\n"
54441"    _httpSession.queue_message(request, function(_httpSession, message) {\n"
54442"      if (message.status_code !== 200) {\n"
54443"        callback(message.status_code, null);\n"
54444"        return;\n"
54445"      }\n"
54446"      var weatherJSON = request.response_body.data;\n"
54447"      var weather = JSON.parse(weatherJSON);\n"
54448"      callback(null, weather);\n"
54449"      });\n"
54450"},\n"
54451"\n"
54452"getIcon: function(weather){\n"
54453"    switch (weather.weatherObservation.weatherCondition){\n"
54454"    case \"drizzle\":\n"
54455"    case \"light showers rain\":\n"
54456"    case \"light rain\":\n"
54457"      return \"weather-showers-scattered.svg\";\n"
54458"    case \"rain\":\n"
54459"      return \"weather-showers.svg\";\n"
54460"    case \"light snow\":\n"
54461"    case \"snow grains\":\n"
54462"      return \"weather-snow.svg\";\n"
54463"    }\n"
54464"    switch (weather.weatherObservation.clouds){\n"
54465"      case \"few clouds\":\n"
54466"      case \"scattered clouds\":\n"
54467"        return \"weather-few-clouds.svg\";\n"
54468"      case \"clear sky\":\n"
54469"        return \"weather-clear.svg\"\n"
54470"      case \"broken clouds\":\n"
54471"      case \"overcast\":\n"
54472"        return \"weather-overcast.svg\";\n"
54473"    }\n"
54474"    return \"weather-fog.svg\";\n"
54475"}\n"
54476msgstr ""
54477"\n"
54478"getWeather: function(callback) {\n"
54479"    var request = Soup.Message.new('GET', 'http://api.geonames.org/weatherIcaoJSON?ICAO=' + this.station + '&amp;username=demo');\n"
54480"    _httpSession.queue_message(request, function(_httpSession, message) {\n"
54481"      if (message.status_code !== 200) {\n"
54482"        callback(message.status_code, null);\n"
54483"        return;\n"
54484"      }\n"
54485"      var weatherJSON = request.response_body.data;\n"
54486"      var weather = JSON.parse(weatherJSON);\n"
54487"      callback(null, weather);\n"
54488"      });\n"
54489"},\n"
54490"\n"
54491"getIcon: function(weather){\n"
54492"    switch (weather.weatherObservation.weatherCondition){\n"
54493"    case \"drizzle\":\n"
54494"    case \"light showers rain\":\n"
54495"    case \"light rain\":\n"
54496"      return \"weather-showers-scattered.svg\";\n"
54497"    case \"rain\":\n"
54498"      return \"weather-showers.svg\";\n"
54499"    case \"light snow\":\n"
54500"    case \"snow grains\":\n"
54501"      return \"weather-snow.svg\";\n"
54502"    }\n"
54503"    switch (weather.weatherObservation.clouds){\n"
54504"      case \"few clouds\":\n"
54505"      case \"scattered clouds\":\n"
54506"        return \"weather-few-clouds.svg\";\n"
54507"      case \"clear sky\":\n"
54508"        return \"weather-clear.svg\"\n"
54509"      case \"broken clouds\":\n"
54510"      case \"overcast\":\n"
54511"        return \"weather-overcast.svg\";\n"
54512"    }\n"
54513"    return \"weather-fog.svg\";\n"
54514"}\n"
54515
54516#. (itstool) path: section/p
54517#: C/weatherGeonames.js.page:97
54518msgid ""
54519"The first method for GeoNames is getWeather and the second getIcon. In getWeather we make a http request with "
54520"soup, handle errors and then parse the information from the request to form we can use it. In getIcon we simply "
54521"compare the results we got from getWeather to the switch we have in order to get the icon matching current "
54522"weather. Now that we have our local library ready, it's time to make use of it."
54523msgstr ""
54524"GeoNames의 첫 메서드는 getWeather와 getIcon입니다. getWeather에서 Soup로 http 요청, 오류를 처리하며, 요청의 응답으"
54525"로 온 정보를 우리가 사용할 수 있는 모양새로 해석합니다. getIcon에서는 getWeather에서 가져온 결과를 비교하여 현재 날"
54526"씨와 일치하는 아이콘 결과를 가져옵니다. 이제 준비한 로컬 라이브러리가 있으니 쓸 수 있게 만들 시간입니다."
54527
54528#. (itstool) path: section/title
54529#: C/weatherGeonames.js.page:102
54530msgid "geonames.js"
54531msgstr "geonames.js"
54532
54533#. (itstool) path: section/p
54534#: C/weatherGeonames.js.page:103
54535msgid "Here is the entire code for our local library. The main program file calls this asynchronously."
54536msgstr "로컬 라이브러리 전체 코드입니다. 주 프로그램 파일에서는 비동기 방식으로 호출합니다."
54537
54538#. (itstool) path: section/code
54539#: C/weatherGeonames.js.page:104
54540#, no-wrap
54541msgid ""
54542"\n"
54543"const Soup = imports.gi.Soup;\n"
54544"const _httpSession = new Soup.SessionAsync();\n"
54545"Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());\n"
54546"\n"
54547"function GeoNames(station) {\n"
54548"  this.station = station;\n"
54549"}\n"
54550"\n"
54551"GeoNames.prototype = {\n"
54552"  getWeather: function(callback) {\n"
54553"    var request = Soup.Message.new('GET', 'http://api.geonames.org/weatherIcaoJSON?ICAO=' + this.station + '&amp;username=demo');\n"
54554"    _httpSession.queue_message(request, function(_httpSession, message) {\n"
54555"      if (message.status_code !== 200) {\n"
54556"        callback(message.status_code, null);\n"
54557"        return;\n"
54558"      }\n"
54559"      var weatherJSON = request.response_body.data;\n"
54560"      var weather = JSON.parse(weatherJSON);\n"
54561"      callback(null, weather);\n"
54562"      });\n"
54563"    },\n"
54564"\n"
54565"  getIcon: function(weather){\n"
54566"    switch (weather.weatherObservation.weatherCondition){\n"
54567"    case \"drizzle\":\n"
54568"    case \"light showers rain\":\n"
54569"    case \"light rain\":\n"
54570"      return \"weather-showers-scattered.svg\";\n"
54571"    case \"rain\":\n"
54572"      return \"weather-showers.svg\";\n"
54573"    case \"light snow\":\n"
54574"    case \"snow grains\":\n"
54575"      return \"weather-snow.svg\";\n"
54576"    }\n"
54577"    switch (weather.weatherObservation.clouds){\n"
54578"      case \"few clouds\":\n"
54579"      case \"scattered clouds\":\n"
54580"        return \"weather-few-clouds.svg\";\n"
54581"      case \"clear sky\":\n"
54582"        return \"weather-clear.svg\"\n"
54583"      case \"broken clouds\":\n"
54584"      case \"overcast\":\n"
54585"        return \"weather-overcast.svg\";\n"
54586"    }\n"
54587"    return \"weather-fog.svg\";\n"
54588"    }\n"
54589"}\n"
54590"}  "
54591msgstr ""
54592"\n"
54593"const Soup = imports.gi.Soup;\n"
54594"const _httpSession = new Soup.SessionAsync();\n"
54595"Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());\n"
54596"\n"
54597"function GeoNames(station) {\n"
54598"  this.station = station;\n"
54599"}\n"
54600"\n"
54601"GeoNames.prototype = {\n"
54602"  getWeather: function(callback) {\n"
54603"    var request = Soup.Message.new('GET', 'http://api.geonames.org/weatherIcaoJSON?ICAO=' + this.station + '&amp;username=demo');\n"
54604"    _httpSession.queue_message(request, function(_httpSession, message) {\n"
54605"      if (message.status_code !== 200) {\n"
54606"        callback(message.status_code, null);\n"
54607"        return;\n"
54608"      }\n"
54609"      var weatherJSON = request.response_body.data;\n"
54610"      var weather = JSON.parse(weatherJSON);\n"
54611"      callback(null, weather);\n"
54612"      });\n"
54613"    },\n"
54614"\n"
54615"  getIcon: function(weather){\n"
54616"    switch (weather.weatherObservation.weatherCondition){\n"
54617"    case \"drizzle\":\n"
54618"    case \"light showers rain\":\n"
54619"    case \"light rain\":\n"
54620"      return \"weather-showers-scattered.svg\";\n"
54621"    case \"rain\":\n"
54622"      return \"weather-showers.svg\";\n"
54623"    case \"light snow\":\n"
54624"    case \"snow grains\":\n"
54625"      return \"weather-snow.svg\";\n"
54626"    }\n"
54627"    switch (weather.weatherObservation.clouds){\n"
54628"      case \"few clouds\":\n"
54629"      case \"scattered clouds\":\n"
54630"        return \"weather-few-clouds.svg\";\n"
54631"      case \"clear sky\":\n"
54632"        return \"weather-clear.svg\"\n"
54633"      case \"broken clouds\":\n"
54634"      case \"overcast\":\n"
54635"        return \"weather-overcast.svg\";\n"
54636"    }\n"
54637"    return \"weather-fog.svg\";\n"
54638"    }\n"
54639"}\n"
54640"}  "
54641
54642#. (itstool) path: info/title
54643#: C/widget_drawing.py.page:8
54644msgctxt "text"
54645msgid "Widget (Python)"
54646msgstr "Widget (Python)"
54647
54648#. (itstool) path: info/desc
54649#: C/widget_drawing.py.page:18
54650msgid "A widget that uses the Cairo library to draw"
54651msgstr "카이로 라이브러리를 그리기 용도로 활용하는 위젯"
54652
54653#. (itstool) path: page/title
54654#: C/widget_drawing.py.page:21
54655msgid "Widget"
54656msgstr "Widget"
54657
54658#. (itstool) path: page/media
54659#. This is a reference to an external file such as an image or video. When
54660#. the file changes, the md5 hash will change to let you know you need to
54661#. update your localized copy. The msgstr is not used at all. Set it to
54662#. whatever you like once you have updated your copy of the file.
54663#: C/widget_drawing.py.page:22
54664msgctxt "_"
54665msgid "external ref='media/widget_drawing.png' md5='d00abd8cb9e158018c57fd75b81dfe58'"
54666msgstr ""
54667
54668#. (itstool) path: page/p
54669#: C/widget_drawing.py.page:23
54670msgid "Enter an angle, visualize it."
54671msgstr "각도를 입력하면 그림으로 나타냅니다."
54672
54673#. (itstool) path: section/code
54674#: C/widget_drawing.py.page:30
54675#, no-wrap
54676msgid ""
54677"from gi.repository import Gtk\n"
54678"from gi.repository import cairo\n"
54679"import sys\n"
54680"import math\n"
54681"\n"
54682"\n"
54683"class MyWindow(Gtk.ApplicationWindow):\n"
54684"\n"
54685"    def __init__(self, app):\n"
54686"        Gtk.Window.__init__(self, title=\"Choose an angle\", application=app)\n"
54687"        self.set_default_size(400, 400)\n"
54688"        self.set_border_width(10)\n"
54689"\n"
54690"        # a default angle\n"
54691"        self.angle = 360\n"
54692"\n"
54693"        grid = Gtk.Grid()\n"
54694"\n"
54695"        # a spinbutton that takes the value of an angle\n"
54696"        ad = Gtk.Adjustment(360, 0, 360, 1, 0, 0)\n"
54697"        self.spin = Gtk.SpinButton(adjustment=ad, climb_rate=1, digits=0)\n"
54698"        self.spin.connect(\"value-changed\", self.get_angle)\n"
54699"\n"
54700"        # a drawing area for drawing whatever we want\n"
54701"        self.darea = Gtk.DrawingArea()\n"
54702"        # that we describe in the method draw(), connected to the signal \"draw\"\n"
54703"        self.darea.connect(\"draw\", self.draw)\n"
54704"        # we have to request a minimum size of the drawing area, or it will\n"
54705"        # disappear\n"
54706"        self.darea.set_size_request(300, 300)\n"
54707"\n"
54708"        grid.attach(self.spin, 0, 0, 1, 1)\n"
54709"        grid.attach(self.darea, 0, 1, 1, 1)\n"
54710"\n"
54711"        self.add(grid)\n"
54712"\n"
54713"    # whenever we get a new angle in the spinbutton\n"
54714"    def get_angle(self, event):\n"
54715"        self.angle = self.spin.get_value_as_int()\n"
54716"        # redraw what is in the drawing area\n"
54717"        self.darea.queue_draw()\n"
54718"\n"
54719"    def draw(self, darea, cr):\n"
54720"        # a 10-pixels-wide line\n"
54721"        cr.set_line_width(10)\n"
54722"        # red\n"
54723"        cr.set_source_rgba(0.5, 0.0, 0.0, 1.0)\n"
54724"\n"
54725"        # get the width and height of the drawing area\n"
54726"        w = self.darea.get_allocated_width()\n"
54727"        h = self.darea.get_allocated_height()\n"
54728"\n"
54729"        # move to the center of the drawing area\n"
54730"        # (translate from the top left corner to w/2, h/2)\n"
54731"        cr.translate(w / 2, h / 2)\n"
54732"        # draw a line to (55, 0)\n"
54733"        cr.line_to(55, 0)\n"
54734"        # and get back to (0, 0)\n"
54735"        cr.line_to(0, 0)\n"
54736"        # draw an arc centered in the origin, 50 pixels wide, from the angle 0\n"
54737"        # (in radians) to the angle given by the spinbutton (in degrees)\n"
54738"        cr.arc(0, 0, 50, 0, self.angle * (math.pi / 180))\n"
54739"        # draw a line back to the origin\n"
54740"        cr.line_to(0, 0)\n"
54741"        # drawing the path, and keeping the path for future use\n"
54742"        cr.stroke_preserve()\n"
54743"\n"
54744"        # set a colour\n"
54745"        cr.set_source_rgba(0.0, 0.5, 0.5, 1.0)\n"
54746"        # and use it to fill the path (that we had kept)\n"
54747"        cr.fill()\n"
54748"\n"
54749"\n"
54750"class MyApplication(Gtk.Application):\n"
54751"\n"
54752"    def __init__(self):\n"
54753"        Gtk.Application.__init__(self)\n"
54754"\n"
54755"    def do_activate(self):\n"
54756"        win = MyWindow(self)\n"
54757"        win.show_all()\n"
54758"\n"
54759"    def do_startup(self):\n"
54760"        Gtk.Application.do_startup(self)\n"
54761"\n"
54762"app = MyApplication()\n"
54763"exit_status = app.run(sys.argv)\n"
54764"sys.exit(exit_status)\n"
54765msgstr ""
54766"from gi.repository import Gtk\n"
54767"from gi.repository import cairo\n"
54768"import sys\n"
54769"import math\n"
54770"\n"
54771"\n"
54772"class MyWindow(Gtk.ApplicationWindow):\n"
54773"\n"
54774"    def __init__(self, app):\n"
54775"        Gtk.Window.__init__(self, title=\"Choose an angle\", application=app)\n"
54776"        self.set_default_size(400, 400)\n"
54777"        self.set_border_width(10)\n"
54778"\n"
54779"        # a default angle\n"
54780"        self.angle = 360\n"
54781"\n"
54782"        grid = Gtk.Grid()\n"
54783"\n"
54784"        # a spinbutton that takes the value of an angle\n"
54785"        ad = Gtk.Adjustment(360, 0, 360, 1, 0, 0)\n"
54786"        self.spin = Gtk.SpinButton(adjustment=ad, climb_rate=1, digits=0)\n"
54787"        self.spin.connect(\"value-changed\", self.get_angle)\n"
54788"\n"
54789"        # a drawing area for drawing whatever we want\n"
54790"        self.darea = Gtk.DrawingArea()\n"
54791"        # that we describe in the method draw(), connected to the signal \"draw\"\n"
54792"        self.darea.connect(\"draw\", self.draw)\n"
54793"        # we have to request a minimum size of the drawing area, or it will\n"
54794"        # disappear\n"
54795"        self.darea.set_size_request(300, 300)\n"
54796"\n"
54797"        grid.attach(self.spin, 0, 0, 1, 1)\n"
54798"        grid.attach(self.darea, 0, 1, 1, 1)\n"
54799"\n"
54800"        self.add(grid)\n"
54801"\n"
54802"    # whenever we get a new angle in the spinbutton\n"
54803"    def get_angle(self, event):\n"
54804"        self.angle = self.spin.get_value_as_int()\n"
54805"        # redraw what is in the drawing area\n"
54806"        self.darea.queue_draw()\n"
54807"\n"
54808"    def draw(self, darea, cr):\n"
54809"        # a 10-pixels-wide line\n"
54810"        cr.set_line_width(10)\n"
54811"        # red\n"
54812"        cr.set_source_rgba(0.5, 0.0, 0.0, 1.0)\n"
54813"\n"
54814"        # get the width and height of the drawing area\n"
54815"        w = self.darea.get_allocated_width()\n"
54816"        h = self.darea.get_allocated_height()\n"
54817"\n"
54818"        # move to the center of the drawing area\n"
54819"        # (translate from the top left corner to w/2, h/2)\n"
54820"        cr.translate(w / 2, h / 2)\n"
54821"        # draw a line to (55, 0)\n"
54822"        cr.line_to(55, 0)\n"
54823"        # and get back to (0, 0)\n"
54824"        cr.line_to(0, 0)\n"
54825"        # draw an arc centered in the origin, 50 pixels wide, from the angle 0\n"
54826"        # (in radians) to the angle given by the spinbutton (in degrees)\n"
54827"        cr.arc(0, 0, 50, 0, self.angle * (math.pi / 180))\n"
54828"        # draw a line back to the origin\n"
54829"        cr.line_to(0, 0)\n"
54830"        # drawing the path, and keeping the path for future use\n"
54831"        cr.stroke_preserve()\n"
54832"\n"
54833"        # set a colour\n"
54834"        cr.set_source_rgba(0.0, 0.5, 0.5, 1.0)\n"
54835"        # and use it to fill the path (that we had kept)\n"
54836"        cr.fill()\n"
54837"\n"
54838"\n"
54839"class MyApplication(Gtk.Application):\n"
54840"\n"
54841"    def __init__(self):\n"
54842"        Gtk.Application.__init__(self)\n"
54843"\n"
54844"    def do_activate(self):\n"
54845"        win = MyWindow(self)\n"
54846"        win.show_all()\n"
54847"\n"
54848"    def do_startup(self):\n"
54849"        Gtk.Application.do_startup(self)\n"
54850"\n"
54851"app = MyApplication()\n"
54852"exit_status = app.run(sys.argv)\n"
54853"sys.exit(exit_status)\n"
54854
54855#. (itstool) path: item/p
54856#: C/widget_drawing.py.page:39
54857msgid "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkDrawingArea.html\">GtkDrawingArea</link>"
54858msgstr "<link href=\"http://developer.gnome.org/gtk3/unstable/GtkDrawingArea.html\">GtkDrawingArea</link>"
54859
54860#. (itstool) path: item/p
54861#: C/widget_drawing.py.page:40
54862msgid "<link href=\"http://www.tortall.net/mu/wiki/CairoTutorial\">The Cairo Tutorial for Python Programmers</link>"
54863msgstr "<link href=\"http://www.tortall.net/mu/wiki/CairoTutorial\">파이썬 프로그래머용 카이로 지침서</link>"
54864
54865#. (itstool) path: info/title
54866#: C/window.c.page:8
54867msgctxt "text"
54868msgid "Window (C)"
54869msgstr "Window (C)"
54870
54871#. (itstool) path: info/desc
54872#: C/window.c.page:18 C/window.py.page:25 C/window.vala.page:18
54873msgid "A toplevel window which can contain other widgets"
54874msgstr "다른 위젯을 넣을 수 있는 최상위 창"
54875
54876#. (itstool) path: page/title
54877#: C/window.c.page:21 C/window.js.page:21 C/window.py.page:28 C/window.vala.page:21
54878msgid "Window"
54879msgstr "Window"
54880
54881#. (itstool) path: page/p
54882#: C/window.c.page:24
54883msgid ""
54884"A minimal GtkApplication. Use <link xref=\"GtkApplicationWindow.c\">Application Window</link> if you need GMenu "
54885"support."
54886msgstr ""
54887"소형 GtkApplication입니다. GMenu 지원 기능이 필요하면 <link xref=\"GtkApplicationWindow.c\">ApplicationWindow</"
54888"link>를 사용하세요."
54889
54890#. (itstool) path: page/code
54891#: C/window.c.page:28
54892#, no-wrap
54893msgid ""
54894"\n"
54895"#include &lt;gtk/gtk.h&gt;\n"
54896"\n"
54897"static void\n"
54898"activate (GtkApplication *app,\n"
54899"          gpointer        user_data)\n"
54900"{\n"
54901"  GtkWidget *window;\n"
54902"\n"
54903"  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);\n"
54904"\n"
54905"  gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (app));\n"
54906"  gtk_window_set_title (GTK_WINDOW (window), \"Hello GNOME\");\n"
54907"\n"
54908"  gtk_widget_show_all (GTK_WIDGET (window));\n"
54909"}\n"
54910"\n"
54911"int\n"
54912"main (int argc, char **argv)\n"
54913"{\n"
54914"  GtkApplication *app;\n"
54915"  int status;\n"
54916"\n"
54917"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
54918"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
54919"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
54920"  g_object_unref (app);\n"
54921"  return status;\n"
54922"}\n"
54923msgstr ""
54924"\n"
54925"#include &lt;gtk/gtk.h&gt;\n"
54926"\n"
54927"static void\n"
54928"activate (GtkApplication *app,\n"
54929"          gpointer        user_data)\n"
54930"{\n"
54931"  GtkWidget *window;\n"
54932"\n"
54933"  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);\n"
54934"\n"
54935"  gtk_window_set_application (GTK_WINDOW (window), GTK_APPLICATION (app));\n"
54936"  gtk_window_set_title (GTK_WINDOW (window), \"Hello GNOME\");\n"
54937"\n"
54938"  gtk_widget_show_all (GTK_WIDGET (window));\n"
54939"}\n"
54940"\n"
54941"int\n"
54942"main (int argc, char **argv)\n"
54943"{\n"
54944"  GtkApplication *app;\n"
54945"  int status;\n"
54946"\n"
54947"  app = gtk_application_new (\"org.gtk.example\",G_APPLICATION_FLAGS_NONE);\n"
54948"  g_signal_connect (app, \"activate\", G_CALLBACK (activate), NULL);\n"
54949"  status = g_application_run (G_APPLICATION (app), argc, argv);\n"
54950"  g_object_unref (app);\n"
54951"  return status;\n"
54952"}\n"
54953
54954#. (itstool) path: info/title
54955#: C/window.js.page:8
54956msgctxt "text"
54957msgid "Window (JavaScript)"
54958msgstr "Window (JavaScript)"
54959
54960#. (itstool) path: info/desc
54961#: C/window.js.page:18
54962msgid "A basic window which can contain other widgets"
54963msgstr "다른 위젯을 넣을 수 있는 기본 창"
54964
54965#. (itstool) path: td/p
54966#: C/window.js.page:26
54967msgid "A minimal GtkApplication"
54968msgstr "소형 GtkApplication"
54969
54970#. (itstool) path: td/p
54971#: C/window.js.page:29
54972msgid "Use <link xref=\"GtkApplicationWindow.js\">ApplicationWindow</link> if you need GMenu support."
54973msgstr "GMenu 지원 기능이 필요하면 <link xref=\"GtkApplicationWindow.js\">ApplicationWindow</link>를 사용하세요."
54974
54975#. (itstool) path: page/code
54976#: C/window.js.page:33
54977#, no-wrap
54978msgid ""
54979"\n"
54980"#!/usr/bin/gjs\n"
54981"\n"
54982"imports.gi.versions.Gtk = '3.0';\n"
54983"\n"
54984"const Gio = imports.gi.Gio;\n"
54985"const GLib = imports.gi.GLib;\n"
54986"const Gtk = imports.gi.Gtk;\n"
54987"\n"
54988"class Application {\n"
54989"    //create the application\n"
54990"    constructor() {\n"
54991"        this.application = new Gtk.Application({\n"
54992"            application_id: 'org.example.myapp',\n"
54993"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
54994"        });\n"
54995"\n"
54996"       this.application.connect('activate', this._onActivate.bind(this));\n"
54997"    }\n"
54998"\n"
54999"    //callback function for 'activate' signal\n"
55000"    _onActivate() {\n"
55001"        let myWindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
55002"        myWindow.title = \"Welcome to GNOME\";\n"
55003"\n"
55004"       /* Here are a few ways we can customize our window.\n"
55005"       Try uncommenting them or changing their values! */\n"
55006"        //myWindow.set_default_size (400,200);\n"
55007"        //myWindow.set_has_resize_grip (false);\n"
55008"        //myWindow.set_opacity (0.5);\n"
55009"        //myWindow.maximize ();\n"
55010"\n"
55011"        //show the window and all child widgets (none in this case)\n"
55012"        myWindow.show_all();\n"
55013"        this.application.add_window(myWindow);\n"
55014"    }\n"
55015"};\n"
55016"\n"
55017"//run the application\n"
55018"let app = new Application ();\n"
55019"app.application.run (ARGV);\n"
55020msgstr ""
55021"\n"
55022"#!/usr/bin/gjs\n"
55023"\n"
55024"imports.gi.versions.Gtk = '3.0';\n"
55025"\n"
55026"const Gio = imports.gi.Gio;\n"
55027"const GLib = imports.gi.GLib;\n"
55028"const Gtk = imports.gi.Gtk;\n"
55029"\n"
55030"class Application {\n"
55031"    //create the application\n"
55032"    constructor() {\n"
55033"        this.application = new Gtk.Application({\n"
55034"            application_id: 'org.example.myapp',\n"
55035"            flags: Gio.ApplicationFlags.FLAGS_NONE\n"
55036"        });\n"
55037"\n"
55038"       this.application.connect('activate', this._onActivate.bind(this));\n"
55039"    }\n"
55040"\n"
55041"    //callback function for 'activate' signal\n"
55042"    _onActivate() {\n"
55043"        let myWindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});\n"
55044"        myWindow.title = \"Welcome to GNOME\";\n"
55045"\n"
55046"       /* Here are a few ways we can customize our window.\n"
55047"       Try uncommenting them or changing their values! */\n"
55048"        //myWindow.set_default_size (400,200);\n"
55049"        //myWindow.set_has_resize_grip (false);\n"
55050"        //myWindow.set_opacity (0.5);\n"
55051"        //myWindow.maximize ();\n"
55052"\n"
55053"        //show the window and all child widgets (none in this case)\n"
55054"        myWindow.show_all();\n"
55055"        this.application.add_window(myWindow);\n"
55056"    }\n"
55057"};\n"
55058"\n"
55059"//run the application\n"
55060"let app = new Application ();\n"
55061"app.application.run (ARGV);\n"
55062
55063#. (itstool) path: page/p
55064#: C/window.js.page:35
55065msgid "In this example we used the following:"
55066msgstr "이 예제에서 다음 구성 요소를 사용합니다:"
55067
55068#. (itstool) path: item/p
55069#: C/window.js.page:40
55070msgid "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Window.html\">Gtk.Window</link>"
55071msgstr "<link href=\"http://www.roojs.com/seed/gir-1.2-gtk-3.0/gjs/Gtk.Window.html\">Gtk.Window</link>"
55072
55073#. (itstool) path: info/title
55074#: C/window.py.page:8
55075msgctxt "text"
55076msgid "Window (Python)"
55077msgstr "Window (Python)"
55078
55079#. (itstool) path: td/p
55080#: C/window.py.page:34
55081msgid "A minimal GTK+ Application: a window with a title."
55082msgstr "작은 GTK+ 프로그램: 제목이 들어간 창."
55083
55084#. (itstool) path: td/p
55085#: C/window.py.page:37
55086msgid "Use <link xref=\"GtkApplicationWindow.py\"/> if you need <link xref=\"gmenu.py\"/> support."
55087msgstr "<link xref=\"gmenu.py\"/> 지원 기능이 필요하면 <link xref=\"GtkApplicationWindow.py\"/>를 사용하세요."
55088
55089#. (itstool) path: section/code
55090#: C/window.py.page:47
55091#, no-wrap
55092msgid ""
55093"from gi.repository import Gtk\n"
55094"import sys\n"
55095"\n"
55096"\n"
55097"class MyApplication(Gtk.Application):\n"
55098"\n"
55099"    def do_activate(self):\n"
55100"        # create a Gtk Window belonging to the application itself\n"
55101"        window = Gtk.Window(application=self)\n"
55102"        # set the title\n"
55103"        window.set_title(\"Welcome to GNOME\")\n"
55104"        # show the window\n"
55105"        window.show_all()\n"
55106"\n"
55107"# create and run the application, exit with the value returned by\n"
55108"# running the program\n"
55109"app = MyApplication()\n"
55110"exit_status = app.run(sys.argv)\n"
55111"sys.exit(exit_status)\n"
55112msgstr ""
55113"from gi.repository import Gtk\n"
55114"import sys\n"
55115"\n"
55116"\n"
55117"class MyApplication(Gtk.Application):\n"
55118"\n"
55119"    def do_activate(self):\n"
55120"        # create a Gtk Window belonging to the application itself\n"
55121"        window = Gtk.Window(application=self)\n"
55122"        # set the title\n"
55123"        window.set_title(\"Welcome to GNOME\")\n"
55124"        # show the window\n"
55125"        window.show_all()\n"
55126"\n"
55127"# create and run the application, exit with the value returned by\n"
55128"# running the program\n"
55129"app = MyApplication()\n"
55130"exit_status = app.run(sys.argv)\n"
55131"sys.exit(exit_status)\n"
55132
55133#. (itstool) path: section/title
55134#: C/window.py.page:52
55135msgid "Useful methods for a Window widget"
55136msgstr "Window 위젯에 쓸만한 메서드"
55137
55138#. (itstool) path: info/title
55139#: C/window.vala.page:8
55140msgctxt "text"
55141msgid "Window (Vala)"
55142msgstr "Window (Vala)"
55143
55144#. (itstool) path: td/p
55145#: C/window.vala.page:26
55146msgid "The simplest Gtk.Application"
55147msgstr "간단한 Gtk.Application"
55148
55149#. (itstool) path: td/p
55150#: C/window.vala.page:29
55151msgid "Use <link xref=\"GtkApplicationWindow.vala\">Application Window</link> if you need GMenu support."
55152msgstr "GMenu 지원 기능이 필요하면 <link xref=\"GtkApplicationWindow.vala\">ApplicationWindow</link>를 사용하세요."
55153
55154#. (itstool) path: page/code
55155#: C/window.vala.page:33
55156#, no-wrap
55157msgid ""
55158"/* This is the application. */\n"
55159"public class Application : Gtk.Application {\n"
55160"\n"
55161"\t/* Constructor */\n"
55162"\tpublic Application () {\n"
55163"\t\tObject (application_id: \"org.example.window\");\n"
55164"\t}\n"
55165"\n"
55166"\t/* Override the 'activate' signal of GLib.Application,\n"
55167"\t * which is inherited by Gtk.Application. */\n"
55168"\tpublic override void activate () {\n"
55169"\n"
55170"\t\tvar window = new Gtk.Window ();\n"
55171"\t\twindow.title = \"Welcome to GNOME\";\n"
55172"\n"
55173"\t\t/* The following 3 lines are included here to introduce\n"
55174"\t\t * you to ways you can adjust the toplevel window to suit\n"
55175"\t\t * your needs.  Uncomment them to see what they do.\n"
55176"\t\t */\n"
55177"\n"
55178"\t\t//window.border_width = 10;\n"
55179"\t\t//window.set_default_size (350, 70);\n"
55180"\t\t//window.window_position = Gtk.WindowPosition.CENTER;\n"
55181"\n"
55182"\t\t/* Add the window to this application. */\n"
55183"\t\tthis.add_window (window);\n"
55184"\n"
55185"\t\t/* Show the window. */\n"
55186"\t\twindow.show ();\n"
55187"\t}\n"
55188"}\n"
55189"\n"
55190"/* The main function creates the application and runs it.*/\n"
55191"int main (string[] args) {\n"
55192"\tvar app = new Application ();\n"
55193"\treturn app.run (args);\n"
55194"}\n"
55195msgstr ""
55196"/* This is the application. */\n"
55197"public class Application : Gtk.Application {\n"
55198"\n"
55199"\t/* Constructor */\n"
55200"\tpublic Application () {\n"
55201"\t\tObject (application_id: \"org.example.window\");\n"
55202"\t}\n"
55203"\n"
55204"\t/* Override the 'activate' signal of GLib.Application,\n"
55205"\t * which is inherited by Gtk.Application. */\n"
55206"\tpublic override void activate () {\n"
55207"\n"
55208"\t\tvar window = new Gtk.Window ();\n"
55209"\t\twindow.title = \"Welcome to GNOME\";\n"
55210"\n"
55211"\t\t/* The following 3 lines are included here to introduce\n"
55212"\t\t * you to ways you can adjust the toplevel window to suit\n"
55213"\t\t * your needs.  Uncomment them to see what they do.\n"
55214"\t\t */\n"
55215"\n"
55216"\t\t//window.border_width = 10;\n"
55217"\t\t//window.set_default_size (350, 70);\n"
55218"\t\t//window.window_position = Gtk.WindowPosition.CENTER;\n"
55219"\n"
55220"\t\t/* Add the window to this application. */\n"
55221"\t\tthis.add_window (window);\n"
55222"\n"
55223"\t\t/* Show the window. */\n"
55224"\t\twindow.show ();\n"
55225"\t}\n"
55226"}\n"
55227"\n"
55228"/* The main function creates the application and runs it.*/\n"
55229"int main (string[] args) {\n"
55230"\tvar app = new Application ();\n"
55231"\treturn app.run (args);\n"
55232"}\n"
55233
55234#. (itstool) path: item/p
55235#: C/window.vala.page:39
55236msgid "The widget <link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.html\">Gtk.Window</link>"
55237msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.html\">Gtk.Window</link> 위젯"
55238
55239#. (itstool) path: item/p
55240#: C/window.vala.page:41
55241msgid "The enum <link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.WindowPosition.html\">Gtk.WindowPosition</link>"
55242msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.WindowPosition.html\">Gtk.WindowPosition</link> 서수형"
55243
55244#. (itstool) path: item/p
55245#: C/window.vala.page:43
55246msgid ""
55247"The method <link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.set_default_size.html\">set_default_size</link>"
55248msgstr ""
55249"<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.set_default_size.html\">set_default_size</link> 메서드"
55250
55251#. (itstool) path: item/p
55252#: C/window.vala.page:45
55253msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Container.border_width.html\">border_width</link>"
55254msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Container.border_width.html\">border_width</link>"
55255
55256#. (itstool) path: item/p
55257#: C/window.vala.page:47
55258msgid "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.window_position.html\">window_position</link>"
55259msgstr "<link href=\"http://www.valadoc.org/gtk+-3.0/Gtk.Window.window_position.html\">window_position</link>"
55260
55261#. (itstool) path: credit/name
55262#: C/custom-gsource.c.page:11
55263msgid "Philip Withnall"
55264msgstr "Philip Withnall"
55265
55266#. (itstool) path: credit/years
55267#: C/custom-gsource.c.page:13
55268msgid "2015"
55269msgstr "2015"
55270
55271#. (itstool) path: info/desc
55272#: C/custom-gsource.c.page:18
55273msgid "Tutorial for writing a custom <code>GSource</code> implementation"
55274msgstr "개별 <code>GSource</code> 구현체 작성 지침서"
55275
55276#. (itstool) path: page/title
55277#: C/custom-gsource.c.page:23
55278msgid "Custom GSources"
55279msgstr "개별 GSource"
55280
55281#. (itstool) path: synopsis/title
55282#: C/custom-gsource.c.page:26
55283msgid "Summary"
55284msgstr "요약"
55285
55286#. (itstool) path: synopsis/p
55287#: C/custom-gsource.c.page:28
55288msgid ""
55289"This article is a tutorial on creating a custom <code>GSource</code>. For the reference documentation, see the "
55290"<link href=\"https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#GSource\">GLib API reference</"
55291"link>."
55292msgstr ""
55293"이 글은 개별 <code>GSource</code>를 만드는 지침 내용을 담고 있습니다. 참고 문서를 찾아보려면 <link href=\"https://"
55294"developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#GSource\">GLib API 참고서</link>를 살펴보십시오."
55295
55296#. (itstool) path: section/title
55297#: C/custom-gsource.c.page:37
55298msgid "What is <code>GSource</code>?"
55299msgstr "<code>GSource</code>가 뭐죠?"
55300
55301#. (itstool) path: section/p
55302#: C/custom-gsource.c.page:39
55303msgid ""
55304"A <link href=\"https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#GSource\"><code>GSource</"
55305"code></link> is an expected event with an associated callback function which will be invoked when that event is "
55306"received. An event could be a timeout or data being received on a socket, for example."
55307msgstr ""
55308"<link href=\"https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#GSource\"><code>GSource</code></"
55309"link>는 이벤트를 받았을때 실행할 콜백 함수와 관계있는 기대 이벤트입니다.  예를 들어 이벤트는 시간 초과 상황 또는 소"
55310"켓을 통해 데이터를 받았을 때가 될 수 있습니다."
55311
55312#. (itstool) path: section/p
55313#: C/custom-gsource.c.page:46
55314msgid ""
55315"GLib contains various types of <code>GSource</code>, but also allows applications to define their own, allowing "
55316"custom events to be integrated into the main loop."
55317msgstr ""
55318"GLib에는 다양한 <code>GSource</code>가 있지만, 메인 루프에 통합할 개별 이벤트를 허용하여 프로그램 자체에서의 "
55319"<code>GSource</code> 정의를 허용합니다."
55320
55321#. (itstool) path: section/p
55322#: C/custom-gsource.c.page:52
55323msgid ""
55324"The structure of a <code>GSource</code> and its virtual functions are documented in detail in the <link href="
55325"\"https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#GSourceFuncs\">GLib API reference</link>."
55326msgstr ""
55327"<code>GSource</code> 구조와 가상 함수에 대한 자세한 문서는 <link href=\"https://developer.gnome.org/glib/stable/"
55328"glib-The-Main-Event-Loop.html#GSourceFuncs\">GLib API 참고서</link>에 있습니다."
55329
55330#. (itstool) path: section/title
55331#: C/custom-gsource.c.page:61
55332msgid "A Message Queue Source"
55333msgstr "메시지 큐 소스"
55334
55335#. (itstool) path: section/p
55336#: C/custom-gsource.c.page:63
55337msgid ""
55338"As a running example, a message queue source will be used which dispatches its callback whenever a message is "
55339"enqueued to a queue internal to the source (potentially from another thread)."
55340msgstr ""
55341"실행 예제와 같이, 소스 내부 큐에 메시지를 쌓아둘 때마다 (잠재적으로 다른 스레드에서) 콜백을 실행할 때 메시지 큐 소"
55342"스를 사용합니다."
55343
55344#. (itstool) path: section/p
55345#: C/custom-gsource.c.page:69
55346msgid ""
55347"This type of source is useful for efficiently transferring large numbers of messages between main contexts. The "
55348"alternative is transferring each message as a separate idle <code>GSource</code> using <code>g_source_attach()</"
55349"code>. For large numbers of messages, this means a lot of allocations and frees of <code>GSource</code>s."
55350msgstr ""
55351"이 소스 형식은 메인 컨텍스트간 상당한 양의 메시지를 효율적으로 주고 받을때 쓸만합니다. 대신, "
55352"<code>g_source_attach()</code> 함수를 활용하여 각 메시지를 개별 대기 <code>GSource</code> 로 보내는 방법이 있습니"
55353"다. 수많은 메시지에 대해 <code>GSource</code>에 대해 메모리를 할당하고 해제함을 의미합니다."
55354
55355#. (itstool) path: section/title
55356#: C/custom-gsource.c.page:78
55357msgid "Structure"
55358msgstr "구조체"
55359
55360#. (itstool) path: section/p
55361#: C/custom-gsource.c.page:80
55362msgid ""
55363"Firstly, a structure for the source needs to be declared. This must contain a <code>GSource</code> as its parent, "
55364"followed by the private fields for the source: the queue and a function to call to free each message once finished "
55365"with."
55366msgstr ""
55367"우선 source 구조를 선언해야합니다. <code>GSource</code>를 상위 구조로 넣어야하며 그 다음 source 자체 필드를 넣습니"
55368"다. 큐와 각 메시지를 처리하고 나서 메모리 할당을 해제할 함수가 이에 해당합니다."
55369
55370#. (itstool) path: section/code
55371#: C/custom-gsource.c.page:86
55372#, no-wrap
55373msgid ""
55374"\n"
55375"typedef struct {\n"
55376"  GSource         parent;\n"
55377"  GAsyncQueue    *queue;  /* owned */\n"
55378"  GDestroyNotify  destroy_message;\n"
55379"} MessageQueueSource;"
55380msgstr ""
55381"\n"
55382"typedef struct {\n"
55383"  GSource         parent;\n"
55384"  GAsyncQueue    *queue;  /* owned */\n"
55385"  GDestroyNotify  destroy_message;\n"
55386"} MessageQueueSource;"
55387
55388#. (itstool) path: section/title
55389#: C/custom-gsource.c.page:95
55390msgid "Prepare Function"
55391msgstr "준비 함수"
55392
55393#. (itstool) path: section/p
55394#: C/custom-gsource.c.page:97
55395msgid ""
55396"Next, the prepare function for the source must be defined. This determines whether the source is ready to be "
55397"dispatched. As this source is using an in-memory queue, this can be determined by checking the queue’s length: if "
55398"there are elements in the queue, the source can be dispatched to handle them."
55399msgstr ""
55400"그 다음, source의 준비 함수를 정의해야합니다. source를 처리할 준비가 됐는지 여부를 결정합니다. source가 인메모리 큐"
55401"를 사용하기 때문에 큐 길이를 검사하여 결정할 수 있습니다. 큐에 구성요소를 넣어두었다면 source에서 해당 구성 요소를 "
55402"처리할 수 있습니다."
55403
55404#. (itstool) path: section/code
55405#: C/custom-gsource.c.page:104
55406#, no-wrap
55407msgid ""
55408"\n"
55409"return (g_async_queue_length (message_queue_source-&gt;queue) &gt; 0);"
55410msgstr ""
55411"\n"
55412"return (g_async_queue_length (message_queue_source-&gt;queue) &gt; 0);"
55413
55414#. (itstool) path: section/title
55415#: C/custom-gsource.c.page:109
55416msgid "Check Function"
55417msgstr "점검 함수"
55418
55419#. (itstool) path: section/p
55420#: C/custom-gsource.c.page:111
55421msgid ""
55422"As this source has no file descriptors, the prepare and check functions essentially have the same job, so a check "
55423"function is not needed. Setting the field to <code>NULL</code> in <code>GSourceFuncs</code> bypasses the check "
55424"function for this source type."
55425msgstr ""
55426"이 소스에 파일 서술자가 없기에, 준비하고 검사하는 함수는 근본적으로 동일한 동작을 취합니다. 따라서 검사 함수가 필요"
55427"하지 않습니다. <code>GSourceFuncs</code>에서 필드 값을 <code>NULL</code>로 설정하면 소스 형식에 대한 검사 함수 동작"
55428"을 건너뜁니다."
55429
55430#. (itstool) path: section/title
55431#: C/custom-gsource.c.page:120
55432msgid "Dispatch Function"
55433msgstr "실행 함수"
55434
55435#. (itstool) path: section/p
55436#: C/custom-gsource.c.page:122
55437msgid ""
55438"For this source, the dispatch function is where the complexity lies. It needs to dequeue a message from the queue, "
55439"then pass that message to the <code>GSource</code>’s callback function. No messages may be queued: even through "
55440"the prepare function returned true, another source wrapping the same queue may have been dispatched in the mean "
55441"time and taken the final message from the queue. Further, if no callback has been set for the <code>GSource</code> "
55442"(which is allowed), the message must be destroyed and silently dropped."
55443msgstr ""
55444"이 source에 대해, 실행 함수는 복잡성이 존재하는 곳입니다. 큐에서 메시지를 빼낸 후 <code>GSource</code>의 콜백 함수"
55445"에 메시지를 전달해야합니다. 큐에 메시지가 없을 수도 있습니다. 준비 함수에서 true를 반환한다 하더라도, 동일한 큐를 "
55446"래핑하는 다른 source를 평균 시간내에 처리하며 큐에서 마지막 메시지를 취하기도 합니다. 게다가 <code>GSource</code>"
55447"에 (허용한) 콜백을 설정하지 않으면, 메시지를 해체하고 버려야합니다."
55448
55449#. (itstool) path: section/p
55450#: C/custom-gsource.c.page:133
55451msgid ""
55452"If both a message and callback are set, the callback can be invoked on the message and its return value propagated "
55453"as the return value of the dispatch function. This is <code>FALSE</code> to destroy the <code>GSource</code> and "
55454"<code>TRUE</code> to keep it alive, just as for <code>GSourceFunc</code> — these semantics are the same for all "
55455"dispatch function implementations."
55456msgstr ""
55457"메시지와 콜백을 설정하면 콜백에서 메시지를 처리하고, 실행 함수의 반환 값으로 반환 값을 전달합니다. <code>GSource</"
55458"code>가 해체되면 <code>FALSE</code>, <code>GSourceFunc</code>에 대해 계속 남아있으면 <code>TRUE</code>입니다. 이런 "
55459"식의 의미는 모든 실행 함수 구현에 동일하게 적용합니다."
55460
55461#. (itstool) path: section/code
55462#: C/custom-gsource.c.page:141
55463#, no-wrap
55464msgid ""
55465"\n"
55466"/* Pop a message off the queue. */\n"
55467"message = g_async_queue_try_pop (message_queue_source-&gt;queue);\n"
55468"\n"
55469"/* If there was no message, bail. */\n"
55470"if (message == NULL)\n"
55471"  {\n"
55472"    /* Keep the source around to handle the next message. */\n"
55473"    return TRUE;\n"
55474"  }\n"
55475"\n"
55476"/* @func may be %NULL if no callback was specified.\n"
55477" * If so, drop the message. */\n"
55478"if (func == NULL)\n"
55479"  {\n"
55480"    if (message_queue_source-&gt;destroy_message != NULL)\n"
55481"      {\n"
55482"        message_queue_source-&gt;destroy_message (message);\n"
55483"      }\n"
55484"\n"
55485"    /* Keep the source around to consume the next message. */\n"
55486"    return TRUE;\n"
55487"  }\n"
55488"\n"
55489"return func (message, user_data);"
55490msgstr ""
55491"\n"
55492"/* Pop a message off the queue. */\n"
55493"message = g_async_queue_try_pop (message_queue_source-&gt;queue);\n"
55494"\n"
55495"/* If there was no message, bail. */\n"
55496"if (message == NULL)\n"
55497"  {\n"
55498"    /* Keep the source around to handle the next message. */\n"
55499"    return TRUE;\n"
55500"  }\n"
55501"\n"
55502"/* @func may be %NULL if no callback was specified.\n"
55503" * If so, drop the message. */\n"
55504"if (func == NULL)\n"
55505"  {\n"
55506"    if (message_queue_source-&gt;destroy_message != NULL)\n"
55507"      {\n"
55508"        message_queue_source-&gt;destroy_message (message);\n"
55509"      }\n"
55510"\n"
55511"    /* Keep the source around to consume the next message. */\n"
55512"    return TRUE;\n"
55513"  }\n"
55514"\n"
55515"return func (message, user_data);"
55516
55517#. (itstool) path: section/title
55518#: C/custom-gsource.c.page:169
55519msgid "Callback Functions"
55520msgstr "콜백 함수"
55521
55522#. (itstool) path: section/p
55523#: C/custom-gsource.c.page:171
55524msgid ""
55525"The callback from a <code>GSource</code> does not have to have type <code>GSourceFunc</code>. It can be whatever "
55526"function type is called in the source’s dispatch function, as long as that type is sufficiently documented."
55527msgstr ""
55528"<code>GSource</code> 콜백은 <code>GSourceFunc</code> 형식일 필요는 없습니다. 이 형식에 대해 충분히 문서로 남겨둔 만"
55529"큼 source의 실행 함수에서 불리는 어떤 함수 형식이든 될 수 있습니다."
55530
55531#. (itstool) path: section/p
55532#: C/custom-gsource.c.page:178
55533msgid ""
55534"Normally, <code>g_source_set_callback()</code> is used to set the callback function for a source instance. With "
55535"its <code>GDestroyNotify</code>, a strong reference can be held to keep an object alive while the source is still "
55536"alive:"
55537msgstr ""
55538"보통, 소스 인스턴스에서 콜백 함수를 설정할 때 <code>g_source_set_callback()</code> 함수를 사용합니다. "
55539"<code>GDestroyNotify</code>를 함께 사용하면, 소스가 계속 살아있는 동안 객체의 강 참조를 유지할 수 있습니다:"
55540
55541#. (itstool) path: section/code
55542#: C/custom-gsource.c.page:184
55543#, no-wrap
55544msgid ""
55545"\n"
55546"g_source_set_callback (source, callback_func,\n"
55547"                       g_object_ref (object_to_strong_ref),\n"
55548"                       (GDestroyNotify) g_object_unref);"
55549msgstr ""
55550"\n"
55551"g_source_set_callback (source, callback_func,\n"
55552"                       g_object_ref (object_to_strong_ref),\n"
55553"                       (GDestroyNotify) g_object_unref);"
55554
55555#. (itstool) path: section/p
55556#: C/custom-gsource.c.page:189
55557msgid ""
55558"However, <code>GSource</code> has a layer of indirection for retrieving this callback, exposed as "
55559"<code>g_source_set_callback_indirect()</code>. This allows GObject to set a <code>GClosure</code> as the callback "
55560"for a source, which allows for sources which are automatically destroyed when an object is finalized — a <em>weak</"
55561"em> reference, in contrast to the <em>strong</em> reference above:"
55562msgstr ""
55563"그러나, <code>GSource</code>는 <code>g_source_set_callback_indirect()</code>로 노출하여 콜백을 전달하는 간접 계층입"
55564"니다. GObject는 객체 사용을 마감했을 때 소스에서 자동으로 해제하는 소스에 <code>GClosure</code>를 콜백으로 설정할 "
55565"수 있게 합니다  — 위의 <em>강</em> 참조에 대비되는 <em>약</em>참조는 다음과 같습니다:"
55566
55567#. (itstool) path: section/code
55568#: C/custom-gsource.c.page:197
55569#, no-wrap
55570msgid ""
55571"\n"
55572"g_source_set_closure (source,\n"
55573"                      g_cclosure_new_object (callback_func,\n"
55574"                                             object_to_weak_ref));"
55575msgstr ""
55576"\n"
55577"g_source_set_closure (source,\n"
55578"                      g_cclosure_new_object (callback_func,\n"
55579"                                             object_to_weak_ref));"
55580
55581#. (itstool) path: section/p
55582#: C/custom-gsource.c.page:202
55583msgid ""
55584"It also allows for a generic, closure-based ‘dummy’ callback, which can be used when a source needs to exist but "
55585"no action needs to be performed in its callback:"
55586msgstr ""
55587"소스에서는 콜백이 필요하지만 콜백에서 동작이 필요하지 않은 경우 사용할 수 있는 일반 클로저 기반 'dummy' 콜백을 허용"
55588"합니다:"
55589
55590#. (itstool) path: section/code
55591#: C/custom-gsource.c.page:207
55592#, no-wrap
55593msgid ""
55594"\n"
55595"g_source_set_dummy_callback (source);"
55596msgstr ""
55597"\n"
55598"g_source_set_dummy_callback (source);"
55599
55600#. (itstool) path: section/title
55601#: C/custom-gsource.c.page:212
55602msgid "Constructor"
55603msgstr "생성자"
55604
55605#. (itstool) path: section/p
55606#: C/custom-gsource.c.page:214
55607msgid ""
55608"Finally, the <code>GSourceFuncs</code> definition of the <code>GSource</code> can be written, alongside a "
55609"construction function. It is typical practice to expose new source types simply as <code>GSource</code>s, not as "
55610"the subtype structure; so the constructor returns a <code>GSource*</code>."
55611msgstr ""
55612"마지막으로 <code>GSource</code>의 <code>GSourceFuncs</code> 정의를 생성자 함수에 작성할 수 있습니다. 보통 하위 형"
55613"식 구조로서가 아닌 <code>GSource</code>로서 새 source 형식을 노출하는 전형적인 사례입니다. 이렇게 하여 생성자에서 "
55614"<code>GSource*</code>를 반환합니다."
55615
55616#. (itstool) path: section/p
55617#: C/custom-gsource.c.page:222
55618msgid ""
55619"The example constructor here also demonstrates use of a child source to support cancellation conveniently. If the "
55620"<code>GCancellable</code> is cancelled, the application’s callback will be dispatched and can check for "
55621"cancellation. (The application code will need to make a pointer to the <code>GCancellable</code> available to its "
55622"callback, as a field of the callback’s user data set in <code>g_source_set_callback()</code>)."
55623msgstr ""
55624"여기 예제 생성자에서는 편하게 취소하는 방식을 지원하는 하위 source 활용법을 예를 들어 보여줍니다. "
55625"<code>GCancellable</code>를 취소처리하면, 프로그램의 콜백 함수를 실행하여 취소 여부를확인할 수 있습니다(프로그램 코"
55626"드에서는 <code>g_source_set_callback()</code> 함수의 콜백 사용자 데이터 세트로, 콜백 함수에 <code>GCancellable</"
55627"code> 에 접근할 수 있는 포인터를 만들어아합니다.)"
55628
55629#. (itstool) path: section/code
55630#: C/custom-gsource.c.page:230
55631#, no-wrap
55632msgid ""
55633"\n"
55634"GSource *\n"
55635"message_queue_source_new (GAsyncQueue    *queue,\n"
55636"                          GDestroyNotify  destroy_message,\n"
55637"                          GCancellable   *cancellable)\n"
55638"{\n"
55639"  GSource *source;  /* alias of @message_queue_source */\n"
55640"  MessageQueueSource *message_queue_source;  /* alias of @source */\n"
55641"\n"
55642"  g_return_val_if_fail (queue != NULL, NULL);\n"
55643"  g_return_val_if_fail (cancellable == NULL ||\n"
55644"                        G_IS_CANCELLABLE (cancellable), NULL);\n"
55645"\n"
55646"  source = g_source_new (&amp;message_queue_source_funcs,\n"
55647"                         sizeof (MessageQueueSource));\n"
55648"  message_queue_source = (MessageQueueSource *) source;\n"
55649"\n"
55650"  /* The caller can overwrite this name with something more useful later. */\n"
55651"  g_source_set_name (source, \"MessageQueueSource\");\n"
55652"\n"
55653"  message_queue_source-&gt;queue = g_async_queue_ref (queue);\n"
55654"  message_queue_source-&gt;destroy_message = destroy_message;\n"
55655"\n"
55656"  /* Add a cancellable source. */\n"
55657"  if (cancellable != NULL)\n"
55658"    {\n"
55659"      GSource *cancellable_source;\n"
55660"\n"
55661"      cancellable_source = g_cancellable_source_new (cancellable);\n"
55662"      g_source_set_dummy_callback (cancellable_source);\n"
55663"      g_source_add_child_source (source, cancellable_source);\n"
55664"      g_source_unref (cancellable_source);\n"
55665"    }\n"
55666"\n"
55667"  return source;\n"
55668"}"
55669msgstr ""
55670"\n"
55671"GSource *\n"
55672"message_queue_source_new (GAsyncQueue    *queue,\n"
55673"                          GDestroyNotify  destroy_message,\n"
55674"                          GCancellable   *cancellable)\n"
55675"{\n"
55676"  GSource *source;  /* alias of @message_queue_source */\n"
55677"  MessageQueueSource *message_queue_source;  /* alias of @source */\n"
55678"\n"
55679"  g_return_val_if_fail (queue != NULL, NULL);\n"
55680"  g_return_val_if_fail (cancellable == NULL ||\n"
55681"                        G_IS_CANCELLABLE (cancellable), NULL);\n"
55682"\n"
55683"  source = g_source_new (&amp;message_queue_source_funcs,\n"
55684"                         sizeof (MessageQueueSource));\n"
55685"  message_queue_source = (MessageQueueSource *) source;\n"
55686"\n"
55687"  /* The caller can overwrite this name with something more useful later. */\n"
55688"  g_source_set_name (source, \"MessageQueueSource\");\n"
55689"\n"
55690"  message_queue_source-&gt;queue = g_async_queue_ref (queue);\n"
55691"  message_queue_source-&gt;destroy_message = destroy_message;\n"
55692"\n"
55693"  /* Add a cancellable source. */\n"
55694"  if (cancellable != NULL)\n"
55695"    {\n"
55696"      GSource *cancellable_source;\n"
55697"\n"
55698"      cancellable_source = g_cancellable_source_new (cancellable);\n"
55699"      g_source_set_dummy_callback (cancellable_source);\n"
55700"      g_source_add_child_source (source, cancellable_source);\n"
55701"      g_source_unref (cancellable_source);\n"
55702"    }\n"
55703"\n"
55704"  return source;\n"
55705"}"
55706
55707#. (itstool) path: section/title
55708#: C/custom-gsource.c.page:270
55709msgid "Complete Example"
55710msgstr "완전한 예제"
55711
55712#. (itstool) path: listing/title
55713#: C/custom-gsource.c.page:273
55714msgid "Complete Example Code"
55715msgstr "완전한 예제 코드"
55716
55717#. (itstool) path: listing/code
55718#: C/custom-gsource.c.page:275
55719#, no-wrap
55720msgid ""
55721"/**\n"
55722" * MessageQueueSource:\n"
55723" *\n"
55724" * This is a #GSource which wraps a #GAsyncQueue and is dispatched whenever a\n"
55725" * message can be pulled off the queue. Messages can be enqueued from any\n"
55726" * thread.\n"
55727" *\n"
55728" * The callbacks dispatched by a #MessageQueueSource have type\n"
55729" * #MessageQueueSourceFunc.\n"
55730" *\n"
55731" * #MessageQueueSource supports adding a #GCancellable child source which will\n"
55732" * additionally dispatch if a provided #GCancellable is cancelled.\n"
55733" */\n"
55734"typedef struct {\n"
55735"  GSource         parent;\n"
55736"  GAsyncQueue    *queue;  /* owned */\n"
55737"  GDestroyNotify  destroy_message;\n"
55738"} MessageQueueSource;\n"
55739"\n"
55740"/**\n"
55741" * MessageQueueSourceFunc:\n"
55742" * @message: (transfer full) (nullable): message pulled off the queue\n"
55743" * @user_data: user data provided to g_source_set_callback()\n"
55744" *\n"
55745" * Callback function type for #MessageQueueSource.\n"
55746" */\n"
55747"typedef gboolean (*MessageQueueSourceFunc) (gpointer message,\n"
55748"                                            gpointer user_data);\n"
55749"\n"
55750"static gboolean\n"
55751"message_queue_source_prepare (GSource *source,\n"
55752"                              gint    *timeout_)\n"
55753"{\n"
55754"  MessageQueueSource *message_queue_source = (MessageQueueSource *) source;\n"
55755"\n"
55756"  return (g_async_queue_length (message_queue_source-&gt;queue) &gt; 0);\n"
55757"}\n"
55758"\n"
55759"static gboolean\n"
55760"message_queue_source_dispatch (GSource     *source,\n"
55761"                               GSourceFunc  callback,\n"
55762"                               gpointer     user_data)\n"
55763"{\n"
55764"  MessageQueueSource *message_queue_source = (MessageQueueSource *) source;\n"
55765"  gpointer message;\n"
55766"  MessageQueueSourceFunc func = (MessageQueueSourceFunc) callback;\n"
55767"\n"
55768"  /* Pop a message off the queue. */\n"
55769"  message = g_async_queue_try_pop (message_queue_source-&gt;queue);\n"
55770"\n"
55771"  /* If there was no message, bail. */\n"
55772"  if (message == NULL)\n"
55773"    {\n"
55774"      /* Keep the source around to handle the next message. */\n"
55775"      return TRUE;\n"
55776"    }\n"
55777"\n"
55778"  /* @func may be %NULL if no callback was specified.\n"
55779"   * If so, drop the message. */\n"
55780"  if (func == NULL)\n"
55781"    {\n"
55782"      if (message_queue_source-&gt;destroy_message != NULL)\n"
55783"        {\n"
55784"          message_queue_source-&gt;destroy_message (message);\n"
55785"        }\n"
55786"\n"
55787"      /* Keep the source around to consume the next message. */\n"
55788"      return TRUE;\n"
55789"    }\n"
55790"\n"
55791"  return func (message, user_data);\n"
55792"}\n"
55793"\n"
55794"static void\n"
55795"message_queue_source_finalize (GSource *source)\n"
55796"{\n"
55797"  MessageQueueSource *message_queue_source = (MessageQueueSource *) source;\n"
55798"\n"
55799"  g_async_queue_unref (message_queue_source-&gt;queue);\n"
55800"}\n"
55801"\n"
55802"static gboolean\n"
55803"message_queue_source_closure_callback (gpointer message,\n"
55804"                                       gpointer user_data)\n"
55805"{\n"
55806"  GClosure *closure = user_data;\n"
55807"  GValue param_value = G_VALUE_INIT;\n"
55808"  GValue result_value = G_VALUE_INIT;\n"
55809"  gboolean retval;\n"
55810"\n"
55811"  /* The invoked function is responsible for freeing @message. */\n"
55812"  g_value_init (&amp;result_value, G_TYPE_BOOLEAN);\n"
55813"  g_value_init (&amp;param_value, G_TYPE_POINTER);\n"
55814"  g_value_set_pointer (&amp;param_value, message);\n"
55815"\n"
55816"  g_closure_invoke (closure, &amp;result_value, 1, &amp;param_value, NULL);\n"
55817"  retval = g_value_get_boolean (&amp;result_value);\n"
55818"\n"
55819"  g_value_unset (&amp;param_value);\n"
55820"  g_value_unset (&amp;result_value);\n"
55821"\n"
55822"  return retval;\n"
55823"}\n"
55824"\n"
55825"static GSourceFuncs message_queue_source_funcs =\n"
55826"  {\n"
55827"    message_queue_source_prepare,\n"
55828"    NULL,  /* check */\n"
55829"    message_queue_source_dispatch,\n"
55830"    message_queue_source_finalize,\n"
55831"    (GSourceFunc) message_queue_source_closure_callback,\n"
55832"    NULL,\n"
55833"  };\n"
55834"\n"
55835"/**\n"
55836" * message_queue_source_new:\n"
55837" * @queue: the queue to check\n"
55838" * @destroy_message: (nullable): function to free a message, or %NULL\n"
55839" * @cancellable: (nullable): a #GCancellable, or %NULL\n"
55840" *\n"
55841" * Create a new #MessageQueueSource, a type of #GSource which dispatches for\n"
55842" * each message queued to it.\n"
55843" *\n"
55844" * If a callback function of type #MessageQueueSourceFunc is connected to the\n"
55845" * returned #GSource using g_source_set_callback(), it will be invoked for each\n"
55846" * message, with the message passed as its first argument. It is responsible for\n"
55847" * freeing the message. If no callback is set, messages are automatically freed\n"
55848" * as they are queued.\n"
55849" *\n"
55850" * Returns: (transfer full): a new #MessageQueueSource\n"
55851" */\n"
55852"GSource *\n"
55853"message_queue_source_new (GAsyncQueue    *queue,\n"
55854"                          GDestroyNotify  destroy_message,\n"
55855"                          GCancellable   *cancellable)\n"
55856"{\n"
55857"  GSource *source;  /* alias of @message_queue_source */\n"
55858"  MessageQueueSource *message_queue_source;  /* alias of @source */\n"
55859"\n"
55860"  g_return_val_if_fail (queue != NULL, NULL);\n"
55861"  g_return_val_if_fail (cancellable == NULL ||\n"
55862"                        G_IS_CANCELLABLE (cancellable), NULL);\n"
55863"\n"
55864"  source = g_source_new (&amp;message_queue_source_funcs,\n"
55865"                         sizeof (MessageQueueSource));\n"
55866"  message_queue_source = (MessageQueueSource *) source;\n"
55867"\n"
55868"  /* The caller can overwrite this name with something more useful later. */\n"
55869"  g_source_set_name (source, \"MessageQueueSource\");\n"
55870"\n"
55871"  message_queue_source-&gt;queue = g_async_queue_ref (queue);\n"
55872"  message_queue_source-&gt;destroy_message = destroy_message;\n"
55873"\n"
55874"  /* Add a cancellable source. */\n"
55875"  if (cancellable != NULL)\n"
55876"    {\n"
55877"      GSource *cancellable_source;\n"
55878"\n"
55879"      cancellable_source = g_cancellable_source_new (cancellable);\n"
55880"      g_source_set_dummy_callback (cancellable_source);\n"
55881"      g_source_add_child_source (source, cancellable_source);\n"
55882"      g_source_unref (cancellable_source);\n"
55883"    }\n"
55884"\n"
55885"  return source;\n"
55886"}\n"
55887msgstr ""
55888"/**\n"
55889" * MessageQueueSource:\n"
55890" *\n"
55891" * This is a #GSource which wraps a #GAsyncQueue and is dispatched whenever a\n"
55892" * message can be pulled off the queue. Messages can be enqueued from any\n"
55893" * thread.\n"
55894" *\n"
55895" * The callbacks dispatched by a #MessageQueueSource have type\n"
55896" * #MessageQueueSourceFunc.\n"
55897" *\n"
55898" * #MessageQueueSource supports adding a #GCancellable child source which will\n"
55899" * additionally dispatch if a provided #GCancellable is cancelled.\n"
55900" */\n"
55901"typedef struct {\n"
55902"  GSource         parent;\n"
55903"  GAsyncQueue    *queue;  /* owned */\n"
55904"  GDestroyNotify  destroy_message;\n"
55905"} MessageQueueSource;\n"
55906"\n"
55907"/**\n"
55908" * MessageQueueSourceFunc:\n"
55909" * @message: (transfer full) (nullable): message pulled off the queue\n"
55910" * @user_data: user data provided to g_source_set_callback()\n"
55911" *\n"
55912" * Callback function type for #MessageQueueSource.\n"
55913" */\n"
55914"typedef gboolean (*MessageQueueSourceFunc) (gpointer message,\n"
55915"                                            gpointer user_data);\n"
55916"\n"
55917"static gboolean\n"
55918"message_queue_source_prepare (GSource *source,\n"
55919"                              gint    *timeout_)\n"
55920"{\n"
55921"  MessageQueueSource *message_queue_source = (MessageQueueSource *) source;\n"
55922"\n"
55923"  return (g_async_queue_length (message_queue_source-&gt;queue) &gt; 0);\n"
55924"}\n"
55925"\n"
55926"static gboolean\n"
55927"message_queue_source_dispatch (GSource     *source,\n"
55928"                               GSourceFunc  callback,\n"
55929"                               gpointer     user_data)\n"
55930"{\n"
55931"  MessageQueueSource *message_queue_source = (MessageQueueSource *) source;\n"
55932"  gpointer message;\n"
55933"  MessageQueueSourceFunc func = (MessageQueueSourceFunc) callback;\n"
55934"\n"
55935"  /* Pop a message off the queue. */\n"
55936"  message = g_async_queue_try_pop (message_queue_source-&gt;queue);\n"
55937"\n"
55938"  /* If there was no message, bail. */\n"
55939"  if (message == NULL)\n"
55940"    {\n"
55941"      /* Keep the source around to handle the next message. */\n"
55942"      return TRUE;\n"
55943"    }\n"
55944"\n"
55945"  /* @func may be %NULL if no callback was specified.\n"
55946"   * If so, drop the message. */\n"
55947"  if (func == NULL)\n"
55948"    {\n"
55949"      if (message_queue_source-&gt;destroy_message != NULL)\n"
55950"        {\n"
55951"          message_queue_source-&gt;destroy_message (message);\n"
55952"        }\n"
55953"\n"
55954"      /* Keep the source around to consume the next message. */\n"
55955"      return TRUE;\n"
55956"    }\n"
55957"\n"
55958"  return func (message, user_data);\n"
55959"}\n"
55960"\n"
55961"static void\n"
55962"message_queue_source_finalize (GSource *source)\n"
55963"{\n"
55964"  MessageQueueSource *message_queue_source = (MessageQueueSource *) source;\n"
55965"\n"
55966"  g_async_queue_unref (message_queue_source-&gt;queue);\n"
55967"}\n"
55968"\n"
55969"static gboolean\n"
55970"message_queue_source_closure_callback (gpointer message,\n"
55971"                                       gpointer user_data)\n"
55972"{\n"
55973"  GClosure *closure = user_data;\n"
55974"  GValue param_value = G_VALUE_INIT;\n"
55975"  GValue result_value = G_VALUE_INIT;\n"
55976"  gboolean retval;\n"
55977"\n"
55978"  /* The invoked function is responsible for freeing @message. */\n"
55979"  g_value_init (&amp;result_value, G_TYPE_BOOLEAN);\n"
55980"  g_value_init (&amp;param_value, G_TYPE_POINTER);\n"
55981"  g_value_set_pointer (&amp;param_value, message);\n"
55982"\n"
55983"  g_closure_invoke (closure, &amp;result_value, 1, &amp;param_value, NULL);\n"
55984"  retval = g_value_get_boolean (&amp;result_value);\n"
55985"\n"
55986"  g_value_unset (&amp;param_value);\n"
55987"  g_value_unset (&amp;result_value);\n"
55988"\n"
55989"  return retval;\n"
55990"}\n"
55991"\n"
55992"static GSourceFuncs message_queue_source_funcs =\n"
55993"  {\n"
55994"    message_queue_source_prepare,\n"
55995"    NULL,  /* check */\n"
55996"    message_queue_source_dispatch,\n"
55997"    message_queue_source_finalize,\n"
55998"    (GSourceFunc) message_queue_source_closure_callback,\n"
55999"    NULL,\n"
56000"  };\n"
56001"\n"
56002"/**\n"
56003" * message_queue_source_new:\n"
56004" * @queue: the queue to check\n"
56005" * @destroy_message: (nullable): function to free a message, or %NULL\n"
56006" * @cancellable: (nullable): a #GCancellable, or %NULL\n"
56007" *\n"
56008" * Create a new #MessageQueueSource, a type of #GSource which dispatches for\n"
56009" * each message queued to it.\n"
56010" *\n"
56011" * If a callback function of type #MessageQueueSourceFunc is connected to the\n"
56012" * returned #GSource using g_source_set_callback(), it will be invoked for each\n"
56013" * message, with the message passed as its first argument. It is responsible for\n"
56014" * freeing the message. If no callback is set, messages are automatically freed\n"
56015" * as they are queued.\n"
56016" *\n"
56017" * Returns: (transfer full): a new #MessageQueueSource\n"
56018" */\n"
56019"GSource *\n"
56020"message_queue_source_new (GAsyncQueue    *queue,\n"
56021"                          GDestroyNotify  destroy_message,\n"
56022"                          GCancellable   *cancellable)\n"
56023"{\n"
56024"  GSource *source;  /* alias of @message_queue_source */\n"
56025"  MessageQueueSource *message_queue_source;  /* alias of @source */\n"
56026"\n"
56027"  g_return_val_if_fail (queue != NULL, NULL);\n"
56028"  g_return_val_if_fail (cancellable == NULL ||\n"
56029"                        G_IS_CANCELLABLE (cancellable), NULL);\n"
56030"\n"
56031"  source = g_source_new (&amp;message_queue_source_funcs,\n"
56032"                         sizeof (MessageQueueSource));\n"
56033"  message_queue_source = (MessageQueueSource *) source;\n"
56034"\n"
56035"  /* The caller can overwrite this name with something more useful later. */\n"
56036"  g_source_set_name (source, \"MessageQueueSource\");\n"
56037"\n"
56038"  message_queue_source-&gt;queue = g_async_queue_ref (queue);\n"
56039"  message_queue_source-&gt;destroy_message = destroy_message;\n"
56040"\n"
56041"  /* Add a cancellable source. */\n"
56042"  if (cancellable != NULL)\n"
56043"    {\n"
56044"      GSource *cancellable_source;\n"
56045"\n"
56046"      cancellable_source = g_cancellable_source_new (cancellable);\n"
56047"      g_source_set_dummy_callback (cancellable_source);\n"
56048"      g_source_add_child_source (source, cancellable_source);\n"
56049"      g_source_unref (cancellable_source);\n"
56050"    }\n"
56051"\n"
56052"  return source;\n"
56053"}\n"
56054
56055#. (itstool) path: section/title
56056#: C/custom-gsource.c.page:282
56057msgid "Further Examples"
56058msgstr "더 많은 예제"
56059
56060#. (itstool) path: section/p
56061#: C/custom-gsource.c.page:284
56062msgid ""
56063"Sources can be more complex than the example given above. In <link href=\"http://nice.freedesktop.org/\">libnice</"
56064"link>, a custom <code>GSource</code> is needed to poll a set of sockets which changes dynamically. The "
56065"implementation is given as <code>ComponentSource</code> in <link href=\"http://cgit.freedesktop.org/libnice/"
56066"libnice/tree/agent/component.c#n941\">component.c</link> and demonstrates a more complex use of the prepare "
56067"function."
56068msgstr ""
56069"위에 보여드린 예제보다 소스가 더 복잡할 수 있습니다. <link href=\"http://nice.freedesktop.org/\">libnice</link>에"
56070"서 자체 정의한 <code>GSource</code>는 동적으로 바뀌는 소켓 세트를 폴링 처리해야 합니다. 구현체는 <link href="
56071"\"http://cgit.freedesktop.org/libnice/libnice/tree/agent/component.c#n941\">component.c</link>의 "
56072"<code>ComponentSource</code>를 들 수 있으며, 준비 함수보다 더욱 복잡한 활용의 예를 보여줍니다."
56073
56074#. (itstool) path: section/p
56075#: C/custom-gsource.c.page:293
56076msgid ""
56077"Another example is a custom source to interface GnuTLS with GLib in its <code>GTlsConnection</code> "
56078"implementation. <link href=\"https://git.gnome.org/browse/glib-networking/tree/tls/gnutls/gtlsconnection-gnutls."
56079"c#n871\"><code>GTlsConnectionGnutlsSource</code></link> synchronizes the main thread and a TLS worker thread which "
56080"performs the blocking TLS operations."
56081msgstr ""
56082"다른 예제로는 GLib의 <code>GTlsConnection</code> 구현체에서 GLib용 GnuTLS 인터페이스를 제공하는 부분입니다. <link "
56083"href=\"https://git.gnome.org/browse/glib-networking/tree/tls/gnutls/gtlsconnection-gnutls."
56084"c#n871\"><code>GTlsConnectionGnutlsSource</code></link>는 메인 스레드와 TLS 처리 블로킹을 수행하는 TLS 워커 스레드"
56085"를 동기화합니다."
56086
56087#~ msgid ""
56088#~ "const Lang = imports.lang;\n"
56089#~ "const Gtk = imports.gi.Gtk;"
56090#~ msgstr ""
56091#~ "const Lang = imports.lang;\n"
56092#~ "const Gtk = imports.gi.Gtk;"
56093
56094#~ msgid ""
56095#~ "\n"
56096#~ "const WelcomeToTheGrid = new Lang.Class({\n"
56097#~ "    Name: 'Welcome to the Grid',\n"
56098#~ "\n"
56099#~ "    // Create the application itself\n"
56100#~ "    _init: function() {\n"
56101#~ "        this.application = new Gtk.Application();\n"
56102#~ "\n"
56103#~ "        // Connect 'activate' and 'startup' signals to the callback functions\n"
56104#~ "        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
56105#~ "        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
56106#~ "    },\n"
56107#~ "\n"
56108#~ "    // Callback function for 'activate' signal presents windows when active\n"
56109#~ "    _onActivate: function() {\n"
56110#~ "        this._window.present();\n"
56111#~ "    },\n"
56112#~ "\n"
56113#~ "    // Callback function for 'startup' signal builds the UI\n"
56114#~ "    _onStartup: function() {\n"
56115#~ "        this._buildUI ();\n"
56116#~ "    },\n"
56117#~ msgstr ""
56118#~ "\n"
56119#~ "const WelcomeToTheGrid = new Lang.Class({\n"
56120#~ "    Name: 'Welcome to the Grid',\n"
56121#~ "\n"
56122#~ "    // Create the application itself\n"
56123#~ "    _init: function() {\n"
56124#~ "        this.application = new Gtk.Application();\n"
56125#~ "\n"
56126#~ "        // Connect 'activate' and 'startup' signals to the callback functions\n"
56127#~ "        this.application.connect('activate', Lang.bind(this, this._onActivate));\n"
56128#~ "        this.application.connect('startup', Lang.bind(this, this._onStartup));\n"
56129#~ "    },\n"
56130#~ "\n"
56131#~ "    // Callback function for 'activate' signal presents windows when active\n"
56132#~ "    _onActivate: function() {\n"
56133#~ "        this._window.present();\n"
56134#~ "    },\n"
56135#~ "\n"
56136#~ "    // Callback function for 'startup' signal builds the UI\n"
56137#~ "    _onStartup: function() {\n"
56138#~ "        this._buildUI ();\n"
56139#~ "    },\n"
56140
56141#~ msgid ""
56142#~ "\n"
56143#~ "const HelloGNOME = new Lang.Class ({\n"
56144#~ "    Name: 'Hello GNOME',\n"
56145#~ msgstr ""
56146#~ "\n"
56147#~ "const HelloGNOME = new Lang.Class ({\n"
56148#~ "    Name: 'Hello GNOME',\n"
56149#~ "이\n"
56150
56151#~ msgid ""
56152#~ "#!/usr/bin/gjs\n"
56153#~ "\n"
56154#~ "const Gio = imports.gi.Gio;\n"
56155#~ "const GLib = imports.gi.GLib;\n"
56156#~ "const Gtk = imports.gi.Gtk;\n"
56157#~ "const Lang = imports.lang;\n"
56158#~ "\n"
56159#~ "const ImageExample = new Lang.Class ({\n"
56160#~ "\tName: 'Image Example',\n"
56161#~ "\n"
56162#~ "\t/* Create the application itself\n"
56163#~ "\t   This boilerplate code is needed to build any GTK+ application. */\n"
56164#~ "        _init: function () {\n"
56165#~ "   \t     this.application = new Gtk.Application ({\n"
56166#~ "  \t          application_id: 'org.example.jsimage',\n"
56167#~ "  \t          flags: Gio.ApplicationFlags.FLAGS_NONE\n"
56168#~ "   \t     });\n"
56169#~ "\n"
56170#~ "\t// Connect 'activate' and 'startup' signals to the callback functions\n"
56171#~ "\tthis.application.connect('activate', Lang.bind(this, this._onActivate));\n"
56172#~ "\tthis.application.connect('startup', Lang.bind(this, this._onStartup));\n"
56173#~ "\t},\n"
56174#~ "\n"
56175#~ "\t// Callback function for 'activate' signal presents windows when active\n"
56176#~ "\t_onActivate: function () {\n"
56177#~ "\t\tthis._window.present ();\n"
56178#~ "\t},\n"
56179#~ "\n"
56180#~ "\t// Callback function for 'startup' signal initializes menus and builds the UI\n"
56181#~ "\t_onStartup: function () {\n"
56182#~ "\t\tthis._buildUI ();\n"
56183#~ "\t},\n"
56184#~ "\n"
56185#~ "\n"
56186#~ "\n"
56187#~ "\n"
56188#~ "\t// Build the application's UI\n"
56189#~ "\t_buildUI: function () {\n"
56190#~ "\n"
56191#~ "\t\t// Create the application window\n"
56192#~ "        \tthis._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
56193#~ "                                                     \t     window_position: Gtk.WindowPosition.CENTER,\n"
56194#~ "                                                     \t     title: \"Welcome to GNOME\",\n"
56195#~ "                                                     \t     default_height: 300,\n"
56196#~ "                                                     \t     default_width: 300 });\n"
56197#~ "\n"
56198#~ "\t\t// Create the label\n"
56199#~ "\t\tthis.jsimage = new Gtk.Image ({file: \"gnome-image.png\"});\n"
56200#~ "\t\tthis._window.add (this.jsimage);\n"
56201#~ "\n"
56202#~ "       \t \t// Show the window and all child widgets\n"
56203#~ "       \t \tthis._window.show_all();\n"
56204#~ "\t}\n"
56205#~ "\n"
56206#~ "\n"
56207#~ "});\n"
56208#~ "\n"
56209#~ "// Run the application\n"
56210#~ "let app = new ImageExample ();\n"
56211#~ "app.application.run (ARGV);\n"
56212#~ msgstr ""
56213#~ "#!/usr/bin/gjs\n"
56214#~ "\n"
56215#~ "const Gio = imports.gi.Gio;\n"
56216#~ "const GLib = imports.gi.GLib;\n"
56217#~ "const Gtk = imports.gi.Gtk;\n"
56218#~ "const Lang = imports.lang;\n"
56219#~ "\n"
56220#~ "const ImageExample = new Lang.Class ({\n"
56221#~ "\tName: 'Image Example',\n"
56222#~ "\n"
56223#~ "\t/* Create the application itself\n"
56224#~ "\t   This boilerplate code is needed to build any GTK+ application. */\n"
56225#~ "        _init: function () {\n"
56226#~ "   \t     this.application = new Gtk.Application ({\n"
56227#~ "  \t          application_id: 'org.example.jsimage',\n"
56228#~ "  \t          flags: Gio.ApplicationFlags.FLAGS_NONE\n"
56229#~ "   \t     });\n"
56230#~ "\n"
56231#~ "\t// Connect 'activate' and 'startup' signals to the callback functions\n"
56232#~ "\tthis.application.connect('activate', Lang.bind(this, this._onActivate));\n"
56233#~ "\tthis.application.connect('startup', Lang.bind(this, this._onStartup));\n"
56234#~ "\t},\n"
56235#~ "\n"
56236#~ "\t// Callback function for 'activate' signal presents windows when active\n"
56237#~ "\t_onActivate: function () {\n"
56238#~ "\t\tthis._window.present ();\n"
56239#~ "\t},\n"
56240#~ "\n"
56241#~ "\t// Callback function for 'startup' signal initializes menus and builds the UI\n"
56242#~ "\t_onStartup: function () {\n"
56243#~ "\t\tthis._buildUI ();\n"
56244#~ "\t},\n"
56245#~ "\n"
56246#~ "\n"
56247#~ "\n"
56248#~ "\n"
56249#~ "\t// Build the application's UI\n"
56250#~ "\t_buildUI: function () {\n"
56251#~ "\n"
56252#~ "\t\t// Create the application window\n"
56253#~ "        \tthis._window = new Gtk.ApplicationWindow  ({ application: this.application,\n"
56254#~ "                                                     \t     window_position: Gtk.WindowPosition.CENTER,\n"
56255#~ "                                                     \t     title: \"Welcome to GNOME\",\n"
56256#~ "                                                     \t     default_height: 300,\n"
56257#~ "                                                     \t     default_width: 300 });\n"
56258#~ "\n"
56259#~ "\t\t// Create the label\n"
56260#~ "\t\tthis.jsimage = new Gtk.Image ({file: \"gnome-image.png\"});\n"
56261#~ "\t\tthis._window.add (this.jsimage);\n"
56262#~ "\n"
56263#~ "       \t \t// Show the window and all child widgets\n"
56264#~ "       \t \tthis._window.show_all();\n"
56265#~ "\t}\n"
56266#~ "\n"
56267#~ "\n"
56268#~ "});\n"
56269#~ "\n"
56270#~ "// Run the application\n"
56271#~ "let app = new ImageExample ();\n"
56272#~ "app.application.run (ARGV);\n"
56273
56274#~ msgid ""
56275#~ "\n"
56276#~ "# a class to define a window\n"
56277#~ "class MyWindow(Gtk.ApplicationWindow):\n"
56278#~ "    def __init__(self, app):\n"
56279#~ "        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
56280#~ "        self.set_default_size(200, 100)\n"
56281#~ "\n"
56282#~ "# a class to define a label\n"
56283#~ "<hi>\n"
56284#~ "class MyLabel(Gtk.Label):\n"
56285#~ "    def __init__(self):\n"
56286#~ "        Gtk.Label.__init__(self)\n"
56287#~ "        self.set_text(\"Hello GNOME!\")\n"
56288#~ "</hi>\n"
56289#~ "\n"
56290#~ "class MyApplication(Gtk.Application):\n"
56291#~ "    def __init__(self):\n"
56292#~ "        Gtk.Application.__init__(self)\n"
56293#~ "\n"
56294#~ "    def do_activate(self):\n"
56295#~ "        # create an instance of MyWindow\n"
56296#~ "        win = MyWindow(self)\n"
56297#~ "\n"
56298#~ "        # create an instance of MyLabel\n"
56299#~ "<hi>\n"
56300#~ "        label = MyLabel()\n"
56301#~ "</hi>\n"
56302#~ "        # and add it to the window\n"
56303#~ "<hi>\n"
56304#~ "        win.add(label)\n"
56305#~ "</hi>\n"
56306#~ "        # show the window and everything on it\n"
56307#~ "        win.show_all()"
56308#~ msgstr ""
56309#~ "\n"
56310#~ "# a class to define a window\n"
56311#~ "class MyWindow(Gtk.ApplicationWindow):\n"
56312#~ "    def __init__(self, app):\n"
56313#~ "        Gtk.Window.__init__(self, title=\"Welcome to GNOME\", application=app)\n"
56314#~ "        self.set_default_size(200, 100)\n"
56315#~ "\n"
56316#~ "# a class to define a label\n"
56317#~ "<hi>\n"
56318#~ "class MyLabel(Gtk.Label):\n"
56319#~ "    def __init__(self):\n"
56320#~ "        Gtk.Label.__init__(self)\n"
56321#~ "        self.set_text(\"Hello GNOME!\")\n"
56322#~ "</hi>\n"
56323#~ "\n"
56324#~ "class MyApplication(Gtk.Application):\n"
56325#~ "    def __init__(self):\n"
56326#~ "        Gtk.Application.__init__(self)\n"
56327#~ "\n"
56328#~ "    def do_activate(self):\n"
56329#~ "        # create an instance of MyWindow\n"
56330#~ "        win = MyWindow(self)\n"
56331#~ "\n"
56332#~ "        # create an instance of MyLabel\n"
56333#~ "<hi>\n"
56334#~ "        label = MyLabel()\n"
56335#~ "</hi>\n"
56336#~ "        # and add it to the window\n"
56337#~ "<hi>\n"
56338#~ "        win.add(label)\n"
56339#~ "</hi>\n"
56340#~ "        # show the window and everything on it\n"
56341#~ "        win.show_all()"
56342