[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r32 - in trunk: checks debian



Author: jeroen
Date: 2004-02-12 21:22:55 +0100 (Thu, 12 Feb 2004)
New Revision: 32

Modified:
   trunk/checks/menu-format
   trunk/checks/menu-format.desc
   trunk/debian/changelog
Log:
checks/menu-format
+ Understand icon32x32 and icon16x16 (Closes: #200046)
  (based on patch by Bill Allombert <ballombe@debian.org>)


Modified: trunk/checks/menu-format
===================================================================
--- trunk/checks/menu-format	2004-02-12 19:43:26 UTC (rev 31)
+++ trunk/checks/menu-format	2004-02-12 20:22:55 UTC (rev 32)
@@ -25,7 +25,20 @@
 my @req_tags=qw(needs section title command);
 
 # This is a list of all known tags.
-my @known_tags=qw(needs section title sort command longtitle icon description hotkey hints);
+my @known_tags=qw(
+	needs
+	section
+	title
+	sort
+	command
+	longtitle
+	icon
+	icon16x16
+	icon32x32
+	description
+	hotkey
+	hints
+    );
 
 # This is a list of all known uses of the needs= tag.
 # (It's case insensitive, use lower case here.).
@@ -310,11 +323,17 @@
 	    }
 	}
     }
-	
+
     if (exists($vals{'icon'})) {
-	VerifyIcon($menufile, $linecount, $vals{'icon'});
+	VerifyIcon($menufile, $linecount, $vals{'icon'}, 32);
     }
-	
+    if (exists($vals{'icon32x32'})) {
+	VerifyIcon($menufile, $linecount, $vals{'icon32x32'}, 32);
+    }
+    if (exists($vals{'icon16x16'})) {
+	VerifyIcon($menufile, $linecount, $vals{'icon16x16'}, 16);
+    }
+
     # Check the needs tag.
     if ((not $needs_tag_vals_hash{lc($vals{'needs'})}) and
 	$vals{'needs'} ne $pkg) {
@@ -374,7 +393,7 @@
 
 
 sub VerifyIcon {
-    my ($menufile, $linecount, $icon) = @_;
+    my ($menufile, $linecount, $icon, $size) = @_;
     local *IN;
 
     if ($icon eq 'none') {
@@ -417,8 +436,8 @@
     my $numcolours = $3 + 0;
     my $cpp = $4 + 0;
     
-    if ($width > 32 || $height > 32) {
-	print "E: $pkg $type: menu-icon-too-big $icon: ${width}x${height}\n";
+    if ($width > $size || $height > $size) {
+	print "E: $pkg $type: menu-icon-too-big $icon: ${width}x${height} > ${size}x${size}\n";
     }
 
     close IN or die;

Modified: trunk/checks/menu-format.desc
===================================================================
--- trunk/checks/menu-format.desc	2004-02-12 19:43:26 UTC (rev 31)
+++ trunk/checks/menu-format.desc	2004-02-12 20:22:55 UTC (rev 32)
@@ -114,7 +114,8 @@
 
 Tag: menu-icon-too-big
 Type: error
-Info: Icons in the Debian menu system should be at most 32x32 pixels.
+Info: Icons in the Debian menu system should be at most 32x32 pixels
+ (icon16x16 icons should of course be at most 16x16 pixels)
 Ref: menu 3.4
 
 Tag: menu-icon-cannot-parse

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-02-12 19:43:26 UTC (rev 31)
+++ trunk/debian/changelog	2004-02-12 20:22:55 UTC (rev 32)
@@ -35,6 +35,8 @@
      + Menu sub-policy 3.6.0 added two sections (Closes: #207529)
      + Added three checks for correct su-to-root usage (Closes: #188095)
        (based on patch by Bill Allombert <ballombe@debian.org>)
+     + Understand icon32x32 and icon16x16 (Closes: #200046)
+       (based on patch by Bill Allombert <ballombe@debian.org>)
    * checks/scripts
      + Recognise the 'tcl' interpreter, not the same as tclsh (Closes: #230182)
 
@@ -54,7 +56,7 @@
      + fix testing of dependencies to eliminate false
        positives of missing-debconf-dependency (Closes: #195201)
 
- -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Thu, 12 Feb 2004 19:52:00 +0100
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Thu, 12 Feb 2004 21:20:41 +0100
 
 lintian (1.22.9) unstable; urgency=low
 



Reply to: