mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
8656eb9d85
* libnautilus/nautilus-directory-private.h, libnautilus/nautilus-directory.c, libnautilus/nautilus-file.c (nautilus_directory_find_file, compare_file_with_name, nautilus_directory_get, nautilus_file_get): Fixed bugs relating to multiple directory and file objects for the same entity. Stripped trailing '/' characters in nautilus_directory_get and changed nautilus_file_get to return already-existing files instead of always creating new ones. Added self-checks to make sure this works. * libnautilus/nautilus-directory.c (nautilus_directory_try_to_read_metafile): Fixed bug where metafile reading would fail. The gnome-xml parser requires a null character at the end of the file, even though the size is passed in! * libnautilus/nautilus-directory.c (nautilus_directory_remove_write_metafile_idle, nautilus_directory_finalize, nautilus_directory_try_to_write_metafile, nautilus_directory_request_write_metafile, ): Changed metafile writing so it always happens at idle time. * libnautilus/nautilus-directory.c (nautilus_directory_try_to_read_metafile): Fixed bug where metafile reading would fail. The gnome-xml parser requires a null character at the end of the file, even though the size is passed in! * libnautilus/nautilus-lib-self-check-functions.h: Changed order so lower-level tests come before higher-level ones. * libnautilus/nautilus-string.h, libnautilus/nautilus-string.c: Renamed functions: nautilus_has_prefix -> nautilus_str_has_prefix nautilus_strdup_prefix -> nautilus_str_get_prefix nautilus_has_suffix -> nautilus_str_has_suffix nautilus_strstrip -> nautilus_str_strip_chr nautilus_string_to_int -> nautilus_str_to_int nautilus_eat_string_to_int -> nautilus_eat_str_to_int Changed nautilus_str_strip_chr not to modify in place. Added nautilus_str_strip_trailing_chr. * components/music/nautilus-music-view.c (is_mp3_file, nautilus_music_view_update_from_uri), libnautilus/nautilus-icon-factory.c (nautilus_icon_factory_get_icon_for_file, make_thumbnail_path, load_specific_image), libnautilus/nautilus-icons-view-icon-item.c (draw_mini_text), src/ntl-index-panel.c (command_button_cb, add_command_buttons), src/ntl-window-msgs.c (nautilus_window_change_location_2), src/file-manager-fm-directory-view-icons.c (fm_directory_view_icons_compute_menu_item_info), src/file-manager/fm-directory-view.c (compute_menu_item_info), src/file-manager/fm-icons-controller.c (fm_icons_controller_get_icon_property): Switched callers to use new names for string calls. * libnautilus/gnome-icon-container.c (destroy): Reformatting. * components/help/converters/gnome-info2html2/main.c (main): Fixed a warning.
66 lines
2.5 KiB
C
66 lines
2.5 KiB
C
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
|
|
|
|
nautilus-string.h: String routines to augment <string.h>.
|
|
|
|
Copyright (C) 2000 Eazel, Inc.
|
|
|
|
The Gnome Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
The Gnome 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
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with the Gnome Library; see the file COPYING.LIB. If not,
|
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA.
|
|
|
|
Authors: Darin Adler <darin@eazel.com>
|
|
*/
|
|
|
|
#ifndef NAUTILUS_STRING_H
|
|
#define NAUTILUS_STRING_H
|
|
|
|
#include <glib.h>
|
|
#include <string.h>
|
|
|
|
/* We use the "str" abbrevation to mean char * string, since
|
|
* "string" usually means g_string instead.
|
|
*/
|
|
|
|
/* NULL is allowed for all the str parameters to these functions. */
|
|
|
|
/* Versions of basic string functions that allow NULL. */
|
|
size_t nautilus_strlen (const char *string);
|
|
char * nautilus_strchr (const char *haystack,
|
|
char needle);
|
|
int nautilus_strcmp (const char *string_a,
|
|
const char *string_b);
|
|
|
|
/* Versions of basic string functions that free their parameters. */
|
|
int nautilus_eat_strcmp (char *string_a_gets_freed,
|
|
const char *string_b);
|
|
|
|
/* Other basic string operations. */
|
|
gboolean nautilus_str_has_prefix (const char *target,
|
|
const char *prefix);
|
|
char * nautilus_str_get_prefix (const char *source,
|
|
const char *delimiter);
|
|
gboolean nautilus_str_has_suffix (const char *target,
|
|
const char *suffix);
|
|
char * nautilus_str_strip_chr (const char *string,
|
|
char remove_this);
|
|
char * nautilus_str_strip_trailing_chr (const char *string,
|
|
char remove_this);
|
|
|
|
/* Conversions to and from strings. */
|
|
gboolean nautilus_str_to_int (const char *string,
|
|
int *integer);
|
|
gboolean nautilus_eat_str_to_int (char *string_gets_freed,
|
|
int *integer);
|
|
|
|
#endif /* NAUTILUS_STRING_H */
|