FeedBurnerTirasCategories*
Recent Comments On Blog*
|
Wednesday* 08 October* 2008 2:03am
Categories
generalSoftware_Development personal Python gtk christine Pictures FLOSS Flickr So, it is time to post again.. this time is to post about christine. Christine as many of you know is a small project of mine, it must be an easy to use and small (and cute) media player, It start as some gstreamer play and then it becomes the music player I use for my every day, no longer rhythmbox nor banshee, wich are fine, but, not for me.The project is slow, mostly because I code on it when I need something else or just want to fix something that don't like me. Why? because I get almost no feedback. So, if you use christine or, you want to see this project to grow up, please, test it and fill bugs or request features so we can work on it or maybe you want to cooperate with this project in another way, like writing documents, doing artwork or something like that. The last two weeks GaRaGeD have been working on christine too, on the Pidgin "plugin" which is a nice plugin and I have been doing my work too. This makes me fell good, when you are not the only one in the project it feels better, when you can discuss some point to other project mates and know what would be the better for the average user. ![]() Well, I'm working on the plugin interface and in the last.fm plugin for christine, I already have the authorization part, and then create the configuration dialog for the plugin, this requires me to get familiar with last.fm but, if you already use last.fm and want some feature that you already have in another player, please comment here or on the feature request tracker for the christine project. On the paid work side, I have been working a lot with Gtk, and reading about the Human Interface Guidelines, have you noted that the GNOME Human Interface Guidelines are quite similar to the Apple Human Interface Guidelines. Well, I hope this helps me to create more intuitive and very usable gtk interfaces. On the personal side. Cristina and I are really happy, last friday we went to the gynecologist and we see our baby, he is three months right and everything looks right. I have nothing more to say, Im happy! Just to close this post, if you use mac or compiz, how does looks likeyour desktop right now using the Expos�© or the Scale plugin on compiz ![]() Saturday* 04 October* 2008 12:03am
Categories
generalSoftware_Development stuff personal christine Pictures FLOSS Flickr ![]() Tweeting the song from christine, originally uploaded by markuz. Inspired by GaRaGeD's pidgin "plugin" (christine still doesn't have a plugin API), I wrote my "plugin" to tweet the song on being played on christine. Thursday* 02 October* 2008 1:18pm
Friday* 26 September* 2008 3:28am
Friday* 26 September* 2008 2:30am
Categories
generalSoftware_Development personal Python gtk christine ICTC Another post on the blog. I know, I haven't post too regularly these days, this is because I have a lot of work, and my spare time is used to be with cristina and our growing still-in-the-belly baby. Well, I think you just don't care abot my life, is quite boring for everyone that is not me. Why? just because this is not the blog of some kind of nerdy hacker that do lot of shiny new and amazing stuff, nor the guy that post every single fart that Apple, ubuntu nor Microsoft does. So, what is about this blog? I think is a way to flush my mind. I wish I have all the time to write more posts, Several times I had Ideas to be written in the blog, but they didn't come to the blog because (again) there is no time. Anyway, three paragraphs are enough for my complaints. So, what have I done since my last Post? (the christine love, the picture is not..a post) Well, let me see... let me see... Lot of work. I have been working on this project on ICTC, a desktop application using Python and PyGtk. User interface design is a quite interesting challenge, and more if you need to design input forms, make them look good, being user friendly (mmm, user friendly... If user friendly means scratching the testicles {or your favorite scratch part of the body} of the users. This application in some forms, need to be fully functional without mouse and use only the key pad, which makes the challenge more interesting. Writing a form that makes input validation, key-press-event handling for every widget, looks good, be ultra-easy to use is... is sometimes castrating... (the more if the client want the application in this color: #FF00FF.) Obviously I don't have to see the application in that color, but I also have to write a color chooser for this application, if I don't, then the client is going to ask me to change the colors after 15 days using the program or when it get almost blind. Well. This is most of the work I have done, I'm trying to learn how to use django. I love python, and I want to use django (or another python based framework) to write web applications in the future. I have write some applications but nothing really functional by now. One of the first and small projects I want to do is a web page for christine. And talking about christine, I'm still working on the new version. I'm refactoring modules. And by now is quite usefull. Just commit this night fixes for the bug #2122313 but I need people to test it to check it is working fine. I have also fixed the open remote dialog that wasn't working since I reallocate this methods. Well, I thinks is enough for today. See you latter. Update I forgot, If you like the season 1 of The Big Bang Theory you can the download links from Here, those rar files don't have the subtitles, I will post them there too. I have been watching this tv serie and I love it. Tuesday* 16 September* 2008 12:16pm
Friday* 12 September* 2008 12:52am
Categories
generalSoftware_Development personal Python linux gtk christine Pictures FLOSS Video Flickr ![]() Giving love to christine, originally uploaded by markuz. This is my desktop testing some changes I have done to christine in this night. Most of them code cleaning and some harmless optimizations. Update: I have made a screencast, you can download it![]() here Wednesday* 10 September* 2008 1:03am
Categories
generalSoftware_Development personal Python gtk FLOSS ICTC A few weeks ago, I have to write a program in PyGTK that was supposed to be all the time in the background. This application needs to run over Microsoft Windows, and hide in the notification area, wich in Windows is near to the clock. One of challenges for me in this application is that as it must run in the background there must be a way to raise it, the most easy way to do it is by force the user to click on the small icon in the notification area, but in this case, that was impossible because the computer don't have any mouse, everything is done with the keyboard. So, I start googling for some way to use hot keys with GTK (PyGtk) in this case, I found that Gtk does have a way to represent the Display wich a way to get to your computer display resources. I just want to grab the keyboard presses and if the right key with the right modifier where pressed then the application arises. Unfortunely for me, Gtk+ does have a way to do this, but the implementation in PyGTK has a bug where all the display events are ignored, I mean, every time you check of a pending event for the display pygtk will return None, so, no event, no catch, no working code. Well, in linux you can do this by using the xlib bindings for python, but I have to do this on Windows, so a workmate point me to This url. Wich shows how to register a hot key on windows. That was easier than I thought!. But, there is a trick... As you can see in this piece of code: try: msg = wintypes.MSG() while user32.GetMessageA(byref (msg), None, 0, 0) != 0: if msg.message == win32con.WM_HOTKEY: action_to_take = HOTKEY_ACTIONS.get(msg.wParam) if action_to_take: action_to_take () user32.TranslateMessage(byref (msg)) user32.DispatchMessageA(byref (msg)) The method GetMessageA is the one that is listening to the messages in the system, and returns when there is a message. If you use a single threaded program, like... some text bassed application or just a "show something" application, then it will be nice, but, if you use Gtk, where the application's events are handled in the gtk main loop this is useless, why? because this method locks until it receives something, and then let your application work, but, if you have it in a while loop you will never leave that loop and then, your signals will never been emited and your handler will never do their job. Is something similar to the use of sockets. Ha... I forgot, you can't use the while gtk.events_pending(): gtk.main_iteration_do() stuff.. it doesn't work, keep reading if you wanna know why. So, what can I do for this to work?, well, I thought: A thread, but, there is a problem. Windows documentation says that the hotkey registerd with the method RegisterHotKey will only be catched with GetMessageA if the "register" method and the "get message" are in the same thread. So, what can I do? Put this on the same thread, and then use a flag to let the rest of your application know that the keys have been pressed, then, raise your application. But, why I can't make a gobject based class that emits a signal when this keys are pressed? Well, you should know that Gtk+ is thread aware, but not thread safe, this means, you cannot use Gtk accross the threads, and this is something inherited from gobject (AFAIK). Here's the code that will let you register hot keys on windows and make your applications raise when you need them. #!/usr/bin/env pythonimport ctypes importthread import win32con import gobject from ctypes import wintypes class keyhandler: def__init__(self): self.__emit = False thread.start_new_thread(self.__catchMsgs, tuple()) gobject.timeout_add(5,self.checkEmit) def checkEmit(self): ifself.__emit: self.emit('keyhandler-keypress',self,self.__emit) print'Emitiendo senial..' self.__emit = False returnTrue def __catchMsgs(self, *args): byref = ctypes.byref user32 = ctypes.windll.user32 self.HOTKEYS[1] = {'hotkey' : win32con.VK_F3,'modifiers': win32con.MOD_WIN} ifnot user32.RegisterHotKey(None, 1, win32con.MOD_WIN, win32con.VK_F3): print"Unable to register id", 1 while1: try: msg = wintypes.MSG() if user32.GetMessageA(byref (msg), None, 0, 0): if msg.message == win32con.WM_HOTKEY: ifself.HOTKEYS.has_key(msg.wParam): self.__emit = self.HOTKEYS[msg.wParam] user32.TranslateMessage(byref (msg)) user32.DispatchMessageA(byref (msg)) except: pass Tuesday* 09 September* 2008 4:27pm
Saturday* 06 September* 2008 12:52pm
Categories
googleFlickr ![]() Google is in the future..., originally uploaded by markuz. Tuesday* 26 August* 2008 11:43am
Categories
generalInternet stuff gnome FLOSS Flickr ![]() gweeber rules!, originally uploaded by markuz. I'm using gwibber., a really nice application that solves one problem with microblogging: A multi-protocol client. This small app, looks good, and works better, I can see Flickr updates, twitter, identi.ca, and updates on my facebook page. If you use two of this services you should use gwibber Tuesday* 26 August* 2008 11:41am
Friday* 22 August* 2008 10:17pm
Friday* 22 August* 2008 4:21pm
Categories
stuffchristine FLOSS Flickr ![]() Christine in ohloh, originally uploaded by markuz.
I just want to let you know the christine page in Ohloh: http://www.ohloh.net/projects/christine Sunday* 17 August* 2008 11:00pm
Categories
Software_DevelopmentPython christine Flickr ![]() screenshot3.png, originally uploaded by markuz.
This is a screenshot quite surprising for me, this is the gnome-system-monitor saying that christine uses just 6Mb of my RAM. I was looking for memory leaks in one of the applications that I'm currently developing in ICT Consulting, and I found that the memory used by one program, that memory that just belongs to the program is the Writeable memory and that is the memory you should be aware. Visitors Statistics*Technorati |