vfmg: VFMG/wmaker_out.pm (NEW) - wmaker backend

sparky sparky at pld-linux.org
Sat Dec 2 00:21:43 CET 2006


Author: sparky                       Date: Fri Dec  1 23:21:43 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- wmaker backend

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

---- Diffs:

================================================================
Index: vfmg/VFMG/wmaker_out.pm
diff -u /dev/null vfmg/VFMG/wmaker_out.pm:1.1
--- /dev/null	Sat Dec  2 00:21:43 2006
+++ vfmg/VFMG/wmaker_out.pm	Sat Dec  2 00:21:38 2006
@@ -0,0 +1,36 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub wmaker {
+	my ($no, $coma, $level) = @_;
+	my $apps = "";
+	foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+		my $d = $main::desktop[$entry];
+		my $name = $$d{Name};
+		$name =~ s/\"/\\\"/g;
+		if ($main::menu[$no]{$entry} < 0) {
+			(my $exec = $$d{Exec}) =~ s/\"/\\\"/g;
+			$apps .= "$coma\n".
+				qq{$level("$name", EXEC, "$exec")};
+		} else {
+			print "$coma\n",
+				qq{$level("$name"};
+			wmaker( $main::menu[$no]{$entry},",",$level."\t");
+			print "\n$level)";
+		}
+	}
+	print $apps;
+}
+
+sub do_menu() {
+	if($main::opt{strip}) {
+		wmaker(1,",","");
+	} else {
+		wmaker(0,"","");
+	}
+	print "\n";
+}
+
+1;
================================================================


More information about the pld-cvs-commit mailing list