aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-selection-model-simple.c
blob: 80654e3097dacd3d8cc953735a1415ac5f0c5f03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * e-selection-model-simple.c: a Table Selection Model
 *
 * Author:
 *   Christopher James Lahey <clahey@ximian.com>
 *
 * (C) 2000, 2001 Ximian, Inc.
 */
#include <config.h>
#include <gal/util/e-util.h>
#include "e-selection-model-array.h"
#include "e-selection-model-simple.h"

#define ESMS_CLASS(e) ((ESelectionModelSimpleClass *)((GtkObject *)e)->klass)

#define PARENT_TYPE e_selection_model_array_get_type ()

static ESelectionModelArray *parent_class;

static gint esms_get_row_count (ESelectionModelArray *esma);

static void
e_selection_model_simple_init (ESelectionModelSimple *selection)
{
    selection->row_count = 0;
}

static void
e_selection_model_simple_class_init (ESelectionModelSimpleClass *klass)
{
    ESelectionModelArrayClass *esma_class;

    parent_class             = gtk_type_class (PARENT_TYPE);

    esma_class                = E_SELECTION_MODEL_ARRAY_CLASS(klass);

    esma_class->get_row_count = esms_get_row_count;
}

E_MAKE_TYPE(e_selection_model_simple, "ESelectionModelSimple", ESelectionModelSimple,
        e_selection_model_simple_class_init, e_selection_model_simple_init, PARENT_TYPE);

/** 
 * e_selection_model_simple_new
 *
 * This routine creates a new #ESelectionModelSimple.
 *
 * Returns: The new #ESelectionModelSimple.
 */
ESelectionModelSimple *
e_selection_model_simple_new (void)
{
    return gtk_type_new (e_selection_model_simple_get_type ());
}

void
e_selection_model_simple_set_row_count (ESelectionModelSimple *esms,
                    int row_count)
{
    if (esms->row_count != row_count) {
        ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(esms);
        if (esma->eba)
            gtk_object_unref(GTK_OBJECT(esma->eba));
        esma->eba = NULL;
    }
    esms->row_count = row_count;
}

static gint
esms_get_row_count (ESelectionModelArray *esma)
{
    ESelectionModelSimple *esms = E_SELECTION_MODEL_SIMPLE(esma);

    return esms->row_count;
}

void      e_selection_model_simple_insert_rows         (ESelectionModelSimple *esms,
                            int                    row,
                            int                    count)
{
    esms->row_count += count;
    e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY(esms), row, count);
}

void
e_selection_model_simple_delete_rows          (ESelectionModelSimple *esms,
                           int                    row,
                           int                    count)
{
    esms->row_count -= count;
    e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY(esms), row, count);
}

void
e_selection_model_simple_move_row            (ESelectionModelSimple *esms,
                          int                    old_row,
                          int                    new_row)
{
    e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY(esms), old_row, new_row);
}
ports-gnome/commit/textproc?h=gstreamer0.10-removal&id=d6b2883ba5291e98d4bb87a8649c5dfb142367fe'>- Update to 0.98.2jylefort2005-05-032-10/+9 * - Update to 0.10jylefort2005-05-033-7/+7 * Update to 0.9.2jylefort2005-05-033-3/+5 * Update to version 0.4.0krion2005-05-033-7/+8 * Update the Danish ispell database from 1.43 to 1.49, 1.43 was no longerjesper2005-05-023-11/+11 * Fix build of textproc/py-syck by using -fPIC in CFLAGS.krion2005-05-021-0/+1 * requires perl > 5.6ijliao2005-05-021-1/+7 * Add an explicit 'exit 0'; xmlcatmgr may return a non-zero exit code ifdes2005-05-012-2/+4 * Mark IGNORE on 4.x: the library is built, but cannot be used:thierry2005-05-011-0/+4 * - remove *.orig and unbreak this port on 4.xleeym2005-04-301-5/+8 * - Update to 1.2.28ahze2005-04-283-32/+33 * . pre-install -> pre-su-install so this port is installable by a non-rootglewis2005-04-281-1/+1 * add p5-XML-Parser-Lite-Tree 0.03ijliao2005-04-275-0/+44 * Use MAKE_ARGS instead of patchvs2005-04-262-43/+5 * - Use MAKE_ARGSvs2005-04-263-18/+1 * - Use MAKE_ARGS instead of patchvs2005-04-263-21/+1 * Use PLIST_FILES/PORTDOCSvs2005-04-262-8/+5 * Use variablesvs2005-04-263-20/+4 * Use MAKE_ARGS & SUB_FILES=pkg-messagevs2005-04-263-31/+4 * Update to 2.13skv2005-04-253-7/+5 * Update to 1.08skv2005-04-252-3/+3 * Use libtool-1.5 (with required plist fix).kuriyama2005-04-242-1/+3 * Reset undeliverable maintainer address:kris2005-04-241-1/+1 * Update to 1.70, which has better heuristics to recognize thefenner2005-04-242-3/+3 * - update to 0.07clsung2005-04-232-3/+3 * add re_graph 0.2ijliao2005-04-224-0/+63 * Mark as BROKEN: Not compatible with latest GHC yetvs2005-04-222-0/+4 * Use MAKE_ARGSvs2005-04-212-25/+3 * - Fix BUILD_DEPENDS.flz2005-04-211-1/+3 * - Update to 2.69pav2005-04-202-3/+3 * Add p5-Text-ASCIITable 0.15, create a nice formatted table using ASCIIlth2005-04-205-0/+38 * - Track updated distfile, which has changed in-place (added XMLVersionjylefort2005-04-182-7/+5 * Update to 1.2.7.jylefort2005-04-182-3/+7 * * update to 2.0.11skv2005-04-184-973/+98 * Add docbook-xml-440 4.4,skv2005-04-184-0/+87 * - Update to 1.0b1pav2005-04-177-1684/+3447 * - Add py-twistedFlow, Documentation generator with HTML and LaTeX support.flz2005-04-155-0/+133 * Update to 0.9.1vs2005-04-143-21/+12 * Remove p5-Sort-PolySort.tobez2005-04-141-1/+0 * * Fixes HTTP charset parsing.jylefort2005-04-143-1/+86 * Change my MAINTAINER email address to jylefort@FreeBSD.orgjylefort2005-04-134-4/+4 * - Fix issues with monochrome terminals.flz2005-04-123-9/+23 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-1234-35/+35 * New port: textproc/pear-XML_Wddx PEAR Wddx pretty serializer and deserializerpav2005-04-124-0/+42 * - Change maintainer's email address.flz2005-04-121-1/+1 * PEAR::XML_Beautifier will add indentation and linebreaks to you XML files,pav2005-04-124-0/+37 * PEAR::XML_HTMLSax provides an API very similar to the native PHP XMLpav2005-04-124-0/+44 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-1134-35/+35 * BROKEN: Incorrect pkg-plistkris2005-04-111-0/+2 * BROKEN on 4.x: Does not compilekris2005-04-112-2/+14 * Now builds on amd64kris2005-04-111-4/+0 * Unbreak on FreeBSD-4.11.thierry2005-04-112-1/+20 * Ruby-htmltools tools for parsing and manipulating HTML text in Ruby.pav2005-04-106-0/+99 * - Update to 3.01pav2005-04-102-3/+3 * - Reflect plist changes in gauche portpav2005-04-092-1/+1 * - Update distinfopav2005-04-092-4/+3 * - Raise PORTREVISION for previous commitpav2005-04-091-0/+1 * - Unbreak, unversioned distfile was updated.pav2005-04-095-735/+752 * - Unbreak (unversioned distfile):pav2005-04-093-10/+7 * Use pre-su-install instead of pre-install.jmz2005-04-091-1/+1 * Remove deprecated and expired devel/p5-Server-FastPL,tobez2005-04-084-40/+0 * - Install docsnovel2005-04-082-3/+135 * Fix plist, dump portrevision.kwm2005-04-072-0/+4 * - Unbreak by fixing pkg-plist: the port was removing a dir listed inhq2005-04-072-3/+1 * [Maintainer Update] Update to 1.29.fenner2005-04-074-15/+13 * Update to 0.9.88arved2005-04-064-26/+53 * - patch that make '>' encoded to '&gt;'clsung2005-04-062-0/+11 * Remove dependencies on p5-Test-*, sinceclsung2005-04-051-9/+2 * - Update to 0.41lth2005-04-052-4/+6 * Update to 3.3vs2005-04-054-26/+63 * Update to 0.03lth2005-04-052-3/+3 * Update to 0.03.tobez2005-04-054-6/+6 * Update to 1.63: updates for use with xml2rfc 1.29fenner2005-04-052-3/+3 * Update to 0.41erwin2005-04-044-6/+6 * - update to 0.06clsung2005-04-042-3/+3 * - update to 0.12clsung2005-04-042-3/+3 * - Update to 0.2.0ahze2005-04-044-8/+8 * - Unbreak on arch != i386sem2005-04-042-7/+30 * Add p5-PPI-HTML 0.02, generate syntax-hightlighted HTML for Perl usinglth2005-04-035-0/+51 * Add p5-PPI 0.903, analyze and manipulate Perl code without using perllth2005-04-035-0/+151 * Update to 1.1.14.marcus2005-04-032-3/+3 * Update to 2.6.19.marcus2005-04-032-3/+3 * - Update to 1.2.27ahze2005-04-032-4/+5 * Update to 2.12skv2005-04-023-3/+4 * Update to 1.08lth2005-04-024-6/+34 * Unbreak: add a mirrorhq2005-03-301-3/+2 * BROKEN on !i386: Does not compilekris2005-03-271-1/+7 * BROKEN: Incorrect pkg-plistkris2005-03-271-0/+2 * BROKEN: Unfetchablekris2005-03-271-0/+2 * Fixed iiimf-related ports build faildaichi2005-03-252-6/+27 * - update to 1.2.0clsung2005-03-223-11/+24 * Fix the build.mezz2005-03-221-0/+2 * Update to 0.1.1skv2005-03-222-7/+5 * - Update to 1.0.0.2pav2005-03-215-41/+12 * Update to 3.17mat2005-03-213-3/+4 * Properly depend this port on linux_base.joerg2005-03-193-3/+3 * Update to 0.40.98erwin2005-03-184-6/+6 * Update to 2.120.tobez2005-03-182-3/+3 * - Update to 0.40.97erwin2005-03-186-6/+52 * Reset maintainer to ports@FreeBSD.orgskv2005-03-182-3/+1 * Updated to 1.07skv2005-03-172-3/+3 * - Chase libver of scimahze2005-03-171-2/+2 * Resolve conflict between lang/perl5(.8)? and textproc/p5-podlators.skv2005-03-171-10/+9 * Resolve conflict between lang/perl5(.8)? and textproc/p5-PodParser.skv2005-03-172-18/+18 * Fix build if teTeX is present.vs2005-03-162-1/+12 * - update to 0.531clsung2005-03-162-3/+3 * Add missing '\' to end of line. Should fix INDEX builds.adamw2005-03-161-1/+1 * - Update to 2.68clsung2005-03-162-3/+4 * - Add a MASTER_SITES (bsdchat.com)clsung2005-03-161-0/+1 * - Add p5-IO-CSVHeaderFile 0.03, a Perl module to automate reads from CSVflz2005-03-165-0/+40 * - update to 0.19clsung2005-03-153-4/+8 * Update to 1.1.13.marcus2005-03-152-4/+3 * Update to 2.6.18.marcus2005-03-153-3/+5 * - update to 1.4.3clsung2005-03-142-3/+3 * - update to 1.35clsung2005-03-142-3/+3 * - Sync with libscim shared library version bump.nobutaka2005-03-132-2/+3 * Update to 2.10.0. Note: this release is API and ABI compatible withmarcus2005-03-123-9/+271 * Bump PORTREVISION to chase the glib20 shared lib version change.marcus2005-03-1235-16/+35 * Presenting GNOME 2.10 for FreeBSD!marcus2005-03-129-0/+293 * New port for py-zpt, which is a version of Zope Page Templates that does notpav2005-03-125-0/+113 * emacs-wiki enables you to create and use hyperlinks and simple formatting inpav2005-03-125-0/+91 * Read XML data into Lisp structures, and allow those same List structurespav2005-03-125-0/+44 * Update to 0.40.96erwin2005-03-104-6/+6 * - upgrade to 1.07, fix plist, and unbreak this portleeym2005-03-104-6/+8 * Update to 0.7.3lioux2005-03-102-3/+3 * - Update to 1.8.7.flz2005-03-102-4/+4 * Update to 1.06skv2005-03-092-3/+3 * Add p5-Text-Aspell 0.04, perl interface to the GNU Aspell library.ahze2005-03-095-0/+42 * - Update to 0.8.0 (use libmba 0.8.10)barner2005-03-094-46/+53 * - Update to 1.9.0vs2005-03-086-57/+204 * - Remove gnomeprefix from USE_GNOME to fix plist for gnome 2.10ahze2005-03-081-1/+1 * - update to 1.4.3clsung2005-03-072-3/+3 * - This port will add real people text to speech functionalityclsung2005-03-075-0/+21117 * - This is the im engine for scim table based input methods.clsung2005-03-0710-0/+166 * Update to 2.0.10.marcus2005-03-076-6/+8 * - Fix dependency on devel/icu.flz2005-03-073-6/+9 * - Chase ImageMagick shlib bumppav2005-03-071-2/+2 * Drop maintainershiplioux2005-03-052-2/+2 * IIIMF-related ports: I have forgotten to add two patchesdaichi2005-03-042-0/+72 * IIIMF-related ports some changes:daichi2005-03-04107-1084/+883 * Remove the now-redundant MTREE file selection code. This is handled inmarcus2005-03-041-9/+1 * - update to 1.34clsung2005-03-042-3/+3 * Add p5-Regexp-Log-Common, a regexp parser for the common log format.tobez2005-03-035-0/+46 * Add p5-Regexp-Log, a base Perl class for log files regexp builders.tobez2005-03-035-0/+41 * Update to 0.3.2. Changes between 0.3.1 and 0.3.2:hrs2005-03-035-11/+86 * Update to 0.08lth2005-03-022-3/+3 * Remove patch-xim:xim.h to fix patch error.nobutaka2005-03-021-10/+0 * - Update to 1.2.0ahze2005-03-025-68/+45 * - skip pod2html under perl 5.6 or aboveleeym2005-03-022-15/+29 * Respect the user's USE_LINUX setting.trevor2005-03-024-4/+4 * Don't make ${X11BASE}/lib/gtk-2.0/2.4.0/immodules directory if gtk2nobutaka2005-03-021-0/+27 * - Update to 0.4.6.nobutaka2005-03-023-15/+65 * Add missed dependency on liblzxcomp.skv2005-03-011-0/+3 * Look very scared and update to 0.33.kwm2005-03-012-4/+4 * fixed to build IIIMF-related ports on 4-stabledaichi2005-02-2810-0/+10 * Add hhm 0.1, HTML Help Maker.skv2005-02-285-0/+49 * BROKEN: Size mismatchkris2005-02-284-0/+8 * BROKEN: Size mismatch.kris2005-02-281-0/+2 * Drive-by commit to unbreak from kris' autobreaker scriptade2005-02-282-2/+3 * IIIMF-related ports: Update to r12_1-svn2002 and bug fixesdaichi2005-02-28145