vfmg: VFMG/fvwm2_out.pm (NEW) - fvwm2 backend

sparky sparky at pld-linux.org
Fri Dec 1 23:47:21 CET 2006


Author: sparky                       Date: Fri Dec  1 22:47:21 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- fvwm2 backend

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

---- Diffs:

================================================================
Index: vfmg/VFMG/fvwm2_out.pm
diff -u /dev/null vfmg/VFMG/fvwm2_out.pm:1.1
--- /dev/null	Fri Dec  1 23:47:21 2006
+++ vfmg/VFMG/fvwm2_out.pm	Fri Dec  1 23:47:16 2006
@@ -0,0 +1,33 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub fvwm2 {
+	my ($no, $level)=@_;
+	my $apps = "";
+	foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+		my $d = $main::desktop[$entry];
+		( my $name = $$d{Name} ) =~ s/\"/\\\"/g;
+		my $icon = "";
+		$icon = main::scale_icon($$d{Icon}) if $main::opt{icons};
+		$icon = "\%$icon\%" if length $icon;
+		if ($main::menu[$no]{$entry} < 0) {
+			$apps .= qq(AddToMenu $level	"$icon$name"	Exec $$d{Exec} &\n);
+		} else {
+			my $file = $$d{file};
+			$file =~ s/\s+/_/g;
+			print qq(AddToMenu $level	"$icon$name"	Popup $level.$file\n);
+			print "DestroyMenu recreate $level.$file\n\n";
+			print qq(AddToMenu $level.$file	"$icon$name"	Title\n);
+			fvwm2($main::menu[$no]{$entry}, "$level.$file");
+		}
+	}
+	print $apps."\n";
+}
+
+sub do_menu() {
+	fvwm2($main::opt{strip}, "fvwm2");
+}
+
+1;
================================================================


More information about the pld-cvs-commit mailing list