Tuesday, April 19, 2011

Update time....

As I mentioned in my last blog, I was going to browse through the available Banshee extensions to find ones that had similar functions to what we are trying to do with our project (right-click menu option, entry window, extracting current track info, ect...). This is exactly what I did. And as expected, or hoped, it really paid off. I was able to find several extensions that implemented the different functions that we were looking to do in our extension. After studying the code for these extensions, some late nights at the computer and a couple group meetings we are very close to wrapping this thing up. Here is the breakdown of our progress, which has really taken off in the past couple weeks.

The first breakthrough was the right-click options menu. We were able to get an option to appear in the right-click menu when clicking on the current track. All of this happens only when our extension is enabled of course. This break through was very important because it gave use a starting point, which is what we were struggling with.

So how did this happen. I was able to locate a LastFM extension that created an option in the right click menu, exactly what we where looking for. So I tracked down the code that performed this function and tailored it for our project. This code even included an event handler that listened for the click of the option button. Perfect! Everything looked like it should work but no option in the right-click menu after compiling he source code. I was not exactly sure why so I brought this to the next team meeting. With a little bit of teamwork we were able to figure out that there was an xml configure file missing that we needed to create in our project to tell the option where to appear. It is pretty cool, we can make this option appear in other places just by specifying it in the xml file. Currently we have our option showing up in the right-click menu and the edit tab on the main tool bar.

Our second break through came about via Jesse. The code I provided for the menu option was a bit messy from me playing around with it. Jess took this code and cleaned it up and in the process added the code for the entry window. He was able to get the event handler to call the window code. So, when the right-click menu option is selected by the user our Gwibber entry window pops up, as needed.

Our latest breakthrough was the ability to grab the current track metadata (artist, song title, album title, ect...). We are able to store the values in string variables. I think Jesse said he had figured this out before but I found a different namespace that provides similar methods for this. SO by placing this code that extracts the current track metadata in the event handler allows us to grab the current track info on the option click. Getting very close!!!

Finally after all that, we are left with one task. Pre-load a formated string of track metadata into the Gwibber entry window. This is proving to be a challenge since there is no direct method for this and there is no extension available with such function. Each of has come up with a different way of attacking this problem. Hopefully one will pay off.

Jesse has been in contact with one of the developers trying to figure out a of doing this. Not sure on the details but I think it involves overriding some sort of event handler to accomplish this. He is going to look into that further.

Kyle thinks that he an create a new class that inherits from the gtk enrty window which will include a setText method. This would make things very easy if he could pull that off.

I found a getClipboard method that is provided by the gwibber entry window. I am not sure how it works but I have been trying to figure that out. It requires that you pass it the type Atom but I am unsure what this I am reading up on this type and I have emailed the gwibber mailing list in hope that someone can shed some light on this method or maybe a better way to pre-load this text.

Guess I should mention what Shawn has been doing as well. He is supposed to be getting a poster ready for the poster contest. The abstract is due Friday and he says he will have this done. Hopefully he follows though on this!

Well that should catch us up for now. The semester is coming to an end quickly so I would like to wrap this the project up so we can submit a patch and look towards our presentation. Exciting stuff!!!

No comments:

Post a Comment