aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-07-27 23:07:47 +0800
committerChris Lahey <clahey@src.gnome.org>2000-07-27 23:07:47 +0800
commit5f04bddb8e129ff6c56955359aa1b3b6db2a9587 (patch)
treee6cf508c52e1dd033147d2419c5a856169c737c8
parent86b1bd7f21c3024437375e656e75738423e85335 (diff)
downloadgsoc2013-evolution-5f04bddb8e129ff6c56955359aa1b3b6db2a9587.tar
gsoc2013-evolution-5f04bddb8e129ff6c56955359aa1b3b6db2a9587.tar.gz
gsoc2013-evolution-5f04bddb8e129ff6c56955359aa1b3b6db2a9587.tar.bz2
gsoc2013-evolution-5f04bddb8e129ff6c56955359aa1b3b6db2a9587.tar.lz
gsoc2013-evolution-5f04bddb8e129ff6c56955359aa1b3b6db2a9587.tar.xz
gsoc2013-evolution-5f04bddb8e129ff6c56955359aa1b3b6db2a9587.tar.zst
gsoc2013-evolution-5f04bddb8e129ff6c56955359aa1b3b6db2a9587.zip
Allocate correctly in the insert method.
2000-07-27 Christopher James Lahey <clahey@helixcode.com> * e-table-selection-model.c: Allocate correctly in the insert method. * e-table-click-to-add.c: Removed the line that was causing this to do bad things. svn path=/trunk/; revision=4385
-rw-r--r--widgets/e-table/ChangeLog7
-rw-r--r--widgets/e-table/e-table-click-to-add.c4
-rw-r--r--widgets/e-table/e-table-selection-model.c6
-rw-r--r--widgets/table/e-table-click-to-add.c4
-rw-r--r--widgets/table/e-table-selection-model.c6
5 files changed, 13 insertions, 14 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index df302f38e5..53a06afd09 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,5 +1,12 @@
2000-07-27 Christopher James Lahey <clahey@helixcode.com>
+ * e-table-selection-model.c: Allocate correctly in the insert method.
+
+ * e-table-click-to-add.c: Removed the line that was causing this
+ to do bad things.
+
+2000-07-27 Christopher James Lahey <clahey@helixcode.com>
+
* e-table-item.c (eti_cursor_change): Grab focus properly.
* e-table-item.c, e-table-click-to-add.c: Fixed ETableClickToAdd
diff --git a/widgets/e-table/e-table-click-to-add.c b/widgets/e-table/e-table-click-to-add.c
index 0a4ba21f81..ed22b5117c 100644
--- a/widgets/e-table/e-table-click-to-add.c
+++ b/widgets/e-table/e-table-click-to-add.c
@@ -103,10 +103,6 @@ etcta_drop_one (ETableClickToAdd *etcta)
gtk_object_set(GTK_OBJECT(etcta->selection),
"model", NULL,
NULL);
- if (etcta->row)
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(etcta->row),
- "ETableModel", NULL,
- NULL);
}
static void
diff --git a/widgets/e-table/e-table-selection-model.c b/widgets/e-table/e-table-selection-model.c
index b82d3c3a5e..c6b7485608 100644
--- a/widgets/e-table/e-table-selection-model.c
+++ b/widgets/e-table/e-table-selection-model.c
@@ -47,7 +47,7 @@ model_changed(ETableModel *etm, ETableSelectionModel *etsm)
e_table_selection_model_clear(etsm);
}
-#if 1
+#if 0
static void
model_row_inserted(ETableModel *etm, int row, ETableSelectionModel *etsm)
{
@@ -56,7 +56,7 @@ model_row_inserted(ETableModel *etm, int row, ETableSelectionModel *etsm)
if(etsm->row_count >= 0) {
/* Add another word if needed. */
if ((etsm->row_count & 0x1f) == 0) {
- etsm->selection = g_realloc(etsm->selection, (etsm->row_count >> 5) + 1);
+ etsm->selection = g_renew(etsm->selection, gint, (etsm->row_count >> 5) + 1);
etsm->selection[etsm->row_count >> 5] = 0;
}
@@ -101,7 +101,7 @@ model_row_deleted(ETableModel *etm, int row, ETableSelectionModel *etsm)
etsm->row_count --;
/* Remove the last word if not needed. */
if ((etsm->row_count & 0x1f) == 0) {
- etsm->selection = g_realloc(etsm->selection, etsm->row_count >> 5);
+ etsm->selection = g_renew(etsm->selection, gint, etsm->row_count >> 5);
}
}
}
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 0a4ba21f81..ed22b5117c 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -103,10 +103,6 @@ etcta_drop_one (ETableClickToAdd *etcta)
gtk_object_set(GTK_OBJECT(etcta->selection),
"model", NULL,
NULL);
- if (etcta->row)
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(etcta->row),
- "ETableModel", NULL,
- NULL);
}
static void
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index b82d3c3a5e..c6b7485608 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -47,7 +47,7 @@ model_changed(ETableModel *etm, ETableSelectionModel *etsm)
e_table_selection_model_clear(etsm);
}
-#if 1
+#if 0
static void
model_row_inserted(ETableModel *etm, int row, ETableSelectionModel *etsm)
{
@@ -56,7 +56,7 @@ model_row_inserted(ETableModel *etm, int row, ETableSelectionModel *etsm)
if(etsm->row_count >= 0) {
/* Add another word if needed. */
if ((etsm->row_count & 0x1f) == 0) {
- etsm->selection = g_realloc(etsm->selection, (etsm->row_count >> 5) + 1);
+ etsm->selection = g_renew(etsm->selection, gint, (etsm->row_count >> 5) + 1);
etsm->selection[etsm->row_count >> 5] = 0;
}
@@ -101,7 +101,7 @@ model_row_deleted(ETableModel *etm, int row, ETableSelectionModel *etsm)
etsm->row_count --;
/* Remove the last word if not needed. */
if ((etsm->row_count & 0x1f) == 0) {
- etsm->selection = g_realloc(etsm->selection, etsm->row_count >> 5);
+ etsm->selection = g_renew(etsm->selection, gint, etsm->row_count >> 5);
}
}
}