vfmg: VFMG/fvwm_out.pm (NEW) - fvwm backend

sparky sparky at pld-linux.org
Fri Dec 1 23:41:56 CET 2006


Author: sparky                       Date: Fri Dec  1 22:41:56 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- fvwm backend

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

---- Diffs:

================================================================
Index: vfmg/VFMG/fvwm_out.pm
diff -u /dev/null vfmg/VFMG/fvwm_out.pm:1.1
--- /dev/null	Fri Dec  1 23:41:56 2006
+++ vfmg/VFMG/fvwm_out.pm	Fri Dec  1 23:41:51 2006
@@ -0,0 +1,33 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub fvwm {
+	my ($no, $file, $basename) = @_;
+	$file =~ s#^\.##;
+	
+	my $apps = "";
+	my $this_menu = "";
+	$this_menu .= qq(Popup "$file"\n\tTitle "$basename"\n);
+	foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+		my $d = $main::desktop[$entry];
+		if ($main::menu[$no]{$entry} < 0) {
+			my $name = $$d{Name};
+			$name =~ s/\"/\\\"/g;
+			$apps .= qq(\tExec "$name"\texec $$d{Exec}\n);
+		} else {
+			my $name = $$d{file};
+			$name =~ s/\s+/_/g;
+			$this_menu .= qq(\tPopup "$$d{Name}"\t$file.$name\n);
+			fvwm($main::menu[$no]{$entry},"$file.$name", $$d{Name});
+		}
+	}
+	print $this_menu . $apps . "EndPopup\n\n" if length $file;
+}
+
+sub do_menu() {
+	fvwm($main::opt{strip},"", "fvwm");
+}
+
+1;
================================================================


More information about the pld-cvs-commit mailing list