Anaconda/Features/GTK3

From FedoraProject

< Anaconda | Features(Difference between revisions)
Jump to: navigation, search
m (moved Anaconda/Features/PyGI to Anaconda/Features/GTK3: PyGI requires GTK3 (and vice versa), and that's a more straightforward and interesting feature name, so...)
(Scope)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
= Port UI to PyGObject =
+
= Port UI to GTK3 =
  
 
== Summary ==
 
== Summary ==
  
Port the Anaconda UI from PyGTK to PyGObject.
+
Port Anaconda from GTK2 (using PyGTK and libglade) to GTK3 (using PyGI and GtkBuilder).
  
 
== Owner ==
 
== Owner ==
Line 11: Line 11:
 
== Current status ==
 
== Current status ==
  
* Targeted release: [[Releases/17|Fedora 17]] (or earlier)
+
* Targeted release: [[Releases/17|Fedora 17]]
* Last updated: 12 Jan 2011
+
* Last updated: 30 Jan 2011
 
* Percentage of completion: 0%
 
* Percentage of completion: 0%
  
 
== Detailed Description ==
 
== Detailed Description ==
  
Anaconda's UI is written in PyGTK, which provides Python bindings for GTK+ 2.x.
+
Current Anaconda is written in PyGTK (which is deprecated), using Glade files (which are deprecated) and a lot of procedurally-generated UI (which is kind of terrible).  
  
PyGTK will not support GTK+ 3. [http://pygtk.org/ pygtk.org] says:
+
GTK3 is new and prettier. The GTK3 bindings for Python are provided by PyGI, and they're a lot cleaner. libglade has been replaced by GtkBuilder, which is nicer and more powerful.  
  Existing authors of PyGTK applications are also recommended to port their applications to PyGObject
+
  to take advantage of new features appearing in GTK-3 and beyond. More information on PyGObject and
+
  GObject-Introspection can be found at [http://live.gnome.org/PyGObject http://live.gnome.org/PyGObject].
+
(from the [http://article.gmane.org/gmane.comp.gnome.gtk%2B.python/14835 PyGTK 2.22.0 release notes], 25 Sep 2010)
+
 
+
Thus, if we want Anaconda to use GTK+ 3, we will need to port to PyGObject. While this isn't immediately necessary there's some good reasons to get started now:
+
 
+
* The Anaconda UI code is old, messy, and inflexible, and could use some reworking anyway.
+
* There are several other features that also involve major changes to the Anaconda UI - including [[Anaconda/Features/ThreadedGUI|ThreadedGUI]] and the entire [[Anaconda/UX_Redesign|UX Redesign]] project.
+
* In the not-too-distant future, GTK+ 2.x will be deprecated. It would be good to have this fixed before it becomes an emergency. ([[User:Walters|Colin Walters]] suggests that won't happen before Fedora 17.)
+
  
 
== Benefit to Fedora ==
 
== Benefit to Fedora ==
  
* Future-proof Anaconda against the eventual transition to GTK+ 3
 
 
* Prettier UI, with a GTK theme that matches the rest of the system
 
* Prettier UI, with a GTK theme that matches the rest of the system
 
* Cleaned up Anaconda UI backend
 
* Cleaned up Anaconda UI backend
Line 39: Line 28:
 
== Scope ==
 
== Scope ==
  
This involves porting all the UI code to use PyGObject. Exploratory work is underway to determine how much effort this will take.
+
This involves porting all the UI code to use PyGI and converting all the Glade files to GtkBuilder format. There is a [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh script] to help convert PyGTK to PyGI, which will help. We will also
 +
need to port our custom widgets (for partitioning etc.).
  
There is a [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh script] to help convert PyGTK to PyGObject.
+
Furthermore, we'll probably want to port firstboot at the same time.
  
 
== Test Plan ==
 
== Test Plan ==

Latest revision as of 23:21, 30 January 2011

Contents

[edit] Port UI to GTK3

[edit] Summary

Port Anaconda from GTK2 (using PyGTK and libglade) to GTK3 (using PyGI and GtkBuilder).

[edit] Owner

[edit] Current status

  • Targeted release: Fedora 17
  • Last updated: 30 Jan 2011
  • Percentage of completion: 0%

[edit] Detailed Description

Current Anaconda is written in PyGTK (which is deprecated), using Glade files (which are deprecated) and a lot of procedurally-generated UI (which is kind of terrible).

GTK3 is new and prettier. The GTK3 bindings for Python are provided by PyGI, and they're a lot cleaner. libglade has been replaced by GtkBuilder, which is nicer and more powerful.

[edit] Benefit to Fedora

  • Prettier UI, with a GTK theme that matches the rest of the system
  • Cleaned up Anaconda UI backend

[edit] Scope

This involves porting all the UI code to use PyGI and converting all the Glade files to GtkBuilder format. There is a script to help convert PyGTK to PyGI, which will help. We will also need to port our custom widgets (for partitioning etc.).

Furthermore, we'll probably want to port firstboot at the same time.

[edit] Test Plan

Unit tests will be written to ensure the UI behaves as expected, at least for the simple cases. More complex UI interactions will be tested as a side-effect of other Anaconda testing.

[edit] User Experience

Anaconda's UI uses the same nice GTK3 code and themes as the rest of the system, making the UI prettier and more responsive.

[edit] Dependencies

Requires the availability of pygobject2 in the installer image.

[edit] Contingency Plan

Continue using the existing UI and providing PyGTK and its dependencies in the installer image.

[edit] Documentation

TBD

[edit] Release Notes

TBD