Author: sparky                       Date: Sat Dec  2 00:09:54 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- enlightenment / e16 backend

---- Files affected:
vfmg/VFMG:
   e16_out.pm (NONE -> 1.1)  (NEW), enlightenment_out.pm (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: vfmg/VFMG/e16_out.pm
diff -u /dev/null vfmg/VFMG/e16_out.pm:1.1
--- /dev/null   Sat Dec  2 01:09:54 2006
+++ vfmg/VFMG/e16_out.pm        Sat Dec  2 01:09:49 2006
@@ -0,0 +1,50 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub destdir {
+       if ( $main::o_output eq "enlightenment" ) {
+               return "$ENV{'HOME'}/.enlightenment/menus";
+       } else {
+               return "$ENV{'HOME'}/.e16/menus";
+       }
+}
+
+sub icons_dir {
+       if ( $main::o_output eq "enlightenment" ) {
+               return "$ENV{'HOME'}/.enlightenment/icons";
+       } else {
+               return "$ENV{'HOME'}/.e16/icons";
+       }
+}
+
+sub e16 {
+       my ($no, $mfile, $title)[EMAIL PROTECTED];
+       my $F_OUT;
+       open $F_OUT, ">> $main::opt{destdir}/$mfile.menu"
+               or warn "$main::opt{destdir}/$mfile.menu: $!\n";
+       print $F_OUT qq("$title"\n);
+       my $apps = "";
+       foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+               my $d = $main::desktop[$entry];
+               my $name = main::encode($main::opt{encoding},$$d{Name});
+               $name=~s/\"/\'/g;
+               my $icon = "";
+               $icon = main::scale_icon($$d{Icon}) if $main::opt{icons};
+               if ($main::menu[$no]{$entry} < 0) {
+                       $apps .= qq("$name" "$icon" exec "$$d{Exec}"\n);
+               } else {
+                       print $F_OUT qq("$name" "$icon" menu 
"$main::opt{destdir}/$$d{file}.menu"\n);
+                       e16( $main::menu[$no]{$entry}, $$d{file}, $name);
+               }
+       }
+       print $F_OUT $apps;
+       close $F_OUT;
+}
+
+sub do_menu() {
+       e16( $main::opt{strip}, "index", "Enlightenment");
+}
+
+1;

================================================================
Index: vfmg/VFMG/enlightenment_out.pm
diff -u /dev/null vfmg/VFMG/enlightenment_out.pm:1.1
--- /dev/null   Sat Dec  2 01:09:54 2006
+++ vfmg/VFMG/enlightenment_out.pm      Sat Dec  2 01:09:49 2006
@@ -0,0 +1,50 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub destdir {
+       if ( $main::o_output eq "enlightenment" ) {
+               return "$ENV{'HOME'}/.enlightenment/menus";
+       } else {
+               return "$ENV{'HOME'}/.e16/menus";
+       }
+}
+
+sub icons_dir {
+       if ( $main::o_output eq "enlightenment" ) {
+               return "$ENV{'HOME'}/.enlightenment/icons";
+       } else {
+               return "$ENV{'HOME'}/.e16/icons";
+       }
+}
+
+sub e16 {
+       my ($no, $mfile, $title)[EMAIL PROTECTED];
+       my $F_OUT;
+       open $F_OUT, ">> $main::opt{destdir}/$mfile.menu"
+               or warn "$main::opt{destdir}/$mfile.menu: $!\n";
+       print $F_OUT qq("$title"\n);
+       my $apps = "";
+       foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+               my $d = $main::desktop[$entry];
+               my $name = main::encode($main::opt{encoding},$$d{Name});
+               $name=~s/\"/\'/g;
+               my $icon = "";
+               $icon = main::scale_icon($$d{Icon}) if $main::opt{icons};
+               if ($main::menu[$no]{$entry} < 0) {
+                       $apps .= qq("$name" "$icon" exec "$$d{Exec}"\n);
+               } else {
+                       print $F_OUT qq("$name" "$icon" menu 
"$main::opt{destdir}/$$d{file}.menu"\n);
+                       e16( $main::menu[$no]{$entry}, $$d{file}, $name);
+               }
+       }
+       print $F_OUT $apps;
+       close $F_OUT;
+}
+
+sub do_menu() {
+       e16( $main::opt{strip}, "index", "Enlightenment");
+}
+
+1;
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to