vfmg: VFMG/metisse_out.pm (NEW) - metisse backend

sparky sparky at pld-linux.org
Fri Dec 1 23:59:00 CET 2006


Author: sparky                       Date: Fri Dec  1 22:59:00 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- metisse backend

---- Files affected:
vfmg/VFMG:
   metisse_out.pm (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: vfmg/VFMG/metisse_out.pm
diff -u /dev/null vfmg/VFMG/metisse_out.pm:1.1
--- /dev/null	Fri Dec  1 23:59:00 2006
+++ vfmg/VFMG/metisse_out.pm	Fri Dec  1 23:58:55 2006
@@ -0,0 +1,35 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub metisse {
+	my ($no, $file, $basename) = @_;
+	$file =~ s#^\.##;
+	
+	my $apps = "";
+	my $this_menu = "";
+	$this_menu .= qq(DestroyMenu $file\nAddToMenu $file "$basename" Title\n);
+	foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+		my $d = $main::desktop[$entry];
+		my $icon = "";
+		$icon = main::scale_icon($$d{Icon}) if $main::opt{icons};
+		$icon = "\%$icon\%" if length $icon;
+		
+		if ($main::menu[$no]{$entry} < 0) {
+			( my $name = $$d{Name} ) =~ s/\"/\\\"/g;
+			$apps .= qq(+ "$icon$name"\tExec exec $$d{Exec}\n);
+		} else {
+			( my $name = $$d{file} ) =~ s/\s+/_/g;
+			$this_menu .= qq(+ "$icon$$d{Name}"\tPopup\t$file.$name\n);
+			metisse($main::menu[$no]{$entry}, "$file.$name", $$d{Name});
+		}
+	}
+	print $this_menu . $apps . "\n" if length $file;
+}
+
+sub do_menu() {
+	metisse($main::opt{strip},"", "metisse");
+}
+
+1;
================================================================


More information about the pld-cvs-commit mailing list