Commit 700232e5 authored by Darin Adler's avatar Darin Adler

Removed some special-case file names that aren't needed any more.

	* check-FIXME.pl: Removed some special-case file names
	that aren't needed any more.

	* libnautilus-extensions/nautilus-file-operations.c:
	(get_link_name): Added comments to help localizers.
	* libnautilus-extensions/nautilus-file.c:
	(nautilus_file_get_date_as_string): Added comments to help
	localizers. Deals with bug 2720 (Please add a comment to help
	localizers do date translations)
	* libnautilus-extensions/nautilus-icon-canvas-item.c:
	(draw_or_measure_label_text): Added a comment to help localizers.
	* src/file-manager/fm-directory-view.c:
	(fm_directory_view_display_selection_info): Unmarked one string
	that doesn't make sense to translate and adding a comment to
	another to explain why it is marked for translation.
	(add_separator): Changed add_open_with_gtk_menu_item into this
	function, which deals with bug 2735 (add_open_with_gtk_menu_item
	only called to create separator?).
	(create_open_with_gtk_menu): Call the new add_separator function.
	* src/nautilus-zoom-control.c: (create_zoom_menu_item): Added a
	comment to help localizers.

	* libnautilus-extensions/nautilus-link.c: (make_local_path): Fixed
	logic here that was doing strange things with URIs.  This deals
	with bugs 2492 (Incorrect unescaping when dealing with link
	files), 2493 (Mysterious and probably incorrect "+7" when escaping
	URI for link file), and 2737 (link code must make path into URI).

	* libnautilus-extensions/nautilus-search-bar-criterion.c:
	* libnautilus-extensions/nautilus-search-bar-criterion.h:
	* po/POTFILES.in:
	Removed these duplicate files. Rebecca moved them to src, but she
	didn't remove the old ones. I didn't have to remove them from the
	makefile, since they were already removed, but I had to remove
	them from the list of files to translate.

	* src/nautilus-search-bar-criterion.h:
	* libnautilus-extensions/nautilus-search-uri.h:
	Moved some of the stuff from nautilus-search-bar-criterion.h to
	here, since it's really about search URIs, not specific to the
	search bar. Over time we will move more.

	* src/nautilus-search-bar-criterion.c: Added include of the
	nautilus-search-uri.h header now that stuff was moved there.

	* src/file-manager/fm-search-list-view.c:
	Fixed includes to get the nautilus-search-bar-criterion.h from its
	new location. This is not a real solution to the problem that was
	exposed by moving the search bar code. The bug 2815 covers this.
	* src/nautilus-complex-search-bar.c: Fix search bar so it gets
	the real location of the header. It was including the old one.
	* src/nautilus-simple-search-bar.c: Fix search bar so it gets
	the real location of the header. It was including the old one.

	* src/nautilus-main.c: (main): Some small cleanups including some
	additional parameter checking and returning a failure code to
	the invoking shell in the case where the parameters are not
	consistent.
parent b01779bf
2000-09-05 Darin Adler <darin@eazel.com>
* check-FIXME.pl: Removed some special-case file names
that aren't needed any more.
* libnautilus-extensions/nautilus-file-operations.c:
(get_link_name): Added comments to help localizers.
* libnautilus-extensions/nautilus-file.c:
(nautilus_file_get_date_as_string): Added comments to help
localizers. Deals with bug 2720 (Please add a comment to help
localizers do date translations)
* libnautilus-extensions/nautilus-icon-canvas-item.c:
(draw_or_measure_label_text): Added a comment to help localizers.
* src/file-manager/fm-directory-view.c:
(fm_directory_view_display_selection_info): Unmarked one string
that doesn't make sense to translate and adding a comment to
another to explain why it is marked for translation.
(add_separator): Changed add_open_with_gtk_menu_item into this
function, which deals with bug 2735 (add_open_with_gtk_menu_item
only called to create separator?).
(create_open_with_gtk_menu): Call the new add_separator function.
* src/nautilus-zoom-control.c: (create_zoom_menu_item): Added a
comment to help localizers.
* libnautilus-extensions/nautilus-link.c: (make_local_path): Fixed
logic here that was doing strange things with URIs. This deals
with bugs 2492 (Incorrect unescaping when dealing with link
files), 2493 (Mysterious and probably incorrect "+7" when escaping
URI for link file), and 2737 (link code must make path into URI).
* libnautilus-extensions/nautilus-search-bar-criterion.c:
* libnautilus-extensions/nautilus-search-bar-criterion.h:
* po/POTFILES.in:
Removed these duplicate files. Rebecca moved them to src, but she
didn't remove the old ones. I didn't have to remove them from the
makefile, since they were already removed, but I had to remove
them from the list of files to translate.
* src/nautilus-search-bar-criterion.h:
* libnautilus-extensions/nautilus-search-uri.h:
Moved some of the stuff from nautilus-search-bar-criterion.h to
here, since it's really about search URIs, not specific to the
search bar. Over time we will move more.
* src/nautilus-search-bar-criterion.c: Added include of the
nautilus-search-uri.h header now that stuff was moved there.
* src/file-manager/fm-search-list-view.c:
Fixed includes to get the nautilus-search-bar-criterion.h from its
new location. This is not a real solution to the problem that was
exposed by moving the search bar code. The bug 2815 covers this.
* src/nautilus-complex-search-bar.c: Fix search bar so it gets
the real location of the header. It was including the old one.
* src/nautilus-simple-search-bar.c: Fix search bar so it gets
the real location of the header. It was including the old one.
* src/nautilus-main.c: (main): Some small cleanups including some
additional parameter checking and returning a failure code to
the invoking shell in the case where the parameters are not
consistent.
2000-09-05 Pavel Cisler <pavel@eazel.com>
* configure.in:
......
......@@ -44,12 +44,6 @@ if (!@ARGV)
"./libtool" => 1,
"./ltconfig" => 1,
"./ltmain.sh" => 1,
"./macros/gnome-fileutils.m4" => 1,
"./macros/gnome-objc-checks.m4" => 1,
"./macros/gnome-vfs.m4" => 1,
"./src/file-manager/desktop-canvas.c" => 1,
"./src/file-manager/desktop-layout.c" => 1,
"./src/file-manager/desktop-window.c" => 1,
);
}
......
......@@ -456,15 +456,30 @@ get_link_name (const char *name, int count)
*/
switch (count % 10) {
case 1:
/* Localizers: Feel free to leave out the "st" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%dst link to %s"), count, name);
case 2:
/* Localizers: Feel free to leave out the "nd" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%dnd link to %s"), count, name);
case 3:
/* Localizers: Feel free to leave out the "rd" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%drd link to %s"), count, name);
default:
/* Localizers: Feel free to leave out the "th" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%dth link to %s"), count, name);
}
/* The general case. */
return g_strdup_printf (_("%dth link to %s"), count, name);
}
static char *
......
......@@ -1731,15 +1731,27 @@ nautilus_file_get_date_as_string (NautilusFile *file, NautilusDateType date_type
*/
if (file_date_age == 0) {
/* today, use special word */
/* Today, use special word.
* Note to localizers: You can look at man strftime
* for details on the format, but do no use format
* strings that are specific to the GNU version of
* the library, or you will make Nautilus less portable.
*/
format = _("today %-I:%M %p");
} else if (file_date_age == 1) {
/* yesterday, use special word */
/* Yesterday, use special word.
* Note to localizers: Same issues as "today" string.
*/
format = _("yesterday %-I:%M %p");
} else if (file_date_age < 7) {
/* current week, include day of week */
/* Current week, include day of week.
* Note to localizers: Same issues as "today" string.
*/
format = _("%A %-m/%-d/%y %-I:%M %p");
} else {
/* Other dates.
* Note to localizers: Same issues as "today" string.
*/
format = _("%-m/%-d/%y %-I:%M %p");
}
......
......@@ -703,8 +703,10 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
text_piece = " ";
}
/* The list of characters that cause line breaks can be localized. */
icon_text_info = gnome_icon_layout_text
(details->font, text_piece, _(" -_,;.?/&"), max_text_width, TRUE);
(details->font, text_piece, _(" -_,;.?/&"),
max_text_width, TRUE);
/* Draw text if we are not in user rename mode */
if (drawable != NULL && !details->is_renaming) {
......
......@@ -267,19 +267,9 @@ nautilus_link_get_additional_text (const char *link_file_uri)
static char *
make_local_path (const char *image_uri)
{
char *escaped_uri, *unescaped_uri, *local_directory_path, *local_file_path;
char *escaped_uri, *local_directory_path, *local_directory_uri, *local_file_path;
/* We can't call nautilus_get_local_path_from_uri here, since
* it will return NULL since it's not a local uri, but we
* still should unescape.
*/
unescaped_uri = gnome_vfs_unescape_string (image_uri, "/");
/* FIXME bugzilla.eazel.com 2492: Why should we unescape? The above can return NULL for
* URIs with slashes in it and other cases like that.
*/
/* FIXME bugzilla.eazel.com 2493: Why the +7 below? This seems totally wrong. */
escaped_uri = gnome_vfs_escape_slashes (unescaped_uri + 7);
g_free (unescaped_uri);
escaped_uri = gnome_vfs_escape_slashes (image_uri);
local_directory_path = g_strconcat
(g_get_home_dir (),
......@@ -287,9 +277,10 @@ make_local_path (const char *image_uri)
NULL);
/* We must create the directory if it doesn't exist. */
local_directory_uri = gnome_vfs_get_uri_from_local_path (local_directory_path);
/* FIXME bugzilla.eazel.com 2494: Is it OK to ignore the error here? */
/* FIXME bugzilla.eazel.com 2737: This needs to make the path into a URI if it's going to use gnome_vfs. */
gnome_vfs_make_directory (local_directory_path, REMOTE_ICON_DIR_PERMISSIONS);
gnome_vfs_make_directory (local_directory_uri, REMOTE_ICON_DIR_PERMISSIONS);
g_free (local_directory_uri);
local_file_path = nautilus_make_path (local_directory_path, escaped_uri);
g_free (escaped_uri);
......
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-search-bar-criterion.h - Types that will
bring up the various search criteria
Copyright (C) 2000 Eazel, Inc.
This program 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 program 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 program; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Rebecca Schulman <rebecka@eazel.com>
*/
#ifndef NAUTILUS_SEARCH_BAR_CRITERION_H
#define NAUTILUS_SEARCH_BAR_CRITERION_H
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtkentry.h>
typedef enum {
NAUTILUS_FILE_NAME_SEARCH_CRITERION,
NAUTILUS_CONTENT_SEARCH_CRITERION,
NAUTILUS_FILE_TYPE_SEARCH_CRITERION,
NAUTILUS_SIZE_SEARCH_CRITERION,
NAUTILUS_EMBLEM_SEARCH_CRITERION,
NAUTILUS_DATE_MODIFIED_SEARCH_CRITERION,
NAUTILUS_OWNER_SEARCH_CRITERION,
NAUTILUS_LAST_CRITERION
} NautilusSearchBarCriterionType;
/* These strings are used programatically; they must not be translated */
#define NAUTILUS_SEARCH_URI_TEXT_NAME "file_name"
#define NAUTILUS_SEARCH_URI_TEXT_CONTENT "content"
#define NAUTILUS_SEARCH_URI_TEXT_TYPE "file_type"
#define NAUTILUS_SEARCH_URI_TEXT_SIZE "size"
#define NAUTILUS_SEARCH_URI_TEXT_EMBLEMS "keywords"
#define NAUTILUS_SEARCH_URI_TEXT_DATE_MODIFIED "modified"
#define NAUTILUS_SEARCH_URI_TEXT_OWNER "owner"
typedef struct NautilusSearchBarCriterionDetails NautilusSearchBarCriterionDetails;
typedef struct NautilusSearchBarCriterion {
NautilusSearchBarCriterionDetails *details;
NautilusSearchBarCriterionType type;
} NautilusSearchBarCriterion;
typedef void (* NautilusSearchBarCriterionCallback) (NautilusSearchBarCriterion *old_criterion,
NautilusSearchBarCriterion *new_criterion,
gpointer data);
#define NAUTILUS_SEARCH_BAR_CRITERION(arg) (NautilusSearchBarCriterion *) arg
NautilusSearchBarCriterion * nautilus_search_bar_criterion_first_new (void);
NautilusSearchBarCriterion * nautilus_search_bar_criterion_next_new (NautilusSearchBarCriterionType criterion_type);
/* set callback called when the user chooses a new criterion type.
Used by complex-search-bar */
void nautilus_search_bar_criterion_set_callback (NautilusSearchBarCriterion *criterion,
NautilusSearchBarCriterionCallback callback,
gpointer data);
/* called by the seach-bar-complex when the user asks for a search to be performed.
We need toi build the serach uri from the different criterions.
Each criterion returns the part of the search uri it represents
*/
char * nautilus_search_bar_criterion_get_location (NautilusSearchBarCriterion *criterion);
void nautilus_search_bar_criterion_show (NautilusSearchBarCriterion *criterion);
void nautilus_search_bar_criterion_hide (NautilusSearchBarCriterion *criterion);
void nautilus_search_bar_criterion_destroy (NautilusSearchBarCriterion *criterion);
/* Search URI utilities. Maybe these should go in a separate file? */
char * nautilus_search_bar_criterion_human_from_uri (const char *location_uri);
char * nautilus_search_uri_get_first_criterion (const char *search_uri);
#endif NAUTILUS_SEARCH_BAR_CRITERION_H
......@@ -26,6 +26,15 @@
#include <glib.h>
/* These strings are used programatically; they must not be translated */
#define NAUTILUS_SEARCH_URI_TEXT_NAME "file_name"
#define NAUTILUS_SEARCH_URI_TEXT_CONTENT "content"
#define NAUTILUS_SEARCH_URI_TEXT_TYPE "file_type"
#define NAUTILUS_SEARCH_URI_TEXT_SIZE "size"
#define NAUTILUS_SEARCH_URI_TEXT_EMBLEMS "keywords"
#define NAUTILUS_SEARCH_URI_TEXT_DATE_MODIFIED "modified"
#define NAUTILUS_SEARCH_URI_TEXT_OWNER "owner"
gboolean nautilus_is_search_uri (const char *uri);
char * nautilus_search_uri_to_human (const char *search_uri);
......
......@@ -456,15 +456,30 @@ get_link_name (const char *name, int count)
*/
switch (count % 10) {
case 1:
/* Localizers: Feel free to leave out the "st" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%dst link to %s"), count, name);
case 2:
/* Localizers: Feel free to leave out the "nd" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%dnd link to %s"), count, name);
case 3:
/* Localizers: Feel free to leave out the "rd" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%drd link to %s"), count, name);
default:
/* Localizers: Feel free to leave out the "th" suffix
* if there's no way to do that nicely for a
* particular language.
*/
return g_strdup_printf (_("%dth link to %s"), count, name);
}
/* The general case. */
return g_strdup_printf (_("%dth link to %s"), count, name);
}
static char *
......
......@@ -1731,15 +1731,27 @@ nautilus_file_get_date_as_string (NautilusFile *file, NautilusDateType date_type
*/
if (file_date_age == 0) {
/* today, use special word */
/* Today, use special word.
* Note to localizers: You can look at man strftime
* for details on the format, but do no use format
* strings that are specific to the GNU version of
* the library, or you will make Nautilus less portable.
*/
format = _("today %-I:%M %p");
} else if (file_date_age == 1) {
/* yesterday, use special word */
/* Yesterday, use special word.
* Note to localizers: Same issues as "today" string.
*/
format = _("yesterday %-I:%M %p");
} else if (file_date_age < 7) {
/* current week, include day of week */
/* Current week, include day of week.
* Note to localizers: Same issues as "today" string.
*/
format = _("%A %-m/%-d/%y %-I:%M %p");
} else {
/* Other dates.
* Note to localizers: Same issues as "today" string.
*/
format = _("%-m/%-d/%y %-I:%M %p");
}
......
......@@ -703,8 +703,10 @@ draw_or_measure_label_text (NautilusIconCanvasItem *item,
text_piece = " ";
}
/* The list of characters that cause line breaks can be localized. */
icon_text_info = gnome_icon_layout_text
(details->font, text_piece, _(" -_,;.?/&"), max_text_width, TRUE);
(details->font, text_piece, _(" -_,;.?/&"),
max_text_width, TRUE);
/* Draw text if we are not in user rename mode */
if (drawable != NULL && !details->is_renaming) {
......
......@@ -267,19 +267,9 @@ nautilus_link_get_additional_text (const char *link_file_uri)
static char *
make_local_path (const char *image_uri)
{
char *escaped_uri, *unescaped_uri, *local_directory_path, *local_file_path;
char *escaped_uri, *local_directory_path, *local_directory_uri, *local_file_path;
/* We can't call nautilus_get_local_path_from_uri here, since
* it will return NULL since it's not a local uri, but we
* still should unescape.
*/
unescaped_uri = gnome_vfs_unescape_string (image_uri, "/");
/* FIXME bugzilla.eazel.com 2492: Why should we unescape? The above can return NULL for
* URIs with slashes in it and other cases like that.
*/
/* FIXME bugzilla.eazel.com 2493: Why the +7 below? This seems totally wrong. */
escaped_uri = gnome_vfs_escape_slashes (unescaped_uri + 7);
g_free (unescaped_uri);
escaped_uri = gnome_vfs_escape_slashes (image_uri);
local_directory_path = g_strconcat
(g_get_home_dir (),
......@@ -287,9 +277,10 @@ make_local_path (const char *image_uri)
NULL);
/* We must create the directory if it doesn't exist. */
local_directory_uri = gnome_vfs_get_uri_from_local_path (local_directory_path);
/* FIXME bugzilla.eazel.com 2494: Is it OK to ignore the error here? */
/* FIXME bugzilla.eazel.com 2737: This needs to make the path into a URI if it's going to use gnome_vfs. */
gnome_vfs_make_directory (local_directory_path, REMOTE_ICON_DIR_PERMISSIONS);
gnome_vfs_make_directory (local_directory_uri, REMOTE_ICON_DIR_PERMISSIONS);
g_free (local_directory_uri);
local_file_path = nautilus_make_path (local_directory_path, escaped_uri);
g_free (escaped_uri);
......
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* nautilus-search-bar-criterion.h - Types that will
bring up the various search criteria
Copyright (C) 2000 Eazel, Inc.
This program 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 program 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 program; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Rebecca Schulman <rebecka@eazel.com>
*/
#ifndef NAUTILUS_SEARCH_BAR_CRITERION_H
#define NAUTILUS_SEARCH_BAR_CRITERION_H
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtkentry.h>
typedef enum {
NAUTILUS_FILE_NAME_SEARCH_CRITERION,
NAUTILUS_CONTENT_SEARCH_CRITERION,
NAUTILUS_FILE_TYPE_SEARCH_CRITERION,
NAUTILUS_SIZE_SEARCH_CRITERION,
NAUTILUS_EMBLEM_SEARCH_CRITERION,
NAUTILUS_DATE_MODIFIED_SEARCH_CRITERION,
NAUTILUS_OWNER_SEARCH_CRITERION,
NAUTILUS_LAST_CRITERION
} NautilusSearchBarCriterionType;
/* These strings are used programatically; they must not be translated */
#define NAUTILUS_SEARCH_URI_TEXT_NAME "file_name"
#define NAUTILUS_SEARCH_URI_TEXT_CONTENT "content"
#define NAUTILUS_SEARCH_URI_TEXT_TYPE "file_type"
#define NAUTILUS_SEARCH_URI_TEXT_SIZE "size"
#define NAUTILUS_SEARCH_URI_TEXT_EMBLEMS "keywords"
#define NAUTILUS_SEARCH_URI_TEXT_DATE_MODIFIED "modified"
#define NAUTILUS_SEARCH_URI_TEXT_OWNER "owner"
typedef struct NautilusSearchBarCriterionDetails NautilusSearchBarCriterionDetails;
typedef struct NautilusSearchBarCriterion {
NautilusSearchBarCriterionDetails *details;
NautilusSearchBarCriterionType type;
} NautilusSearchBarCriterion;
typedef void (* NautilusSearchBarCriterionCallback) (NautilusSearchBarCriterion *old_criterion,
NautilusSearchBarCriterion *new_criterion,
gpointer data);
#define NAUTILUS_SEARCH_BAR_CRITERION(arg) (NautilusSearchBarCriterion *) arg
NautilusSearchBarCriterion * nautilus_search_bar_criterion_first_new (void);
NautilusSearchBarCriterion * nautilus_search_bar_criterion_next_new (NautilusSearchBarCriterionType criterion_type);
/* set callback called when the user chooses a new criterion type.
Used by complex-search-bar */
void nautilus_search_bar_criterion_set_callback (NautilusSearchBarCriterion *criterion,
NautilusSearchBarCriterionCallback callback,
gpointer data);
/* called by the seach-bar-complex when the user asks for a search to be performed.
We need toi build the serach uri from the different criterions.
Each criterion returns the part of the search uri it represents
*/
char * nautilus_search_bar_criterion_get_location (NautilusSearchBarCriterion *criterion);
void nautilus_search_bar_criterion_show (NautilusSearchBarCriterion *criterion);
void nautilus_search_bar_criterion_hide (NautilusSearchBarCriterion *criterion);
void nautilus_search_bar_criterion_destroy (NautilusSearchBarCriterion *criterion);
/* Search URI utilities. Maybe these should go in a separate file? */
char * nautilus_search_bar_criterion_human_from_uri (const char *location_uri);
char * nautilus_search_uri_get_first_criterion (const char *search_uri);
#endif NAUTILUS_SEARCH_BAR_CRITERION_H
......@@ -26,6 +26,15 @@
#include <glib.h>
/* These strings are used programatically; they must not be translated */
#define NAUTILUS_SEARCH_URI_TEXT_NAME "file_name"
#define NAUTILUS_SEARCH_URI_TEXT_CONTENT "content"
#define NAUTILUS_SEARCH_URI_TEXT_TYPE "file_type"
#define NAUTILUS_SEARCH_URI_TEXT_SIZE "size"
#define NAUTILUS_SEARCH_URI_TEXT_EMBLEMS "keywords"
#define NAUTILUS_SEARCH_URI_TEXT_DATE_MODIFIED "modified"
#define NAUTILUS_SEARCH_URI_TEXT_OWNER "owner"
gboolean nautilus_is_search_uri (const char *uri);
char * nautilus_search_uri_to_human (const char *search_uri);
......
......@@ -9,7 +9,7 @@ components/services/vault/command-line/main.c
components/shell/shell.c
components/websearch/ntl-web-search.c
libnautilus-extensions/nautilus-program-choosing.c
libnautilus-extensions/nautilus-search-bar-criterion.c
src/nautilus-search-bar-criterion.c
libnautilus-extensions/nautilus-stock-dialogs.c
nautilus-installer/src/installer.c
nautilus-installer/src/support.c
......
......@@ -1120,10 +1120,17 @@ fm_directory_view_display_selection_info (FMDirectoryView *view)
} else if (folder_count == 0) {
status_string = g_strdup (non_folder_str);
} else if (non_folder_count == 0) {
status_string = g_strdup_printf (_("%s%s"),
/* No use marking this for translation, since you
* can't reorder the strings, which is the main thing
* you'd want to do.
*/
status_string = g_strdup_printf ("%s%s",
folder_count_str,
folder_item_count_str);
} else {
/* This is marked for translation in case a localizer
* needs to change ", " to something else.
*/
status_string = g_strdup_printf (_("%s%s, %s"),
folder_count_str,
folder_item_count_str,
......@@ -2577,18 +2584,11 @@ other_viewer_callback (GtkMenuItem *menu_item, GList *files)
}
static void
add_open_with_gtk_menu_item (GtkMenu *menu, const char *label)
add_separator (GtkMenu *menu)
{
GtkWidget *menu_item;
/* FIXME bugzilla.eazel.com 2735: This is only called to add a separator? */
if (label != NULL) {
menu_item = gtk_menu_item_new_with_label (label);
} else {
/* No label means this is a separator. */
menu_item = gtk_menu_item_new ();
}
menu_item = gtk_menu_item_new ();
finish_adding_menu_item (menu, menu_item, TRUE);
}
......@@ -2700,13 +2700,10 @@ create_open_with_gtk_menu (FMDirectoryView *view, GList *files)
if (nautilus_g_list_exactly_one_item (files)) {
uri = nautilus_file_get_uri (NAUTILUS_FILE (files->data));
applications =
nautilus_mime_get_short_list_applications_for_uri (uri);
applications = nautilus_mime_get_short_list_applications_for_uri (uri);
for (node = applications; node != NULL; node = node->next) {
add_application_to_gtk_menu (view, open_with_menu, node->data, uri);
}
gnome_vfs_mime_application_list_free (applications);
append_gtk_menu_item_with_view (view,
......@@ -2716,15 +2713,12 @@ create_open_with_gtk_menu (FMDirectoryView *view, GList *files)
other_application_callback,
files);
add_open_with_gtk_menu_item (open_with_menu, NULL);
components =
nautilus_mime_get_short_list_components_for_uri (uri);
add_separator (open_with_menu);
components = nautilus_mime_get_short_list_components_for_uri (uri);
for (node = components; node != NULL; node = node->next) {
add_component_to_gtk_menu (view, open_with_menu, node->data, uri);
}
gnome_vfs_mime_component_list_free (components);
g_free (uri);
......
......@@ -29,17 +29,23 @@
#include "fm-directory-view.h"
#include "fm-list-view-private.h"
#include "nautilus-indexing-info.h"
#include <libgnome/gnome-i18n.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extensions/nautilus-file-attributes.h>
#include <libnautilus-extensions/nautilus-file-utilities.h>
#include <libnautilus-extensions/nautilus-glib-extensions.h>
#include <libnautilus-extensions/nautilus-gtk-macros.h>
#include <libnautilus-extensions/nautilus-search-bar-criterion.h>
#include <libnautilus-extensions/nautilus-search-uri.h>
#include <libnautilus-extensions/nautilus-string.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnome/gnome-i18n.h>
/* FIXME bugzilla.eazel.com 2815: This code uses part of the
* NautilusSearchBarCriterion class, which is really for complex
* search bar user interface. We only need to do some non-UI
* manipulations of the search URI, so we can refactor the code, put
* more into nautilus-search-uri.[ch] and get rid of this terrible
* include statement.
*/
#include "../nautilus-search-bar-criterion.h"
/* Paths to use when creating & referring to Bonobo menu items */
#define MENU_PATH_INDEXING_INFO "/File/Indexing Info..."
......@@ -539,5 +545,4 @@ reveal_selected_items_callback (gpointer ignored, gpointer user_data)
nautilus_file_list_free (selection);
}
......@@ -25,22 +25,19 @@
/* nautilus-complex-search-bar.c - Search bar containing many attributes
*/
#include <config.h>
#include "nautilus-complex-search-bar.h"
#include "nautilus-search-bar-criterion-private.h"
#include "nautilus-search-bar-criterion.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib.h>
#include <gtk/gtkeventbox.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libnautilus-extensions/nautilus-gdk-pixbuf-extensions.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-gtk-extensions.h>
#include <libnautilus-extensions/nautilus-gtk-macros.h>
#include <libnautilus-extensions/nautilus-global-preferences.h>
#include <libnautilus-extensions/nautilus-search-bar-criterion.h>
#include <libnautilus-extensions/nautilus-search-bar-criterion-private.h>
#include <libnautilus-extensions/nautilus-string.h>
struct NautilusComplexSearchBarDetails {
......
......@@ -95,13 +95,12 @@ main (int argc, char *argv[])
gboolean stop_desktop;
gboolean start_desktop;
gboolean perform_self_check;
poptContext popt_context;
const char **args;
CORBA_ORB orb;
NautilusApplication *application;
char **argv_copy;
struct poptOption options[] = {
#ifndef NAUTILUS_OMIT_SELF_CHECK
{ "check", '\0', POPT_ARG_NONE, &perform_self_check, 0, N_("Perform high-speed self-check tests."), NULL },
......@@ -128,18 +127,49 @@ main (int argc, char *argv[])