[gnome-devel-docs] tutorials python: display widgets' pages corrected
- From: Tiffany Antopolski <antopolski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-devel-docs] tutorials python: display widgets' pages corrected
- Date: Thu, 14 Jun 2012 17:53:13 +0000 (UTC)
commit 67acd32268fb54038a7650dda48e9fc96a78383c
Author: Marta Maria Casetti <mmcasetti gmail com>
Date: Thu Jun 14 18:02:22 2012 +0100
tutorials python: display widgets' pages corrected
platform-demos/C/image.py.page | 10 +++++-----
platform-demos/C/label.py.page | 8 ++++----
platform-demos/C/progressbar.py.page | 6 +++---
platform-demos/C/spinner.py.page | 2 +-
platform-demos/C/statusbar.py.page | 8 ++++----
5 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/platform-demos/C/image.py.page b/platform-demos/C/image.py.page
index 43cef11..247b692 100644
--- a/platform-demos/C/image.py.page
+++ b/platform-demos/C/image.py.page
@@ -62,9 +62,9 @@ class MyApplication(Gtk.Application):
<title>Useful methods for an Image widget</title>
<list>
- <item><p>To set a stock icon as image, you can use <code>image.set_from_stock(stock_id, size)</code> where <code>stock_id</code> is a stock icon such as <code>Gtk.STOCK_ABOUT</code> (more can be found at <link href="http://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items">Stock Items</link>, with the caveat that they should be modified as above) and <code>size</code> is a stock icon size to be chosen from <code>Gtk.IconSize.INVALID, Gtk.IconSize.MENU, Gtk.IconSize.SMALL_TOOLBAR, Gtk.IconSize.LARGE_TOOLBAR, Gtk.IconSize.BUTTON, Gtk.IconSize.DND, Gtk.IconSize.DIALOG</code>.</p></item>
- <item><p>You can also use <code>image.set_from_icon_name(icon_name, size)</code>, where <code>icon_name</code> is a stock icon name such as <code>"gtk-about"</code> (more can be found as above) and <code>size</code> is as above.</p></item>
- <item><p>To load an image over a network use <code>image.set_from_pixbuf(pixbuf)</code>, where <code>pixbuf</code> is a <link href="http://developer.gnome.org/gdk-pixbuf/unstable//index.html">GdkPixbuf</link>.</p>
+ <item><p>To set a stock icon as image, you can use <code>set_from_stock(stock_id, size)</code> where <code>stock_id</code> is a stock icon such as <code>Gtk.STOCK_ABOUT</code> (more can be found at <link href="http://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items">Stock Items</link>, with the caveat that they should be modified as above) and <code>size</code> is a stock icon size to be chosen from <code>Gtk.IconSize.INVALID, Gtk.IconSize.MENU, Gtk.IconSize.SMALL_TOOLBAR, Gtk.IconSize.LARGE_TOOLBAR, Gtk.IconSize.BUTTON, Gtk.IconSize.DND, Gtk.IconSize.DIALOG</code>.</p></item>
+ <item><p>You can also use <code>set_from_icon_name(icon_name, size)</code>, where <code>icon_name</code> is a stock icon name such as <code>"gtk-about"</code> (more can be found as above) and <code>size</code> is as above.</p></item>
+ <item><p>To load an image over a network use <code>set_from_pixbuf(pixbuf)</code>, where <code>pixbuf</code> is a <link href="http://developer.gnome.org/gdk-pixbuf/unstable//index.html">GdkPixbuf</link>.</p>
<code mime="text/python">
from gi.repository import Gtk
from gi.repository import GdkPixbuf
@@ -87,13 +87,13 @@ class MyWindow(Gtk.ApplicationWindow):
# add the image to the window
self.add(image)</code>
<p>If <code>preserve_aspect_ratio=True</code> we can use <code>new_from_file_at_size(filename, width, height)</code>. If <code>width</code> or <code>height</code> is <code>-1</code>, it is not constrained.</p>
- <p> For loading from an input stream, see <code>new_from_stream()</code> and <code>new_from_stream_at_scale()</code> in the documentation</p>
+ <p>For loading from an input stream, see <code>new_from_stream()</code> and <code>new_from_stream_at_scale()</code> in the documentation</p>
</item>
</list>
</section>
<section id="references">
- <title>References</title>
+ <title>API References</title>
<p>In this sample we used the following:</p>
<list>
<item><p><link href="http://developer.gnome.org/gtk3/3.4/GtkImage.html">GtkImage</link></p></item>
diff --git a/platform-demos/C/label.py.page b/platform-demos/C/label.py.page
index 8b2ea46..2961814 100644
--- a/platform-demos/C/label.py.page
+++ b/platform-demos/C/label.py.page
@@ -66,9 +66,9 @@ class MyApplication(Gtk.Application):
<title>Useful methods for a Label widgets</title>
<list>
<item><p><code>label = Gtk.Label("Hello GNOME!")</code> could also be used create a label and set the text directly.</p></item>
- <item><p><code>label.set_line_wrap(True)</code> breaks lines if the text of the label exceeds the size of the widget.</p></item>
- <item><p><code>label.set_justify(Gtk.Justification.LEFT)</code> (or <code>Gtk.Justification.RIGHT, Gtk.Justification.CENTER, Gtk.Justification.FILL</code>) sets the alignment of the lines in the text of the label relative to each other. The method has no effect on a single-line label.</p></item>
- <item><p>For decorated text we can use <code>label.set_markup("text")</code>, where <code>"text"</code> is a text in the <link href="http://developer.gnome.org/pango/stable/PangoMarkupFormat.html">Pango Markup Language</link>. An example:</p>
+ <item><p><code>set_line_wrap(True)</code> breaks lines if the text of the label exceeds the size of the widget.</p></item>
+ <item><p><code>set_justify(Gtk.Justification.LEFT)</code> (or <code>Gtk.Justification.RIGHT, Gtk.Justification.CENTER, Gtk.Justification.FILL</code>) sets the alignment of the lines in the text of the label relative to each other. The method has no effect on a single-line label.</p></item>
+ <item><p>For decorated text we can use <code>set_markup("text")</code>, where <code>"text"</code> is a text in the <link href="http://developer.gnome.org/pango/stable/PangoMarkupFormat.html">Pango Markup Language</link>. An example:</p>
<code mime="text/x-python"><![CDATA[
label.set_markup("Text can be <small>small</small>, <big>big</big>, "
"<b>bold</b>, <i>italic</i> and even point to somewhere "
@@ -79,7 +79,7 @@ label.set_markup("Text can be <small>small</small>, <big>big</big>, "
</section>
<section id="references">
- <title>References</title>
+ <title>API References</title>
<p>In this sample we used the following:</p>
<list>
<item><p><link href="http://developer.gnome.org/gtk3/3.4/GtkLabel.html">GtkLabel</link></p></item>
diff --git a/platform-demos/C/progressbar.py.page b/platform-demos/C/progressbar.py.page
index 5b737c5..f9d62e5 100644
--- a/platform-demos/C/progressbar.py.page
+++ b/platform-demos/C/progressbar.py.page
@@ -42,13 +42,13 @@
<section id="methods">
<title>Useful methods for a ProgressBar widget</title>
<list>
- <item><p>Instead of <code>progressbar.pulse()</code>, that makes the bar go back and forth, if we want the ProgressBar to "fill in" a fraction (a <code>float</code> between <code>0.0</code> and <code>1.0</code> included) of the bar that has been completed, use <code>progressbar.set_fraction(fraction)</code>.</p></item>
- <item><p>To set a text and show it (superimposed over the bar) use <code>progressbar.set_text("some text")</code> and <code>progressbar.set_show_text(True)</code>. If a text is not set and <code>progressbar.set_show_text(True)</code> the text will be the percentage of the work that has been completed.</p></item>
+ <item><p>Instead of <code>pulse()</code>, that makes the bar go back and forth, if we want the ProgressBar to "fill in" a fraction (a <code>float</code> between <code>0.0</code> and <code>1.0</code> included) of the bar that has been completed, use <code>set_fraction(fraction)</code>.</p></item>
+ <item><p>To set a text and show it (superimposed over the bar) use <code>set_text("some text")</code> and <code>set_show_text(True)</code>. If a text is not set and <code>set_show_text(True)</code> the text will be the percentage of the work that has been completed.</p></item>
</list>
</section>
<section id="references">
- <title>References</title>
+ <title>API References</title>
<p>In this sample we used the following:</p>
<list>
<item><p><link href="http://developer.gnome.org/gtk3/3.4/GtkProgressBar.html">GtkProgressBar</link></p></item>
diff --git a/platform-demos/C/spinner.py.page b/platform-demos/C/spinner.py.page
index af8091c..6ecb23e 100644
--- a/platform-demos/C/spinner.py.page
+++ b/platform-demos/C/spinner.py.page
@@ -33,7 +33,7 @@
</section>
<section id="references">
- <title>References</title>
+ <title>API References</title>
<p>In this sample we used the following:</p>
<list>
<item><p><link href="http://developer.gnome.org/gtk3/3.4/GtkSpinner.html">GtkSpinner</link></p></item>
diff --git a/platform-demos/C/statusbar.py.page b/platform-demos/C/statusbar.py.page
index d0a1497..32690d3 100644
--- a/platform-demos/C/statusbar.py.page
+++ b/platform-demos/C/statusbar.py.page
@@ -38,14 +38,14 @@
<section id="methods">
<title>Useful methods for a Statusbar widget</title>
<list>
- <item><p><code>statusbar.pop(context_id)</code> removes the first message in the statusbar stack with the given <code>context_id</code>.</p></item>
- <item><p><code>statusbar.remove_all(context_id)</code> removes all the messages in the statusbar stack with the given <code>context_id</code>.</p></item>
- <item><p><code>statusbar.remove(context_id, message_id)</code> removes the message with the given <code>message_id</code> in the statusbar stack with the given <code>context_id</code>. The <code>message_id</code> is returned by <code>statusbar.push(context_id, "the message")</code> when pushing the message on the statusbar.</p></item>
+ <item><p><code>pop(context_id)</code> removes the first message in the statusbar stack with the given <code>context_id</code>.</p></item>
+ <item><p><code>remove_all(context_id)</code> removes all the messages in the statusbar stack with the given <code>context_id</code>.</p></item>
+ <item><p><code>remove(context_id, message_id)</code> removes the message with the given <code>message_id</code> in the statusbar stack with the given <code>context_id</code>. The <code>message_id</code> is returned by <code>push(context_id, "the message")</code> when pushing the message on the statusbar.</p></item>
</list>
</section>
<section id="references">
- <title>References</title>
+ <title>API References</title>
<p>In this sample we used the following:</p>
<list>
<item><p><link href="http://developer.gnome.org/gtk3/3.4/GtkStatusbar.html">GtkStatusbar</link></p></item>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]