Anaconda/Work List

= Anaconda UI Work List =

Bored? Tired of bugs? Looking for something new to do? Why not check out something from this list of work items for the new user interface! The list below is what can currently be worked on, given the state of the base classes and custom widgets. If you want to claim one of these items, simply put your name in the right column. Discuss your code on anaconda-devel-list and when you are happy with it, link to it here (eventually, you will instead commit to anaconda but we're not there yet). If you have any questions, ask clumens.

More items will be posted periodically, so be sure to check back.

Guidelines
First, here are a couple guidelines for all items.


 * Everything here should be done in Python. The one exception might be if you are doing something very low level graphically and there are not satisfactory Python bindings.  Then, C might be appropriate.
 * You will need a lot of very current software installed to work on this. At the least, you'll want gtk3, gobject-introspection, glade3 and glade3-libgladeui, pygobject3, and all their devel subpackages.  You'll also want to make sure you have the latest glib.  It might be best to be running rawhide or at least F16 with this stuff updated.  RHEL6 probably isn't going to cut it.
 * Use glade for as much as possible. glade allows doing all the TreeView and ListStore stuff now.  Use glade for dialogs.  Use signals where appropriate.
 * Consider keyboard use - put mnemonics on things.
 * Don't hard code stylistic elements (absolute font sizes or names, rounded corners, and the like). We want to use the shipping GTK style to decide all that for us.  Of course, you can specify things to be bold or red as needed.
 * Include test cases.
 * Do not look at existing anaconda UI code for how to do things. I'm planning on getting rid of it all anyway, and I don't want people dragging bad ideas from the past along.
 * Don't worry too much about integrating your code with anaconda as it stands today. Make your solution something that can be tested standalone and pulled into non-anaconda applications.  We'll worry about the integration later.

Conventions
Use the following standard values when designing in Glade:
 * spacing: 6
 * border width: 6

Use the following keyboard mnemonics and add the dialog number in parenthesis so we can reuse. One rule is that in any of the lightbox dialogs that pop up you can reuse _q, _c and _b because you aren't be able to interact with anything else there.
 * _Quit
 * _Continue
 * _Back
 * _Close (#9-1-4)
 * _Remove (#9-1-4)

Brief pygobject Introduction
pygtk is dead. Nothing in the new anaconda UI will be using it. In its place, we have pygobject3+gobject-introspection. This is an automatic binding generation system that examines source code and generates libraries that can be used in other languages. It's not specific to Python, but that doesn't really matter for our purposes. It's also not specific to GTK. gobject-introspection can be used with just about anything.

If you need to use the new GTK bindings from within python, it's really pretty easy: >>> from gi.repository import Gtk

One interesting note here is that anything gobject-introspection has a binding for is in. Then once you've got Gtk imported, everything else looks rather familiar: >>> w = Gtk.Window >>> box = Gtk.HBox >>> lbl = Gtk.Label("This is a label") >>> box.add(lbl) >>> w.add(box) >>> w.show_all >>> Gtk.main

Constants are hiding a little bit. If you want to specify whether something's oriented vertically or horizontally, you have to use. With a little bit of practice (and a lot of use of tab completion in ipython) you'll eventually get comfortable with how things are laid out. Since it's all automatically generated, it's at least consistently weird.

Using your glade-generated interface file is not really all that different than it used to be, either: from gi.repository import Gtk builder = Gtk.Builder builder.add_from_file("test.ui") w = builder.get_object("window1") w.show_all Gtk.main

The key difference is that it's now.