Friday, July 26, 2013

Sound Recorder: Week Six

Last week I moved on to frontend coding. I finished a first iteration of the listview:


Maybe it's just me, but I spent a lot of time trying to figure out how to display the Gtk.StackSwitcher before I discovered that it needed to be added to the headerbar using, e.g. headerbar.custom_title = stackSwitcher; Maybe there are other ways to display the buttons, but this was kind of an opaque point in the widget's documentation.

I implemented the actions for all of the buttons shown except for sharing. I would actually like to hide one of the buttons so the play functionality can only be launched from the listview, but I haven't implemented that yet. I still have a little work left on the info dialog (moving the close button to the top, finalizing what info to display about the file). Reda made some very nice hi-res mockups that I'm using, for example, for the info dialog:


Anyway, I have a million things to do today to get ready for GUADEC, so that's all I'm going to write. See you there :)

Friday, July 19, 2013

Sound Recorder, Update Five

Since it's been a week since I blogged here is my reluctantly-written update... Somehow blogging once a week about coding feels like microblogging. I spent last week as I intended, in cleaning up my code, fixing bugs, etc. I think I fixed all the bugs I knew about, so that's good. I'm sure plenty more will show up now that I'm writing the UI, since the functions will be called in different orders and threads will probably start canceling each other out or something. I don't know. It should be exciting for me, yet very boring for you to read about :)

Anyway, Reda Lazri says that he will give me some feedback on the UI as we go along, so I will post some screenshots as soon as we have something presentable. Now that I am working on Gtk code, I also need to refer less to other people's code. This week I've been working on the listview: I have it puling all the info I need from the files and displaying it in a Gtk.ListBox. Honestly I wrote the listview using a Gtk.ListBox because some older mockups had the play button in the listview, but a couple days ago Reda redesigned it so that there is a menu with text for play/edit/delete:
Honestly I think a Gtk.TreeView would be just as good for this, so I might re-write it.

Other than coding, I have been spending the week getting ready for GUADEC. I'm going to be giving a talk there on the monthly GNOME-related gatherings that Jim Campbell and I have been organizing at our local hackerspace, and I'm also giving a lightning talk on my GSoC project.
Thanks to the GNOME Foundation for the travel sponsorship! See you all at GUADEC :)



Wednesday, July 10, 2013

Sound Recorder

So this is my last backend update. I'm finished with everything I think I need (which is never really all, but is probably close, anyway). I'm planning to spend the rest of this week on code cleanup, and then move on to frontend code on Monday. This is a week ahead of schedule, sort of: I moved a few backend tasks (like renaming files, because it's helpful to be able to choose a file via a gui to test renaming) to later in my schedule. So next week I plan to start with the listview/listbox frontend. I'm going to be using some nice new Gtk widgets, like Gtk.Overlay, Gtk.Listbox, and friends, so it should be fun :)

Last week was a short week because of the 4th of July Holiday, so I just read Vogue Paris instead of code:
GStreamer
Sushi
Transmageddon
Banshee
GNOME Media
and Stereolab :)




Tuesday, July 2, 2013

Sound Recorder Weekly Update: Three

Last week I finished the main items on my agenda -- those being the functions that populated the listview with information from the files in the appropriate directory. Today I moved on to writing the backend code for the minor widgets: the label which shows time progress, the volume element, etc. I have to say that my brain is kind of in a knot over the volume element. I think this is mainly because I was reading the source code from Empathy, which I think is a lot more complicated than what I need to write.

I think I'm mainly on track to finish this phase of coding on time. I have two more weeks in my calendar before I start on frontend code. I haven't been sticking to my schedule exactly, but instead have been transposing tasks based on interdependencies in the code. As usual, my solutions seem to me to be more circuitous than necessary, but I think I'm starting to get a better understanding of the language, which I am pleased about. I think I spend around two thirds of my coding time trying to understand what I am doing, one sixth writing functional code, and one sixth correcting what I wrote. The understanding part feels pretty frustrating sometimes, but luckily (I guess) I find that not understanding how to do something, or not knowing how something works, or just having no idea at all what a piece of code is saying is motivating rather than discouraging. Anyway, I don't have much else to report, so I'll close with my code reading list from this past week:
1. Empathy audiosrc.c
2. Sushi sushi-file-loader.c (for glib print formatting, which I couldn't find docs for)
3. Rhythmbox rb-encoder-gst.c (Gstreamer time queries)
4. Music player.js (formatting nanoseconds as seconds)
5. Gstreamer Plugins Bad id3tag.c (because it doesn't support the tag I want to set, and I wanted to know why)


and etc :)