gtkmm-documentation - master - Tutorial - Swedish

← Back to actions


Uploaded file by Anders Jonsson on 2022-08-16 10:26:55+00:00
Uploaded file by Anders Jonsson on 2022-08-25 23:52:54+00:00
5#5#
6msgid ""6msgid ""
7msgstr ""7msgstr ""
8"Project-Id-Version: gtkmm-documentation master\n"8"Project-Id-Version: gtkmm-documentation master\n"
9"POT-Creation-Date: 2025-07-08 14:05+0000\n"9"POT-Creation-Date: 2025-07-08 14:05+0000\n"
n10"PO-Revision-Date: 2022-08-16 12:26+0200\n"n10"PO-Revision-Date: 2022-08-26 01:52+0200\n"
11"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"11"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
12"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"12"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
13"Language: sv\n"13"Language: sv\n"
14"MIME-Version: 1.0\n"14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
3600"string to <methodname>set_markup()</methodname>, using the <link xlink:"3600"string to <methodname>set_markup()</methodname>, using the <link xlink:"
3601"href=\"https://docs.gtk.org/Pango/pango_markup.html\">Pango Markup syntax</"3601"href=\"https://docs.gtk.org/Pango/pango_markup.html\">Pango Markup syntax</"
3602"link>. For instance, <code> &lt;b&gt;bold text&lt;/b&gt; and &lt;s&gt;"3602"link>. For instance, <code> &lt;b&gt;bold text&lt;/b&gt; and &lt;s&gt;"
3603"strikethrough text&lt;/s&gt; </code> ."3603"strikethrough text&lt;/s&gt; </code> ."
3604msgstr ""3604msgstr ""
n3605"Gtk::Label stöder viss enkel formatering, till exempel låter det göra text i "n3605"Gtk::Label stöder viss enkel formatering, till exempel låter det dig göra "
3606"fetstil, i färg, eller större. Du kan göra detta genom att tillhandahålla en "3606"text i fetstil, i färg, eller större. Du kan göra detta genom att "
3607"sträng till <methodname>set_markup()</methodname> med <link xlink:"3607"tillhandahålla en sträng till <methodname>set_markup()</methodname> med "
3608"href=\"https://docs.gtk.org/Pango/pango_markup.html\">Pango Markup-syntax</"3608"<link xlink:href=\"https://docs.gtk.org/Pango/pango_markup.html\">Pango "
3609"link>. Exempelvis, <code> &lt;b&gt;text i fetstil&lt;/b&gt; och &lt;s&gt;"3609"Markup-syntax</link>. Exempelvis, <code> &lt;b&gt;text i fetstil&lt;/b&gt; "
3610"genomstruken text&lt;/s&gt; </code> ."3610"och &lt;s&gt;genomstruken text&lt;/s&gt; </code> ."
36113611
3612#. (itstool) path: section/para3612#. (itstool) path: section/para
3613#: C/index-in.docbook:12843613#: C/index-in.docbook:1284
3614#, fuzzy3614#, fuzzy
3615#| msgid ""3615#| msgid ""
4839msgid "AspectFrame"4839msgid "AspectFrame"
4840msgstr "AspectFrame"4840msgstr "AspectFrame"
48414841
4842#. (itstool) path: section/para4842#. (itstool) path: section/para
4843#: C/index-in.docbook:18854843#: C/index-in.docbook:1885
n4844#, fuzzyn
4845msgid ""4844msgid ""
4846"The <classname>AspectFrame</classname> widget looks like a <classname>Frame</"4845"The <classname>AspectFrame</classname> widget looks like a <classname>Frame</"
4847"classname> widget, but it also enforces the <emphasis>aspect ratio</"4846"classname> widget, but it also enforces the <emphasis>aspect ratio</"
4848"emphasis> (the ratio of the width to the height) of the child widget, adding "4847"emphasis> (the ratio of the width to the height) of the child widget, adding "
4849"extra space if necessary. For instance, this would allow you to display a "4848"extra space if necessary. For instance, this would allow you to display a "
4966"methodname> för flerobjektsbehållare tar ett argument som anger vilken "4965"methodname> för flerobjektsbehållare tar ett argument som anger vilken "
4967"komponent som ska tas bort."4966"komponent som ska tas bort."
49684967
4969#. (itstool) path: section/title4968#. (itstool) path: section/title
4970#: C/index-in.docbook:19464969#: C/index-in.docbook:1946
n4971#, fuzzyn
4972msgid "Packing"4970msgid "Packing"
4973msgstr "Packning"4971msgstr "Packning"
49744972
4975#. (itstool) path: section/para4973#. (itstool) path: section/para
4976#: C/index-in.docbook:19484974#: C/index-in.docbook:1948
5222msgid "Adding widgets"5220msgid "Adding widgets"
5223msgstr "Lägga till komponenter"5221msgstr "Lägga till komponenter"
52245222
5225#. (itstool) path: section/title5223#. (itstool) path: section/title
5226#: C/index-in.docbook:20735224#: C/index-in.docbook:2073
n5227#, fuzzyn
5228msgid "Per-child packing options"5225msgid "Per-child packing options"
5229msgstr "Packningsalternativ per underordnad"5226msgstr "Packningsalternativ per underordnad"
52305227
5231#. (itstool) path: section/para5228#. (itstool) path: section/para
5232#: C/index-in.docbook:20745229#: C/index-in.docbook:2074
5275"möjligt. Du kan till och med bestämma dig för att använda <classname>Gtk::"5272"möjligt. Du kan till och med bestämma dig för att använda <classname>Gtk::"
5276"Builder</classname>-API:t för att läsa in ditt GUI vid körning."5273"Builder</classname>-API:t för att läsa in ditt GUI vid körning."
52775274
5278#. (itstool) path: section/para5275#. (itstool) path: section/para
5279#: C/index-in.docbook:20955276#: C/index-in.docbook:2095
n5280#, fuzzyn
5281msgid "There are basically five different styles, as shown in this picture:"5277msgid "There are basically five different styles, as shown in this picture:"
n5282msgstr "Det finns i princip fem olika stilar, som kan ses i denna bild:"n5278msgstr "Det finns i grunden fem olika stilar, som kan ses i denna bild:"
52835279
5284#. (itstool) path: figure/title5280#. (itstool) path: figure/title
5285#: C/index-in.docbook:21015281#: C/index-in.docbook:2101
5286#, fuzzy5282#, fuzzy
5287msgid "Box Packing 1"5283msgid "Box Packing 1"
5518"komponenter i rader och kolumner. Dimensionerna på rutnätet behöver inte "5514"komponenter i rader och kolumner. Dimensionerna på rutnätet behöver inte "
5519"anges i konstruktorn."5515"anges i konstruktorn."
55205516
5521#. (itstool) path: section/para5517#. (itstool) path: section/para
5522#: C/index-in.docbook:22055518#: C/index-in.docbook:2205
n5523#, fuzzyn
5524msgid ""5519msgid ""
5525"Child widgets can span multiple rows or columns, using <methodname>attach()</"5520"Child widgets can span multiple rows or columns, using <methodname>attach()</"
5526"methodname>, or added next to an existing widget inside the grid with "5521"methodname>, or added next to an existing widget inside the grid with "
5527"<methodname>attach_next_to()</methodname>. Individual rows and columns of "5522"<methodname>attach_next_to()</methodname>. Individual rows and columns of "
5528"the grid can be set to have uniform height or width with "5523"the grid can be set to have uniform height or width with "
5542msgid ""5537msgid ""
5543"You can set the <emphasis>margin</emphasis> and <emphasis>expand</emphasis> "5538"You can set the <emphasis>margin</emphasis> and <emphasis>expand</emphasis> "
5544"properties of the child <classname>Widget</classname>s to control their "5539"properties of the child <classname>Widget</classname>s to control their "
5545"spacing and their behavior when the Grid is resized."5540"spacing and their behavior when the Grid is resized."
5546msgstr ""5541msgstr ""
n5547"Du kan konfigurera egenskaperna för <emphasis>marginal</emphasis> och "n5542"Du kan sätta egenskaperna för <emphasis>marginal</emphasis> och "
5548"<emphasis>expansion</emphasis> för underordnade <classname>Widget</"5543"<emphasis>expansion</emphasis> för underordnade <classname>Widget</"
5549"classname> för att styra deras utrymme och deras beteende när vår Grid får "5544"classname> för att styra deras utrymme och deras beteende när vår Grid får "
5550"storleken ändrad."5545"storleken ändrad."
55515546
5552#. (itstool) path: section/para5547#. (itstool) path: section/para
7001"auto strText = row[m_Columns.m_col_text];\n"6996"auto strText = row[m_Columns.m_col_text];\n"
7002"auto number = row[m_Columns.m_col_number];"6997"auto number = row[m_Columns.m_col_number];"
70036998
7004#. (itstool) path: section/para6999#. (itstool) path: section/para
7005#: C/index-in.docbook:28037000#: C/index-in.docbook:2803
n7006#, fuzzyn
7007msgid ""7001msgid ""
7008"The compiler will complain if you use an inappropriate type. For instance, "7002"The compiler will complain if you use an inappropriate type. For instance, "
7009"this would generate a compiler error:"7003"this would generate a compiler error:"
7010msgstr ""7004msgstr ""
n7011"Kompilatorn kommer klaga om du använder en opassande typ. Exempelvis skulle "n7005"Kompilatorn kommer klaga om du använder en olämplig typ. Exempelvis skulle "
7012"detta generera ett kompilatorfel:"7006"detta generera ett kompileringsfel:"
70137007
7014#. (itstool) path: section/programlisting7008#. (itstool) path: section/programlisting
7015#: C/index-in.docbook:28077009#: C/index-in.docbook:2807
7016#, fuzzy, no-wrap7010#, fuzzy, no-wrap
7017#| msgid ""7011#| msgid ""
7103"You can use the <methodname>append_column()</methodname> method to tell the "7097"You can use the <methodname>append_column()</methodname> method to tell the "
7104"View that it should display certain Model columns, in a certain order, with "7098"View that it should display certain Model columns, in a certain order, with "
7105"a certain column title."7099"a certain column title."
7106msgstr ""7100msgstr ""
7107"Du kan använda metoden <methodname>append_column()</methodname> för att säga "7101"Du kan använda metoden <methodname>append_column()</methodname> för att säga "
n7108"till byn att den ska visa vissa modellkolumner i en viss ordning, med en "n7102"till vyn att den ska visa vissa modellkolumner i en viss ordning, med en "
7109"viss kolumntitel."7103"viss kolumntitel."
71107104
7111#. (itstool) path: section/programlisting7105#. (itstool) path: section/programlisting
7112#: C/index-in.docbook:28537106#: C/index-in.docbook:2853
7113#, fuzzy, no-wrap7107#, fuzzy, no-wrap
7178"vår <classname>TreeModelColumn</classname> från vilken den genererar en "7172"vår <classname>TreeModelColumn</classname> från vilken den genererar en "
7179"lämplig <classname>Gtk::TreeView::Column</classname>-komponent."7173"lämplig <classname>Gtk::TreeView::Column</classname>-komponent."
71807174
7181#. (itstool) path: section/para7175#. (itstool) path: section/para
7182#: C/index-in.docbook:28857176#: C/index-in.docbook:2885
n7183#, fuzzyn
7184msgid ""7177msgid ""
7185"Here is some example code, which has a pixbuf icon and a text name in the "7178"Here is some example code, which has a pixbuf icon and a text name in the "
7186"same column:"7179"same column:"
7187msgstr ""7180msgstr ""
7188"Här är lite exempelkod som har en pixbuf-ikon och ett textnamn i samma "7181"Här är lite exempelkod som har en pixbuf-ikon och ett textnamn i samma "
7202"m_TreeView.append_column(*pColumn);</code>"7195"m_TreeView.append_column(*pColumn);</code>"
7203msgstr ""7196msgstr ""
7204"\n"7197"\n"
7205"auto pColumn = Gtk::make_managed&lt;Gtk::TreeView::Column&gt;(\"Ikonnamn\");\n"7198"auto pColumn = Gtk::make_managed&lt;Gtk::TreeView::Column&gt;(\"Ikonnamn\");\n"
7206"\n"7199"\n"
n7207"// m_columns.icon and m_columns.iconname are columns in the model.\n"n7200"// m_columns.icon och m_columns.iconname är kolumner i modellen.\n"
7208"// pColumn is the column in the TreeView:\n"7201"// pColumn är kolumnen i vår TreeView:\n"
7209"pColumn-&gt;pack_start(m_columns.icon, /* expand= */ false);\n"7202"pColumn-&gt;pack_start(m_columns.icon, /* expand= */ false);\n"
7210"pColumn-&gt;pack_start(m_columns.iconname);\n"7203"pColumn-&gt;pack_start(m_columns.iconname);\n"
7211"\n"7204"\n"
7212"m_TreeView.append_column(*pColumn);"7205"m_TreeView.append_column(*pColumn);"
72137206
9769msgid "Menus and Toolbars"9762msgid "Menus and Toolbars"
9770msgstr "Menyer och verktygsfält"9763msgstr "Menyer och verktygsfält"
97719764
9772#. (itstool) path: chapter/para9765#. (itstool) path: chapter/para
9773#: C/index-in.docbook:39759766#: C/index-in.docbook:3975
n9774#, fuzzyn
9775msgid ""9767msgid ""
9776"There are specific APIs for menus and toolbars, but you should usually deal "9768"There are specific APIs for menus and toolbars, but you should usually deal "
9777"with them together, creating <classname>Gio::SimpleAction</classname>s that "9769"with them together, creating <classname>Gio::SimpleAction</classname>s that "
9778"you can refer to in both menus and toolbars. In this way you can handle "9770"you can refer to in both menus and toolbars. In this way you can handle "
9779"activation of the action instead of responding to the menu and toolbar items "9771"activation of the action instead of responding to the menu and toolbar items "
9789"inaktivera både menyns och verktygsfältets objekt via åtgärden. "9781"inaktivera både menyns och verktygsfältets objekt via åtgärden. "
9790"<classname>Gtk::Builder</classname> kan skapa menyer och verktygsfält."9782"<classname>Gtk::Builder</classname> kan skapa menyer och verktygsfält."
97919783
9792#. (itstool) path: chapter/para9784#. (itstool) path: chapter/para
9793#: C/index-in.docbook:39839785#: C/index-in.docbook:3983
n9794#, fuzzyn
9795msgid ""9786msgid ""
9796"This involves the use of the <classname>Gio::SimpleActionGroup</classname>, "9787"This involves the use of the <classname>Gio::SimpleActionGroup</classname>, "
9797"<classname>Gio::SimpleAction</classname> and <classname>Gtk::Builder</"9788"<classname>Gio::SimpleAction</classname> and <classname>Gtk::Builder</"
9798"classname> classes, all of which should be instantiated via their "9789"classname> classes, all of which should be instantiated via their "
9799"<methodname>create()</methodname> methods, which return <classname>RefPtr</"9790"<methodname>create()</methodname> methods, which return <classname>RefPtr</"
9805"<methodname>create()</methodname>-metoder, vilka returnerar "9796"<methodname>create()</methodname>-metoder, vilka returnerar "
9806"<classname>RefPtr</classname>-pekare."9797"<classname>RefPtr</classname>-pekare."
98079798
9808#. (itstool) path: section/title9799#. (itstool) path: section/title
9809#: C/index-in.docbook:39919800#: C/index-in.docbook:3991
n9810#, fuzzyn
9811msgid "Actions"9801msgid "Actions"
9812msgstr "Åtgärder"9802msgstr "Åtgärder"
98139803
9814#. (itstool) path: section/para9804#. (itstool) path: section/para
9815#: C/index-in.docbook:39939805#: C/index-in.docbook:3993
n9816#, fuzzyn
9817msgid ""9806msgid ""
9818"First create the <classname>Gio::SimpleAction</classname>s and add them to a "9807"First create the <classname>Gio::SimpleAction</classname>s and add them to a "
9819"<classname>Gio::SimpleActionGroup</classname>, with <methodname>Gio::"9808"<classname>Gio::SimpleActionGroup</classname>, with <methodname>Gio::"
9820"ActionMap::add_action()</methodname>. (<classname>Gio::ActionMap</classname> "9809"ActionMap::add_action()</methodname>. (<classname>Gio::ActionMap</classname> "
9821"is a base class of <classname>Gio::SimpleActionGroup</classname>.) Then add "9810"is a base class of <classname>Gio::SimpleActionGroup</classname>.) Then add "
9889msgid "Menubar and Toolbar"9878msgid "Menubar and Toolbar"
9890msgstr "Menyrad och verktygsfält"9879msgstr "Menyrad och verktygsfält"
98919880
9892#. (itstool) path: section/para9881#. (itstool) path: section/para
9893#: C/index-in.docbook:40339882#: C/index-in.docbook:4033
n9894#, fuzzyn
9895msgid ""9883msgid ""
9896"Next you should create a <classname>Gtk::Builder</classname>. At this point "9884"Next you should create a <classname>Gtk::Builder</classname>. At this point "
9897"is also a good idea to tell the application to respond to keyboard "9885"is also a good idea to tell the application to respond to keyboard "
9898"shortcuts, by using <methodname>Gtk::Application::set_accel_for_action()</"9886"shortcuts, by using <methodname>Gtk::Application::set_accel_for_action()</"
9899"methodname>."9887"methodname>."
9900msgstr ""9888msgstr ""
n9901"Härnäst bör du skapa en <classname>Gtk::Builder</classname>. Vid detta "n9889"Härnäst ska du skapa en <classname>Gtk::Builder</classname>. Vid detta "
9902"tillfälle är det också en bra idé att säga till programmet att svara på "9890"tillfälle är det också en bra idé att säga till programmet att svara på "
9903"tangentbordsgenvägar genom att använda <methodname>Gtk::Application::"9891"tangentbordsgenvägar genom att använda <methodname>Gtk::Application::"
9904"set_accel_for_action()</methodname>."9892"set_accel_for_action()</methodname>."
99059893
9906#. (itstool) path: section/para9894#. (itstool) path: section/para
10161"<methodname>popup()</methodname>-metod. Till exempel:"10149"<methodname>popup()</methodname>-metod. Till exempel:"
1016210150
10163#. (itstool) path: section/programlisting10151#. (itstool) path: section/programlisting
10164#: C/index-in.docbook:416610152#: C/index-in.docbook:4166
10165#, fuzzy, no-wrap10153#, fuzzy, no-wrap
nn10154#| msgid ""
10155#| "\n"
10156#| "void ExampleWindow::on_label_pressed(int /* n_press */, double x, double y)\
 >n"
10157#| "{\n"
10158#| "  const Gdk::Rectangle rect(x, y, 1, 1);\n"
10159#| "  m_MenuPopup.set_pointing_to(rect);\n"
10160#| "  m_MenuPopup.popup();\n"
10161#| "}"
10166msgid ""10162msgid ""
10167"<code>void ExampleWindow::on_label_pressed(int /* n_press */, double x, double 10163"<code>void ExampleWindow::on_label_pressed(int /* n_press */, double x, double 
>y)\n">y)\n"
10168"{\n"10164"{\n"
10169"  const Gdk::Rectangle rect(x, y, 1, 1);\n"10165"  const Gdk::Rectangle rect(x, y, 1, 1);\n"
10170"  m_MenuPopup.set_pointing_to(rect);\n"10166"  m_MenuPopup.set_pointing_to(rect);\n"
10229"det också lättare att skapa flyttbara program."10225"det också lättare att skapa flyttbara program."
1023010226
10231#. (itstool) path: section/para10227#. (itstool) path: section/para
10232#: C/index-in.docbook:419810228#: C/index-in.docbook:4198
10233#, fuzzy10229#, fuzzy
nn10230#| msgid ""
10231#| "Resource bundles are created by the <link xlink:href=\"https://developer-"
10232#| "old.gnome.org/gio/stable/glib-compile-resources.html\">glib-compile-"
10233#| "resources</link> program which takes an xml file that describes the "
10234#| "bundle, and a set of files that the xml references. These are combined "
10235#| "into a binary resource bundle."
10234msgid ""10236msgid ""
10235"Resource bundles are created by the <application>glib-compile-resources</"10237"Resource bundles are created by the <application>glib-compile-resources</"
10236"application> program which takes an xml file that describes the bundle, and "10238"application> program which takes an xml file that describes the bundle, and "
10237"a set of files that the xml references. These are combined into a binary "10239"a set of files that the xml references. These are combined into a binary "
10238"resource bundle."10240"resource bundle."
10382"Klasser härleds från <classname>Gtk::Application</classname> och "10384"Klasser härleds från <classname>Gtk::Application</classname> och "
10383"<classname>Gtk::ApplicationWindow</classname>."10385"<classname>Gtk::ApplicationWindow</classname>."
1038410386
10385#. (itstool) path: figure/title10387#. (itstool) path: figure/title
10386#: C/index-in.docbook:425610388#: C/index-in.docbook:4256
n10387#, fuzzyn
10388msgid "App and Main Menu"10389msgid "App and Main Menu"
10389msgstr "Program- och huvudmeny"10390msgstr "Program- och huvudmeny"
1039010391
10391#. (itstool) path: imageobject/imagedata10392#. (itstool) path: imageobject/imagedata
10392#. This is a reference to an external file such as an image or video. When10393#. This is a reference to an external file such as an image or video. When
10415msgid "Main Menu example"10416msgid "Main Menu example"
10416msgstr "Exempel på huvudmeny"10417msgstr "Exempel på huvudmeny"
1041710418
10418#. (itstool) path: section/para10419#. (itstool) path: section/para
10419#: C/index-in.docbook:426810420#: C/index-in.docbook:4268
n10420#, fuzzyn
10421msgid ""10421msgid ""
10422"This program contains a menubar and a toolbar. A class is derived from "10422"This program contains a menubar and a toolbar. A class is derived from "
10423"<classname>Gtk::Window</classname>."10423"<classname>Gtk::Window</classname>."
10424msgstr ""10424msgstr ""
10425"Detta program innehåller en menyrad och ett verktygsfält. En klass är "10425"Detta program innehåller en menyrad och ett verktygsfält. En klass är "
13758"stöds på alla plattformar, men signalen <literal>done</literal> kommer "13758"stöds på alla plattformar, men signalen <literal>done</literal> kommer "
13759"fortfarande sändas ut."13759"fortfarande sändas ut."
1376013760
13761#. (itstool) path: section/para13761#. (itstool) path: section/para
13762#: C/index-in.docbook:580813762#: C/index-in.docbook:5808
n13763#, fuzzyn
13764msgid ""13763msgid ""
13765"<methodname>run()</methodname> may return <literal>PrintOperation::Result::"13764"<methodname>run()</methodname> may return <literal>PrintOperation::Result::"
13766"IN_PROGRESS</literal>. To track status and handle the result or error you "13765"IN_PROGRESS</literal>. To track status and handle the result or error you "
13767"need to implement signal handlers for the <literal>done</literal> and "13766"need to implement signal handlers for the <literal>done</literal> and "
13768"<literal>status_changed</literal> signals:"13767"<literal>status_changed</literal> signals:"
15740"leak."15739"leak."
15741msgstr ""15740msgstr ""
1574215741
15743#. (itstool) path: section/title15742#. (itstool) path: section/title
15744#: C/index-in.docbook:671015743#: C/index-in.docbook:6710
t15745#, fuzzyt
15746msgid "Managed Widgets"15744msgid "Managed Widgets"
15747msgstr "Hanterade komponenter"15745msgstr "Hanterade komponenter"
1574815746
15749#. (itstool) path: section/para15747#. (itstool) path: section/para
15750#: C/index-in.docbook:671215748#: C/index-in.docbook:6712

Note: both files are merged with latest POT file.