vfmg: VFMG/openbox_out.pm (NEW) - openbox backend
sparky
sparky at pld-linux.org
Sat Dec 2 00:12:37 CET 2006
Author: sparky Date: Fri Dec 1 23:12:37 2006 GMT
Module: vfmg Tag: HEAD
---- Log message:
- openbox backend
---- Files affected:
vfmg/VFMG:
openbox_out.pm (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: vfmg/VFMG/openbox_out.pm
diff -u /dev/null vfmg/VFMG/openbox_out.pm:1.1
--- /dev/null Sat Dec 2 00:12:37 2006
+++ vfmg/VFMG/openbox_out.pm Sat Dec 2 00:12:32 2006
@@ -0,0 +1,39 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub openbox {
+ my ($no, $level) = @_;
+ my $apps = "";
+ foreach my $entry (sort main::cmpdname keys %{$main::menu[$no]}) {
+ my $d = $main::desktop[$entry];
+ if ($main::menu[$no]{$entry}<0) {
+ $apps .=
+ qq($level<item label="$$d{Name}">\n).
+ qq($level <action name="Execute">\n).
+ qq($level <execute>$$d{Exec}</execute>\n).
+ qq($level </action>\n).
+ qq($level</item>\n);
+ } else {
+ print qq($level<menu id="$$d{Name}" label="$$d{Name}">\n);
+ openbox( $main::menu[$no]{$entry}, $level."\t");
+ print "$level</menu>\n";
+ }
+ }
+ print $apps;
+}
+
+sub do_menu() {
+ if ($main::opt{nomenu}) {
+ openbox($main::opt{strip}, "");
+ } else {
+ print "<openbox_menu>\n";
+ print qq(<menu id="root-menu" label="PLD Linux">\n);
+ openbox($main::opt{strip}, "");
+ print "</menu>\n";
+ print "</openbox_menu>\n";
+ }
+}
+
+1;
================================================================
More information about the pld-cvs-commit
mailing list