aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/Makefile.am2
-rw-r--r--shell/e-history.c259
-rw-r--r--shell/e-history.h83
4 files changed, 6 insertions, 344 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 543bc84a4b..0af35de21f 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-10 Matthew Barnes <mbarnes@redhat.com>
+
+ * e-history.[ch]:
+ Remove these files. They were written in 2002 and, AFACIT,
+ never used for anything.
+
2008-07-01 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #540282
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 916acd779b..2c1e513f32 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -129,8 +129,6 @@ evolution_SOURCES = \
e-config-upgrade.h \
e-corba-config-page.c \
e-corba-config-page.h \
- e-history.c \
- e-history.h \
e-shell.c \
e-shell.h \
e-shell-constants.h \
diff --git a/shell/e-history.c b/shell/e-history.c
deleted file mode 100644
index d3f395e9b0..0000000000
--- a/shell/e-history.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-history.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 <ettore@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-history.h"
-
-struct _EHistoryPrivate {
- EHistoryItemFreeFunc item_free_function;
-
- GList *items;
- GList *current_item;
-};
-
-G_DEFINE_TYPE (EHistory, e_history, GTK_TYPE_OBJECT)
-
-
-/* GObject methods. */
-
-static void
-impl_finalize (GObject *object)
-{
- EHistory *history;
- EHistoryPrivate *priv;
- GList *p;
-
- history = E_HISTORY (object);
- priv = history->priv;
-
- for (p = priv->items; p != NULL; p = p->next)
- (* priv->item_free_function) (p->data);
-
- g_list_free (priv->items);
-
- g_free (priv);
-
- (* G_OBJECT_CLASS (e_history_parent_class)->finalize) (object);
-}
-
-
-static void
-e_history_class_init (EHistoryClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = impl_finalize;
-}
-
-static void
-e_history_init (EHistory *history)
-{
- EHistoryPrivate *priv;
-
- priv = g_new (EHistoryPrivate, 1);
- priv->items = NULL;
- priv->current_item = NULL;
-
- history->priv = priv;
-
- /* XXX I guess just clear the floating flag. */
- /* GTK_OBJECT_UNSET_FLAGS (history, GTK_FLOATING); */
- g_object_ref_sink (history);
- g_object_unref (history);
-}
-
-
-void
-e_history_construct (EHistory *history,
- EHistoryItemFreeFunc item_free_function)
-{
- EHistoryPrivate *priv;
-
- g_return_if_fail (history != NULL);
- g_return_if_fail (E_IS_HISTORY (history));
-
- priv = history->priv;
-
- priv->item_free_function = item_free_function;
-}
-
-EHistory *
-e_history_new (EHistoryItemFreeFunc item_free_function)
-{
- EHistory *history;
-
- history = g_object_new (e_history_get_type (), NULL);
- e_history_construct (history, item_free_function);
-
- return history;
-}
-
-void *
-e_history_prev (EHistory *history)
-{
- EHistoryPrivate *priv;
-
- g_return_val_if_fail (history != NULL, NULL);
- g_return_val_if_fail (E_IS_HISTORY (history), NULL);
-
- priv = history->priv;
-
- if (! e_history_has_prev (history))
- return NULL;
-
- priv->current_item = priv->current_item->prev;
- return e_history_get_current (history);
-}
-
-gboolean
-e_history_has_prev (EHistory *history)
-{
- EHistoryPrivate *priv;
-
- g_return_val_if_fail (history != NULL, FALSE);
- g_return_val_if_fail (E_IS_HISTORY (history), FALSE);
-
- priv = history->priv;
-
- if (priv->current_item == NULL)
- return FALSE;
-
- if (priv->current_item->prev == NULL)
- return FALSE;
- else
- return TRUE;
-}
-
-void *
-e_history_next (EHistory *history)
-{
- EHistoryPrivate *priv;
-
- g_return_val_if_fail (history != NULL, NULL);
- g_return_val_if_fail (E_IS_HISTORY (history), NULL);
-
- priv = history->priv;
-
- if (! e_history_has_next (history))
- return NULL;
-
- priv->current_item = priv->current_item->next;
- return e_history_get_current (history);
-}
-
-gboolean
-e_history_has_next (EHistory *history)
-{
- EHistoryPrivate *priv;
-
- g_return_val_if_fail (history != NULL, FALSE);
- g_return_val_if_fail (E_IS_HISTORY (history), FALSE);
-
- priv = history->priv;
-
- if (priv->current_item == NULL)
- return FALSE;
-
- if (priv->current_item->next == NULL)
- return FALSE;
- else
- return TRUE;
-}
-
-void *
-e_history_get_current (EHistory *history)
-{
- EHistoryPrivate *priv;
-
- g_return_val_if_fail (history != NULL, NULL);
- g_return_val_if_fail (E_IS_HISTORY (history), NULL);
-
- priv = history->priv;
-
- if (priv->current_item == NULL)
- return NULL;
-
- return priv->current_item->data;
-}
-
-void
-e_history_add (EHistory *history,
- void *data)
-{
- EHistoryPrivate *priv;
-
- g_return_if_fail (history != NULL);
- g_return_if_fail (E_IS_HISTORY (history));
-
- priv = history->priv;
-
- if (priv->current_item == NULL) {
- priv->items = g_list_prepend (priv->items, data);
- priv->current_item = priv->items;
-
- return;
- }
-
- if (priv->current_item->next != NULL) {
- GList *p;
-
- for (p = priv->current_item->next; p != NULL; p = p->next)
- (* priv->item_free_function) (p->data);
-
- priv->current_item->next->prev = NULL;
- g_list_free (priv->current_item->next);
-
- priv->current_item->next = NULL;
- }
-
- priv->current_item = g_list_append (priv->current_item, data);
- priv->current_item = priv->current_item->next;
-}
-
-void
-e_history_remove_matching (EHistory *history,
- const void *data,
- GCompareFunc compare_func)
-{
- EHistoryPrivate *priv;
- GList *p;
-
- g_return_if_fail (history != NULL);
- g_return_if_fail (E_IS_HISTORY (history));
- g_return_if_fail (compare_func != NULL);
-
- priv = history->priv;
-
- for (p = priv->items; p != NULL; p = p->next) {
- if ((* compare_func) (data, p->data) == 0) {
- if (priv->items == priv->current_item)
- priv->items = priv->current_item = g_list_remove_link (priv->items, p);
- else
- priv->items = g_list_remove_link (priv->items, p);
- }
- }
-}
-
diff --git a/shell/e-history.h b/shell/e-history.h
deleted file mode 100644
index 93b3aa62c8..0000000000
--- a/shell/e-history.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-history.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 <ettore@ximian.com>
- */
-
-#ifndef _E_HISTORY_H_
-#define _E_HISTORY_H_
-
-#include <gtk/gtk.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_HISTORY (e_history_get_type ())
-#define E_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_HISTORY, EHistory))
-#define E_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_HISTORY, EHistoryClass))
-#define E_IS_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_HISTORY))
-#define E_IS_HISTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_HISTORY))
-
-
-typedef struct _EHistory EHistory;
-typedef struct _EHistoryPrivate EHistoryPrivate;
-typedef struct _EHistoryClass EHistoryClass;
-
-struct _EHistory {
- GtkObject parent;
-
- EHistoryPrivate *priv;
-};
-
-struct _EHistoryClass {
- GtkObjectClass parent_class;
-};
-
-
-typedef void (* EHistoryItemFreeFunc) (void *data);
-
-
-GType e_history_get_type (void);
-
-void e_history_construct (EHistory *history,
- EHistoryItemFreeFunc item_free_function);
-EHistory *e_history_new (EHistoryItemFreeFunc item_free_function);
-
-void *e_history_prev (EHistory *history);
-gboolean e_history_has_prev (EHistory *history);
-
-void *e_history_next (EHistory *history);
-gboolean e_history_has_next (EHistory *history);
-
-void *e_history_get_current (EHistory *history);
-
-void e_history_add (EHistory *history,
- void *data);
-
-void e_history_remove_matching (EHistory *history,
- const void *data,
- GCompareFunc compare_func);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_HISTORY_H_ */