Mads Buus Westmark’s tech blog
RSS icon Home icon
  • Snap open on a Mac

    Posted on March 3rd, 2009 mads 5 comments

    UPDATE - Gedit now has native OS X builds here, and snapopen 1.2 (from github) should work out of the box.

    (Thanks to the great project MacPorts it is now possible to install gtk and gnome applications on your mac almost as easy as in Linux. The GUI tool Porticus makes it ‘point and click’).

    With a brand new MacBook pro 17″ in my hands, I could not resist installing gedit and snap open to see how that would work:

    Here it is:

    snapopen_mac

    There were some issues… and there are still some.

    First of all: Get rid of that horrid default gtk theme that scares so many away from gtk apps. Install gtk-theme-switch from MacPorts and download a proper skin from www.gnome-looks.org. (This one is called ‘Leopardish’).

    Installing the plugin was a bit tricky and I ended up putting my snapopen plugin files directly into

    /opt/local/lib/gedit-2/plugins/

    Furthermore, the ‘find’ command we all love, and my plugin relies heavily on, on Mac does not support the -iwholename flags, but instead the -ipath so that was easy.

    Next issue was the keyboard shortcuts CTRL+ALT+o does not work out of the box. I switched to SHIFT+CTRL+o which works fine (I will fix this properly later).

    Now it works… well almost:

    The filebrowser integration seems to be quirky, and it often falls back to ‘wd’ (working dir).

    I might do a ‘Mac’ version soon, so it will work here as well, although it would in the form of a ‘Mac-detect flag’ not a code fork.

    Until next time…

    Link to original (linux only) snapopen plugin