On Apr 12, 2011, at 8:35 AM, David Seikel wrote:

> On Mon, 11 Apr 2011 21:15:35 -0700 Dave Ray <cl...@jonive.com> wrote:
> 
>> And I don't even know if those installations provide what's needed
>> for e17 menus.
> 
> Just to be clear, this is not e17 menus you are talking about, but the
> freedesktop.org XDG menus that e17 supports.  They are common in linux
> distros, but sounds like there is no support for them in MacOS.  So you
> have to roll your own.  XDG menus are horrendously complex collections
> of XML files.  Good luck.

Here's my quick 'n dirty solution:
1) run this script
2) delete ~/.e
3) start e17

#!/usr/bin/perl
# Build XDG style menu file on MacOS. Run this as root, i.e. 'sudo [thisfile]'
use strict;
my @files = </usr/local/share/applications/*.desktop>;
my @files2 = </~/.local/share/applications/*.desktop>;
my @allfiles = (@files,@files2);
my $buf = '';
foreach my $file (sort {lc $a cmp lc $b} @allfiles) {
   $file = substr($file,rindex($file, '/')+1);
   $buf .= "    <Filename>" . $file . "</Filename>\n";
}
if (! -d "/usr/local/etc") { mkdir("/usr/local/etc", 0755); }
if (! -d "/usr/local/etc/xdg") { mkdir("/usr/local/etc/xdg", 0755); }
if (! -d "/usr/local/etc/xdg/menus") { mkdir("/usr/local/etc/xdg/menus", 0755); 
}
open(NEW,"> /usr/local/etc/xdg/menus/x11macos.menu");
print NEW <<"FOO";
<?xml version="1.0"?>
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" 
"http://standards.freedesktop.org/menu-spec/menu-1.0.dtd";>
<Menu>
  <Name>Favorites</Name>
  <DefaultAppDirs/>
  <DefaultDirectoryDirs/>
  <Layout>
$buf
  </Layout>
  <Include>
$buf
  </Include>
</Menu>
FOO
close (NEW);
exit();



------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to