/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* e-shell-utils.c * * Copyright (C) 2000 Helix Code, 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; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Author: Ettore Perazzoli */ #ifdef HAVE_CONFIG_H #include #endif #include #include "e-shell-constants.h" #include "e-shell-utils.h" static char * get_icon_path (const char *icon_name) { char *icon_path; if (g_path_is_absolute (icon_name)) { icon_path = g_strdup (icon_name); } else { icon_path = gnome_pixmap_file (icon_name); if (icon_path == NULL) icon_path = g_concat_dir_and_file (EVOLUTION_IMAGES, icon_name); } if (g_file_exists (icon_path)) { return icon_path; } else { g_free (icon_path); return NULL; } } static char * get_mini_name (const char *icon_name) { const char *dot_ptr; const char *basename; char *name_without_extension; char *mini_name; basename = g_basename (icon_name); if (basename == NULL) return NULL; dot_ptr = strrchr (basename, '.'); if (dot_ptr == NULL) { /* No extension. */ return g_strconcat (icon_name, E_SHELL_MINI_ICON_SUFFIX, NULL); } name_without_extension = g_strndup (icon_name, dot_ptr - icon_name); mini_name = g_strconcat (name_without_extension, E_SHELL_MINI_ICON_SUFFIX, dot_ptr, NULL); g_free (name_without_extension); return mini_name; } char * e_shell_get_icon_path (const char *icon_name, gboolean try_mini) { if (try_mini) { char *path; char *mini_name; mini_name = get_mini_name (icon_name); if (mini_name == NULL) { path = NULL; } else { path = get_icon_path (mini_name); g_free (mini_name); } if (path != NULL) return path; } return get_icon_path (icon_name); } es/minimist-1.2.2'>dependabot/npm_and_yarn/devel/electron4/files/minimist-1.2.2 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Augment port description.danfe2011-10-201-2/+5
* Remove now longer applicable warning and enable graph option by default asdanfe2011-08-111-2/+3
* -remove MD5ohauer2011-07-031-1/+0
* - Update to version 3.3.1, now with Qt4 GUI instead of Gtk+2!danfe2010-06-225-76/+40
* - update to 1.4.1dinoex2010-03-281-1/+1
* - update to jpeg-8dinoex2010-02-051-1/+1
* - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-1/+1
* - Unbreak on big-endian architecturesdanfe2008-09-171-2/+17
* Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1
* - Kill superfluous line (debug leftover)danfe2008-03-161-4/+2