Older blog entries for funrecords (starting at number 13)

Too Much Hacking For One Day

As the Changelog will show, I spent way too much time hacking on OpenApplet today.
I'm sure the next time I go look at the code I'll end wondering what the hell I was thinking :P

Anyway the list of new features includes:

  • Asnychronous loading of urls so that the ui doesn't lock up while mime sniffing remote files.
  • Progress dialog while a remote file is being loaded.

    and why did this take me so much time?

  • Don't you love when you spend two hours searching for the source of a bug that ends up taking two lines to fix.

    Vicious on Code Quality

    "Most code is absolute crap. GNOME, KDE, it's all mostly crap. Yet overall it generally works. If we just wrote beautiful code that is all theoretically correct and only uses nice well designed APIs, we wouldn't have shit...Unix APIs are utter shit...Same with X11. Let's produce free software desktops that work, rather then lots of beautiful code that will never be finished."

    Tabbed MDI Strikes Mozilla Again

    In attempt to deal with the monstrosity known as tabbed MDI, mozilla developers have now added a "Do you really want to close all these tabs" dialog, a variation on the horribly annoying "Do you really want to quit" dialog.

    The solution to this problem is really not all that difficult. Instead of trying to deal with the data loss caused by allowing users to close a group of documents at once, simply only allow the user to close one tab at a time. Epiphany gets this right. The file menu close item only closes the current tab. If there is only one tab in a window, the window is closed. Now if I can only get them to implement the same behavior for the window border close button.

    Desktop Wide Bookmarks

    Why are bookmarks in the web browser only? It seems so limiting to me. Shouldn't any file or folder be bookmarkable?

    Anyway here's my idea. Remove the bookmarks menu from every application that has one. Instead add a "Bookmarks" menu to the desktop panel menus. This menu would list the 15 most used [1] bookmarks and a "More Bookmarks..." menu item. Selecting "More Bookmarks..." opens the bookmarks folder [2], giving you access to all of your bookmarks and automagically opens them in the correct application.

    How do I bookmark a page than? Well quite simply File->Bookmark should be available for every document. [3]

    Question and Answers

  • Why not list all bookmarks in the bookmarks menu using hierarichal menus? [4]

    Well hierarichal menus are slow and hard to use. The main goal of the bookmarks menu is to provide quick access to the most commonly used bookmarks. Including all bookmarks in the bookmarks menu makes the menu inefficient at which point a desktop launcher to open the bookmarks folder makes more sense. The bookmarks folder should provide quick enough access for less commonly used bookmarks.

  • Why File->Bookmark?

    File is the most correct menu in which to place this entry. All document actions appear in this menu including print and save.

    [1] Note I say "most used" and not "most recently used" there is a difference.
    [2] I use the term "folder" loosely here, it need not be a unix directory.
    [3] Of course for this to work we're going to need a cross-desktop standard for bookmarks.
    [4] This assumes a hierarichal bookmarks system of course, which I actually don't support but thats another issue.

  • Open Applet Runs Into API Snags

    For those not in the know, the open applet is a simple panel applet that allows you to open web address, file system files and folders, remote ftp files and folders, or search the web.

    Well my originally simple panel applet has run into some issues. The function it uses to open a url with is gnome_vfs_url_show from GNOME VFS. The main issue is that mime-sniffing remote files is costly [1] and the sync i/o leads to a noticeable lockup in the ui. My original solution was to set application handlers for common schemes like http:// and ftp://. This works all fine and dandy until you consider the fact that opening a web browser to view a pdf file that just happens to be stored on a webserver doesn't really make sense nor does it make sense to open webdav directories in a web browser either [2].

    What to do, what to do?

    UI wise I have it all figured out in my head. For the most part mime-sniffing single remote files does not take that terribly long. On average I'd guess its taking about 5 seconds for the average website. I'd need to take a look at the GNOME HIG, but afair if an operation takes more than around 3-5 seconds some sort of visual affordance that work is being done should be provided. In the case of the open applet poping up a dialog which informs the user that the file is being loaded along with a button to cancel the operation would suffice [3]. However the key here is to not block the main ui so that the user can open other urls at the same time that he/she is waiting for the blocked one/s.

    One idea I had to avoid the worst of the UI locking was to fork off gnome-open processes instead of directly opening the url with gnome_vfs_url_show in my app. This would work but obviously wouldn't scale very well :/

    [1] Especially for those of us in the majority who still use dialup.

    [2] I believe kde uses webdav:// in this case, but to the best of my knowledge gnome's use of http:// is more correct. It doesn't really matter though, even in the webdav case you need to be able to sniff out the mime-type of the file to open.

    [3] Libifying functions to provide UI would be useful to other apps that can open hyperlinked data such as irc clients, word processors etc.

    A great quote from gnomdesktop.org.

    "The fact that the much of computer world equates simple with dumb and complex with powerful is an unfortunate accident of history."

    hadess: The GNOME VFS method provided by sound juicer is a start but the ui still sucks due to the lack of steps 2 and 3. Expecting users to be familiar with gnome-vfs schemes is an even worst ui than using an application. [1]

    Anyway, while we're on the subject of code, any chance this patch can get applied to gnome-mime-data. I need it so that the open applet can be used to open folders.

    [1] Once again i'm not picking on sound juicer here specifically.

    8 Jul 2003 (updated 8 Jul 2003 at 06:42 UTC) »
    A Simple CD Burning Interface

    Ross Burton works on a nice little app called sound juicer. This app aims to provide a simple to use cd ripping interface. The thing thats strikes me though is the fact that no one ever thought "Hey this is a form of file management, lets put it into the file manager!" The file manager, what you say? Thats crack! Think again. The file manager provides the exact required interface here. Ripping cd's is just another form of managing your files (these just happen to cd audio tracks).

    Dave's Proposed CD Ripping Interface

  • User inserts cd into cd player
  • CD player icon appears on the desktop
  • User double clicks on CD player icon, opening the CD player folder.
  • User selects the songs he/she wishes to "rip" with the mouse or keyboard.
  • User opens another folder in which to put the ripped files. Note, this step can be ommited if the user wishes to place the files on the desktop.
  • User drag and drops the files (CD tracks) from the CD player folder to the target folder
  • Since the files can not be directly copied, the file manager will popup a dialog offering to copy and convert the cd files to one of the available formats (wav, mp3, ogg, etc.).
  • Ripped audio files automatically appear in the music player library. Note, this library may just be another special file manager "search folder" with a special music library view

    Compare the above steps to rip a cd to the similar steps to copying files from a floppy disk. *gasp* you can replace the term CD Player with floppy disk and rip with copy, and you have virtually the exact same steps.

    Addendum, July 8th

    I whipped up a quick mockup dialog for the UI mentioned above. One issue that came to mind is that users may not want to be bothered every time they try to copy files from an audio cd to a folder. This leaves us with two choices. A lesser designer might suggest adding a "Don't ask me again" checkbox, but as mpt says "oh, so you didn't really need to annoy me, but you thought you would anyway?." The other option is to provide the preferences from the within file manager preference dialog.[1] The issue of a dialog vs preferences really requires two questions to be answered, "How often do users actually rip their cd's?" and "Will they most likely always choose the same format and endoding?" If the answers are quite often and yes, I think a preference available from the file manager preferences might be a better ui, if the opposite answers are true, than perhaps a dialog is better.

    2:36 AM, time to go to bed....

    [1] I do think these preferences are useful/necessary. A hi-fi audio fanatic will likely choose a high-bit rate to encode at, a linux geek will want to use OGG and your traditional file swapper will most likely want to use MP3.

  • funrecords is annoying

    sisob, maybe gnome needs a gnome-rants list :). For the time being usability list will have to do.

    In other news, I spent the day painting kitchen walls. It was kind of fun and I made a nice slice of cash as well, considering my current complete lack of income. I have now returned to my normal daily activity, staring at a computer screen.

    So I'm back at it once again, trying to convince gnome developers that a concrete document based object model is needed in order for gnome to extend its usability. I wonder if anything will come out of it this time. I'm honestly not holding much hope, but maybe I should join auspex's effort to produce a written document. He claims that he "could present (it) in person on a napkin." I don't doubt this.

    4 older entries...

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!