Session 5 – Part 1 – Gtk with Python

Today we are going to use Gtk with Python and for that we can check our version of Python just type python

2

Then I’m going to install pygobject3-devel

1.png

this code just create an empty window that close the program when you close the window

3.png

and then we run it with python

5.png

Now, if you want to set the title, you have to add the line win.set_title(“The Text”) like this

1.png

And finally you can run it

2

Now we are going to create another file that have to allow us lo go to the web page of 4 languages, there we are going to add a label and gtk.listbox that contains 4 gtklistboxrow in order to create some like this

5.png

We create a Gtk.Box that will contain all (our first label and gtklistbox and so on)

Here is how it works

  1. box_outer contain label and gtklistbox
  2. gtklistbox contain gtklistboxrow and hbox
  3. hbox contain button

3.png

All that we did was to create the same 4 rows and just change the link for each one using gtklinbutton also to create the link and open it in Chrome.

You can check the code here.

Finally we were seeing how to search bugs in gnome here.

In the next picture we are able to see the nautilus bugs clicking in Issues

6

There we can grep bugs for people who are Newcomers like me

7

Also we saw the projects for Fedora in this link

9

we saw one project called system_config_language that wants to create something like a button for example that change the language configuration for all the system including apps browser keyword etc

22.png

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

w

Conectando a %s