aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-07-12 21:15:48 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-07-12 21:15:48 +0800
commit3127d12f901da70e6503f7e7d979c279849662f5 (patch)
tree8e91308ea295f426e7aa2b406a67e55edccc7bc2
parentc92225213c13a0b29068c5eebc2e26f82f328880 (diff)
downloadgsoc2013-evolution-3127d12f901da70e6503f7e7d979c279849662f5.tar
gsoc2013-evolution-3127d12f901da70e6503f7e7d979c279849662f5.tar.gz
gsoc2013-evolution-3127d12f901da70e6503f7e7d979c279849662f5.tar.bz2
gsoc2013-evolution-3127d12f901da70e6503f7e7d979c279849662f5.tar.lz
gsoc2013-evolution-3127d12f901da70e6503f7e7d979c279849662f5.tar.xz
gsoc2013-evolution-3127d12f901da70e6503f7e7d979c279849662f5.tar.zst
gsoc2013-evolution-3127d12f901da70e6503f7e7d979c279849662f5.zip
Remove more unused files.
2008-07-12 Matthew Barnes <mbarnes@redhat.com> * shell/e-shell-utils.[ch]: Remove more unused files. * shell/e-user-creatable-items-handler.c: Remove inclusion of "e-shell-utils.h". svn path=/trunk/; revision=35739
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/Makefile.am2
-rw-r--r--shell/e-shell-utils.c151
-rw-r--r--shell/e-shell-utils.h34
-rw-r--r--shell/e-user-creatable-items-handler.c1
5 files changed, 8 insertions, 188 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 0af35de21f..1c8214ec55 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-12 Matthew Barnes <mbarnes@redhat.com>
+
+ * e-shell-utils.[ch]:
+ Remove more unused files.
+
+ * e-user-creatable-items-handler.c:
+ Remove inclusion of "e-shell-utils.h".
+
2008-07-10 Matthew Barnes <mbarnes@redhat.com>
* e-history.[ch]:
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 2c1e513f32..b401237f40 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -90,7 +90,6 @@ eshellincludedir = $(privincludedir)/shell
eshellinclude_HEADERS = \
Evolution.h \
e-component-view.h \
- e-shell-utils.h \
e-user-creatable-items-handler.h \
evolution-config-control.h \
evolution-component.h \
@@ -105,7 +104,6 @@ libeshell_la_SOURCES = \
e-component-view.c \
evolution-component.c \
evolution-listener.c \
- e-shell-utils.c \
e-user-creatable-items-handler.c \
evolution-config-control.c \
evolution-shell-component-utils.c \
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
deleted file mode 100644
index d626d34f40..0000000000
--- a/shell/e-shell-utils.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-shell-utils.c
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-
-#include <glib.h>
-
-#include <libgnome/gnome-util.h>
-#include <glib/gi18n.h>
-
-#include "e-util/e-util-private.h"
-
-#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 = g_build_filename (EVOLUTION_IMAGESDIR, icon_name, NULL);
-
- if (g_file_test (icon_path, G_FILE_TEST_EXISTS)) {
- return icon_path;
- } else {
- g_free (icon_path);
- return NULL;
- }
-}
-
-static char *
-get_mini_name (const char *icon_name)
-{
- const char *dot_ptr;
- char *basename;
- char *name_without_extension;
- char *mini_name;
-
- basename = g_path_get_basename (icon_name);
- if (basename == NULL)
- return NULL;
-
- dot_ptr = strrchr (basename, '.');
-
- if (dot_ptr == NULL) {
- /* No extension. */
- g_free (basename);
- return g_strconcat (icon_name, E_SHELL_MINI_ICON_SUFFIX, NULL);
- }
-
- name_without_extension = g_strndup (icon_name, dot_ptr - basename);
- mini_name = g_strconcat (name_without_extension, E_SHELL_MINI_ICON_SUFFIX,
- dot_ptr, NULL);
- g_free (name_without_extension);
-
- g_free (basename);
- 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);
-}
-
-
-gboolean
-e_shell_folder_name_is_valid (const char *name,
- const char **reason_return)
-{
- if (name == NULL || *name == '\0') {
- if (reason_return != NULL)
- *reason_return = _("No folder name specified.");
- return FALSE;
- }
-
- /* GtkEntry is broken - if you hit KP_ENTER you get a \r inserted... */
- if (strchr (name, '\r')) {
- if (reason_return != NULL)
- *reason_return = _("Folder name cannot contain the Return character.");
- return FALSE;
- }
-
- if (strchr (name, E_PATH_SEPARATOR) != NULL) {
- if (reason_return != NULL)
- *reason_return = _("Folder name cannot contain the character \"/\".");
- return FALSE;
- }
-
- if (strchr (name, '#') != NULL) {
- if (reason_return != NULL)
- *reason_return = _("Folder name cannot contain the character \"#\".");
- return FALSE;
- }
-
- if (strcmp (name, ".") == 0 || strcmp (name, "..") == 0) {
- if (reason_return != NULL)
- *reason_return = _("'.' and '..' are reserved folder names.");
- return FALSE;
- }
-
- *reason_return = NULL;
-
- return TRUE;
-}
-
diff --git a/shell/e-shell-utils.h b/shell/e-shell-utils.h
deleted file mode 100644
index f0af734bce..0000000000
--- a/shell/e-shell-utils.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-shell-utils.h
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * 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., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef E_SHELL_UTILS_H
-#define E_SHELL_UTILS_H
-
-#include <glib.h>
-
-char *e_shell_get_icon_path (const char *icon_name,
- gboolean try_mini);
-
-gboolean e_shell_folder_name_is_valid (const char *name,
- const char **reason_return);
-
-#endif
diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c
index fa2d781b54..ed17f4934c 100644
--- a/shell/e-user-creatable-items-handler.c
+++ b/shell/e-user-creatable-items-handler.c
@@ -26,7 +26,6 @@
#include "e-user-creatable-items-handler.h"
#include <e-util/e-icon-factory.h>
-#include "e-shell-utils.h"
#include "Evolution.h"
#include "e-util/e-corba-utils.h"