This is a new Perl script for searching for FIXME in the code. It reports

* check-FIXME.pl: This is a new Perl script for searching for FIXME
	in the code. It reports any FIXME that does not have a bug number
	next to it, or any with a bug number that's not an open bug.
	* libnautilus/nautilus-bookmark.c: Attached a bug number to a FIXME
	for script-testing purposes.
	* docs/architecture.txt: Removed a FIXME. So sue me!

	* src/file-manager/fm-icon-text-window.c
	(create_attributes_option_menu): Added a call to gettext since the
	attribute_labels are now N_ strings.
	* po/.cvsignore: Ignore the generated files.

	* libnautilus/nautilus-icon-factory.c: Formatting tweak.
This commit is contained in:
Darin Adler 2000-04-12 20:34:37 +00:00
parent 951e7313c6
commit baebdb1ad1
11 changed files with 142 additions and 14 deletions

View file

@ -1,3 +1,19 @@
2000-04-12 Darin Adler <darin@eazel.com>
* check-FIXME.pl: This is a new Perl script for searching for FIXME
in the code. It reports any FIXME that does not have a bug number
next to it, or any with a bug number that's not an open bug.
* libnautilus/nautilus-bookmark.c: Attached a bug number to a FIXME
for script-testing purposes.
* docs/architecture.txt: Removed a FIXME. So sue me!
* src/file-manager/fm-icon-text-window.c
(create_attributes_option_menu): Added a call to gettext since the
attribute_labels are now N_ strings.
* po/.cvsignore: Ignore the generated files.
* libnautilus/nautilus-icon-factory.c: Formatting tweak.
2000-04-12 Ramiro Estrugo <ramiro@eazel.com>
* src/file-manager/fm-icon-text-window.c:

102
check-FIXME.pl Executable file
View file

@ -0,0 +1,102 @@
#!/usr/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# Nautilus
#
# Copyright (C) 2000 Eazel, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this library; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Author: Darin Adler <darin@eazel.com>,
#
# check-FIXME.pl: Search for FIXMEs in the sources and correlate them
# with bugs in the bug database.
use diagnostics;
use strict;
# default to all the files starting from the current directory
my %skip_files;
if (!@ARGV)
{
@ARGV = `find -name '*' -and ! \\( -name '*~' -or -name '#*' -or -name 'ChangeLog' -or -name 'Entries' -or -name 'check-FIXME.pl' \\)`;
$skip_files{"./TODO"} = 1;
$skip_files{"./autogen.sh"} = 1;
$skip_files{"./aclocal.m4"} = 1;
$skip_files{"./config.sub"} = 1;
$skip_files{"./libtool"} = 1;
$skip_files{"./ltconfig"} = 1;
$skip_files{"./ltmain.sh"} = 1;
$skip_files{"./macros/gnome-fileutils.m4"} = 1;
$skip_files{"./macros/gnome-objc-checks.m4"} = 1;
$skip_files{"./macros/gnome-vfs.m4"} = 1;
}
# locate all of the target lines
my $no_bug_lines;
my %bug_lines;
foreach my $file (@ARGV)
{
chomp $file;
next if $skip_files{$file};
next unless -T $file;
open(FILE, $file) || die "can't open $file";
while (<FILE>)
{
next if !/FIXME/;
if (/FIXME bug (\d+)/)
{
$bug_lines{$1} .= "$file:$.:$_";
}
else
{
$no_bug_lines .= "$file:$.:$_";
}
}
close(FILE);
}
# list the ones without bug numbers
if ($no_bug_lines ne '')
{
my @no_bug_list = sort split /\n/, $no_bug_lines;
print "\n", scalar(@no_bug_list), " FIXMEs don't have bug reports:\n\n";
foreach my $line (@no_bug_list)
{
print $line, "\n";
}
}
# list the ones with bugs that are not open
sub numerically { $a <=> $b; }
foreach my $bug (sort numerically keys %bug_lines)
{
# Check and see if the bug is open.
my $page = `wget -q -O - http://bugzilla.eazel.com/show_bug.cgi?id=$bug`;
$page =~ tr/\n/ /;
my $status = "unknown";
$status = $1 if $page =~ m|Status:.*</TD>\s*<TD>([A-Z]+)</TD>|;
next if $status eq "NEW" || $status eq "ASSIGNED" || $status eq "REOPENED";
# This a bug that is not open, so report it.
my @bug_line_list = sort split /\n/, $bug_lines{$bug};
print "\nBug $bug is $status:\n\n";
foreach my $line (@bug_line_list)
{
print $line, "\n";
}
}

View file

@ -116,7 +116,7 @@ location change or load an initial location, it calls
`nautilus_window_change_location'. This routine begins by stopping any
previous in-progress loads. Then it determines the applicable content
views and meta-views. It then enters a state machine which results in
updating each view [FIXME: Sopwith or Darin should expand on this].
updating each view.
When an individual view is being updated, one of two things may
happen. First, if the same view component is still applicable but the

View file

@ -152,7 +152,7 @@ nautilus_bookmark_get_pixmap_and_mask (const NautilusBookmark *bookmark,
file = nautilus_file_get (nautilus_bookmark_get_uri (bookmark));
/* FIXME: This might be a bookmark that points to nothing, or
/* FIXME bug 461: This might be a bookmark that points to nothing, or
* maybe its uri cannot be converted to a NautilusFile for some
* other reason. It should get some sort of generic icon, but for
* now it gets none.
@ -180,7 +180,7 @@ nautilus_bookmark_get_pixbuf(const NautilusBookmark *bookmark,
file = nautilus_file_get (nautilus_bookmark_get_uri (bookmark));
/* FIXME: This might be a bookmark that points to nothing, or
/* FIXME bug 461: This might be a bookmark that points to nothing, or
* maybe its uri cannot be converted to a NautilusFile for some
* other reason. It should get some sort of generic icon, but for
* now it gets none.
@ -266,7 +266,7 @@ nautilus_bookmark_new (const char *uri)
/* For now, the only default rule is to use the file/directory name
* rather than the whole path. */
/* FIXME: This needs to do better (use just file names for file:// urls,
/* FIXME bug 1000: This needs to do better (use just file names for file:// urls,
* use page names for http://, etc.)
*/

View file

@ -744,8 +744,9 @@ nautilus_icon_factory_get_icon_for_file (NautilusFile *file)
if (uri == NULL && nautilus_str_has_prefix (nautilus_file_get_mime_type (file), "image/")) {
if (nautilus_file_get_size (file) < SELF_THUMBNAIL_SIZE_THRESHOLD) {
uri = nautilus_file_get_uri (file);
} else if (strstr(file_uri, "/.thumbnails/") == NULL)
} else if (strstr(file_uri, "/.thumbnails/") == NULL) {
uri = nautilus_icon_factory_get_thumbnail_uri (file);
}
}
/* Get the generic icon set for this file. */

View file

@ -152,7 +152,7 @@ nautilus_bookmark_get_pixmap_and_mask (const NautilusBookmark *bookmark,
file = nautilus_file_get (nautilus_bookmark_get_uri (bookmark));
/* FIXME: This might be a bookmark that points to nothing, or
/* FIXME bug 461: This might be a bookmark that points to nothing, or
* maybe its uri cannot be converted to a NautilusFile for some
* other reason. It should get some sort of generic icon, but for
* now it gets none.
@ -180,7 +180,7 @@ nautilus_bookmark_get_pixbuf(const NautilusBookmark *bookmark,
file = nautilus_file_get (nautilus_bookmark_get_uri (bookmark));
/* FIXME: This might be a bookmark that points to nothing, or
/* FIXME bug 461: This might be a bookmark that points to nothing, or
* maybe its uri cannot be converted to a NautilusFile for some
* other reason. It should get some sort of generic icon, but for
* now it gets none.
@ -266,7 +266,7 @@ nautilus_bookmark_new (const char *uri)
/* For now, the only default rule is to use the file/directory name
* rather than the whole path. */
/* FIXME: This needs to do better (use just file names for file:// urls,
/* FIXME bug 1000: This needs to do better (use just file names for file:// urls,
* use page names for http://, etc.)
*/

View file

@ -744,8 +744,9 @@ nautilus_icon_factory_get_icon_for_file (NautilusFile *file)
if (uri == NULL && nautilus_str_has_prefix (nautilus_file_get_mime_type (file), "image/")) {
if (nautilus_file_get_size (file) < SELF_THUMBNAIL_SIZE_THRESHOLD) {
uri = nautilus_file_get_uri (file);
} else if (strstr(file_uri, "/.thumbnails/") == NULL)
} else if (strstr(file_uri, "/.thumbnails/") == NULL) {
uri = nautilus_icon_factory_get_thumbnail_uri (file);
}
}
/* Get the generic icon set for this file. */

View file

@ -152,7 +152,7 @@ nautilus_bookmark_get_pixmap_and_mask (const NautilusBookmark *bookmark,
file = nautilus_file_get (nautilus_bookmark_get_uri (bookmark));
/* FIXME: This might be a bookmark that points to nothing, or
/* FIXME bug 461: This might be a bookmark that points to nothing, or
* maybe its uri cannot be converted to a NautilusFile for some
* other reason. It should get some sort of generic icon, but for
* now it gets none.
@ -180,7 +180,7 @@ nautilus_bookmark_get_pixbuf(const NautilusBookmark *bookmark,
file = nautilus_file_get (nautilus_bookmark_get_uri (bookmark));
/* FIXME: This might be a bookmark that points to nothing, or
/* FIXME bug 461: This might be a bookmark that points to nothing, or
* maybe its uri cannot be converted to a NautilusFile for some
* other reason. It should get some sort of generic icon, but for
* now it gets none.
@ -266,7 +266,7 @@ nautilus_bookmark_new (const char *uri)
/* For now, the only default rule is to use the file/directory name
* rather than the whole path. */
/* FIXME: This needs to do better (use just file names for file:// urls,
/* FIXME bug 1000: This needs to do better (use just file names for file:// urls,
* use page names for http://, etc.)
*/

View file

@ -744,8 +744,9 @@ nautilus_icon_factory_get_icon_for_file (NautilusFile *file)
if (uri == NULL && nautilus_str_has_prefix (nautilus_file_get_mime_type (file), "image/")) {
if (nautilus_file_get_size (file) < SELF_THUMBNAIL_SIZE_THRESHOLD) {
uri = nautilus_file_get_uri (file);
} else if (strstr(file_uri, "/.thumbnails/") == NULL)
} else if (strstr(file_uri, "/.thumbnails/") == NULL) {
uri = nautilus_icon_factory_get_thumbnail_uri (file);
}
}
/* Get the generic icon set for this file. */

7
po/.cvsignore Normal file
View file

@ -0,0 +1,7 @@
Makefile
Makefile.in
Makefile.in.in
POTFILES
cat-id-tbl.c
nautilus.pot
stamp-cat-id

View file

@ -209,7 +209,7 @@ create_attributes_option_menu (int menu_number)
menu_item = gtk_menu_item_new ();
/* Do some extra label-creating work so they're centered */
accel_label = gtk_accel_label_new (attribute_labels[index]);
accel_label = gtk_accel_label_new (gettext (attribute_labels[index]));
gtk_misc_set_alignment (GTK_MISC (accel_label), 0.5, 0.5);
gtk_container_add (GTK_CONTAINER (menu_item), accel_label);
gtk_accel_label_set_accel_widget (GTK_ACCEL_LABEL (accel_label), menu_item);