From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.117.16 with SMTP id p16cs150715agc; Wed, 28 Oct 2009 15:16:33 -0700 (PDT) Received: by 10.224.36.104 with SMTP id s40mr9520738qad.296.1256768193205; Wed, 28 Oct 2009 15:16:33 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 29si1945512qyk.100.2009.10.28.15.16.33; Wed, 28 Oct 2009 15:16:33 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id C0351158806F; Wed, 28 Oct 2009 18:16:32 -0400 (EDT) X-Greylist: delayed 579 seconds by postgrey-1.31 at rubycentral.org; Wed, 28 Oct 2009 18:16:24 EDT Received: from smtp183.iad.emailsrvr.com (smtp183.iad.emailsrvr.com [207.97.245.183]) by rubyforge.org (Postfix) with ESMTP id 4F9B018582AC for ; Wed, 28 Oct 2009 18:16:26 -0400 (EDT) Received: from relay18.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay18.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id C208A1B4058 for ; Wed, 28 Oct 2009 18:06:43 -0400 (EDT) Received: by relay18.relay.iad.mlsrvr.com (Authenticated sender: jonah-AT-goodcoffee.ca) with ESMTPSA id B4B5A1B4023 for ; Wed, 28 Oct 2009 18:06:43 -0400 (EDT) Message-ID: <4AE8C073.404@GoodCoffee.ca> Date: Wed, 28 Oct 2009 18:06:43 -0400 From: Jonah User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: sup-talk@rubyforge.org X-Enigmail-Version: 0.96.0 Subject: [sup-talk] [PATCH] change opening attachements on darwin to use open instead of run-mailcap X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org Hey everyone, I've been working on getting sup to work in MacOSX (darwin). MacOSX has a special command (open) for opening files - there is no support for mailcap. This patch uses case to run the appropriate command depending on the architecture used. I still haven't gotten sup to send mail yet,.. so more patches for MacOSX will probably be forthcoming. :) I'm loving sup so far, keep up the great work! Cheers, Jonah --- lib/sup/message-chunks.rb | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index edc40c4..581b707 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -132,7 +132,12 @@ EOS def initial_state; :open end def viewable?; @lines.nil? end def view_default! path - cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}'" + case Config::CONFIG['arch'] + when /darwin/ + cmd = "open '#{path}'" + else + cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}'" + end debug "running: #{cmd.inspect}" BufferManager.shell_out(cmd) $? == 0 -- 1.6.3.3 _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk