diff --git a/translations/po/pt_BR.po b/translations/po/pt_BR.po index 27433dc..67afe54 100644 --- a/translations/po/pt_BR.po +++ b/translations/po/pt_BR.po @@ -1,747 +1,615 @@ # Brazilian Portuguese translation for Python GTK+ 3 Tutorial # Copyright (C) GNU Free Documentation License 1.3 # This file is distributed under the same license as the Python GTK+ 3 Tutorial package. -# Rafael Fontenelle , 2020. +# Rafael Fontenelle , 2020-2024. # msgid "" msgstr "" "Project-Id-Version: Python GTK+ 3 Tutorial 3.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-18 20:31+0200\n" -"PO-Revision-Date: 2020-04-19 13:48-0300\n" +"POT-Creation-Date: 2021-06-30 15:27+0200\n" +"PO-Revision-Date: 2024-04-28 00:03-0300\n" "Last-Translator: Rafael Fontenelle \n" -"Language-Team: Brazilian Portuguese \n" +"Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" -"X-Generator: Gtranslator 3.36.0\n" +"X-Generator: Gtranslator 46.0\n" -#: ../../source/iconview.txt:2 -msgid "IconView" -msgstr "IconView" - -#: ../../source/iconview.txt:3 -msgid "" -"A :class:`Gtk.IconView` is a widget that displays a collection of icons in a " -"grid view. It supports features such as drag and drop, multiple selections " -"and item reordering." -msgstr "" -"A :class:`Gtk.IconView` é um widget que exibe uma coleção de ícones em uma " -"visualização de grade. Ele possui suporte a recursos como arrastar e soltar, " -"seleções múltiplas e reordenação de itens." - -#: ../../source/iconview.txt:5 -msgid "" -"Similarly to :class:`Gtk.TreeView`, :class:`Gtk.IconView` uses a :class:`Gtk." -"ListStore` for its model. Instead of using :ref:`cell renderers " -"`, :class:`Gtk.IconView` requires that one of the columns in " -"its :class:`Gtk.ListStore` contains :class:`GdkPixbuf.Pixbuf` objects." -msgstr "" -"Similarmente a :class:`Gtk.TreeView`, :class:`Gtk.IconView` usa um :class:" -"`Gtk.ListStore` para seu modelo. Em vez de usar :ref:`renderizadores de " -"célula `, :class:`Gtk.IconView` requer que uma das colunas em " -"seu :class:`Gtk.ListStore` contenha objetos :class:`GdkPixbuf.Pixbuf`." +#: ../../source/application.txt:4 +msgid "Application" +msgstr "Application" -#: ../../source/iconview.txt:7 +#: ../../source/application.txt:6 msgid "" -":class:`Gtk.IconView` supports numerous selection modes to allow for either " -"selecting multiple icons at a time, restricting selections to just one item " -"or disallowing selecting items completely. To specify a selection mode, the :" -"meth:`Gtk.IconView.set_selection_mode` method is used with one of the :class:" -"`Gtk.SelectionMode` selection modes." +":class:`Gtk.Application` encompasses many repetitive tasks that a modern " +"application needs such as handling multiple instances, D-Bus activation, " +"opening files, command line parsing, startup/shutdown, menu management, " +"window management, and more." msgstr "" -":class:`Gtk.IconView` possui suporte a vários modos de seleção para permitir " -"a seleção de vários ícones por vez, restringindo seleções para apenas um " -"item ou desaprovando a seleção de itens completamente. Para especificar um " -"modo de seleção, o método :meth:`Gtk.IconView.set_selection_mode` é usado " -"com um dos modos de seleção :class:`Gtk.SelectionMode`." - -#: ../../source/iconview.txt:10 ../../source/layout.txt:40 -#: ../../source/layout.txt:97 ../../source/layout.txt:123 -#: ../../source/layout.txt:156 ../../source/layout.txt:180 -#: ../../source/layout.txt:212 ../../source/layout.txt:232 -#: ../../source/button_widgets.txt:18 ../../source/button_widgets.txt:39 -#: ../../source/button_widgets.txt:78 ../../source/button_widgets.txt:95 -#: ../../source/button_widgets.txt:131 ../../source/button_widgets.txt:150 -#: ../../source/spinner.txt:12 ../../source/spinner.txt:29 -#: ../../source/layout-table.txt:26 ../../source/combobox.txt:29 -#: ../../source/builder.txt:118 ../../source/entry.txt:32 -#: ../../source/clipboard.txt:17 ../../source/cellrenderers.txt:39 -#: ../../source/cellrenderers.txt:59 ../../source/cellrenderers.txt:74 -#: ../../source/cellrenderers.txt:98 ../../source/cellrenderers.txt:116 -#: ../../source/cellrenderers.txt:138 ../../source/menus.txt:80 -#: ../../source/textview.txt:115 ../../source/label.txt:48 -#: ../../source/dialogs.txt:46 ../../source/dialogs.txt:66 -#: ../../source/dialogs.txt:130 ../../source/popover.txt:19 -#: ../../source/popover.txt:34 ../../source/drag_and_drop.txt:74 -#: ../../source/application.txt:61 ../../source/progressbar.txt:32 -msgid "Example" -msgstr "Exemplo" +":class:`Gtk.Application` abrange muitas tarefas repetitivas que um " +"aplicativo moderno precisa, como manipular várias instâncias, ativação do D-" +"Bus, abertura de arquivos, análise de linha de comando, inicialização/" +"desligamento, gerenciamento de menus, gerenciamento de janelas e muito mais." -#: ../../source/layout.txt:4 -msgid "Layout Containers" -msgstr "Contêineres de Layout" +#: ../../source/application.txt:12 ../../source/menus.txt:17 +msgid "Actions" +msgstr "Ações" -#: ../../source/layout.txt:5 +#: ../../source/application.txt:14 msgid "" -"While many GUI toolkits require you to precisely place widgets in a window, " -"using absolute positioning, GTK+ uses a different approach. Rather than " -"specifying the position and size of each widget in the window, you can " -"arrange your widgets in rows, columns, and/or tables. The size of your " -"window can be determined automatically, based on the sizes of the widgets it " -"contains. And the sizes of the widgets are, in turn, determined by the " -"amount of text they contain, or the minimum and maximum sizes that you " -"specify, and/or how you have requested that the available space should be " -"shared between sets of widgets. You can perfect your layout by specifying " -"padding distance and centering values for each of your widgets. GTK+ then " -"uses all this information to resize and reposition everything sensibly and " -"smoothly when the user manipulates the window." +":class:`Gio.Action` is a way to expose any single task your application or " +"widget does by a name. These actions can be disabled/enabled at runtime and " +"they can either be activated or have a state changed (if they contain state)." msgstr "" -"Enquanto muitos toolkits de GUI exigem que você coloque precisamente widgets " -"em uma janela, usando posicionamento absoluto, o GTK+ usa uma abordagem " -"diferente. Em vez de especificar a posição e o tamanho de cada widget na " -"janela, você pode organizar seus widgets em linhas, colunas e/ou tabelas. O " -"tamanho da sua janela pode ser determinado automaticamente, com base nos " -"tamanhos dos widgets que ela contém. E os tamanhos dos widgets, por sua vez, " -"são determinados pela quantidade de texto que eles contêm, ou os tamanhos " -"mínimo e máximo que você especifica, e/ou como você solicitou que o espaço " -"disponível seja compartilhado entre conjuntos de widgets. Você pode " -"aperfeiçoar seu layout especificando a distância de preenchimento e os " -"valores de centralização para cada um de seus widgets. O GTK+ usa todas " -"essas informações para redimensionar e reposicionar tudo de maneira sensata " -"e suave quando o usuário manipula a janela." +":class:`Gio.Action` é uma maneira de expor qualquer tarefa que seu " +"aplicativo ou widget fizer por um nome. Essas ações podem ser desabilitadas/" +"habilitadas no tempo de execução e podem ser ativadas ou ter um estado " +"alterado (se elas contiverem estado)." -#: ../../source/layout.txt:19 +#: ../../source/application.txt:18 msgid "" -"GTK+ arranges widgets hierarchically, using *containers*. They are invisible " -"to the end user and are inserted into a window, or placed within each other " -"to layout components. There are two flavours of containers: single-child " -"containers, which are all descendants of :class:`Gtk.Bin`, and multiple-" -"child containers, which are descendants of :class:`Gtk.Container`. The most " -"commonly used are vertical or horizontal boxes (:class:`Gtk.Box`) and grids " -"(:class:`Gtk.Grid`)." +"The reason to use actions is to separate out the logic from the UI. For " +"example this allows using a menubar on OSX and a gear menu on GNOME both " +"simply referencing the name of an action. The main implementation of this " +"you will be using is :class:`Gio.SimpleAction` which will be demonstrated " +"later." msgstr "" -"O GTK+ organiza widgets hierarquicamente, usando *contêineres*. Eles são " -"invisíveis para o usuário-final e são inseridos em uma janela ou colocados " -"entre si para os componentes do layout. Existem dois tipos de contêineres: " -"contêineres filho único, todos descendentes de :class:`Gtk.Bin`, e " -"contêineres com vários filhos, que são descendentes de :class:`Gtk." -"Container`. Os mais usados são caixas verticais ou horizontais (:class:`Gtk." -"Box`) e grades (:class:`Gtk.Grid`)." - -#: ../../source/layout.txt:29 -msgid "Boxes" -msgstr "Box" +"O motivo para usar ações é separar a lógica da interface do usuário. Por " +"exemplo, isso permite usar uma barra de menu no OSX e um menu de engrenagem " +"no GNOME, simplesmente referenciando o nome de uma ação. A principal " +"implementação que você estará usando é :class:`Gio.SimpleAction` que será " +"mostrado mais tarde." -#: ../../source/layout.txt:31 +#: ../../source/application.txt:23 msgid "" -"Boxes are invisible containers into which we can pack our widgets. When " -"packing widgets into a horizontal box, the objects are inserted horizontally " -"from left to right or right to left depending on whether :meth:`Gtk.Box." -"pack_start` or :meth:`Gtk.Box.pack_end` is used. In a vertical box, widgets " -"are packed from top to bottom or vice versa. You may use any combination of " -"boxes inside or beside other boxes to create the desired effect." +"Many classes such as :class:`Gio.MenuItem` and :class:`Gtk.ModelButton` " +"support properties to set an action name." msgstr "" -"As cauxas *Box* são contêineres invisíveis nos quais podemos empacotar " -"nossos widgets. Ao agrupar widgets em uma caixa horizontal, os objetos são " -"inseridos horizontalmente da esquerda para a direita ou da direita para a " -"esquerda, dependendo se :meth:`Gtk.Box.pack_start` ou :meth:`Gtk.Box." -"pack_end` for usado. Em uma caixa vertical, os widgets são empacotados de " -"cima para baixo ou vice-versa. Você pode usar qualquer combinação de caixas " -"dentro ou ao lado de outras caixas para criar o efeito desejado." +"Muitas classes, como :class:`Gio.MenuItem` e :class:`Gtk.ModelButton` " +"suportam propriedades para definir um nome de ação." -#: ../../source/layout.txt:42 +#: ../../source/application.txt:26 msgid "" -"Let's take a look at a slightly modified version of the extended example " -"with two buttons." +"These actions can be grouped together into a :class:`Gio.ActionGroup` and " +"when these groups are added to a widget with :meth:`Gtk.Widget." +"insert_action_group()` they will gain a prefix. Such as \"win\" when added " +"to a :class:`Gtk.ApplicationWindow`. You will use the full action name when " +"referencing it such as \"app.about\" but when you create the action it will " +"just be \"about\" until added to the application." msgstr "" -"Vamos dar uma olhada em uma versão ligeiramente modificada do exemplo " -"estendido com dois botões." +"Estas ações podem ser agrupadas em um :class:`Gio.ActionGroup` e quando " +"esses grupos são adicionados a um widget com :meth:`Gtk.Widget." +"insert_action_group()`, eles ganharão um prefixo. Tal como “win” quando " +"adicionado a um :class:`Gtk.ApplicationWindow`. Você usará o nome completo " +"da ação ao fazer referência a ele, como “app.about”, mas ao criar a ação, " +"ela ficará “about” até ser adicionada ao aplicativo." -#: ../../source/layout.txt:50 +#: ../../source/application.txt:32 msgid "" -"First, we create a horizontally orientated box container where 6 pixels are " -"placed between children. This box becomes the child of the top-level window." +"You can also very easily make keybindings for actions by setting the `accel` " +"property in the :class:`Gio.Menu` file or by using :meth:`Gtk.Application." +"set_accels_for_action()`." msgstr "" -"Primeiro, criamos um contêiner de caixa orientado horizontalmente, onde 6 " -"pixels são colocados entre os filhos. Esta caixa se torna o filho da janela " -"de nível superior." +"Você também pode facilmente criar keybindings para ações definindo a " +"propriedade `accel` no arquivo :class:`Gio.Menu` ou usando :meth:`Gtk." +"Application.set_accels_for_action()`." -#: ../../source/layout.txt:56 -msgid "Subsequently, we add two different buttons to the box container." -msgstr "" -"Posteriormente, adicionamos dois botões diferentes ao contêiner da caixa." +#: ../../source/application.txt:36 ../../source/menus.txt:2 +msgid "Menus" +msgstr "Menus" -#: ../../source/layout.txt:61 +#: ../../source/application.txt:38 msgid "" -"While with :meth:`Gtk.Box.pack_start` widgets are positioned from left to " -"right, :meth:`Gtk.Box.pack_end` positions them from right to left." +"Your menus should be defined in XML using :class:`Gio.Menu` and would " +"reference the previously mentioned actions you defined. :class:`Gtk." +"Application` allows you to set a menu either via :meth:`Gtk.Application." +"set_app_menu()` or :meth:`Gtk.Application.set_menubar()`. If you make use " +"of :class:`Gio.Resource` this can automatically use the correct menu based " +"on platform, otherwise you can set them manually. A detailed example is " +"shown below." msgstr "" -"Enquanto com os widgets :meth:`Gtk.Box.pack_start` estão posicionados da " -"esquerda para a direita, :meth:`Gtk.Box.pack_end` os posiciona da direita " -"para a esquerda." +"Seus menus devem ser definidos em XML usando :class:`Gio.Menu` e referenciam " +"as ações mencionadas anteriormente que você definiu. :class:`Gtk." +"Application` permite que você defina um menu via :meth:`Gtk.Application." +"set_app_menu()` ou :meth:`Gtk.Application.set_menubar()`. Se você faz uso " +"de :class:`Gio.Resource` isto pode usar automaticamente o menu correto " +"baseado na plataforma, caso contrário você pode configurá-los manualmente. " +"Um exemplo detalhado é mostrado abaixo." -#: ../../source/layout.txt:67 -msgid "Grid" -msgstr "Grade" +#: ../../source/application.txt:46 +msgid "Command Line" +msgstr "Linha de comando" -#: ../../source/layout.txt:68 +#: ../../source/application.txt:48 msgid "" -":class:`Gtk.Grid` is a container which arranges its child widgets in rows " -"and columns, but you do not need to specify the dimensions in the " -"constructor. Children are added using :meth:`Gtk.Grid.attach`. They can span " -"multiple rows or columns. The :meth:`Gtk.Grid.attach` method takes five " -"parameters:" -msgstr "" -":class:`Gtk.Grid` é um contêiner que organiza seus widgets filhos em linhas " -"e colunas, mas você não precisa especificar as dimensões no construtor. Os " -"filhos são adicionados usando :meth:`Gtk.Grid.attach`. Eles podem abranger " -"várias linhas ou colunas. O método :meth:`Gtk.Grid.attach` usa cinco " -"parâmetros:" - -#: ../../source/layout.txt:73 -msgid "The ``child`` parameter is the :class:`Gtk.Widget` to add." -msgstr "O parâmetro ``child`` é o :class:`Gtk.Widget` para adicionar." - -#: ../../source/layout.txt:74 -msgid "``left`` is the column number to attach the left side of ``child`` to." +"When creating your application it takes a flag property of :class:`Gio." +"ApplicationFlags`. Using this you can let it handle everything itself or " +"have more custom behavior." msgstr "" -"``left`` é o número da coluna para anexar o lado esquerdo de ``child`` em." +"Ao criar seu aplicativo, ele recebe uma propriedade de flag de :class:`Gio." +"ApplicationFlags`. Usando isso, você pode permitir que ele manipule tudo " +"sozinho ou tenha um comportamento mais personalizado." -#: ../../source/layout.txt:75 +#: ../../source/application.txt:51 msgid "" -"``top`` indicates the row number to attach the top side of ``child`` to." +"You can use `HANDLES_COMMAND_LINE` to allow custom behavior in :meth:`Gio." +"Application.do_command_line()`. In combination with :meth:`Gio.Application." +"add_main_option()` to add custom options." msgstr "" -"``top`` indica o número da linha para anexar o lado superior do ``child``." +"Você pode usar o `HANDLES_COMMAND_LINE` para permitir um comportamento " +"customizado em :meth:`Gio.Application.do_command_line()`. Em combinação com :" +"meth:`Gio.Application.add_main_option()` para adicionar opções " +"personalizadas." -#: ../../source/layout.txt:76 +#: ../../source/application.txt:54 msgid "" -"``width`` and ``height`` indicate the number of columns that the ``child`` " -"will span, and the number of rows that the ``child`` will span, respectively." +"Using `HANDLES_OPEN` will do the work of simply taking file arguments for " +"you and let you handle it in :meth:`Gio.Application.do_open()`." msgstr "" -"``width`` e ``height`` indicam o número de colunas que o ``child`` irá " -"abranger, e o número de linhas que o ``child`` irá abranger, respectivamente." +"Usar `HANDLES_OPEN` fará o trabalho de simplesmente pegar argumentos de " +"arquivo para você e permitir que você os manipule em :meth:`Gio.Application." +"do_open()`." -#: ../../source/layout.txt:79 +#: ../../source/application.txt:57 msgid "" -"It is also possible to add a child next to an existing child, using :meth:" -"`Gtk.Grid.attach_next_to`, which also takes five parameters:" +"If your application is already open these will all be sent to the existing " +"instance unless you use `NON_UNIQUE` to allow multiple instances." msgstr "" -"Também é possível adicionar um child ao lado de um child existente, usando :" -"meth:`Gtk.Grid.attach_next_to`, que também usa cinco parâmetros:" +"Se o seu aplicativo já estiver aberto, todos serão enviados para a instância " +"existente, a menos que você use `NON_UNIQUE` para permitir várias instâncias." -#: ../../source/layout.txt:82 -msgid "``child`` is the :class:`Gtk.Widget` to add, as above." -msgstr "``child`` é o :class:`Gtk.Widget` para adicionar, como acima." +#: ../../source/application.txt:61 ../../source/builder.txt:118 +#: ../../source/button_widgets.txt:18 ../../source/button_widgets.txt:39 +#: ../../source/button_widgets.txt:78 ../../source/button_widgets.txt:95 +#: ../../source/button_widgets.txt:131 ../../source/button_widgets.txt:150 +#: ../../source/cellrenderers.txt:39 ../../source/cellrenderers.txt:59 +#: ../../source/cellrenderers.txt:74 ../../source/cellrenderers.txt:98 +#: ../../source/cellrenderers.txt:116 ../../source/cellrenderers.txt:138 +#: ../../source/clipboard.txt:17 ../../source/combobox.txt:32 +#: ../../source/dialogs.txt:46 ../../source/dialogs.txt:66 +#: ../../source/dialogs.txt:130 ../../source/drag_and_drop.txt:74 +#: ../../source/entry.txt:32 ../../source/expander.txt:19 +#: ../../source/iconview.txt:10 ../../source/label.txt:48 +#: ../../source/layout.txt:40 ../../source/layout.txt:97 +#: ../../source/layout.txt:123 ../../source/layout.txt:156 +#: ../../source/layout.txt:180 ../../source/layout.txt:212 +#: ../../source/layout.txt:232 ../../source/layout-table.txt:26 +#: ../../source/menus.txt:80 ../../source/popover.txt:19 +#: ../../source/popover.txt:38 ../../source/progressbar.txt:32 +#: ../../source/spinner.txt:12 ../../source/spinner.txt:29 +#: ../../source/textview.txt:115 +msgid "Example" +msgstr "Exemplo" -#: ../../source/layout.txt:83 -msgid "" -"``sibling`` is an existing child widget of ``self`` (a :class:`Gtk.Grid` " -"instance) or ``None``. The ``child`` widget will be placed next to " -"``sibling``, or if ``sibling`` is ``None``, at the beginning or end of the " -"grid." -msgstr "" -"``sibling`` é um widget filho existente de ``self`` (uma instância :class:" -"`Gtk.Grid`) ou ``None``. O widget ``child`` será colocado próximo ao " -"``sibling``, ou se ``sibling`` for ``None``, no início ou no final da grade." +#: ../../source/application.txt:69 ../../source/popover.txt:45 +msgid "See Also" +msgstr "Veja também" -#: ../../source/layout.txt:86 -msgid "" -"``side`` is a :class:`Gtk.PositionType` indicating the side of ``sibling`` " -"that ``child`` is positioned next to." -msgstr "" -"``side`` é um :class:`Gtk.PositionType` indicando o lado do ``sibling`` que " -"``child`` é posicionado ao lado de." +#: ../../source/application.txt:71 +msgid "https://wiki.gnome.org/HowDoI/GtkApplication" +msgstr "https://wiki.gnome.org/HowDoI/GtkApplication" -#: ../../source/layout.txt:88 -msgid "" -"``width`` and ``height`` indicate the number of columns and rows the " -"``child`` widget will span, respectively." -msgstr "" -"``width`` e ``height`` indicam o número de colunas e linhas que o widget " -"``child`` abrangerá, respectivamente." +#: ../../source/application.txt:72 +msgid "https://wiki.gnome.org/HowDoI/GAction" +msgstr "https://wiki.gnome.org/HowDoI/GAction" -#: ../../source/layout.txt:91 -msgid "" -"Finally, :class:`Gtk.Grid` can be used like a :class:`Gtk.Box` by just " -"using :meth:`Gtk.Grid.add`, which will place children next to each other in " -"the direction determined by the \"orientation\" property (defaults to :attr:" -"`Gtk.Orientation.HORIZONTAL`)." -msgstr "" -"Finalmente, :class:`Gtk.Grid` pode ser usado como :class:`Gtk.Box` usando " -"apenas :meth:`Gtk.Grid.add`, que colocará os filhos um ao lado do outro na " -"direção determinada pela propriedade “orientation” (o padrão é :attr:`Gtk." -"Orientation.HORIZONTAL`)." +#: ../../source/application.txt:73 +msgid "https://wiki.gnome.org/HowDoI/ApplicationMenu" +msgstr "https://wiki.gnome.org/HowDoI/ApplicationMenu" -#: ../../source/layout.txt:105 -msgid "ListBox" -msgstr "ListBox" +#: ../../source/application.txt:74 +msgid "https://wiki.gnome.org/HowDoI/GMenu" +msgstr "https://wiki.gnome.org/HowDoI/GMenu" -#: ../../source/layout.txt:107 -msgid "" -"A :class:`Gtk.ListBox` is a vertical container that contains :class:`Gtk." -"ListBoxRow` children. These rows can be dynamically sorted and filtered, and " -"headers can be added dynamically depending on the row content. It also " -"allows keyboard and mouse navigation and selection like a typical list." -msgstr "" -"A :class:`Gtk.ListBox` é um contêiner vertical que contém :class:`Gtk." -"ListBoxRow` filhos. Essas linhas podem ser classificadas e filtradas " -"dinamicamente e os cabeçalhos podem ser adicionados dinamicamente, " -"dependendo do conteúdo da linha. Também permite navegação e seleção de " -"teclado e mouse como uma lista típica." +#: ../../source/basics.txt:4 +msgid "Basics" +msgstr "Noções básicas" -#: ../../source/layout.txt:112 +#: ../../source/basics.txt:5 +msgid "This section will introduce some of the most important aspects of GTK+." +msgstr "Esta seção apresentará alguns dos aspectos mais importantes do GTK+." + +#: ../../source/basics.txt:12 +msgid "Main loop and Signals" +msgstr "Loop principal e sinais" + +#: ../../source/basics.txt:13 msgid "" -"Using :class:`Gtk.ListBox` is often an alternative to :class:`Gtk.TreeView`, " -"especially when the list content has a more complicated layout than what is " -"allowed by a :class:`Gtk.CellRenderer`, or when the content is interactive " -"(i.e. has a button in it)." +"Like most GUI toolkits, GTK+ uses an event-driven programming model. When " +"the user is doing nothing, GTK+ sits in the main loop and waits for input. " +"If the user performs some action - say, a mouse click - then the main loop " +"\"wakes up\" and delivers an event to GTK+." msgstr "" -"Usar :class:`Gtk.ListBox` é muitas vezes uma alternativa para :class:`Gtk." -"TreeView`, especialmente quando o conteúdo da lista tem um layout mais " -"complicado do que o permitido por um :class:`Gtk.CellRenderer`, ou quando o " -"conteúdo é interativo (ou seja, tem um botão)." +"Como a maioria dos toolkits de GUI, o GTK+ usa um modelo de programação " +"orientada a eventos. Quando o usuário não está fazendo nada, o GTK+ fica no " +"loop principal e aguarda a entrada. Se o usuário executar alguma ação – " +"digamos, um clique do mouse — o loop principal “acorda” e entrega um evento " +"para o GTK+." -#: ../../source/layout.txt:117 +#: ../../source/basics.txt:18 msgid "" -"Although a :class:`Gtk.ListBox` must have only :class:`Gtk.ListBoxRow` " -"children, you can add any kind of widget to it via :meth:`Gtk.Container.add` " -"and a :class:`Gtk.ListBoxRow` widget will automatically be inserted between " -"the list and the widget." +"When widgets receive an event, they frequently emit one or more signals. " +"Signals notify your program that \"something interesting happened\" by " +"invoking functions you've connected to the signal. Such functions are " +"commonly known as *callbacks*. When your callbacks are invoked, you would " +"typically take some action - for example, when an Open button is clicked you " +"might display a file chooser dialog. After a callback finishes, GTK+ will " +"return to the main loop and await more user input." msgstr "" -"Embora um :class:`Gtk.ListBox` deva ter apenas :class:`Gtk.ListBoxRow` " -"filhos, você pode adicionar qualquer tipo de widget a ele via :meth:`Gtk." -"Container.add` e um :class:`Gtk.ListBoxRow` widget será automaticamente " -"inserido entre a lista e o widget." +"Quando widgets recebem um evento, eles frequentemente emitem um ou mais " +"sinais. Sinais notificam seu programa que “algo interessante aconteceu” " +"invocando funções que você conectou ao sinal. Tais funções são comumente " +"conhecidas como *callbacks* ou *retorno de chamada*. Quando seus retornos de " +"chamada são invocados, você normalmente toma algumas ações – por exemplo, " +"quando um botão Abrir é clicado, você pode exibir uma caixa de diálogo de " +"seleção de arquivos. Depois que um retorno de chamada terminar, o GTK+ " +"retornará ao loop principal e aguardará mais entrada do usuário." -#: ../../source/layout.txt:131 -msgid "Stack and StackSwitcher" -msgstr "Stack e StackSwitcher" +#: ../../source/basics.txt:28 +msgid "A generic example is:" +msgstr "Um exemplo genérico é:" -#: ../../source/layout.txt:133 +#: ../../source/basics.txt:34 msgid "" -"A :class:`Gtk.Stack` is a container which only shows one of its children at " -"a time. In contrast to :class:`Gtk.Notebook`, :class:`Gtk.Stack` does not " -"provide a means for users to change the visible child. Instead, the :class:" -"`Gtk.StackSwitcher` widget can be used with :class:`Gtk.Stack` to provide " -"this functionality." +"Firstly, *widget* is an instance of a widget we created earlier. Next, the " +"event we are interested in. Each widget has its own particular events which " +"can occur. For instance, if you have a button you usually want to connect to " +"the \"clicked\" event. This means that when the button is clicked, the " +"signal is issued. Thirdly, the *callback* argument is the name of the " +"callback function. It contains the code which runs when signals of the " +"specified type are issued. Finally, the *data* argument includes any data " +"which should be passed when the signal is issued. However, this argument is " +"completely optional and can be left out if not required." msgstr "" -"A :class:`Gtk.Stack` é um contêiner que mostra apenas um de seus filhos por " -"vez. Em contraste com :class:`Gtk.Notebook`, :class:`Gtk.Stack` não fornece " -"um meio para os usuários alterarem o filho visível. Em vez disso, o widget :" -"class:`Gtk.StackSwitcher` pode ser usado com :class:`Gtk.Stack` para " -"fornecer essa funcionalidade." +"Em primeiro lugar, *widget* é uma instância de um widget que criamos " +"anteriormente. Em seguida, o evento em que estamos interessados. Cada widget " +"tem seus próprios eventos específicos que podem ocorrer. Por exemplo, se " +"você tem um botão, geralmente deseja se conectar ao evento “clicked”. Isso " +"significa que quando o botão é clicado, o sinal é emitido. Em terceiro " +"lugar, o argumento *callback* é o nome da função de retorno de chamada. Ele " +"contém o código que é executado quando os sinais do tipo especificado são " +"emitidos. Finalmente, o argumento *data* inclui todos os dados que devem ser " +"passados quando o sinal é emitido. No entanto, esse argumento é " +"completamente opcional e pode ser deixado de fora se não for necessário." -#: ../../source/layout.txt:139 +#: ../../source/basics.txt:46 msgid "" -"Transitions between pages can be animated as slides or fades. This can be " -"controlled with :meth:`Gtk.Stack.set_transition_type`. These animations " -"respect the \"gtk-enable-animations\" setting." +"The function returns a number that identifies this particular signal-" +"callback pair. It is required to disconnect from a signal such that the " +"callback function will not be called during any future or currently ongoing " +"emissions of the signal it has been connected to." msgstr "" -"Transições entre páginas podem ser animadas como slides ou fades. Isso pode " -"ser controlado com :meth:`Gtk.Stack.set_transition_type`. Essas animações " -"respeitam a configuração “gtk-enable-animations”." +"A função retorna um número que identifica esse par de sinal/retorno de " +"chamada específico. É necessário desconectar de um sinal de modo que a " +"função de retorno de chamada não seja chamada durante qualquer emissão " +"futura ou atual do sinal ao qual está conectada." -#: ../../source/layout.txt:143 +#: ../../source/basics.txt:56 msgid "" -"Transition speed can be adjusted with :meth:`Gtk.Stack." -"set_transition_duration`" +"If you have lost the \"handler_id\" for some reason (for example the " +"handlers were installed using :func:`Gtk.Builder.connect_signals`), you can " +"still disconnect a specific callback using the function :func:" +"`disconnect_by_func`:" msgstr "" -"A velocidade de transição pode ser ajustada com :meth:`Gtk.Stack." -"set_transition_duration`" +"Se você perdeu o “handler_id” por algum motivo (por exemplo, os " +"manipuladores foram instalados usando :func:`Gtk.Builder.connect_signals`), " +"você ainda pode desconectar um retorno de chamada específico usando a " +"função :func:`disconnect_by_func`:" -#: ../../source/layout.txt:145 +#: ../../source/basics.txt:64 msgid "" -"The :class:`Gtk.StackSwitcher` widget acts as a controller for a :class:`Gtk." -"Stack`; it shows a row of buttons to switch between the various pages of the " -"associated stack widget." +"Applications should connect to the \"destroy\" signal of the top-level " +"window. It is emitted when an object is destroyed, so when a user requests " +"that a toplevel window is closed, the default handler for this signal " +"destroys the window, but does not terminate the application. Connecting the " +"\"destroy\" signal of the top-level window to the function :func:`Gtk." +"main_quit` will result in the desired behaviour." msgstr "" -"O widget :class:`Gtk.StackSwitcher` atua como um controlador para um :class:" -"`Gtk.Stack`; Ele mostra uma linha de botões para alternar entre as várias " -"páginas do widget de pilha associado." +"Os aplicativos devem se conectar ao sinal “destroy” da janela de nível " +"superior. É emitido quando um objeto é destruído, portanto, quando um " +"usuário solicita que uma janela de nível superior é fechada, o manipulador " +"padrão para este sinal destrói a janela, mas não finaliza o aplicativo. " +"Conectar o sinal “destroy” da janela de nível superior à função :func:`Gtk." +"main_quit` resultará no comportamento desejado." -#: ../../source/layout.txt:149 +#: ../../source/basics.txt:74 msgid "" -"All the content for the buttons comes from the child properties of the :" -"class:`Gtk.Stack`." +"Calling :func:`Gtk.main_quit` makes the main loop inside of :func:`Gtk.main` " +"return." msgstr "" -"Todo o conteúdo para os botões vem das propriedades filho do :class:`Gtk." -"Stack`." +"Chamar :func:`Gtk.main_quit` faz o loop principal dentro do retorno de :func:" +"`Gtk.main`." -#: ../../source/layout.txt:152 +#: ../../source/basics.txt:77 ../../source/objects.txt:96 +msgid "Properties" +msgstr "Propriedades" + +#: ../../source/basics.txt:78 msgid "" -"It is possible to associate multiple :class:`Gtk.StackSwitcher` widgets with " -"the same :class:`Gtk.Stack` widget." +"Properties describe the configuration and state of widgets. As for signals, " +"each widget has its own particular set of properties. For example, a button " +"has the property \"label\" which contains the text of the label widget " +"inside the button. You can specify the name and value of any number of " +"properties as keyword arguments when creating an instance of a widget. To " +"create a label aligned to the right with the text \"Hello World\" and an " +"angle of 25 degrees, use:" msgstr "" -"É possível associar múltiplos widgets :class:`Gtk.StackSwitcher` com o mesmo " -"widget :class:`Gtk.Stack`." +"Propriedades descrevem a configuração e o estado dos widgets. Quanto aos " +"sinais, cada widget tem seu próprio conjunto particular de propriedades. Por " +"exemplo, um botão tem a propriedade “label”, que contém o texto do widget de " +"etiqueta dentro do botão. Você pode especificar o nome e o valor de qualquer " +"número de propriedades como argumentos nomeados ao criar uma instância de um " +"widget. Para criar um rótulo alinhado à direita com o texto “Hello World” e " +"um ângulo de 25 graus, use:" -#: ../../source/layout.txt:164 -msgid "HeaderBar" -msgstr "HeaderBar" +#: ../../source/basics.txt:89 +msgid "which is equivalent to" +msgstr "que é equivalente a" -#: ../../source/layout.txt:166 +#: ../../source/basics.txt:98 msgid "" -"A :class:`Gtk.HeaderBar` is similar to a horizontal :class:`Gtk.Box`, it " -"allows to place children at the start or the end. In addition, it allows a " -"title to be displayed. The title will be centered with respect to the width " -"of the box, even if the children at either side take up different amounts of " -"space." +"Instead of using getters and setters you can also get and set the gobject " +"properties through the \"props\" property such as ``widget.props.prop_name = " +"value``. This is equivalent to the more verbose ``widget.get_property(\"prop-" +"name\")`` and ``widget.set_property(\"prop-name\", value)``." msgstr "" -"A :class:`Gtk.HeaderBar` é semelhante a uma horizontal :class:`Gtk.Box`, " -"permite colocar filhos no início ou no final. Além disso, permite que um " -"título seja exibido. O título será centrado em relação à largura da caixa, " -"mesmo que os filhos de ambos os lados ocupem diferentes quantidades de " -"espaço." +"Em vez de usar getters e setters, você também pode obter e definir as " +"propriedades do gobject através da propriedade “props”, como ``widget.props." +"prop_name = valor``. Isto é equivalente ao mais detalhado ``widget." +"get_property(“prop-name”)`` e ``widget.set_property(“prop-name”, valor)``." -#: ../../source/layout.txt:171 +#: ../../source/basics.txt:103 msgid "" -"Since GTK+ now supports Client Side Decoration, a :class:`Gtk.HeaderBar` can " -"be used in place of the title bar (which is rendered by the Window Manager)." +"To see which properties are available for a widget in the running version of " +"GTK you can \"dir\" the \"props\" property:" msgstr "" -"Como o GTK+ agora tem suporte a Client Side Decoration, um :class:`Gtk." -"HeaderBar` pode ser usado no lugar da barra de título (que é renderizada " -"pelo Gerenciador de Janelas)." +"Para ver quais propriedades estão disponíveis para um widget na versão em " +"execução do GTK, você pode usar “dir” com a propriedade “props”:" -#: ../../source/layout.txt:174 +#: ../../source/basics.txt:110 +msgid "This will print in the console the list of properties a Gtk.Box has." +msgstr "" +"Isto irá imprimir no console a lista de propriedades que um Gtk.Box possui." + +#: ../../source/builder.txt:2 +msgid "Glade and Gtk.Builder" +msgstr "Glade e Gtk.Builder" + +#: ../../source/builder.txt:3 msgid "" -"A :class:`Gtk.HeaderBar` is usually located across the top of a window and " -"should contain commonly used controls which affect the content below. They " -"also provide access to window controls, including the close window button " -"and window menu." +"The :class:`Gtk.Builder` class offers you the opportunity to design user " +"interfaces without writing a single line of code. This is achieved by " +"defining the interface in an XML file and then loading that XML UI " +"definition at runtime using the Builder class which creates the objects " +"automatically. To avoid writing the XML manually use the `Glade `_ application which lets you create the user interface in " +"a WYSIWYG (what you see is what you get) manner" msgstr "" -"A :class:`Gtk.HeaderBar` geralmente está localizado na parte superior de uma " -"janela e deve conter controles comumente usados que afetam o conteúdo " -"abaixo. Eles também fornecem acesso a controles de janela, incluindo o botão " -"de fechar janela e o menu de janela." +"A classe :class:`Gtk.Builder` oferece a você a oportunidade de projetar " +"interfaces de usuário sem escrever uma única linha de código. Isso é " +"alcançado definindo a interface em um arquivo XML e, em seguida, carregando " +"aquela definição XML de UI em tempo de execução usando a classe Builder que " +"cria os objetos automaticamente. Para evitar a escrita do XML manualmente, " +"use o aplicativo `Glade `_, o qual permite criar a " +"interface do usuário de uma maneira WYSIWYG (o que você vê é o que obtém)" -#: ../../source/layout.txt:188 -msgid "FlowBox" -msgstr "FlowBox" +#: ../../source/builder.txt:7 +msgid "This method has several advantages:" +msgstr "Esse método possui várias vantagens:" -#: ../../source/layout.txt:190 -msgid "This example requires at least GTK+ 3.12." -msgstr "Este exemplo requer pelo menos GTK+ 3.12." +#: ../../source/builder.txt:9 +msgid "Less code needs to be written." +msgstr "Menos código precisa ser escrito." -#: ../../source/layout.txt:192 -msgid "" -"A :class:`Gtk.FlowBox` is a container that positions child widgets in " -"sequence according to its orientation." +#: ../../source/builder.txt:10 +msgid "UI changes can be seen more quickly, so UIs are able to improve." msgstr "" -"A :class:`Gtk.FlowBox` é um contêiner que posiciona widgets filhos em " -"sequência de acordo com sua orientação." +"As mudanças da interface do usuário podem ser vistas mais rapidamente, para " +"que as interfaces de usuário possam melhorar." -#: ../../source/layout.txt:195 -msgid "" -"For instance, with the horizontal orientation, the widgets will be arranged " -"from left to right, starting a new row under the previous row when " -"necessary. Reducing the width in this case will require more rows, so a " -"larger height will be requested." +#: ../../source/builder.txt:11 +msgid "Designers without programming skills can create and edit UIs." msgstr "" -"Por exemplo, com a orientação horizontal, os widgets serão organizados da " -"esquerda para a direita, iniciando uma nova linha na linha anterior, quando " -"necessário. Reduzir a largura neste caso exigirá mais linhas, portanto, uma " -"altura maior será solicitada." +"Designers sem habilidades de programação podem criar e editar interfaces de " +"usuário." -#: ../../source/layout.txt:200 +#: ../../source/builder.txt:12 msgid "" -"Likewise, with the vertical orientation, the widgets will be arranged from " -"top to bottom, starting a new column to the right when necessary. Reducing " -"the height will require more columns, so a larger width will be requested." +"The description of the user interface is independent from the programming " +"language being used." msgstr "" -"Da mesma forma, com a orientação vertical, os widgets serão organizados de " -"cima para baixo, iniciando uma nova coluna à direita quando necessário. " -"Reduzir a altura exigirá mais colunas, portanto será solicitada uma largura " -"maior." +"A descrição da interface do usuário é independente da linguagem de " +"programação utilizada." -#: ../../source/layout.txt:204 +#: ../../source/builder.txt:14 msgid "" -"The children of a :class:`Gtk.FlowBox` can be dynamically sorted and " -"filtered." +"There is still code required for handling interface changes triggered by the " +"user, but :class:`Gtk.Builder` allows you to focus on implementing that " +"functionality." msgstr "" -"Os filhos de uma :class:`Gtk.FlowBox` podem ser classificados e filtrados " -"dinamicamente." +"Ainda existe código necessário para lidar com mudanças de interface " +"acionadas pelo usuário, mas :class:`Gtk.Builder` permite que você se " +"concentre em implementar essa funcionalidade." -#: ../../source/layout.txt:206 +#: ../../source/builder.txt:17 +msgid "Creating and loading the .glade file" +msgstr "Criando e carregando o arquivo .glade" + +#: ../../source/builder.txt:18 msgid "" -"Although a :class:`Gtk.FlowBox` must have only :class:`Gtk.FlowBoxChild` " -"children, you can add any kind of widget to it via :meth:`Gtk.Container." -"add`, and a :class:`Gtk.FlowBoxChild` widget will automatically be inserted " -"between the box and the widget." +"First of all you have to download and install Glade. There are `several " +"tutorials `_ about " +"Glade, so this is not explained here in detail. Let's start by creating a " +"window with a button in it and saving it to a file named *example.glade*. " +"The resulting XML file should look like this." msgstr "" -"Embora uma :class:`Gtk.FlowBox` deva ter apenas filhos :class:`Gtk." -"FlowBoxChild`, você pode adicionar qualquer tipo de widget a ele via :meth:" -"`Gtk.Container.add`, e um widget :class:`Gtk.FlowBoxChild` será " -"automaticamente inserido entre a caixa e o widget." +"Primeiro de tudo você tem que baixar e instalar o Glade. Existem `vários " +"tutoriais `_ sobre " +"o Glade, então isso não é explicado aqui em detalhes. Vamos começar criando " +"uma janela com um botão e salvando-a em um arquivo chamado *example.glade*. " +"O arquivo XML resultante deve se parecer com isso." -#: ../../source/layout.txt:220 -msgid "Notebook" -msgstr "Notebook" +#: ../../source/builder.txt:41 +msgid "To load this file in Python we need a :class:`Gtk.Builder` object." +msgstr "" +"Para carregar este arquivo em Python, precisamos de um objeto :class:`Gtk." +"Builder`." -#: ../../source/layout.txt:222 +#: ../../source/builder.txt:48 msgid "" -"The :class:`Gtk.Notebook` widget is a :class:`Gtk.Container` whose children " -"are pages that can be switched between using tab labels along one edge." +"The second line loads all objects defined in *example.glade* into the " +"Builder object." msgstr "" -"O widget :class:`Gtk.Notebook` é um :class:`Gtk.Container` cujos filhos são " -"páginas que podem ser alternadas usando rótulos de guias ao longo de uma " -"borda." +"A segunda linha carrega todos os objetos definidos em *example.glade* no " +"objeto Builder." -#: ../../source/layout.txt:224 +#: ../../source/builder.txt:50 msgid "" -"There are many configuration options for GtkNotebook. Among other things, " -"you can choose on which edge the tabs appear (see :meth:`Gtk.Notebook." -"set_tab_pos`), whether, if there are too many tabs to fit the notebook " -"should be made bigger or scrolling arrows added (see :meth:`Gtk.Notebook." -"set_scrollable`, and whether there will be a popup menu allowing the users " -"to switch pages (see :meth:`Gtk.Notebook.popup_enable`, :meth:`Gtk.Notebook." -"popup_disable`)." +"It is also possible to load only some of the objects. The following line " +"would add only the objects (and their child objects) given in the tuple." msgstr "" -"Existem muitas opções de configuração para o GtkNotebook. Entre outras " -"coisas, você pode escolher em qual borda as abas aparecem (veja :meth:`Gtk." -"Notebook.set_tab_pos`), se houver muitas abas para caber no notebook, elas " -"devem ser maiores ou setas de rolagem serão adicionadas (veja :meth:`Gtk." -"Notebook.set_scrollable`, e se haverá um menu pop-up que permita aos " -"usuários trocar de página (veja :meth:`Gtk.Notebook.popup_enable`, :meth:" -"`Gtk.Notebook.popup_disable`)." +"Também é possível carregar apenas alguns dos objetos. A linha a seguir " +"adicionaria apenas os objetos (e seus objetos filhos) fornecidos na tupla." -#: ../../source/gallery.txt:2 -msgid "Widget Gallery" -msgstr "Galeria de widgets" +#: ../../source/builder.txt:57 +msgid "" +"These two methods exist also for loading from a string rather than a file. " +"Their corresponding names are :meth:`Gtk.Builder.add_from_string` and :meth:" +"`Gtk.Builder.add_objects_from_string` and they simply take a XML string " +"instead of a file name." +msgstr "" +"Esses dois métodos também existem para o carregamento de uma string, em vez " +"de um arquivo. Seus nomes correspondentes são :meth:`Gtk.Builder." +"add_from_string` e :meth:`Gtk.Builder.add_objects_from_string` e eles " +"simplesmente pegam uma string XML em vez de um nome de arquivo." -#: ../../source/gallery.txt:5 -msgid ":class:`Gtk.AboutDialog`" -msgstr ":class:`Gtk.AboutDialog`" +#: ../../source/builder.txt:61 +msgid "Accessing widgets" +msgstr "Acessando widgets" -#: ../../source/gallery.txt:6 -msgid ":class:`Gtk.AccelLabel`" -msgstr ":class:`Gtk.AccelLabel`" +#: ../../source/builder.txt:62 +msgid "" +"Now that the window and the button are loaded we also want to show them. " +"Therefore the :meth:`Gtk.Window.show_all` method has to be called on the " +"window. But how do we access the associated object?" +msgstr "" +"Agora que a janela e o botão estão carregados, também queremos mostrá-los. " +"Portanto, o método :meth:`Gtk.Window.show_all` deve ser chamado na janela. " +"Mas como acessamos o objeto associado?" -#: ../../source/gallery.txt:7 -msgid ":class:`Gtk.ActionBar`" -msgstr ":class:`Gtk.ActionBar`" +#: ../../source/builder.txt:71 +msgid "" +"Every widget can be retrieved from the builder by the :meth:`Gtk.Builder." +"get_object` method and the widget's *id*. It is really *that* simple." +msgstr "" +"Cada widget pode ser recuperado do construtor pelo método :meth:`Gtk.Builder." +"get_object` e pelo *id* do widget. É realmente *isso* simples." -#: ../../source/gallery.txt:8 -msgid ":class:`Gtk.AppChooserButton`" -msgstr ":class:`Gtk.AppChooserButton`" +#: ../../source/builder.txt:74 +msgid "It is also possible to get a list of all objects with" +msgstr "Também é possível obter uma lista de todos os objetos com" -#: ../../source/gallery.txt:9 -msgid ":class:`Gtk.AppChooserDialog`" -msgstr ":class:`Gtk.AppChooserDialog`" +#: ../../source/builder.txt:81 +msgid "Connecting Signals" +msgstr "Conectando sinais" -#: ../../source/gallery.txt:10 -msgid ":class:`Gtk.Assistant`" -msgstr ":class:`Gtk.Assistant`" +#: ../../source/builder.txt:82 +msgid "" +"Glade also makes it possible to define signals which you can connect to " +"handlers in your code without extracting every object from the builder and " +"connecting to the signals manually. The first thing to do is to declare the " +"signal names in Glade. For this example we will act when the window is " +"closed and when the button was pressed, so we give the name \"onDestroy\" to " +"the callback handling the \"destroy\" signal of the window and " +"\"onButtonPressed\" to the callback handling the \"pressed\" signal of the " +"button. Now the XML file should look like this." +msgstr "" +"O Glade também permite definir sinais que você pode conectar a manipuladores " +"em seu código sem extrair todos os objetos do construtor e conectar-se aos " +"sinais manualmente. A primeira coisa a fazer é declarar os nomes dos sinais " +"no Glade. Para este exemplo, vamos agir quando a janela é fechada e quando o " +"botão foi pressionado, então damos o nome “onDestroy” para o retorno de " +"chamada manipulando o sinal “destroy” da janela e “onButtonPressed” para o " +"retorno de chamada manipulando o sinal “pressed” do botão. Agora o arquivo " +"XML deve ficar assim." -#: ../../source/gallery.txt:11 -msgid ":class:`Gtk.Button`" -msgstr ":class:`Gtk.Button`" - -#: ../../source/gallery.txt:12 -msgid ":class:`Gtk.CheckButton`" -msgstr ":class:`Gtk.CheckButton`" - -#: ../../source/gallery.txt:13 -msgid ":class:`Gtk.ColorButton`" -msgstr ":class:`Gtk.ColorButton`" - -#: ../../source/gallery.txt:14 -msgid ":class:`Gtk.ColorChooserDialog`" -msgstr ":class:`Gtk.ColorChooserDialog`" - -#: ../../source/gallery.txt:15 -msgid ":class:`Gtk.ComboBox`" -msgstr ":class:`Gtk.ComboBox`" - -#: ../../source/gallery.txt:16 -msgid ":class:`Gtk.ComboBoxText`" -msgstr ":class:`Gtk.ComboBoxText`" - -#: ../../source/gallery.txt:17 -msgid ":class:`Gtk.Entry`" -msgstr ":class:`Gtk.Entry`" - -#: ../../source/gallery.txt:18 -msgid ":class:`Gtk.FileChooserButton`" -msgstr ":class:`Gtk.FileChooserButton`" - -#: ../../source/gallery.txt:19 -msgid ":class:`Gtk.FileChooserDialog`" -msgstr ":class:`Gtk.FileChooserDialog`" - -#: ../../source/gallery.txt:20 -msgid ":class:`Gtk.FlowBox`" -msgstr ":class:`Gtk.FlowBox`" - -#: ../../source/gallery.txt:21 -msgid ":class:`Gtk.FontButton`" -msgstr ":class:`Gtk.FontButton`" - -#: ../../source/gallery.txt:22 -msgid ":class:`Gtk.FontChooserDialog`" -msgstr ":class:`Gtk.FontChooserDialog`" - -#: ../../source/gallery.txt:23 -msgid ":class:`Gtk.Frame`" -msgstr ":class:`Gtk.Frame`" - -#: ../../source/gallery.txt:24 -msgid ":class:`Gtk.GLArea`" -msgstr ":class:`Gtk.GLArea`" - -#: ../../source/gallery.txt:25 -msgid ":class:`Gtk.Grid`" -msgstr ":class:`Gtk.Grid`" - -#: ../../source/gallery.txt:26 -msgid ":class:`Gtk.HeaderBar`" -msgstr ":class:`Gtk.HeaderBar`" - -#: ../../source/gallery.txt:27 -msgid ":class:`Gtk.IconView`" -msgstr ":class:`Gtk.IconView`" - -#: ../../source/gallery.txt:28 -msgid ":class:`Gtk.Image`" -msgstr ":class:`Gtk.Image`" - -#: ../../source/gallery.txt:29 -msgid ":class:`Gtk.InfoBar`" -msgstr ":class:`Gtk.InfoBar`" - -#: ../../source/gallery.txt:30 -msgid ":class:`Gtk.Label`" -msgstr ":class:`Gtk.Label`" - -#: ../../source/gallery.txt:31 -msgid ":class:`Gtk.LevelBar`" -msgstr ":class:`Gtk.LevelBar`" - -#: ../../source/gallery.txt:32 -msgid ":class:`Gtk.LinkButton`" -msgstr ":class:`Gtk.LinkButton`" - -#: ../../source/gallery.txt:33 -msgid ":class:`Gtk.ListBox`" -msgstr ":class:`Gtk.ListBox`" - -#: ../../source/gallery.txt:34 -msgid ":class:`Gtk.LockButton`" -msgstr ":class:`Gtk.LockButton`" - -#: ../../source/gallery.txt:35 -msgid ":class:`Gtk.MenuBar`" -msgstr ":class:`Gtk.MenuBar`" - -#: ../../source/gallery.txt:36 -msgid ":class:`Gtk.MenuButton`" -msgstr ":class:`Gtk.MenuButton`" - -#: ../../source/gallery.txt:37 -msgid ":class:`Gtk.MessageDialog`" -msgstr ":class:`Gtk.MessageDialog`" - -#: ../../source/gallery.txt:38 -msgid ":class:`Gtk.Notebook`" -msgstr ":class:`Gtk.Notebook`" - -#: ../../source/gallery.txt:39 -msgid ":class:`Gtk.Paned`" -msgstr ":class:`Gtk.Paned`" - -#: ../../source/gallery.txt:40 -msgid ":class:`Gtk.PlacesSidebar`" -msgstr ":class:`Gtk.PlacesSidebar`" - -#: ../../source/gallery.txt:41 -msgid ":class:`Gtk.ProgressBar`" -msgstr ":class:`Gtk.ProgressBar`" - -#: ../../source/gallery.txt:42 -msgid ":class:`Gtk.RadioButton`" -msgstr ":class:`Gtk.RadioButton`" - -#: ../../source/gallery.txt:43 -msgid ":class:`Gtk.RecentChooserDialog`" -msgstr ":class:`Gtk.RecentChooserDialog`" - -#: ../../source/gallery.txt:44 -msgid ":class:`Gtk.Scale`" -msgstr ":class:`Gtk.Scale`" - -#: ../../source/gallery.txt:45 -msgid ":class:`Gtk.Scrollbar`" -msgstr ":class:`Gtk.Scrollbar`" - -#: ../../source/gallery.txt:46 -msgid ":class:`Gtk.ScrolledWindow`" -msgstr ":class:`Gtk.ScrolledWindow`" - -#: ../../source/gallery.txt:47 -msgid ":class:`Gtk.SearchBar`" -msgstr ":class:`Gtk.SearchBar`" - -#: ../../source/gallery.txt:48 -msgid ":class:`Gtk.SearchEntry`" -msgstr ":class:`Gtk.SearchEntry`" - -#: ../../source/gallery.txt:49 -msgid ":class:`Gtk.Separator`" -msgstr ":class:`Gtk.Separator`" - -#: ../../source/gallery.txt:50 -msgid ":class:`Gtk.SpinButton`" -msgstr ":class:`Gtk.SpinButton`" - -#: ../../source/gallery.txt:51 -msgid ":class:`Gtk.Spinner`" -msgstr ":class:`Gtk.Spinner`" - -#: ../../source/gallery.txt:52 -msgid ":class:`Gtk.Stack`" -msgstr ":class:`Gtk.Stack`" - -#: ../../source/gallery.txt:53 -msgid ":class:`Gtk.StackSwitcher`" -msgstr ":class:`Gtk.StackSwitcher`" - -#: ../../source/gallery.txt:54 -msgid ":class:`Gtk.Statusbar`" -msgstr ":class:`Gtk.Statusbar`" +#: ../../source/builder.txt:90 +msgid "" +"Now we have to define the handler functions in our code. The *onDestroy* " +"should simply result in a call to :meth:`Gtk.main_quit`. When the button is " +"pressed we would like to print the string \"Hello World!\", so we define the " +"handler as follows" +msgstr "" +"Agora temos que definir as funções do manipulador em nosso código. O " +"*onDestroy* deve simplesmente resultar em uma chamada para :meth:`Gtk." +"main_quit`. Quando o botão é pressionado, gostaríamos de imprimir a string " +"“Hello World!”, Então definimos o manipulador da seguinte maneira" -#: ../../source/gallery.txt:55 -msgid ":class:`Gtk.Switch`" -msgstr ":class:`Gtk.Switch`" +#: ../../source/builder.txt:99 +msgid "" +"Next, we have to connect the signals and the handler functions. The easiest " +"way to do this is to define a *dict* with a mapping from the names to the " +"handlers and then pass it to the :meth:`Gtk.Builder.connect_signals` method." +msgstr "" +"Em seguida, temos que conectar os sinais e as funções do manipulador. A " +"maneira mais fácil de fazer isso é definir um *dict* com um mapeamento dos " +"nomes para os manipuladores e então passá-lo para o método :meth:`Gtk." +"Builder.connect_signals`." -#: ../../source/gallery.txt:56 -msgid ":class:`Gtk.TextView`" -msgstr ":class:`Gtk.TextView`" +#: ../../source/builder.txt:110 +msgid "" +"An alternative approach is to create a class which has methods that are " +"called like the signals. In our example the last code snippet could be " +"rewritten as:" +msgstr "" +"Uma abordagem alternativa é criar uma classe que tenha métodos que sejam " +"chamados como os sinais. Em nosso exemplo, o último snippet de código pode " +"ser reescrito como:" -#: ../../source/gallery.txt:57 -msgid ":class:`Gtk.ToggleButton`" -msgstr ":class:`Gtk.ToggleButton`" +#: ../../source/builder.txt:119 +msgid "The final code of the example" +msgstr "O código final do exemplo" -#: ../../source/gallery.txt:58 -msgid ":class:`Gtk.ToolPalette`" -msgstr ":class:`Gtk.ToolPalette`" +#: ../../source/builder.txt:125 +msgid "Gtk.Template" +msgstr "Gtk.Template" -#: ../../source/gallery.txt:59 -msgid ":class:`Gtk.Toolbar`" -msgstr ":class:`Gtk.Toolbar`" +#: ../../source/builder.txt:126 +msgid "" +":class:`Gtk.WidgetClass` allows UI definition files to be used to extend a " +"widget, PyGObject provides :doc:`guide/gtk_template` as a way of accessing " +"this from Python." +msgstr "" +":class:`Gtk.WidgetClass` permite que arquivos de definição de UI sejam " +"usados para estender um widget, PyGObject fornece :doc:`guide/gtk_template` " +"como uma forma de acessar isso a partir do Python." -#: ../../source/gallery.txt:60 -msgid ":class:`Gtk.TreeView`" -msgstr ":class:`Gtk.TreeView`" +#: ../../source/builder.txt:129 +msgid "" +"The UI definition file used in the example needs a small change to include a " +"*