vfmg: vfmg - fixed window class guessing

sparky sparky at pld-linux.org
Thu Apr 20 20:03:06 CEST 2006


Author: sparky                       Date: Thu Apr 20 18:03:06 2006 GMT
Module: vfmg                          Tag: HEAD
---- Log message:
- fixed window class guessing

---- Files affected:
vfmg:
   vfmg (1.90 -> 1.91) 

---- Diffs:

================================================================
Index: vfmg/vfmg
diff -u vfmg/vfmg:1.90 vfmg/vfmg:1.91
--- vfmg/vfmg:1.90	Wed Apr 19 02:02:33 2006
+++ vfmg/vfmg	Thu Apr 20 20:03:01 2006
@@ -1009,30 +1009,28 @@
 			push @eapp, "-set-comment",$$d{Comment}
 				if $$d{Comment};
 			push @eapp, "-set-exe",$$d{Exec};
-			if ( defined $$dr{wcnt} ) {
-				if ( exists $$dr{wcnt}{$$d{file}} ) {
-					my $wcnt = $$dr{wcnt}{$$d{file}};
-					push @eapp, "-set-win-class", $$wcnt[0]
-						if defined $$wcnt[0];
-					push @eapp, "-set-win-name", $$wcnt[1] if defined $$wcnt[1];
-					push @eapp, "-set-win-title", $$wcnt[2]
-						if defined $$wcnt[2];
-					push @eapp, "-set-win-role", $$wcnt[3] if defined $$wcnt[3];
-				} else {
-					if ( $$d{term} == 1 ) {
-						if ( defined $opt{termapp_class} ) {
-							(my $tapp = $opt{termapp_class}) =~ s/%1/$$d{bin}/;
-							push @eapp, "-set-win-class", $tapp;
-						}
-						if ( defined $opt{termapp_name} ) {
-							(my $tapp = $opt{termapp_name}) =~ s/%1/$$d{bin}/;
-							push @eapp, "-set-win-name", $tapp;
-						}
-					} else {
-						my $exe = (split /\s/, $$d{Exec})[0];
-						$exe = ucfirst lc $exe;
-						push @eapp, "-set-win-class", $exe;
+			if ( defined $$dr{wcnt} and exists $$dr{wcnt}{$$d{file}} ) {
+				my $wcnt = $$dr{wcnt}{$$d{file}};
+				push @eapp, "-set-win-class", $$wcnt[0]
+					if defined $$wcnt[0];
+				push @eapp, "-set-win-name", $$wcnt[1] if defined $$wcnt[1];
+				push @eapp, "-set-win-title", $$wcnt[2]
+					if defined $$wcnt[2];
+				push @eapp, "-set-win-role", $$wcnt[3] if defined $$wcnt[3];
+			} else {
+				if ( $$d{term} == 1 ) {
+					if ( defined $opt{termapp_class} ) {
+						(my $tapp = $opt{termapp_class}) =~ s/%1/$$d{bin}/;
+						push @eapp, "-set-win-class", $tapp;
+					}
+					if ( defined $opt{termapp_name} ) {
+						(my $tapp = $opt{termapp_name}) =~ s/%1/$$d{bin}/;
+						push @eapp, "-set-win-name", $tapp;
 					}
+				} else {
+					(my $exe = (split /\s/, $$d{Exec})[0]) =~ s#.*/##;
+					$exe = ucfirst lc $exe;
+					push @eapp, "-set-win-class", $exe;
 				}
 			}
 			system(@eapp);
@@ -1578,7 +1576,7 @@
 	foreach my $icon ( keys %{$DR{existing}} ) {
 		print F_OUT "[$icon]\n";
 		foreach my $entry ( keys %{$DR{existing}->{$icon}} ) {
-			print F_OUT "$entry:	$DR{existing}->{$icon}->{$entry}\n"
+			print F_OUT "$entry:    $DR{existing}->{$icon}->{$entry}\n"
 				if defined $DR{existing}->{$icon}->{$entry};
 		}
 	}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/vfmg/vfmg?r1=1.90&r2=1.91&f=u



More information about the pld-cvs-commit mailing list