Mostrando entradas con la etiqueta skin. Mostrar todas las entradas
Mostrando entradas con la etiqueta skin. Mostrar todas las entradas

domingo, 22 de agosto de 2010

Almost there...

Last time I wrote a lot of things were in the to-do list. But now I'm glad to announce that Jake-PyQT4 is almost ready for a first release!
There are still some things that I'd like to patch before releasing, and also fix a little bit the default skin. It's not that ugly, but I'd like to have a designer doing that part, and I just didn't thought about it but Andrew's sister is a designer, so maybe she could help me :)

And here is the list of things that I added/fixed since last week:

* Configuration system was rewritten, and also all plugins. Now plugins have two main lists. One is for how the config dialog should look. The second one is for the default values (or the stored values in user's hard drive).

* Total rewrite of how config files are saved/loaded. Now only really important things are written to disk. That means less space in disk and major load/save speed :p

* Total rewrite of the part where combobox where created. I was saving the index of all combos, and that was totally wrong. Now values are saved.

*  Total rewrite of plugins system. Don't crash if one plugin fails to load (or maybe bad coded, missing libs, etc). Also, show info about what plugin crashed, what line and why.

* Total rewrite of how moving the cursor left/right is handled. No more weird html inserts! Special thanks to girishr from #qt in Freenode

* Major speed improvements on how cursor is managed, things done after hit, after hit, etc...

* A lot of code was moved to it's own class/file to make code more cleaner and easy to read. Also a lot of unused imports were removed (yes, more speed :p)

* More control when doing cut/copy/paste. Now only available-for-edit text can be cut.

* A global event filter was created! That filter manages all keyboard/mouse events and sends them to the right control.

* A bug was sent to Nokia, so they can fix it. The bug that I'm talking about is that weird behavior when moving a tab inside the tab widget. A cut-effect caused by a wrong rect size. You can see the bug report here.

* Now auto complete works everywhere instead only at the beginning of a command.


As you see I haven't wasted any time, and even more features are coming soon ;)

I should do some things before releasing. Here is a list:

* Check if it's possible to read/write to disk (that will let users to store their plugins settings and also update Jake-PyQT4)

* Check for updates and update if newer version is available.

* Fix a little bit the default skin.

Once those three things are done, I'll wait a little bit more for mgrant to release python-xlib 0.15 and nanotube to release pyHook compatible with Python 2.7
If no releases, I'll release with current python-xlib 0.15rc and with pyHook compatible with Python 2.6 (that will force me to release everything on Python 2.6 instead of 2.7).

I'll probably write again next weekend. Until then have a good time and enjoy the summer!
Bye!

jueves, 15 de julio de 2010

[Devs] Basic design

In this post I'll explain a little bit more how Jake-PyQT4 works. If you're not a developer or if you don't have any coding skills, you can skip this post (if you want :p)

First part: Plugin system

The plugin system is loaded at start up. Once loaded, it will search in "plugins" directory. For each found folder it will search "main.py". If found, it will import it.
Once all plugins have been imported, plugin system will send a "get_capabilities" event.  All plugins can register to events, and every time the plugin system sends that event, all plugins that are currently registered to that event will run certain part of code. NOTES:

* more than one plugin can be registered for the same event.
* events are sent to each plugin synchronously, that means that only one plugin will run at the same time, so don't worry about printing things to the console, as it won't get mixed with the output of another plugins.
* each plugin can return a list of commands that can handle, and also, two plugins can handle the same command. Both plugins will be ran synchronously.

Second part: Libs

Currently I'm using Xlib on Linux and pyHook on Windows to handle the global keys. I'm still missing a Mac OS library, so if you know about some library that I could use, please write me an email, or comment here. I was thinking in using Xlib from darwin ports, but I'm not sure if it will work. Anyways, I guess I'll just have to setup a virtual machine and try it myself.
Also, I'm using googlepy for searching in google. But I have rewriten some parts from that lib because it wasn't working at all or as I wanted.
I'll write one lib per each website that I want to search in, and then I'll use that lib from a plugin. This will keep things simpler, and let more people code plugins without having to rewrite the same code for making queries in the same website.

Third part: Configuration system

Plugins must have the option to store settings. That's why the configuration system exists.
Plugins can have a list of options that will be passed to the configuration system. That list will be parsed and converted in a nice dialog. Settings will be stored in current user home folder.
If you want to look how does that list of options looks like, I suggest you to open up configsystem.py and see it yourself.
There is a large comment section will all types of settins, and a little example.


Forth and last part: Skin system

In fact, there is no skin system :p
I'll make a configuration dialog for Jake-PyQT4 (the main app) and I'll let users to choose a skin from there.
All UI elements can be styled using QSS. Also, tab position and transparency can be set with styles. If you need some help trying to make Jake-PyQT4 look as you like it you may need to read this and this. 

That's all for today! I'll post soon about what problems I think I'll have and what problems I'm having right now.
Bye!