diff options
author | nobody <nobody@localhost> | 2003-06-29 00:20:00 +0800 |
---|---|---|
committer | nobody <nobody@localhost> | 2003-06-29 00:20:00 +0800 |
commit | 78df46c6a5f301ed1edcd6ea048d9b523938fc6e (patch) | |
tree | e521429188462e4446c632b5bd4b6f333e589995 /executive-summary/component/e-summary-util.c | |
parent | 5a8e20476b93515b8e69f7e1c8f659ab3dc55a8f (diff) | |
download | gsoc2013-evolution-GNOME_VFS_2_5_1.tar gsoc2013-evolution-GNOME_VFS_2_5_1.tar.gz gsoc2013-evolution-GNOME_VFS_2_5_1.tar.bz2 gsoc2013-evolution-GNOME_VFS_2_5_1.tar.lz gsoc2013-evolution-GNOME_VFS_2_5_1.tar.xz gsoc2013-evolution-GNOME_VFS_2_5_1.tar.zst gsoc2013-evolution-GNOME_VFS_2_5_1.zip |
This commit was manufactured by cvs2svn to create tagGNOME_VFS_2_5_1
'GNOME_VFS_2_5_1'.
svn path=/tags/GNOME_VFS_2_5_1/; revision=21653
Diffstat (limited to 'executive-summary/component/e-summary-util.c')
-rw-r--r-- | executive-summary/component/e-summary-util.c | 131 |
1 files changed, 0 insertions, 131 deletions
diff --git a/executive-summary/component/e-summary-util.c b/executive-summary/component/e-summary-util.c deleted file mode 100644 index 4f7b5f5d6d..0000000000 --- a/executive-summary/component/e-summary-util.c +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-summary-url.c - * - * Authors: Iain Holmes <iain@ximian.com> - * - * Copyright (C) 2000 Ximian, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * 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; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include <e-summary-util.h> - -#include <string.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <dirent.h> - -#include <glib.h> -#include <libgnome/gnome-defs.h> -#include <libgnome/gnome-util.h> - -/** - * e_pixmap_file: - * @filename: Filename of pixmap. - * - * Finds @filename in the Evolution or GNOME installation dir. - * - * Returns: A newly allocated absolute path to @filename, or NULL - * if it cannot be found. - */ -char * -e_pixmap_file (const char *filename) -{ - char *ret; - char *edir; - - if (g_file_exists (filename)) { - ret = g_strdup (filename); - - return ret; - } - - /* Try the evolution images dir */ - edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution", - filename); - - if (g_file_exists (edir)) { - ret = g_strdup (edir); - g_free (edir); - - return ret; - } - g_free (edir); - - /* Try the evolution button images dir */ - edir = g_concat_dir_and_file (EVOLUTION_DATADIR "/images/evolution/buttons", - filename); - - if (g_file_exists (edir)) { - ret = g_strdup (edir); - g_free (edir); - - return ret; - } - g_free (edir); - - /* Fall back to the gnome_pixmap_file */ - return gnome_pixmap_file (filename); -} - -/** - * e_summary_rm_dir: - * @path: Full path to the directory or file to be removed. - * - * Deletes everything in fullpath. - */ -void -e_summary_rm_dir (const char *path) -{ - DIR *base; - struct stat statbuf; - struct dirent *contents; - - stat (path, &statbuf); - if (!S_ISDIR (statbuf.st_mode)) { - /* Not a directory */ - g_warning ("Removing: %s", path); - unlink (path); - return; - } else { - g_warning ("Opening: %s", path); - base = opendir (path); - - if (base == NULL) - return; - - contents = readdir (base); - while (contents != NULL) { - char *fullpath; - - if (strcmp (contents->d_name, ".") == 0|| - strcmp (contents->d_name, "..") ==0) { - contents = readdir (base); - continue; - } - - fullpath = g_concat_dir_and_file (path, contents->d_name); - e_summary_rm_dir (fullpath); - g_free (fullpath); - - contents = readdir (base); - } - - closedir (base); - rmdir (path); - } -} - |