attilalr/openlattice — pull request #4 by satanas (2014-12-11 04:12:40+00:00)
Title: Port to pure gtk

@attilalr, here is the PR with the Gtk3 template done. I've structured the code inside a class and now should be easy don't repeat code along the application. The template is functional (all the buttons are connected to their methods), the timer is working according the status and you just need to fill the code to calculate, render and save using Gtk3. I tried to do the saving but it was Gtk2 code too, so sadly I couldn't help with that.

You have 4 buttons on the header: start, pause, next and save.

The only methods you need to fill are:

__get_pmc()
__save_png()
__save_ps()
start()
next_frame()
render()

The other methods are done, and you shouldn't need to code anything there. You can get the value of the text box (for the size of the net) in every point of the class using:

```
value = int(self.net_size.get_text())
```

This is how the new Openlattice looks, I hope you like it :)

![screenshot from 2014-12-11 01 06 37](https://cloud.githubusercontent.com/assets/29679/5388930/becb46b4-80d2-11e4-83d6-e61c62305f05.png)

## Recomendations
1. Do not use global variables. Instead use instance variables through self.var_name inside the OpenLattice class
2. Use always 4 spaces for indentation in Python and keep a good indentation
3. Don't repeat yourself. Write modular code and use these modules every time you need the feature

Let me know if I can help you with anything else