diff --git a/ChangeLog-20000414 b/ChangeLog-20000414 index 4d0365532..89744523e 100644 --- a/ChangeLog-20000414 +++ b/ChangeLog-20000414 @@ -1,3 +1,19 @@ +2000-04-12 Darin Adler + + * 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 * src/file-manager/fm-icon-text-window.c: diff --git a/check-FIXME.pl b/check-FIXME.pl new file mode 100755 index 000000000..bf1e368f5 --- /dev/null +++ b/check-FIXME.pl @@ -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 , +# + +# 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 () + { + 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:.*\s*([A-Z]+)|; + 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"; + } + } diff --git a/docs/architecture.txt b/docs/architecture.txt index 1e144bf4a..76a5bb74f 100644 --- a/docs/architecture.txt +++ b/docs/architecture.txt @@ -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 diff --git a/libnautilus-extensions/nautilus-bookmark.c b/libnautilus-extensions/nautilus-bookmark.c index 3610841e0..b05fffaff 100644 --- a/libnautilus-extensions/nautilus-bookmark.c +++ b/libnautilus-extensions/nautilus-bookmark.c @@ -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.) */ diff --git a/libnautilus-extensions/nautilus-icon-factory.c b/libnautilus-extensions/nautilus-icon-factory.c index 155df07e6..c72b4de99 100644 --- a/libnautilus-extensions/nautilus-icon-factory.c +++ b/libnautilus-extensions/nautilus-icon-factory.c @@ -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. */ diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c index 3610841e0..b05fffaff 100644 --- a/libnautilus-private/nautilus-bookmark.c +++ b/libnautilus-private/nautilus-bookmark.c @@ -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.) */ diff --git a/libnautilus-private/nautilus-icon-factory.c b/libnautilus-private/nautilus-icon-factory.c index 155df07e6..c72b4de99 100644 --- a/libnautilus-private/nautilus-icon-factory.c +++ b/libnautilus-private/nautilus-icon-factory.c @@ -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. */ diff --git a/libnautilus/nautilus-bookmark.c b/libnautilus/nautilus-bookmark.c index 3610841e0..b05fffaff 100644 --- a/libnautilus/nautilus-bookmark.c +++ b/libnautilus/nautilus-bookmark.c @@ -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.) */ diff --git a/libnautilus/nautilus-icon-factory.c b/libnautilus/nautilus-icon-factory.c index 155df07e6..c72b4de99 100644 --- a/libnautilus/nautilus-icon-factory.c +++ b/libnautilus/nautilus-icon-factory.c @@ -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. */ diff --git a/po/.cvsignore b/po/.cvsignore new file mode 100644 index 000000000..cc2f3302e --- /dev/null +++ b/po/.cvsignore @@ -0,0 +1,7 @@ +Makefile +Makefile.in +Makefile.in.in +POTFILES +cat-id-tbl.c +nautilus.pot +stamp-cat-id diff --git a/src/file-manager/fm-icon-text-window.c b/src/file-manager/fm-icon-text-window.c index 43480ad86..72938484f 100644 --- a/src/file-manager/fm-icon-text-window.c +++ b/src/file-manager/fm-icon-text-window.c @@ -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);