aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text/e-table-text-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/text/e-table-text-model.c')
-rw-r--r--widgets/text/e-table-text-model.c234
1 files changed, 0 insertions, 234 deletions
diff --git a/widgets/text/e-table-text-model.c b/widgets/text/e-table-text-model.c
deleted file mode 100644
index 909a982528..0000000000
--- a/widgets/text/e-table-text-model.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-table-text-model.c
- * Copyright 2000, 2001, Ximian, Inc.
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License, version 2, as published by the Free Software Foundation.
- *
- * This library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <config.h>
-#include <ctype.h>
-#include <gtk/gtksignal.h>
-#include <gal/util/e-util.h>
-#include "e-table-text-model.h"
-
-static void e_table_text_model_class_init (ETableTextModelClass *class);
-static void e_table_text_model_init (ETableTextModel *model);
-static void e_table_text_model_dispose (GObject *object);
-
-static const gchar *e_table_text_model_get_text (ETextModel *model);
-static void e_table_text_model_set_text (ETextModel *model, const gchar *text);
-static void e_table_text_model_insert (ETextModel *model, gint postion, const gchar *text);
-static void e_table_text_model_insert_length (ETextModel *model, gint postion, const gchar *text, gint length);
-static void e_table_text_model_delete (ETextModel *model, gint postion, gint length);
-
-#define PARENT_TYPE E_TYPE_TEXT_MODEL
-static GtkObject *parent_class;
-
-
-
-/**
- * e_table_text_model_get_type:
- * @void:
- *
- * Registers the &ETableTextModel class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &ETableTextModel class.
- **/
-E_MAKE_TYPE (e_table_text_model,
- "ETableTextModel",
- ETableTextModel,
- e_table_text_model_class_init,
- e_table_text_model_init,
- PARENT_TYPE)
-
-/* Class initialization function for the text item */
-static void
-e_table_text_model_class_init (ETableTextModelClass *klass)
-{
- GObjectClass *object_class;
- ETextModelClass *model_class;
-
- object_class = (GObjectClass *) klass;
- model_class = (ETextModelClass *) klass;
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- model_class->get_text = e_table_text_model_get_text;
- model_class->set_text = e_table_text_model_set_text;
- model_class->insert = e_table_text_model_insert;
- model_class->insert_length = e_table_text_model_insert_length;
- model_class->delete = e_table_text_model_delete;
-
- object_class->dispose = e_table_text_model_dispose;
-}
-
-/* Object initialization function for the text item */
-static void
-e_table_text_model_init (ETableTextModel *model)
-{
- model->model = NULL;
- model->row = 0;
- model->model_col = 0;
- model->cell_changed_signal_id = 0;
- model->row_changed_signal_id = 0;
-}
-
-/* Dispose handler for the text item */
-static void
-e_table_text_model_dispose (GObject *object)
-{
- ETableTextModel *model;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (E_IS_TABLE_TEXT_MODEL (object));
-
- model = E_TABLE_TEXT_MODEL (object);
-
- if (model->model)
- g_assert (GTK_IS_OBJECT (model->model));
-
- if (model->cell_changed_signal_id)
- g_signal_handler_disconnect (model->model,
- model->cell_changed_signal_id);
- model->cell_changed_signal_id = 0;
-
- if (model->row_changed_signal_id)
- g_signal_handler_disconnect (model->model,
- model->row_changed_signal_id);
- model->row_changed_signal_id = 0;
-
- if (model->model)
- g_object_unref (model->model);
- model->model = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-static const gchar *
-e_table_text_model_get_text (ETextModel *text_model)
-{
- ETableTextModel *model = E_TABLE_TEXT_MODEL(text_model);
- if (model->model)
- return (gchar *)e_table_model_value_at (model->model, model->model_col, model->row);
- else
- return "";
-}
-
-static void
-e_table_text_model_set_text (ETextModel *text_model, const gchar *text)
-{
- ETableTextModel *model = E_TABLE_TEXT_MODEL(text_model);
- if (model->model)
- e_table_model_set_value_at (model->model, model->model_col, model->row, (void *) text);
-}
-
-static void
-e_table_text_model_insert (ETextModel *text_model, gint position, const gchar *text)
-{
- ETableTextModel *model = E_TABLE_TEXT_MODEL(text_model);
- if (model->model){
- gchar *temp = (gchar *)e_table_model_value_at (model->model, model->model_col, model->row);
- /* Can't use g_strdup_printf here because on some
- systems printf ("%.*s"); is locale dependent. */
- temp = e_strdup_append_strings (temp, position,
- text, -1,
- temp + position, -1,
- NULL);
- e_table_model_set_value_at (model->model, model->model_col, model->row, temp);
- g_free (temp);
- }
-}
-
-static void
-e_table_text_model_insert_length (ETextModel *text_model, gint position, const gchar *text, gint length)
-{
- ETableTextModel *model = E_TABLE_TEXT_MODEL(text_model);
- if (model->model){
- gchar *temp = (gchar *)e_table_model_value_at (model->model, model->model_col, model->row);
- /* Can't use g_strdup_printf here because on some
- systems printf ("%.*s"); is locale dependent. */
- temp = e_strdup_append_strings (temp, position,
- text, length,
- temp + position, -1,
- NULL);
- e_table_model_set_value_at (model->model, model->model_col, model->row, temp);
- g_free (temp);
- }
-}
-
-static void
-e_table_text_model_delete (ETextModel *text_model, gint position, gint length)
-{
- ETableTextModel *model = E_TABLE_TEXT_MODEL(text_model);
- if (model->model){
- gchar *temp = (gchar *)e_table_model_value_at (model->model, model->model_col, model->row);
- /* Can't use g_strdup_printf here because on some
- systems printf ("%.*s"); is locale dependent. */
- temp = e_strdup_append_strings (temp, position,
- temp + position + length, -1,
- NULL);
- e_table_model_set_value_at (model->model, model->model_col, model->row, temp);
- g_free (temp);
- }
-}
-
-static void
-cell_changed (ETableModel *table_model, int model_col, int row, ETableTextModel *model)
-{
- if (model->model_col == model_col &&
- model->row == row)
- e_text_model_changed (E_TEXT_MODEL(model));
-}
-
-static void
-row_changed (ETableModel *table_model, int row, ETableTextModel *model)
-{
- if (model->row == row)
- e_text_model_changed (E_TEXT_MODEL(model));
-}
-
-ETableTextModel *
-e_table_text_model_new (ETableModel *table_model, int row, int model_col)
-{
- ETableTextModel *model;
-
- g_return_val_if_fail(table_model != NULL, NULL);
- g_return_val_if_fail(E_IS_TABLE_MODEL(table_model), NULL);
-
- model = g_object_new (E_TYPE_TABLE_TEXT_MODEL, NULL);
- model->model = table_model;
- if (model->model){
- g_object_ref (model->model);
- model->cell_changed_signal_id =
- g_signal_connect (model->model,
- "model_cell_changed",
- G_CALLBACK(cell_changed),
- model);
- model->row_changed_signal_id =
- g_signal_connect (model->model,
- "model_row_changed",
- G_CALLBACK(row_changed),
- model);
- }
- model->row = row;
- model->model_col = model_col;
- return model;
-}
-
>sunpoet2011-08-131-1/+2 * - Fix MASTER_SITESsunpoet2011-08-083-49/+11 * - Move language prefix to PKGNAMEPREFIXsunpoet2011-07-292-9/+12 * Pass matainership to the new office teambapt2011-07-222-2/+2 * Add some locales thesaurusbapt2011-07-214-0/+34 * Add Hungarian hyphenation rulesbapt2011-07-214-0/+33 * - now only provides the hungarian dictionnariesbapt2011-07-206-148/+17 * - Connect textproc/hunspell to the buildjlaffaye2011-07-191-1/+0 * take maintainership, no reply from previous maintainerbapt2011-07-111-1/+1 * Reset maintainership de jure. In fact KDE 3 has not been maintained by our teammakc2011-07-082-2/+2 * Update KDE Software Compilation ports to 4.6.5makc2011-07-082-2/+35 * The FreeBSD KDE Team is pleased to announce KDE SC 4.6.4. Read fullavilla2011-06-142-2/+3 * Update KDE Software Compilation ports to 4.6.3makc2011-05-172-2/+19 * Fix PKGORIGINmakc2011-04-192-2/+2 * - Update KOffice to 2.3.3.avilla2011-04-132-4/+4 * The FreeBSD KDE Team is pleased to announce April updates for KDEavilla2011-04-071-2/+2 * - Connect hungarian/koffice-kde4-l10n to the build, and, mostavilla2011-03-251-0/+1 * - Update KOffice to 2.3.1.avilla2011-03-258-0/+146 * The FreeBSD KDE Team is pleased to announce KDE SC 4.6.1 and KDE PIMavilla2011-03-252-13/+53 * - Get Rid MD5 supportmiwi2011-03-209-10/+0 * - The KDE FreeBSD team is proud to announce the release of KDE 4.5.5fluffy2011-01-081-2/+2 * KDE FreeBSD team presents KDE SC 4.5.4.makc2010-12-031-2/+2 * KDE FreeBSD team presents KDE SC 4.5.3.makc2010-11-042-3/+5 * KDE FreeBSD team presents KDE SC 4.5.2.makc2010-10-062-3/+45 * Autotools update. Read ports/UPDATING 20100915 for details.ade2010-09-162-4/+2 * KDE FreeBSD team presents KDE SC 4.5.1.makc2010-09-032-376/+11 * Present KDE SC 4.4.5 for FreeBSD.makc2010-06-301-3/+3 * - Update to 1.2.11gabor2010-06-039-71/+57 * Present KDE SC 4.4.4 for FreeBSD.makc2010-06-021-3/+3 * - Update to 1.6.1gabor2010-06-013-5/+7 * Bounce PORTREVISION for gettext-related ports. Have fun, ya'll.ade2010-05-313-2/+3 * - The FreeBSD KDE team is pleased to announce KDE SC 4.4.3 for FreeBSDfluffy2010-05-113-33/+83 * - update to 1.4.1dinoex2010-03-283-2/+3 * Presenting KDE 4.3.5 for FreeBSD. The official release notes for thismiwi2010-02-073-4/+4 * - update to jpeg-8dinoex2010-02-053-2/+3 * The FreeBSD KDE is please to announce the release of KDE 4.3.4,miwi2009-12-022-3/+6 * The KDE FreeBSD team is proud to announce the release of KDE 4.3.3miwi2009-11-272-5/+34 * The FreeBSD KDE is please to announce the release of KDE 4.3.1,tabthorpe2009-09-022-5/+25 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-224-4/+5 * clean upmakc2009-08-081-3/+0 * The KDE FreeBSD team is proud to announce the release of KDE 4.3.0miwi2009-08-053-17/+41 * - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-313-0/+3 * The KDE FreeBSD team is pleased to announce KDE 4.2.4, the last bugfixmiwi2009-06-031-3/+3 * Update KDE ports to 4.2.3makc2009-05-102-3/+70 * The KDE FreeBSD team is proud to announce the release of KDE 4.2.2miwi2009-04-022-6/+28 * Update KDE to 4.2.1.makc2009-03-092-3/+6 * The KDE FreeBSD team is proud to announce the release of KDE 4.2.0miwi2009-02-092-24/+11 * - Update to 1.2.8gabor2009-02-086-16/+58 * - Update to 1.4gabor2009-02-082-4/+4 * kde@freebsd team is pleased to announce KDE 4.1.4, the last bugfix release in...makc2009-01-143-6/+9 * Turns out, libdata/pkgconfig/ is already part of mtree and needs neithermi2008-09-092-3/+1 * Fix the incorrect location hunspell.pc. No PORTREVISION bump, becausemi2008-09-091-1/+1 * Correct the destination of hunspell.pc file -- according to pav,mi2008-09-082-3/+3 * Add two directories missing from plist...mi2008-09-041-0/+2 * Upgrade from 1.2.2b to 1.2.7.mi2008-09-046-47/+73 * The KDE FreeBSD team is proud to announce the release of KDE 4.1.1miwi2008-09-032-5/+21 * The KDE FreeBSD team is proud to announce the releasemiwi2008-08-291-3/+3 * The KDE FreeBSD team is proud to announce the releasemiwi2008-08-182-10/+64 * The KDE FreeBSD team is proud to announce the release of KDE 4.1.0miwi2008-08-105-484/+244 * PHP Documentation in these language has been removed from the distribution.edwin2008-08-042-14/+0 * - Update MASTER_SITESgabor2008-07-122-2/+2 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-063-2/+3 * - Update to 1.3gabor2008-04-245-75/+41 * - Fix checking on LaTeX files on amd64gabor2008-04-242-0/+12 * - Update to 1.2.2bgabor2008-04-074-51/+25 * Update to KDE 3.5.8lofi2007-10-304-8/+6 * - Fix UTF-8 buggabor2007-10-073-0/+21 * - Update to 1.2.1gabor2007-09-284-99/+89 * - Update to 1.1.10gabor2007-08-283-5/+31 * - Update to 1.1.9gabor2007-08-014-8/+18 * - Update to 1.1.8gabor2007-07-214-19/+38 * Update to KDE 3.5.7 / KOffice 1.6.3lofi2007-07-048-29/+12 * BROKEN: Still broken on 6.x and abovekris2007-05-251-0/+2 * - Welcome X.org 7.2 \o/.flz2007-05-205-2/+5 * Remove BROKEN: This might be fixedkris2007-04-291-2/+0 * BROKEN: Does not installkris2007-03-251-0/+2 * Update to KDE 3.5.6 / KOffice 1.6.2lofi2007-03-147-11/+12 * Really normalize Aspell dictionaries ports PKGVERSION...thierry2007-02-151-1/+1 * Normalize Aspell dictionaries PKGNAMEs.thierry2007-01-141-0/+1 * Update to KDE 3.5.5 / KOffice 1.6.1lofi2006-12-205-10/+11 * - Update to 1.1.4miwi2006-11-105-71/+27 * KDE 3.5.4 / KOffice 1.5.2lofi2006-09-134-10/+10 * Now installs again.kris2006-08-171-2/+0 * Mark BROKEN: does not installerwin2006-08-041-0/+2 * Update to 1.0itetcu2006-08-013-43/+107 * All dictionaries can be installed separately:thierry2006-07-154-7/+15 * Update to KDE 3.5.3lofi2006-06-064-22/+20 * Update to KOffice 1.5.1lofi2006-05-272-4/+4 * remove USE_REINPLACE for all categories starting with Hedwin2006-05-081-1/+0 * Update to KOffice 1.5.0lofi2006-04-293-5/+8 * Update to KDE 3.5.2lofi2006-03-314-128/+22 * Update to KDE 3.5.1.lofi2006-02-014-6/+20 * SHA256ifyedwin2006-01-227-0/+8 * Update to KDE 3.5.0lofi2006-01-094-110/+48 * Remove the usage of 'misc' as a secondary category.linimon2005-11-102-2/+2 * Update to KDE 3.4.3 / KOffice 1.4.2lofi2005-11-055-8/+7 * Remove all the secondary port of editors/ooodict-allmaho2005-11-012-21/+0 * Fix index build by moving openoffice.org-1.1 ports.maho2005-08-291-1/+1 * Update to KDE 3.4.2 / KOffice 1.4.1lofi2005-08-014-7/+7 * Update to KOffice 1.4.0a.lofi2005-07-063-30/+7 * Remove openoffice.org localized ports as I announced:maho2005-06-292-16/+0 * Update to KDE 3.4.1lofi2005-06-264-10/+4 * - Unbreak and general updatepav2005-06-061-2/+2 * Added slave port of lang/php_doc for the Hungarian languageedwin2005-05-232-0/+14 * - Update to 1.0.R.2pav2005-05-203-25/+10 * Update to KDE 3.4lofi2005-03-214-62/+270 * - Update MASTER_SITES, WWWpav2005-02-162-2/+2 * - Update MASTER_SITES, WWWpav2005-02-162-2/+2 * Add i18nized doc subdirs to kdehier and adjust i18n port plists accordingly.lofi2004-12-232-2/+0 * - Use new support for plugin ports from textproc/jdictionaryhq2004-12-194-47/+10 * Fix some more plist nits.lofi2004-12-173-3/+0 * Fix kde3-i18n ports.lofi2004-12-162-4/+4 * Update to KDE 3.3.2lofi2004-12-149-13/+16 * Update to KDE 3.3.1lofi2004-11-084-7/+7 * Update to KDE 3.3lofi2004-08-317-21/+133 * Add slaves ports for Aspell's new dictionaries.thierry2004-08-293-0/+22 * Factor out all but one of the build switches of the KDE main module portslofi2004-08-112-3/+3 * Update to 1.0.R.1arved2004-08-102-4/+4 * Update to 1.0 RC1arved2004-08-104-45/+53 * Update to version 3.2.3lofi2004-06-102-4/+4 * Add hunspell 0.9.7, improved Hungarian spelling checker.thierry2004-05-208-0/+169 * Oops. Forgot the language categories.lofi2004-05-072-3/+3 * Update to KDE 3.2.2lofi2004-04-204-40/+18 * Remove category pkg/COMMENT files in favour of a COMMENT variable in thekris2004-04-022-1/+3 * SIZEify (maintainer timeout)trevor2004-03-315-0/+5 * Add Hungarian version of OpenOffice.orgmaho2004-03-212-0/+16 * Reorder those filesmat2004-03-211-5/+5 * Update to KDE 3.2.1 / QT 3.3.1lofi2004-03-105-4/+7 * Use PLIST_FILES (bento-tested, marcus-reviewed).trevor2004-02-064-2/+2 * Update to KDE 3.2.0lofi2004-02-059-479/+223 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-043-0/+3 * Add USE_GETTEXT and bump PORTREVISION.marcus2004-02-043-6/+6 * Now gettext 0.12.1 is gettext-old.trevor2004-01-243-3/+3 * [REPOCOPY WAITING] editors/ooodict-hu_HU port can moved to hungarian categoryedwin2004-01-162-1/+4 * Slave ports do not need to include the master category in CATEGORIES.linimon2003-11-151-1/+0 * OpenOffice -> OpenOffice.orgmaho2003-11-091-1/+1 * rename openoffice* to openoffice-1.0* accodingly (repo copy).maho2003-11-081-1/+1 * Translation update: fix checksum.will2003-09-222-2/+2 * Upgrade to Qt 3.2.1 / KDE 3.1.4. See x11/kde3/Makefile rev 1.64 for details.will2003-09-182-2/+2 * Update KDE to the latest official release, KDE 3.1.3lofi2003-07-294-2/+6 * Maintaner update of hungarian/ispell to version 0.99.3leeym2003-07-246-77/+224 * Update to KDE 3.1.2lioux2003-05-204-8/+8 * New port: localized messages and documentation for kofficelioux2003-05-205-0/+86 * Repo-move KDE I18N hebrew, hungarian, & vietnamese messages to theirwill2003-04-147-12/+5 * Clear moonlight beckons.ade2003-03-074-2/+2 * Remove pkg-comment from remaining master/slave port sets.ade2003-03-072-1/+1 * De-pkg-comment.knu2003-02-21