Commit 5423678e authored by Christoph Reiter's avatar Christoph Reiter 馃悕

GTK+ -> GTK

parent 0b0fe8ce
......@@ -6,9 +6,9 @@
|
**PyGObject** is a Python package which provides bindings for `GObject
<https://developer.gnome.org/gobject/stable/>`__ based libraries such as `GTK+
<https://developer.gnome.org/gobject/stable/>`__ based libraries such as `GTK
<https://www.gtk.org/>`__, `GStreamer <https://gstreamer.freedesktop.org/>`__,
`WebKitGTK+ <https://webkitgtk.org/>`__, `GLib
`WebKitGTK <https://webkitgtk.org/>`__, `GLib
<https://developer.gnome.org/glib/stable/>`__, `GIO
<https://developer.gnome.org/gio/stable/>`__ and many more.
......
......@@ -2,8 +2,8 @@
Further Resources
=================
`Python GTK+ 3 Tutorial <https://python-gtk-3-tutorial.readthedocs.io>`__
Many examples showing how to build an application using PyGObject and GTK+.
`Python GTK 3 Tutorial <https://python-gtk-3-tutorial.readthedocs.io>`__
Many examples showing how to build an application using PyGObject and GTK.
`Python GI API Reference <https://lazka.github.io/pgi-docs>`__
Auto generated API documentation for many libraries accessible through
......
......@@ -6,7 +6,7 @@
Getting Started
===============
To get things started we will try to run a very simple `GTK+
To get things started we will try to run a very simple `GTK
<https://www.gtk.org/>`_ based GUI application using the :doc:`PyGObject <index>` provided
Python bindings. First create a small Python script called ``hello.py`` with
the following content and save it somewhere:
......@@ -22,7 +22,7 @@ the following content and save it somewhere:
window.connect("destroy", Gtk.main_quit)
Gtk.main()
Before we can run the example application we need to install PyGObject, GTK+
Before we can run the example application we need to install PyGObject, GTK
and their dependencies. Follow the instructions for your platform below.
======================================================= ==================================================== ==========================================================
......@@ -30,9 +30,9 @@ and their dependencies. Follow the instructions for your platform below.
|windows-logo| :ref:`Windows <windows-getting-started>` |macosx-logo| :ref:`macOS <macosx-getting-started>` |opensuse-logo| :ref:`openSUSE <opensuse-getting-started>`
======================================================= ==================================================== ==========================================================
After running the example application have a look at the "`Python GTK+ 3
After running the example application have a look at the "`Python GTK 3
Tutorial <https://python-gtk-3-tutorial.readthedocs.io>`__" for more examples
on how to create GTK+ apps and the "`PyGObject API Reference
on how to create GTK apps and the "`PyGObject API Reference
<https://lazka.github.io/pgi-docs>`__" for API documentation for all supported
libraries.
......@@ -46,7 +46,7 @@ libraries.
#) Run ``C:\msys64\mingw32.exe`` - a terminal window should pop up
#) Execute ``pacman -Suy``
#) Execute ``pacman -S mingw-w64-i686-gtk3 mingw-w64-i686-python3-gobject``
#) To test that GTK+3 is working you can run ``gtk3-demo``
#) To test that GTK 3 is working you can run ``gtk3-demo``
#) Copy the ``hello.py`` script you created to ``C:\msys64\home\<username>``
#) In the mingw32 terminal execute ``python3 hello.py`` - a window should appear.
......
......@@ -17,7 +17,7 @@ recommended.
jhbuild shell
GOBJECT_DEBUG=instance-count GTK_DEBUG=interactive ./quodlibet.py
* In the GTK+ Inspector switch to the "Statistics" tab
* In the GTK Inspector switch to the "Statistics" tab
* Sort by "Cumulative" and do the action which you suspect does leak or where
you want to make sure it doesn't repeatedly. Like for example opening
and closing a window or switching between media files to present.
......
......@@ -17,12 +17,12 @@ have to switch everything at once.
Static Bindings Library Differences
-----------------------------------
**pygtk** supported GTK+ 2.0 and Python 2 only. PyGObject supports GTK+ >=3.0
and Python 2/3. If you port away from pygtk you also have to move to GTK+ 3.0
**pygtk** supported GTK 2.0 and Python 2 only. PyGObject supports GTK >=3.0
and Python 2/3. If you port away from pygtk you also have to move to GTK 3.0
at the same time. **pygtkcompat** described below can help you with that
transition.
**pygst** supports GStreamer 0.10 and Python 2 only. Like with GTK+ you have
**pygst** supports GStreamer 0.10 and Python 2 only. Like with GTK you have
to move to PyGObject and GStreamer 1.0 at the same time.
**pygobject 2** supports glib 2.0 and Python 2. The new bindings also support
......@@ -50,13 +50,13 @@ you have to make in the beginning, but nothing more.
4) Continue to the next module...
Porting Tips for GTK+
---------------------
Porting Tips for GTK
--------------------
While PyGObject theoretically supports GTK+ 2.0 it is not really usable. It
will be easier to port to GTK+ 3.0 right away.
While PyGObject theoretically supports GTK 2.0 it is not really usable. It
will be easier to port to GTK 3.0 right away.
For some general advice regarding the migration from GTK+ 2.0 to 3.0 see the
For some general advice regarding the migration from GTK 2.0 to 3.0 see the
`offical migration guide
<https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html>`__. If you
need to know how a C symbol is exposed in Python have a look at the `symbol
......
......@@ -4,7 +4,7 @@
Testing and Continuous Integration
==================================
To get automated tests of GTK+ code running on a headless server use Xvfb
To get automated tests of GTK code running on a headless server use Xvfb
(virtual framebuffer X server). It provides the ``xvfb-run -a`` command which
creates a temporary X server without the need for any real display hardware.
......@@ -16,7 +16,7 @@ creates a temporary X server without the need for any real display hardware.
Continuous Integration using Travis CI / CircleCI
-------------------------------------------------
Travis CI uses a rather old Ubuntu and thus the supported GTK+ is at 3.10 and
Travis CI uses a rather old Ubuntu and thus the supported GTK is at 3.10 and
PyGObject is at 3.12. If that's enough for you then have a look at our Travis
CI example project:
......@@ -25,7 +25,7 @@ CI example project:
.. image:: https://travis-ci.org/pygobject/pygobject-travis-ci-examples.svg?branch=master
:target: https://travis-ci.org/pygobject/pygobject-travis-ci-examples
To get newer PyGObject, GTK+, etc. working on `Travis CI
To get newer PyGObject, GTK, etc. working on `Travis CI
<https://travis-ci.org>`__ or `CircleCI <https://circleci.com>`__ you can use
Docker with an image of your choosing. Have a look at our Docker example
project which runs tests on various Debian, Ubuntu and Fedora versions:
......
......@@ -17,7 +17,7 @@ Such an operation might be:
The following examples show
* how Python threads, running in parallel to GTK+, can interact with the UI
* how Python threads, running in parallel to GTK, can interact with the UI
* how to use and control asynchronous I/O operations in glib
......@@ -66,7 +66,7 @@ while still showing feedback on the progress in a window.
The example shows a simple window containing a progress bar. After everything
is set up it constructs a Python thread, passes it a function to execute,
starts the thread and the GTK+ main loop. After the main loop is started it is
starts the thread and the GTK main loop. After the main loop is started it is
possible to see the window and interact with it.
In the background ``example_target()`` gets executed and calls
......@@ -74,14 +74,14 @@ In the background ``example_target()`` gets executed and calls
:func:`time.sleep` represents the blocking operation. :func:`GLib.idle_add`
takes the ``update_progess()`` function and arguments that will get passed to
the function and asks the main loop to schedule its execution in the main
thread. This is needed because GTK+ isn't thread safe; only one thread, the
main thread, is allowed to call GTK+ code at all times.
thread. This is needed because GTK isn't thread safe; only one thread, the
main thread, is allowed to call GTK code at all times.
Threads: FAQ
------------
* I'm porting code from pygtk (GTK+ 2) to PyGObject (GTK+ 3). Has anything
* I'm porting code from pygtk (GTK 2) to PyGObject (GTK 3). Has anything
changed regarding threads?
Short answer: No.
......@@ -96,7 +96,7 @@ Threads: FAQ
* Remove any :func:`Gdk.threads_init()`, :func:`Gdk.threads_enter` and
:func:`Gdk.threads_leave` calls. In case they get executed in a thread,
move the GTK+ code into its own function and schedule it using
move the GTK code into its own function and schedule it using
:func:`GLib.idle_add`. Be aware that the newly created function will be
executed some time later, so other stuff can happen in between.
......@@ -110,12 +110,12 @@ Threads: FAQ
In GStreamer, for example, some signals can be called from a different
thread, see the respective signal documentation for when this is the case.
In case you connect to such a signal you have to make sure to not call any
GTK+ code or use :func:`GLib.idle_add` accordingly.
GTK code or use :func:`GLib.idle_add` accordingly.
* What if I need to call GTK+ code in signal handlers emitted from a thread?
* What if I need to call GTK code in signal handlers emitted from a thread?
In case you have a signal that is emitted from another thread and you need
to call GTK+ code during and not after signal handling, you can push the
to call GTK code during and not after signal handling, you can push the
operation with an :class:`threading.Event` object to the main loop and wait
in the signal handler until the operation gets scheduled and the result is
available. Be aware that if the signal is emitted from the main loop this
......
pygobject.svg and pygobject-small.svg are based on the GTK+ logo, created by
pygobject.svg and pygobject-small.svg are based on the GTK logo, created by
Andreas Nilsson, licensed under CC BY-SA 3.0. For more info see
https://commons.wikimedia.org/wiki/File:GTK%2B_logo.svg
......@@ -29,9 +29,9 @@
:end-before: ----
If you want to write a Python application for `GNOME
<https://www.gnome.org/>`__ or a Python GUI application using GTK+, then
<https://www.gnome.org/>`__ or a Python GUI application using GTK, then
PyGObject is the way to go. For more information on specific libraries check
out the "`Python GTK+ 3 Tutorial
out the "`Python GTK 3 Tutorial
<https://python-gtk-3-tutorial.readthedocs.io>`__" and the "`Python GI API
Reference <https://lazka.github.io/pgi-docs>`__".
......
......@@ -40,6 +40,6 @@ Build dependencies:
Test Suite dependencies:
* The runtime dependencies
* GTK+ 3 (optional)
* GTK 3 (optional)
* pango (optional)
* pycairo (optional)
......@@ -130,7 +130,7 @@ class GtkDemoApp(Gtk.Application):
def on_activate(self, app):
self.window = Gtk.ApplicationWindow.new(self)
self.window.set_title('PyGObject GTK+ Code Demos')
self.window.set_title('PyGObject GTK Code Demos')
self.window.set_default_size(600, 400)
self.setup_default_icon()
......
......@@ -124,7 +124,7 @@ Boston, MA 02111-1307, USA.
transparent = pixbuf.add_alpha(True, 0xff, 0xff, 0xff)
about = Gtk.AboutDialog(parent=window,
program_name='GTK+ Code Demos',
program_name='GTK Code Demos',
version='0.1',
copyright='(C) 2010 The PyGI Team',
license=license,
......@@ -133,7 +133,7 @@ Boston, MA 02111-1307, USA.
authors=authors,
documenters=documentors,
logo=transparent,
title='About GTK+ Code Demos')
title='About GTK Code Demos')
about.connect('response', widget_destroy)
about.show()
......@@ -172,7 +172,7 @@ action_entries = (
about_cb),
("Logo", "demo-gtk-logo", # name, stock id
None, None, # label, accelerator
"GTK+", # tooltip
"GTK", # tooltip
activate_action),
)
......
......@@ -32,7 +32,7 @@ import cairo
import math
UTF8_TEXT = u"I 鈾 GTK+"
UTF8_TEXT = u"I 鈾 GTK"
HEART = u"鈾"
BYTES_TEXT = UTF8_TEXT.encode("utf-8")
BYTES_HEART = HEART.encode("utf-8")
......
......@@ -42,7 +42,7 @@ except (ValueError, ImportError):
pass
if GDK2 or GDK3:
# Gdk.Color was deprecated since 3.14 and dropped in Gtk+-4.0
# Gdk.Color was deprecated since 3.14 and dropped in Gtk-4.0
class Color(Gdk.Color):
MAX_VALUE = 65535
......@@ -84,7 +84,7 @@ if GDK2 or GDK3:
__all__.append('Color')
if GDK3:
# Introduced since Gtk+-3.0
# Introduced since Gtk-3.0
class RGBA(Gdk.RGBA):
def __init__(self, red=1.0, green=1.0, blue=1.0, alpha=1.0):
Gdk.RGBA.__init__(self)
......@@ -139,7 +139,7 @@ if GDK2:
Rectangle = override(Rectangle)
__all__.append('Rectangle')
elif GDK3:
# Newer GTK+/gobject-introspection (3.17.x) include GdkRectangle in the
# Newer GTK/gobject-introspection (3.17.x) include GdkRectangle in the
# typelib. See https://bugzilla.gnome.org/show_bug.cgi?id=748832 and
# https://bugzilla.gnome.org/show_bug.cgi?id=748833
if not hasattr(Gdk, 'Rectangle'):
......@@ -361,7 +361,7 @@ if GDK2 or GDK3:
Cursor = override(Cursor)
__all__.append('Cursor')
# Gdk.Color was deprecated since 3.14 and dropped in Gtk+-4.0
# Gdk.Color was deprecated since 3.14 and dropped in Gtk-4.0
color_parse = strip_boolean_result(Gdk.color_parse)
__all__.append('color_parse')
......
......@@ -252,7 +252,7 @@ pygi_arg_gobject_to_py_called_from_c (GIArgument *arg,
PyObject *object;
/* HACK:
* The following hack is to work around GTK+ sending signals which
* The following hack is to work around GTK sending signals which
* contain floating widgets in them. This assumes control of how
* references are added by the PyGObject wrapper and avoids the sink
* behavior by explicitly passing GI_TRANSFER_EVERYTHING as the transfer
......
......@@ -7,7 +7,7 @@
<name xml:lang="en">PyGObject</name>
<shortdesc xml:lang="en">Python bindings for GObject Introspection</shortdesc>
<description>
GObject is a object system used by GTK+, GStreamer and other libraries.
GObject is a object system used by GTK, GStreamer and other libraries.
PyGObject provides a convenient wrapper for use in Python programs when accessing GObject libraries.
......
......@@ -532,7 +532,7 @@ class TestGtk(unittest.TestCase):
self.assertTrue(isinstance(button, Gtk.Widget))
if Gtk_version != "4.0":
# Using stock items causes hard warning in devel versions of GTK+.
# Using stock items causes hard warning in devel versions of GTK.
with capture_glib_warnings(allow_warnings=True):
button = Gtk.Button.new_from_stock(Gtk.STOCK_CLOSE)
......@@ -771,7 +771,7 @@ class TestGtk(unittest.TestCase):
def test_toolbutton(self):
# PyGTK compat
# Using stock items causes hard warning in devel versions of GTK+.
# Using stock items causes hard warning in devel versions of GTK.
with capture_glib_warnings(allow_warnings=True):
button = Gtk.ToolButton()
self.assertEqual(button.props.stock_id, None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment