vfmg: VFMG/fbpanel_out.pm (NEW) - fbpanel backend

sparky sparky at pld-linux.org
Fri Dec 1 23:38:13 CET 2006


Author: sparky                       Date: Fri Dec  1 22:38:13 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- fbpanel backend

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

---- Diffs:

================================================================
Index: vfmg/VFMG/fbpanel_out.pm
diff -u /dev/null vfmg/VFMG/fbpanel_out.pm:1.1
--- /dev/null	Fri Dec  1 23:38:13 2006
+++ vfmg/VFMG/fbpanel_out.pm	Fri Dec  1 23:38:08 2006
@@ -0,0 +1,36 @@
+package VFMG::Output;
+
+use strict;
+use warnings;
+
+sub fbpanel {
+	my ($no, $level)=@_;
+	my $apps = "";
+	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};
+		if($main::menu[$no]{$entry}<0) {
+			$apps .=
+				"${level}item {\n".
+				"${level}	name = $$d{Name}\n".
+				"${level}	action = $$d{Exec}\n";
+			$apps .= "${level}	image = $icon\n" if length $icon;
+			$apps .= "${level}}\n";
+		} else {
+			print "${level}menu {\n";
+			print "${level}	name = $$d{Name}\n";
+			print "${level}	image = $icon\n" if length $icon;
+			fbpanel($main::menu[$no]{$entry}, $level."\t");
+			print "${level}}\n";
+		}
+	}
+	print $apps;
+}
+
+
+sub do_menu() {
+	fbpanel($main::opt{strip},"");
+}
+
+1;
================================================================


More information about the pld-cvs-commit mailing list