aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-selection-model-simple.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-03-25 16:17:15 +0800
committerChris Lahey <clahey@src.gnome.org>2001-03-25 16:17:15 +0800
commit1190e292f4e32be10c45ffd92e36eb62e8592a53 (patch)
tree51b03058290b93f1a416764c36b6159cc778723f /widgets/misc/e-selection-model-simple.c
parent2ed07fe856571d969c17c944e1fdb16740252b95 (diff)
downloadgsoc2013-evolution-1190e292f4e32be10c45ffd92e36eb62e8592a53.tar
gsoc2013-evolution-1190e292f4e32be10c45ffd92e36eb62e8592a53.tar.gz
gsoc2013-evolution-1190e292f4e32be10c45ffd92e36eb62e8592a53.tar.bz2
gsoc2013-evolution-1190e292f4e32be10c45ffd92e36eb62e8592a53.tar.lz
gsoc2013-evolution-1190e292f4e32be10c45ffd92e36eb62e8592a53.tar.xz
gsoc2013-evolution-1190e292f4e32be10c45ffd92e36eb62e8592a53.tar.zst
gsoc2013-evolution-1190e292f4e32be10c45ffd92e36eb62e8592a53.zip
Added e-selection-model-array.lo.
2001-03-25 Christopher James Lahey <clahey@ximian.com> * gal/Makefile.am (libgal_la_LIBADD): Added e-selection-model-array.lo. * gal/widgets/Makefile.am: Added e-selection-model-array.c and e-selection-model-array.h. * gal/widgets/e-selection-model-array.c, gal/widgets/e-selection-model-array.h: New class that implements the details of ESelectionModel. ESelectionModel has been refactored to just be a this virtual class. ESelectionModelArray is the original implementation of ESelectionModel. This is what most people will want to use or derive from. * gal/widgets/e-selection-model-simple.c, gal/widgets/e-selection-model-simple.h: Made the parent class of this be ESelectionModelArray instead of ESelectionModel. Changed some function names to match this change. * gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h: Refactored most of the implementation of this class into ESelectionModelArray. Now just a thin virtual class. From gal/e-table/ChangeLog: 2001-03-25 Christopher James Lahey <clahey@ximian.com> * e-table-selection-model.c, e-table-selection-model.h: Made the parent object of this be ESelectionModelArray instead of ESelectionModel due to their refactoring. Changed the commented out code for saving the selection a bit. svn path=/trunk/; revision=8924
Diffstat (limited to 'widgets/misc/e-selection-model-simple.c')
-rw-r--r--widgets/misc/e-selection-model-simple.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c
index 8b8329b7bb..bb20aafaf6 100644
--- a/widgets/misc/e-selection-model-simple.c
+++ b/widgets/misc/e-selection-model-simple.c
@@ -9,15 +9,16 @@
*/
#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_get_type ()
+#define PARENT_TYPE e_selection_model_array_get_type ()
-static ESelectionModel *parent_class;
+static ESelectionModelArray *parent_class;
-static gint esms_get_row_count (ESelectionModel *esm);
+static gint esms_get_row_count (ESelectionModelArray *esma);
static void
e_selection_model_simple_init (ESelectionModelSimple *selection)
@@ -28,13 +29,13 @@ e_selection_model_simple_init (ESelectionModelSimple *selection)
static void
e_selection_model_simple_class_init (ESelectionModelSimpleClass *klass)
{
- ESelectionModelClass *esm_class;
+ ESelectionModelArrayClass *esma_class;
parent_class = gtk_type_class (PARENT_TYPE);
- esm_class = E_SELECTION_MODEL_CLASS(klass);
+ esma_class = E_SELECTION_MODEL_ARRAY_CLASS(klass);
- esm_class->get_row_count = esms_get_row_count;
+ esma_class->get_row_count = esms_get_row_count;
}
E_MAKE_TYPE(e_selection_model_simple, "ESelectionModelSimple", ESelectionModelSimple,
@@ -58,18 +59,18 @@ e_selection_model_simple_set_row_count (ESelectionModelSimple *esms,
int row_count)
{
if (esms->row_count != row_count) {
- ESelectionModel *esm = E_SELECTION_MODEL(esms);
- g_free(esm->selection);
- esm->selection = NULL;
- esm->row_count = -1;
+ ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(esms);
+ g_free(esma->selection);
+ esma->selection = NULL;
+ esma->row_count = -1;
}
esms->row_count = row_count;
}
static gint
-esms_get_row_count (ESelectionModel *esm)
+esms_get_row_count (ESelectionModelArray *esma)
{
- ESelectionModelSimple *esms = E_SELECTION_MODEL_SIMPLE(esm);
+ ESelectionModelSimple *esms = E_SELECTION_MODEL_SIMPLE(esma);
return esms->row_count;
}
@@ -79,7 +80,7 @@ void e_selection_model_simple_insert_rows (ESelectionModelSimple *e
int count)
{
esms->row_count += count;
- e_selection_model_insert_rows (E_SELECTION_MODEL(esms), row, count);
+ e_selection_model_array_insert_rows (E_SELECTION_MODEL_ARRAY(esms), row, count);
}
void
@@ -88,7 +89,7 @@ e_selection_model_simple_delete_rows (ESelectionModelSimple *esms,
int count)
{
esms->row_count -= count;
- e_selection_model_delete_rows (E_SELECTION_MODEL(esms), row, count);
+ e_selection_model_array_delete_rows (E_SELECTION_MODEL_ARRAY(esms), row, count);
}
void
@@ -96,5 +97,5 @@ e_selection_model_simple_move_row (ESelectionModelSimple *esms,
int old_row,
int new_row)
{
- e_selection_model_move_row (E_SELECTION_MODEL(esms), old_row, new_row);
+ e_selection_model_array_move_row (E_SELECTION_MODEL_ARRAY(esms), old_row, new_row);
}