Sunday, May 24, 2009

coding again

This weekend I had some time to code, so I implemented the invite dialog and finished the display of emoticons on the input field. Some modifications were made on the code to allow extensions on other toolkits too.
Dx made some small gui tweaks and worked on p2p, so we may have p2p working on some time.

With the invite dialog the conversation window is almost done, the only thing left is custom emoticon and display picture that depends on p2p.

a screenshot of the gui with the invite window:

Friday, May 15, 2009

about webcam

some comments suggest that webcam is the only feature that matters, that it's not that hard to get it working, some suggest to use other implementations that doesn't support the MSN protocol.

First of all, if I implement webcam I will use farsight/farsight 2, I won't reinvent the wheel.
About using other libraries/techniques that doesn't support MSN protocol, that makes no sense, the number of emesene users is *really* small, and I think that you want to use the webcam with your WLM contacts, if your friend uses emesene, then easily you could use another protocol/client to communicate, I wont make a emesene only implementation.
Another thing that people don't seem to see is that webcam is really platform specific, linux has troubles detecting and making webcams work, there are a lot of ways to get/display video and sound, so it's not easy, also it works differently for each operating system and even between different versions. The protocol for webcam is closed, the codecs are closed and the specification changes whenerver micrsoft wants to change them, so "it works for me" is not enough here, it must be a good implementation otherwise the users will make a DDOS against the bug traking system to notify the developers that with X, Y and Z webcam doesn't works.
Last (for now) is that I don't have webcam/mic on any of my computers :)

and just to show an example on how easy is to make webcam work, talk to the pidgin team ;)

Sunday, May 10, 2009

Release schedule (sort of)

some people are asking when the first alpha/beta/something will be, to answer those questions I made this post.

The idea of the first "something" officially for emesene 2 will be when I get to the following milestone:

"emesene 2 is everything I want except P2P"

what that means?

that the first public bundle to test will be made when I have emesene feature complete excluding P2P (custom emoticons, file send/receive, webcam and inks). When that release is made I will receive bug reports on some place (trac is really not used right now, at least by me), I will work to fix all the problems that appear on that release, then I will make a new release when I think that all major bugs are removed, I will make a new cycle fixing bugs.
When those two cycles are finished we should have something like:

"emesene 2 is everything people want except P2P and it's stable"

then if dx is still not working on P2P (*looks at dx*) I will start to work on that, the features will be added in this order:
  • display pictures
  • custom emoticons
  • file send/receive
then I will make a release to test those implementations and fix bugs. After fixing the bugs the first release of emesene 2 will be made, a next cycle of bugfixing will be made and after that we will start to work on webcam.

why webcam at the end?

because webcam is unstable, it breaks, different distributions/operative systems handle webcam in a different ways, it breaks, it needs to compile/have a shared library, it breaks... did I said it breaks? ;)

dates for that milestones?

No idea, pretty busy right now trying to finish my engineer career and working, but I really want to get to the first milestone fast. Right now the things missing are

  • display emoticons on userlist/labels
  • plugin preference dialog
  • finish emoticon handling on conversation input
  • theme handling on preferences
  • finish the information view for logs
if you want to test earlier, you can checkout from tne subversion repository :)

Friday, May 01, 2009

Worker's day update

Today I had time to code emesene 2, this are the results:

  • fixed the problem getting notifications on login
  • now all the contacts are displayed on the contact list (you don't need to refresh to make some change the status)
  • the emoticon window is closed when the mouse leaves the window for more than a half second
  • the tabs now have widgets that look better (check the code quiz below to help me fix the close button!)
  • the input box on the conversation window is smaller now
  • implemented a dummy e3 protocol to be able to test emesene 2 without the need to login and wait.


The most interesting of all the new features is the last one, using the e3 architecture that allows to add support to new protocols easily I implemented a dummy protocol that basically returns succeed events on all the requests, it contains a userlist with dummy contacts and groups and when you chat with someone some random contact replies you with the same message.
This dummy protocol is nice because of two things:
1) it let me test the gui without login in in msn or gtalk (that means no waiting for login), I can also code when I have no internet connection or I'm behind a closed network (like the one from my university).
2) it shows how easy is to start implementing a new protocol and can help people to understand e3 and make it easy to start hacking the msn or jabber implementations.

if you want to test the dummy protocol, on the login window open the preference dialog (on the bottom right corner) and select the dummy session, then login with some random user and password and start pressing all the buttons to make the bugs appear.

Code quiz

run this code:

see that the close icon has a padding on the left and the bottom?


import gtk

class TinyButton(gtk.Button):
'''a simple and tiny button'''

def __init__(self, stock):
'''constructor'''
gtk.Button.__init__(self)

self.image = gtk.image_new_from_stock(stock, gtk.ICON_SIZE_MENU)
self.set_image(self.image)
width, height = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
self.set_size_request(width + 2, height + 2)
self.image.show()

self.set_focus_on_click(False)
self.set_relief(gtk.RELIEF_NONE)

if __name__ == '__main__':
w = gtk.Window()
w.add(TinyButton(gtk.STOCK_CLOSE))
w.show_all()
gtk.main()


ok, if you can remove that extra padding your name will be on this post :D

EDIT: what I need is a really small button with no margins or paddings, that's why it's called TinyButton ;)

HINT: I borrowed the code from here: http://git.gnome.org./cgit/gnome-terminal/tree/src/terminal-tab-label.c?h=gnome-2-26 but something is missing and I can't see what.

An the winner is:

Faith_Nahn

he posted the code to solve the problem that involved setting a gtk style for the button. Thanks to him and all the ones that submited code!

If you find it fun I can make more code quizes in the future.

as an extra bonus you where added to the dummy user list of the dummy protocol, now you can make girls fall inlove with you by showing them that you are on emesene code (?)*

btw, you are on the commit log too: http://emesene.svn.sourceforge.net/viewvc/emesene?view=rev&revision=1610

* to make this, login with any user and password selecting the dummy session on login preferences.