@@ -108,7 +108,7 @@ The ``show_details`` method loads an image at its full size for display in the d
:start-at: def show_details
:end-at: self.pages.show_page
We use the `Gtk.TreePath`_ passed to this method, along with a `Gtk.TreeIter`_ object, to obtain the file name of the image from the model. A good introduction to this class is provided by the `Tree and List Widgets`_ chapter of the `Python GTK+ 3 Tutorial`_.
We use the `Gtk.TreePath`_ passed to this method, along with a `Gtk.TreeIter`_ object, to obtain the file name of the image from the model. A good introduction to this class is provided by the `Tree and List Widgets`_ chapter of the `Python GTK 3 Tutorial`_.
@@ -64,6 +64,6 @@ Care must be taken to avoid applying too many rules to the widgets in your appli
Further Reading
---------------
The `GTK+ CSS Overview`_ and `GTK+ CSS Properties`_ documents on the GNOME developer site are useful for determining which parts of the standard widgets can be styled, and what changes they support.
The `GTK CSS Overview`_ and `GTK CSS Properties`_ documents on the GNOME developer site are useful for determining which parts of the standard widgets can be styled, and what changes they support.
@@ -39,6 +39,6 @@ Unlike the user interface for the window, the menu's UI file was defined in a te
.. literalinclude:: ../app/src/ui/menus.ui
The actions are defined to be application-wide: each has the ``app.`` prefix. Their strings are marked as translatable so that they will be included in the message catalogs described in :ref:`examples_Treasure_po_dir`. Actions are described in more details in the `Actions section`_ of the `Python GTK+ 3 Tutorial`_.
The actions are defined to be application-wide: each has the ``app.`` prefix. Their strings are marked as translatable so that they will be included in the message catalogs described in :ref:`examples_Treasure_po_dir`. Actions are described in more details in the `Actions section`_ of the `Python GTK 3 Tutorial`_.
@@ -11,7 +11,7 @@ This section will show you how to use GNOME Builder for developing, building,
and deploying app flatpaks to a phone shell environment. Apps built from GNOME
Builder can theoretically be deployed on Plasma Mobile as well.
Builder is a fantastic IDE traditionally used for building GNOME GTK+ apps however the fun doesn't have to stop there. It can build KDE apps as long as there is flatpak metadata for the application - more on that later.
Builder is a fantastic IDE traditionally used for building GNOME GTK apps however the fun doesn't have to stop there. It can build KDE apps as long as there is flatpak metadata for the application - more on that later.
First, checkout the `GNOME Builder documentation`_.
For this example, the `geary <https://gitlab.gnome.org/aplazas/geary/tree/wip/aplazas/stackablebox>`_ application will be built (written in C and available in Debian apt repositories). This build was done on an x86 system running Debian testing.
...
...
@@ -127,7 +127,7 @@ Alternatively, you can click the omnibar in Builder and select the "Export Bundl
When the flatpak creation is finished, a nautilus window will pop up in the directory where the sm.puri.Handy.Example.flatpak is located. In this example, the flatpak can be found here: ~/.var/app/org.gnome.Builder/cache/gnome-builder/projects/libhandy/flatpak/staging/arm-wip-stackablebox/sm.puri.Handy.Example.flatpak
`GTK+ <GTK+ website_>`_ is the graphical application framework used to develop all GNOME applications. This guide aims to provide a brief overview of GTK+ applications and tools that can assist in their development.
Applications (apps) for the Librem 5 will typically be built using the
`GTK toolkit`_. In fact many of the apps available will have been ported from
existing apps which are part of the GNOME environment.
This guide aims to provide a brief overview of GTK 3 applications and the tools that can assist in their development. GTK 3.32 is the minimum version that applications on the Librem 5 are expected to use.
.. contents::
:local:
...
...
@@ -57,12 +61,12 @@ Debugging
It can be useful to examine the user interface of a running application for debugging or diagnostic purposes.
The GTK+ Inspector
~~~~~~~~~~~~~~~~~~
The GTK Inspector
~~~~~~~~~~~~~~~~~
The `GTK+ Inspector`_ is a tool giving you direct and dynamic access to the internal state of the user interface of your GTK+ application at runtime. It is similar in concept to a web inspector.
The `GTK Inspector`_ is a tool giving you direct and dynamic access to the internal state of the user interface of your GTK application at runtime. It is similar in concept to a web inspector.
The GTK+ Inspector is an extremely convenient tool to help with debugging your GTK+ application. To use it you first need to enable it via GSettings::
The GTK Inspector is an extremely convenient tool to help with debugging your GTK application. To use it you first need to enable it via GSettings::
$ gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
...
...
@@ -72,7 +76,7 @@ Alternatively you can set the ``GTK_DEBUG`` environment variable to ``interactiv
$ GTK_DEBUG=interactive your-application
.. note:: For the GTK+ Inspector to work in your flatpaked application, see how to `enable dconf access`_ in the the Flatpak documentation.
.. note:: For the GTK Inspector to work in your flatpaked application, see how to `enable dconf access`_ in the the Flatpak documentation.
Applications (apps) for the Librem 5 will typically be built using the
`GTK+ toolkit`_. In fact many of the apps available will have been ported from
existing apps which are part of the GNOME environment. When you write an app or
port a current app to the Librem 5, you are likely going to use tools and
libraries from the GNOME Desktop Environment, building user interfaces
based on GTK+ using the GObject model. There are many supporting libraries
like libsoup for HTTP access or GSettings for settings management, D-Bus
interaction and lower level I/O.
When you write an app or port a current app to the Librem 5, you are likely going to use tools and libraries from the GNOME Desktop Environment, building user interfaces based on GTK using the GObject model. There are many supporting libraries like libsoup for HTTP access or GSettings for settings management, D-Bus interaction and lower level I/O.
See the :ref:`development_environment` chapter of this manual, and especially
the :ref:`workstation` section for an overview of the tools that make up
This library is central to the way that adaptive applications are created using GTK. The following sections show how each of its components are employed to make new or existing GTK-based user interfaces adaptable. The :ref:`porting_gnome_apps_guide` guide covers more specific issues related to converting traditional applications to fit the adaptive paradigm.
For general GTK+ and GNOME development resources please consult the :ref:`gnome_resources` page and the `GTK+ 3 documentation`_.
For general GTK and GNOME development resources please consult the :ref:`gnome_resources` page and the `GTK 3 documentation`_.
@@ -29,7 +29,7 @@ A typical developer workflow for porting will involve something like this:
Hints and Tips
--------------
There are some UI elements in GTK+ that are touch-friendly, and therefore ready to use on a phone, while others are not.
There are some UI elements in GTK that are touch-friendly, and therefore ready to use on a phone, while others are not.
A collection of `application mock-ups`_ for GNOME applications should help to give an overview of the presentation and user interface paradigms that developers are using.
@@ -54,7 +54,7 @@ Note the ``id`` property on the object describing the `Gtk.ApplicationWindow`_ w
The ``id`` attribute allows the application code to refer to specific widgets. In this case, the main window of the application can be referred to using the ``window`` identifier.
The ``<requires>`` element contains information about the libraries that provide the components specified in the UI file. In the example, all the components can be provided by GTK+ version 3.20.
The ``<requires>`` element contains information about the libraries that provide the components specified in the UI file. In the example, all the components can be provided by GTK version 3.20.