Inserting text into an actual Gwibber window is not looking very good. It appears that this method probably will not happen and it looks like my team and I will have to implement the alternative window we have created. This will limit the original functionality that we hoped for. Instead of users being able to choose which social networks they will be able to send song information to, they will have to send it to all networks they have configured in their Gwibber client. Also, unless we can fix it soon, user's may not be able to edit the text to personalize it before they send it. It's not what we hoped for but it will probably have to do for this project and later on in the future, I or someone else on the team can fix this.
With our project coming to a close, we are developing our presentation for our final product. For this my team and I have put together an outline of what will be discussed and have began a Prezi presentation. We will be discussing our initial project plan, our experiences, what we learned and then a demo of our final product.
This class has been a great experience and I have enjoyed this project very much. I can only hope that others who take this class will enjoy their experience.
CSCI 462
Wednesday, April 20, 2011
Monday, April 18, 2011
Creating an Alternative Window for Social Extension
With all the attempts of loading text into a Gwibber Window epically failing, it was time to implement the backup plan my team and I came up with. Instead of using the Gwibber window provided by Gwibber developer Ken VanDine, we will just create and implement our own window that would do pretty much the same thing. The only difference would be that this window will only submit to the user's choice of Twitter or Facebook or both. If we have the time though we could probably implement all of the social networks that Gwibber supports, but for now Facebook and Twitter will have to do. To save us some time with creating a window to use, I found that MonoDevelop has a GUI designer for creating Gtk windows, so last night I spent a few hours messing around with the designer. It splits up the window class into a source code section and designer section. While you are designing the window in the GUI designer, it adds the code to the source code side. If any action events need to be programmed, you can select an action event on the designer side and it will create a placeholder for it on the source code side. You can then add the code you want inside the event place holder. So far I have been able to create a window to look very similar to the Gwibber window, and it can load a current track and it will send to all the accounts that are configured in my Gwibber account. The next step is to allow the user to select which account they want to send it to, make the text editable and implement a character limit of 140 characters. This could serve to be a little bit of work, but it's doable.
Wednesday, April 13, 2011
Preloading Still a Problem
Since, last class I have not made any progress with the issue my team and I have had with preloading text into the Gwibber window. Ken VanDine, told me that I have to insert the text into the OnExposeEvent() function, but I'm not really sure about what method to use in order to insert that text. He wasn't very clear on that part and I'm very confused with how to implement text into that function. I've tried just including a string assigned to a variable, console writing and Pango Layouts. Nothing has worked so far. Brandon mentioned something about a way to manipulate the system clipboard as a method to get it into the Gwibber window. The only thing is actually getting the textual information into the actual system clipboard. If we can do that, then we can use a getClipboard () function that Brandon found in the Gwibber library. If neither of these methods gets us anywhere, then we will have to bite the bullet and create our own window which probably won't be that hard but our Gtk experience is limited. I'm still optimistic that a way will present itself though.
Tuesday, April 12, 2011
Working out the preloaded text problem
As the semester comes near an end, my team and I are still trying to figure out a way to load currently playing tack information into the Gwibber window for our social extension project. The problem we are running into is that the Gwibber library has not exact method for inserting text into the Gtk window. The Gtk-sharp window consists of a insertText() method for an Gtk.Entry object but the relationship between the Gtk-sharp classes and classes used used in Gwibber do not have a direct inheritance relationship. I emailed Ken VanDine, the creator of the libgwibber library, about our problem and he said that the C# wrapper does not directly have a way of doing this. He said the best bet was to override the expose event under the library and try inserting the text there. He didn't go into much detail beyond what exactly the expose event did, but all I can imagine is that it has something to do with exposing content. I'm still not exactly sure how to go about inserting text into this method override. I was able to override a method called OnExposeEvent() and all that did was return a boolean value with the original OnExposeEvent() method being returned. I of course am not even sure that is the right method he was talking about. I'm going to email him tomorrow and see if he can give me any more information about this method and what it does exactly. If using the Gwibber window does not work out, then we have a plan for creating our own message window. Hopefully it does work out, because using the Gwibber entry window would save us a lot of time.
Wednesday, April 6, 2011
Social Extension Now Opens Gwibber Window
Yesterday after class, I discussed with my team the method I found for extracting currently playing track information from Banshee and Brandon mentioned that he found another extension that was utilizing a right click menu and a pop up window just like we wanted to utilize. The name of the extension was LastFMFingerPrint and if I remember correctly it was used to find track information about a song by searching through LastFM. What we all ended up doing was taking parts of the code that we would need from the LastFM extension and implementing it into our extension's code. It took us the rest of class and even well after class to get everything to work right, but by the time 4 or 5 o'clock rolled around we had our extension's action showing up in the right click menu of all songs. We were really happy about that!
The core issue that we faced with getting our extension event action to show up in the right click menu had to do with an XML file in the LastFM extension. This XML file contained elements and attributes about where to add your action (in our case called ActionEntry) in the Banshee menus. This XML file was called in the code and probably parsed in order to properly place the action to the correct menu. What we did with this XML file was copy its contents, rename it "Social.xml", and alter some of the attribute values to fit our social extension. Once we altered that file and added it to a resources folder we created in our project, we were able to right click on a song and our action appeared in the menu.
After getting our action to show up in a right click menu, our group decided to call it a day. I went home and messed with the code a little more to see if I could get our Gwibber window to pop up upon clicking on our social action. I got it to work with in no time. All I did was take the Gwibber window code that we had in a separate file and created a new class for the Gwibber window in our social extension project. From there we have an action event method in the main social extension code that creates and instance of the Gwibber window class and calls a method to run the window when the social action receives an action event (in this case a mouse click). That was all there was to it and we are now almost caught up with our schedule. From, here we have to figure out how to load the track information into the Gwibber window, test it, write documentation for it, format the code to fit the Banshee coding standards and then submit it to Bertrand Lorentz for review. Yesterday was a very productive and a breakthrough of a day. I have more confidence that we now have a better handle on our project and we are learning everyday the inner workings of the Banshee project.
The core issue that we faced with getting our extension event action to show up in the right click menu had to do with an XML file in the LastFM extension. This XML file contained elements and attributes about where to add your action (in our case called ActionEntry) in the Banshee menus. This XML file was called in the code and probably parsed in order to properly place the action to the correct menu. What we did with this XML file was copy its contents, rename it "Social.xml", and alter some of the attribute values to fit our social extension. Once we altered that file and added it to a resources folder we created in our project, we were able to right click on a song and our action appeared in the menu.
After getting our action to show up in a right click menu, our group decided to call it a day. I went home and messed with the code a little more to see if I could get our Gwibber window to pop up upon clicking on our social action. I got it to work with in no time. All I did was take the Gwibber window code that we had in a separate file and created a new class for the Gwibber window in our social extension project. From there we have an action event method in the main social extension code that creates and instance of the Gwibber window class and calls a method to run the window when the social action receives an action event (in this case a mouse click). That was all there was to it and we are now almost caught up with our schedule. From, here we have to figure out how to load the track information into the Gwibber window, test it, write documentation for it, format the code to fit the Banshee coding standards and then submit it to Bertrand Lorentz for review. Yesterday was a very productive and a breakthrough of a day. I have more confidence that we now have a better handle on our project and we are learning everyday the inner workings of the Banshee project.
Monday, April 4, 2011
Extracting currently playing track information in Banshee
Last class, half of the team was out so it was just Shaun and I working on the project. Shaun was having Linux troubles as well as getting the Banshee software, Mono Develop and the Banshee Community Extensions branch set up right. So, while I was assisting him with that I was also working on figuring out how our team would extract the track title, artist name and album title from a currently playing track. Before the class I had been struggling through every possible class in the source code and during the last class I figured out how to extract the information! I found reference to a TrackInfo object in the PlayerEngine sub class called CurrentTrack in the BaseTrackListView class. The actual reference looked like this:
current_track = ServiceManager.PlayerEngine.CurrentTrack;
After this reference into our Social extension skeleton code and extracted TrackInfo attributes such as DisplayTrackTitle, DisplayArtistName and DisplayAlbumTitle, I ran Banshee and had the information spit out onto a command line once I had a song playing, and it worked! You never know what you'll find just by digging around inside the source code. Even though I found this reference in the BaseTrackListView class, a search of the source code found that this reference is found in many other classes as well. The next step now will be to figure out how to load this information into a Gwibber window as well as getting the window to show up in Banshee.
current_track = ServiceManager.PlayerEngine.CurrentTrack;
After this reference into our Social extension skeleton code and extracted TrackInfo attributes such as DisplayTrackTitle, DisplayArtistName and DisplayAlbumTitle, I ran Banshee and had the information spit out onto a command line once I had a song playing, and it worked! You never know what you'll find just by digging around inside the source code. Even though I found this reference in the BaseTrackListView class, a search of the source code found that this reference is found in many other classes as well. The next step now will be to figure out how to load this information into a Gwibber window as well as getting the window to show up in Banshee.
Thursday, March 31, 2011
Progress on Social Extension
Last time, I met with my team and we discussed how we would extract audio track information to place in a Gwibber posting window. I came across a class called TrackInfo that gets all of this information, however when I tried to extract the information and post it on a command prompt during a currently playing song, It would give me unkown for the title, the artist and the album. So, I'm still unsure about how that is relating to a currently playing song. I found that the Wikipedia Extension in Banshee uses TrackInfo to collect artist information, but I have not been able to yet determine what they are doing differently form my team and I. We will spend today continuing to look into this matter. My strategy at this point is to keep looking at extensions that extract track information to find any similarities in information extraction as well as finding all classes where TrackInfo is used in order to see if there is a specific class for a currently playing song.
Subscribe to:
Posts (Atom)