[gnome-devel-docs] tutorials python: corrected pages for window widgets



commit 0ff11f7d32fdaeb8e568f9f925878a5b848e39cc
Author: Marta Maria Casetti <mmcasetti gmail com>
Date:   Thu Jun 14 16:42:50 2012 +0100

    tutorials python: corrected pages for window widgets

 platform-demos/C/GtkApplicationWindow.py.page |    4 ++--
 platform-demos/C/dialog.py.page               |    4 ++--
 platform-demos/C/messagedialog.py.page        |    6 +++---
 platform-demos/C/window.py.page               |    4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/platform-demos/C/GtkApplicationWindow.py.page b/platform-demos/C/GtkApplicationWindow.py.page
index 68751d2..2cef8a9 100644
--- a/platform-demos/C/GtkApplicationWindow.py.page
+++ b/platform-demos/C/GtkApplicationWindow.py.page
@@ -30,8 +30,8 @@
     Useful methods for a Gtk.ApplicationWindow widget (to be used in the class MyWindow with self. or in the function do_activate() with win.):
   </p>
   <list>
-    <item><p><code>self.set_default_size(200, 100)</code> sets the default size of the window to a width of <code>200</code> and a height of <code>100</code>; if instead of a positive number we pass <code>-1</code> we have the default size.</p></item>
-    <item><p><code>self.set_position(Gtk.WindowPosition.CENTER)</code> centers the window. Other options are described in the <link href="http://developer.gnome.org/gtk3/3.4/gtk3-Standard-Enumerations.html#GtkWindowPosition";>standard enumerations</link> (with the caveat that they should be changed on the model of Gtk.WindowPosition.CENTER).</p></item>
+    <item><p><code>set_default_size(200, 100)</code> sets the default size of the window to a width of <code>200</code> and a height of <code>100</code>; if instead of a positive number we pass <code>-1</code> we have the default size.</p></item>
+    <item><p><code>set_position(Gtk.WindowPosition.CENTER)</code> centers the window. Other options are described in the <link href="http://developer.gnome.org/gtk3/3.4/gtk3-Standard-Enumerations.html#GtkWindowPosition";>standard enumerations</link> (with the caveat that they should be changed on the model of Gtk.WindowPosition.CENTER).</p></item>
   </list>
   <p>
     In this sample we used the following:
diff --git a/platform-demos/C/dialog.py.page b/platform-demos/C/dialog.py.page
index 8d5788e..91b102e 100644
--- a/platform-demos/C/dialog.py.page
+++ b/platform-demos/C/dialog.py.page
@@ -26,8 +26,8 @@
     Useful methods for a Dialog widget:
   </p>
   <list>
-    <item><p>Instead of <code>dialog.set_modal(True)</code> we could have <code>dialog.set_modal(False)</code> followed by <code>dialog.set_destroy_with_parent(True)</code> that would destroy the dialog window if the main window is closed.</p></item>
-    <item><p><code>dialog.add_button(button_text="The Answer", response_id=42)</code>, where <code>42</code> is any integer, is an alternative to <code>dialog.add_button(button_text="text", response_id=Gtk.ResponseType.RESPONSE)</code>, where <code>RESPONSE</code> could be one of <code>OK, CANCEL, CLOSE, YES, NO, APPLY, HELP</code>, which in turn correspond to the integers <code>-5, -6,..., -11</code>.</p></item>
+    <item><p>Instead of <code>set_modal(True)</code> we could have <code>set_modal(False)</code> followed by <code>set_destroy_with_parent(True)</code> that would destroy the dialog window if the main window is closed.</p></item>
+    <item><p><code>add_button(button_text="The Answer", response_id=42)</code>, where <code>42</code> is any integer, is an alternative to <code>add_button(button_text="text", response_id=Gtk.ResponseType.RESPONSE)</code>, where <code>RESPONSE</code> could be one of <code>OK, CANCEL, CLOSE, YES, NO, APPLY, HELP</code>, which in turn correspond to the integers <code>-5, -6,..., -11</code>.</p></item>
   </list>
   <p>
     In this sample we used the following:
diff --git a/platform-demos/C/messagedialog.py.page b/platform-demos/C/messagedialog.py.page
index 6bcd0b9..c51b7cc 100644
--- a/platform-demos/C/messagedialog.py.page
+++ b/platform-demos/C/messagedialog.py.page
@@ -28,15 +28,15 @@
   <list>
     <item><p>In the constructor of MessageDialog we could set flags as <code>Gtk.DialogFlags.DESTROY_WITH_PARENT</code> (to destroy the messagedialog window when its parent window is destroyed) or as <code>Gtk.DialogFlags.MODAL</code> (no interaction with other windows of the application).</p></item>
     <item><p>In the constructor of MessageDialog we could set type as any of <code>Gtk.MessageType.INFO, Gtk.MessageType.WARNING, Gtk.MessageType.QUESTION, Gtk.MessageType.ERROR, Gtk.MessageType.OTHER</code> depending on what type of message we want.</p></item>
-    <item><p>In the constructor of MessageDialog we could set buttons as any of <code>Gtk.ButtonsType.NONE, Gtk.ButtonsType.OK, Gtk.ButtonsType.CLOSE, Gtk.ButtonsType.CANCEL, Gtk.ButtonsType.YES_NO, Gtk.ButtonsType.OK_CANCEL</code>, or any button using <code>messagedialog.add_button()</code> as in Gtk.Dialog.</p></item>
+    <item><p>In the constructor of MessageDialog we could set buttons as any of <code>Gtk.ButtonsType.NONE, Gtk.ButtonsType.OK, Gtk.ButtonsType.CLOSE, Gtk.ButtonsType.CANCEL, Gtk.ButtonsType.YES_NO, Gtk.ButtonsType.OK_CANCEL</code>, or any button using <code>add_button()</code> as in Gtk.Dialog.</p></item>
     <item><p>We could substitute the default image of the MessageDialog with another image using</p>
-    <code mime="text/x-python" style="numbered">
+    <code mime="text/x-python">
 image = Gtk.Image()
 image.set_from_stock(Gtk.STOCK_CAPS_LOCK_WARNING, Gtk.IconSize.DIALOG)
 image.show()
 messagedialog.set_image(image)</code>
     <p>where <code>Gtk.STOCK_CAPS_LOCK_WARNING</code> is any image from <link href="http://developer.gnome.org/gtk3/3.4/gtk3-Stock-Items.html";>Stock Items</link>. We could also set any image as in the Image widget, as <code>image.set_from_file("filename.png")</code>.</p></item>
-    <item><p><code>messagedialog.format_secondary_text("some secondary message")</code> sets a secondary message. The primary text becomes bold.</p></item>
+    <item><p><code>format_secondary_text("some secondary message")</code> sets a secondary message. The primary text becomes bold.</p></item>
   </list>
   <p>
     In this sample we used the following:
diff --git a/platform-demos/C/window.py.page b/platform-demos/C/window.py.page
index 94227ba..b8e841b 100644
--- a/platform-demos/C/window.py.page
+++ b/platform-demos/C/window.py.page
@@ -41,8 +41,8 @@
   </p>
   <list>
     <item><p><code>window = Gtk.Window(application=self, title="Welcome to GNOME")</code> sets the title as well, without the need for the line <code>window.set_title("Welcome to GNOME")</code>.</p></item>
-    <item><p><code>window.set_default_size(200, 100)</code> sets the default size of the window to a width of <code>200</code> and a height of <code>100</code>; if instead of a positive number we pass <code>-1</code> we have the default size.</p></item>
-    <item><p><code>window.set_position(Gtk.WindowPosition.CENTER)</code> centers the window. Other options are described in the <link href="http://developer.gnome.org/gtk3/3.4/gtk3-Standard-Enumerations.html#GtkWindowPosition";>standard enumerations</link> (with the caveat that they should be changed on the model of Gtk.WindowPosition.CENTER).</p></item>
+    <item><p><code>set_default_size(200, 100)</code> sets the default size of the window to a width of <code>200</code> and a height of <code>100</code>; if instead of a positive number we pass <code>-1</code> we have the default size.</p></item>
+    <item><p><code>set_position(Gtk.WindowPosition.CENTER)</code> centers the window. Other options are described in the <link href="http://developer.gnome.org/gtk3/3.4/gtk3-Standard-Enumerations.html#GtkWindowPosition";>standard enumerations</link> (with the caveat that they should be changed on the model of Gtk.WindowPosition.CENTER).</p></item>
   </list>
   <p>
     In this sample we used the following:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]