> i realize this may not sound as sexy, but couldn't we set the mime
> option for text to something like "eterm -e '$TEXTEDITOR'"?

I'd use that myself, but I'd also like to see E17 become a desktop environment
to the point where the command line is no longer a necessity (so I can get my
less-computer literate friends to use it :), thus things like this are needed.

Also, how does one set a mime option? Currently I do everything from the
command line, but it'd still be nice to know how to do filetype associations
should I want to set up an E based desktop for someone else :)


(I got writing this, realised it was somewhat offtopic, but I though I'd post
it on the odd chance that my proof of concept is a better design than the
current code. Probably not, but I've spent 5 minutes thinking about it and I
don't like to waste thinking time, so I thought I'd show it anyway :)

How does it work anyway? I'd do something like so (very messy, just a proof of
concept):

] # load this from a database of some sort
] $associations = {
]    "text/plain" => {"edit" => "gedit"},
]    "text/html" =>  {"view" => "mozilla", "edit" => "eterm -e vim"},
] }
] sub rightClick($filename) {
]     $mimetype = system("file --mime $filename");
]     foreach($associations[$mimetype]) {
]         menu.addItem($key);
]         menu.item($key).onClick = system("$value $filename");
]     }
] }
] sub doubleClick($filename) {
]     $mimetype = system("file --mime $filename");
]     # action 0 is the default
]     system("$associations[$mimetype][0] $filename");
] }

-- Shish


        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to