diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-07-01 22:43:10 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-07-02 22:34:11 +0800 |
commit | 1f6560f3f2a1df2ae5bffae56a52206dd193a694 (patch) | |
tree | 6771f7e2ac75d0ffdffb3d37ed202fb6f08243e3 | |
parent | 44f1ec85ba61e70e1df2ad673a9eb1b2357eec4c (diff) | |
download | gsoc2013-evolution-1f6560f3f2a1df2ae5bffae56a52206dd193a694.tar gsoc2013-evolution-1f6560f3f2a1df2ae5bffae56a52206dd193a694.tar.gz gsoc2013-evolution-1f6560f3f2a1df2ae5bffae56a52206dd193a694.tar.bz2 gsoc2013-evolution-1f6560f3f2a1df2ae5bffae56a52206dd193a694.tar.lz gsoc2013-evolution-1f6560f3f2a1df2ae5bffae56a52206dd193a694.tar.xz gsoc2013-evolution-1f6560f3f2a1df2ae5bffae56a52206dd193a694.tar.zst gsoc2013-evolution-1f6560f3f2a1df2ae5bffae56a52206dd193a694.zip |
Remove ETableMemory.
No longer used.
-rw-r--r-- | doc/reference/evolution-util/evolution-util-docs.sgml | 1 | ||||
-rw-r--r-- | doc/reference/evolution-util/evolution-util-sections.txt | 26 | ||||
-rw-r--r-- | doc/reference/evolution-util/evolution-util.types | 1 | ||||
-rw-r--r-- | e-util/Makefile.am | 2 | ||||
-rw-r--r-- | e-util/e-table-memory.c | 266 | ||||
-rw-r--r-- | e-util/e-table-memory.h | 91 | ||||
-rw-r--r-- | e-util/e-util.h | 1 |
7 files changed, 0 insertions, 388 deletions
diff --git a/doc/reference/evolution-util/evolution-util-docs.sgml b/doc/reference/evolution-util/evolution-util-docs.sgml index 27d6075eb3..33fb5610fa 100644 --- a/doc/reference/evolution-util/evolution-util-docs.sgml +++ b/doc/reference/evolution-util/evolution-util-docs.sgml @@ -127,7 +127,6 @@ <xi:include href="xml/e-table-header-item.xml"/> <xi:include href="xml/e-table-header.xml"/> <xi:include href="xml/e-table-item.xml"/> - <xi:include href="xml/e-table-memory.xml"/> <xi:include href="xml/e-table-model.xml"/> <xi:include href="xml/e-table-one.xml"/> <xi:include href="xml/e-table-search.xml"/> diff --git a/doc/reference/evolution-util/evolution-util-sections.txt b/doc/reference/evolution-util/evolution-util-sections.txt index 26c5753491..edeab2ffd0 100644 --- a/doc/reference/evolution-util/evolution-util-sections.txt +++ b/doc/reference/evolution-util/evolution-util-sections.txt @@ -3682,32 +3682,6 @@ e_table_item_get_type </SECTION> <SECTION> -<FILE>e-table-memory</FILE> -<TITLE>ETableMemory</TITLE> -ETableMemory -e_table_memory_new -e_table_memory_construct -e_table_memory_insert -e_table_memory_remove -e_table_memory_clear -e_table_memory_freeze -e_table_memory_thaw -e_table_memory_get_data -e_table_memory_set_data -<SUBSECTION Standard> -E_TABLE_MEMORY -E_IS_TABLE_MEMORY -E_TYPE_TABLE_MEMORY -E_TABLE_MEMORY_CLASS -E_IS_TABLE_MEMORY_CLASS -E_TABLE_MEMORY_GET_CLASS -ETableMemoryClass -e_table_memory_get_type -<SUBSECTION Private> -ETableMemoryPrivate -</SECTION> - -<SECTION> <FILE>e-table-model</FILE> <TITLE>ETableModel</TITLE> ETableModel diff --git a/doc/reference/evolution-util/evolution-util.types b/doc/reference/evolution-util/evolution-util.types index b4115bb55f..76d23cd42b 100644 --- a/doc/reference/evolution-util/evolution-util.types +++ b/doc/reference/evolution-util/evolution-util.types @@ -136,7 +136,6 @@ e_table_group_leaf_get_type e_table_header_get_type e_table_header_item_get_type e_table_item_get_type -e_table_memory_get_type e_table_model_get_type e_table_one_get_type e_table_search_get_type diff --git a/e-util/Makefile.am b/e-util/Makefile.am index 08dc7ad4cd..ea3113a352 100644 --- a/e-util/Makefile.am +++ b/e-util/Makefile.am @@ -269,7 +269,6 @@ evolution_util_include_HEADERS = \ e-table-header-utils.h \ e-table-header.h \ e-table-item.h \ - e-table-memory.h \ e-table-model.h \ e-table-one.h \ e-table-search.h \ @@ -513,7 +512,6 @@ libevolution_util_la_SOURCES = \ e-table-header-utils.c \ e-table-header.c \ e-table-item.c \ - e-table-memory.c \ e-table-model.c \ e-table-one.c \ e-table-search.c \ diff --git a/e-util/e-table-memory.c b/e-util/e-table-memory.c deleted file mode 100644 index 09f13e0b11..0000000000 --- a/e-util/e-table-memory.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#include <stdio.h> -#include <errno.h> -#include <stdlib.h> -#include <unistd.h> -#include <fcntl.h> -#include <string.h> - -#include <libxml/parser.h> -#include <libxml/xmlmemory.h> - -#include "e-table-memory.h" -#include "e-xml-utils.h" - -#define E_TABLE_MEMORY_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TABLE_MEMORY, ETableMemoryPrivate)) - -/* Forward Declarations */ -static void e_table_memory_table_model_init - (ETableModelInterface *interface); - -G_DEFINE_TYPE_WITH_CODE ( - ETableMemory, - e_table_memory, - G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE ( - E_TYPE_TABLE_MODEL, - e_table_memory_table_model_init)) - -struct _ETableMemoryPrivate { - gpointer *data; - gint num_rows; - gint frozen; -}; - -static void -table_memory_finalize (GObject *object) -{ - ETableMemoryPrivate *priv; - - priv = E_TABLE_MEMORY_GET_PRIVATE (object); - - g_free (priv->data); - - /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (e_table_memory_parent_class)->finalize (object); -} - -static gint -table_memory_row_count (ETableModel *table_model) -{ - ETableMemory *table_memory = E_TABLE_MEMORY (table_model); - - return table_memory->priv->num_rows; -} - -static void -e_table_memory_class_init (ETableMemoryClass *class) -{ - GObjectClass *object_class; - - g_type_class_add_private (class, sizeof (ETableMemoryPrivate)); - - object_class = G_OBJECT_CLASS (class); - object_class->finalize = table_memory_finalize; -} - -static void -e_table_memory_table_model_init (ETableModelInterface *interface) -{ - interface->row_count = table_memory_row_count; -} - -static void -e_table_memory_init (ETableMemory *table_memory) -{ - table_memory->priv = E_TABLE_MEMORY_GET_PRIVATE (table_memory); -} - -/** - * e_table_memory_new - * - * XXX docs here. - * - * return values: a newly constructed ETableMemory. - */ -ETableMemory * -e_table_memory_new (void) -{ - return g_object_new (E_TYPE_TABLE_MEMORY, NULL); -} - -/** - * e_table_memory_get_data: - * @table_memory: - * @row: - * - * Return value: - **/ -gpointer -e_table_memory_get_data (ETableMemory *table_memory, - gint row) -{ - g_return_val_if_fail (row >= 0, NULL); - g_return_val_if_fail (row < table_memory->priv->num_rows, NULL); - - return table_memory->priv->data[row]; -} - -/** - * e_table_memory_set_data: - * @table_memory: - * @row: - * @data: - * - **/ -void -e_table_memory_set_data (ETableMemory *table_memory, - gint row, - gpointer data) -{ - g_return_if_fail (row >= 0); - g_return_if_fail (row < table_memory->priv->num_rows); - - table_memory->priv->data[row] = data; -} - -/** - * e_table_memory_insert: - * @table_memory: - * @row: - * @data: - * - * Return value: - **/ -void -e_table_memory_insert (ETableMemory *table_memory, - gint row, - gpointer data) -{ - g_return_if_fail (row >= -1); - g_return_if_fail (row <= table_memory->priv->num_rows); - - if (!table_memory->priv->frozen) - e_table_model_pre_change (E_TABLE_MODEL (table_memory)); - - if (row == -1) - row = table_memory->priv->num_rows; - table_memory->priv->data = g_renew (gpointer, table_memory->priv->data, table_memory->priv->num_rows + 1); - memmove ( - table_memory->priv->data + row + 1, - table_memory->priv->data + row, - (table_memory->priv->num_rows - row) * sizeof (gpointer)); - table_memory->priv->data[row] = data; - table_memory->priv->num_rows++; - if (!table_memory->priv->frozen) - e_table_model_row_inserted (E_TABLE_MODEL (table_memory), row); -} - -/** - * e_table_memory_remove: - * @table_memory: - * @row: - * - * Return value: - **/ -gpointer -e_table_memory_remove (ETableMemory *table_memory, - gint row) -{ - gpointer ret; - - g_return_val_if_fail (row >= 0, NULL); - g_return_val_if_fail (row < table_memory->priv->num_rows, NULL); - - if (!table_memory->priv->frozen) - e_table_model_pre_change (E_TABLE_MODEL (table_memory)); - ret = table_memory->priv->data[row]; - memmove ( - table_memory->priv->data + row, - table_memory->priv->data + row + 1, - (table_memory->priv->num_rows - row - 1) * sizeof (gpointer)); - table_memory->priv->num_rows--; - if (!table_memory->priv->frozen) - e_table_model_row_deleted (E_TABLE_MODEL (table_memory), row); - return ret; -} - -/** - * e_table_memory_clear: - * @table_memory: - **/ -void -e_table_memory_clear (ETableMemory *table_memory) -{ - if (!table_memory->priv->frozen) - e_table_model_pre_change (E_TABLE_MODEL (table_memory)); - g_free (table_memory->priv->data); - table_memory->priv->data = NULL; - table_memory->priv->num_rows = 0; - if (!table_memory->priv->frozen) - e_table_model_changed (E_TABLE_MODEL (table_memory)); -} - -/** - * e_table_memory_freeze: - * @table_memory: the ETableModel to freeze. - * - * This function prepares an ETableModel for a period of much change. - * All signals regarding changes to the table are deferred until we - * thaw the table. - * - **/ -void -e_table_memory_freeze (ETableMemory *table_memory) -{ - ETableMemoryPrivate *priv = table_memory->priv; - - if (priv->frozen == 0) - e_table_model_pre_change (E_TABLE_MODEL (table_memory)); - - priv->frozen++; -} - -/** - * e_table_memory_thaw: - * @table_memory: the ETableMemory to thaw. - * - * This function thaws an ETableMemory. All the defered signals can add - * up to a lot, we don't know - so we just emit a model_changed - * signal. - * - **/ -void -e_table_memory_thaw (ETableMemory *table_memory) -{ - ETableMemoryPrivate *priv = table_memory->priv; - - if (priv->frozen > 0) - priv->frozen--; - if (priv->frozen == 0) { - e_table_model_changed (E_TABLE_MODEL (table_memory)); - } -} diff --git a/e-util/e-table-memory.h b/e-util/e-table-memory.h deleted file mode 100644 index 86f2b7014a..0000000000 --- a/e-util/e-table-memory.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Chris Lahey <clahey@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION) -#error "Only <e-util/e-util.h> should be included directly." -#endif - -#ifndef E_TABLE_MEMORY_H -#define E_TABLE_MEMORY_H - -#include <gdk-pixbuf/gdk-pixbuf.h> - -#include <e-util/e-table-model.h> - -/* Standard GObject macros */ -#define E_TYPE_TABLE_MEMORY \ - (e_table_memory_get_type ()) -#define E_TABLE_MEMORY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST \ - ((obj), E_TYPE_TABLE_MEMORY, ETableMemory)) -#define E_TABLE_MEMORY_CLASS(cls) \ - (G_TYPE_CHECK_CLASS_CAST \ - ((cls), E_TYPE_TABLE_MEMORY, ETableMemoryClass)) -#define E_IS_TABLE_MEMORY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE \ - ((obj), E_TYPE_TABLE_MEMORY)) -#define E_IS_TABLE_MEMORY_CLASS(cls) \ - (G_TYPE_CHECK_CLASS_TYPE \ - ((cls), E_TYPE_TABLE_MEMORY)) -#define E_TABLE_MEMORY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS \ - ((obj), E_TYPE_TABLE_MEMORY, ETableMemoryClass)) - -G_BEGIN_DECLS - -typedef struct _ETableMemory ETableMemory; -typedef struct _ETableMemoryClass ETableMemoryClass; -typedef struct _ETableMemoryPrivate ETableMemoryPrivate; - -struct _ETableMemory { - GObject parent; - ETableMemoryPrivate *priv; -}; - -struct _ETableMemoryClass { - GObjectClass parent_class; -}; - -GType e_table_memory_get_type (void) G_GNUC_CONST; -ETableMemory * e_table_memory_new (void); -void e_table_memory_construct (ETableMemory *table_memory); - -/* row operations */ -void e_table_memory_insert (ETableMemory *table_memory, - gint row, - gpointer data); -gpointer e_table_memory_remove (ETableMemory *table_memory, - gint row); -void e_table_memory_clear (ETableMemory *table_memory); - -/* Freeze and thaw */ -void e_table_memory_freeze (ETableMemory *table_memory); -void e_table_memory_thaw (ETableMemory *table_memory); -gpointer e_table_memory_get_data (ETableMemory *table_memory, - gint row); -void e_table_memory_set_data (ETableMemory *table_memory, - gint row, - gpointer data); - -G_END_DECLS - -#endif /* E_TABLE_MEMORY_H */ diff --git a/e-util/e-util.h b/e-util/e-util.h index 428c3b9221..0b54db8241 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -184,7 +184,6 @@ #include <e-util/e-table-header-utils.h> #include <e-util/e-table-header.h> #include <e-util/e-table-item.h> -#include <e-util/e-table-memory.h> #include <e-util/e-table-model.h> #include <e-util/e-table-one.h> #include <e-util/e-table-search.h> |