aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-02-24 16:23:00 +0800
committerChris Lahey <clahey@src.gnome.org>2000-02-24 16:23:00 +0800
commit8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d (patch)
treed55e4f63c6a61ac005093371c89de54ac7b4d391 /widgets
parent71c2274c7a0a99096ca05d63c9bf41cc6eb3295b (diff)
downloadgsoc2013-evolution-8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d.tar
gsoc2013-evolution-8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d.tar.gz
gsoc2013-evolution-8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d.tar.bz2
gsoc2013-evolution-8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d.tar.lz
gsoc2013-evolution-8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d.tar.xz
gsoc2013-evolution-8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d.tar.zst
gsoc2013-evolution-8fb12c9538858bbfdaa6e74f8c08c6f86acbe66d.zip
Made keyboard focus navigation work across groups.
2000-02-24 Christopher James Lahey <clahey@helixcode.com> * e-table-item.c: Made keyboard focus navigation work across groups. * e-table-header.c: Made e_table_header_col_diff not crash if you give it a column less than 0 (it truncates negative column values to 0.) * e-table-group.c, e-table-group.h: Added e_table_group_get_header to get the ETableHeader for this ETableGroup. * e-table-group-container.c: Made shift tab work. svn path=/trunk/; revision=1917
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-table/ChangeLog14
-rw-r--r--widgets/e-table/e-table-group-container.c4
-rw-r--r--widgets/e-table/e-table-group.c9
-rw-r--r--widgets/e-table/e-table-group.h1
-rw-r--r--widgets/e-table/e-table-header.c8
-rw-r--r--widgets/e-table/e-table-item.c2
-rw-r--r--widgets/table/e-table-group-container.c4
-rw-r--r--widgets/table/e-table-group.c9
-rw-r--r--widgets/table/e-table-group.h1
-rw-r--r--widgets/table/e-table-header.c8
-rw-r--r--widgets/table/e-table-item.c2
11 files changed, 54 insertions, 8 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index b231b5cee1..e4caa9707c 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,5 +1,19 @@
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
+ * e-table-item.c: Made keyboard focus navigation work across
+ groups.
+
+ * e-table-header.c: Made e_table_header_col_diff not crash if you
+ give it a column less than 0 (it truncates negative column values
+ to 0.)
+
+ * e-table-group.c, e-table-group.h: Added e_table_group_get_header
+ to get the ETableHeader for this ETableGroup.
+
+ * e-table-group-container.c: Made shift tab work.
+
+2000-02-24 Christopher James Lahey <clahey@helixcode.com>
+
* e-table-item.c: Made changing focus work.
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
diff --git a/widgets/e-table/e-table-group-container.c b/widgets/e-table/e-table-group-container.c
index a9f494db04..634d7934ef 100644
--- a/widgets/e-table/e-table-group-container.c
+++ b/widgets/e-table/e-table-group-container.c
@@ -416,6 +416,10 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
ETableGroup *child = child_node->child;
if (e_table_group_get_focus(child)) {
old_col = e_table_group_get_focus_column(child);
+ if ( old_col == -1 )
+ old_col = 0;
+ if ( start_col == -1 )
+ start_col = e_table_header_count(e_table_group_get_header(child)) - 1;
if (direction == E_FOCUS_END)
list = list->prev;
diff --git a/widgets/e-table/e-table-group.c b/widgets/e-table/e-table-group.c
index 68bc3e7abf..1f4e2037cd 100644
--- a/widgets/e-table/e-table-group.c
+++ b/widgets/e-table/e-table-group.c
@@ -205,6 +205,15 @@ e_table_group_resize (ETableGroup *e_table_group)
etg_signals [RESIZE]);
}
+ETableHeader *
+e_table_group_get_header (ETableGroup *etg)
+{
+ g_return_val_if_fail (etg != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (etg), NULL);
+
+ return etg->header;
+}
+
static int
etg_event (GnomeCanvasItem *item, GdkEvent *event)
{
diff --git a/widgets/e-table/e-table-group.h b/widgets/e-table/e-table-group.h
index 1b3f346290..0dd62eb125 100644
--- a/widgets/e-table/e-table-group.h
+++ b/widgets/e-table/e-table-group.h
@@ -71,6 +71,7 @@ void e_table_group_set_focus (ETableGroup *etg,
gint view_col);
gboolean e_table_group_get_focus (ETableGroup *etg);
gint e_table_group_get_focus_column (ETableGroup *etg);
+ETableHeader *e_table_group_get_header (ETableGroup *etg);
ETableCol *e_table_group_get_ecol (ETableGroup *etg);
ETableGroup *e_table_group_new (GnomeCanvasGroup *parent,
diff --git a/widgets/e-table/e-table-header.c b/widgets/e-table/e-table-header.c
index af3989beff..91aa366932 100644
--- a/widgets/e-table/e-table-header.c
+++ b/widgets/e-table/e-table-header.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* E-table-col-head.c: TableColHead implementation
*
@@ -328,13 +329,14 @@ e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col)
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
{
- const int max_col = eth->col_count;
+ if ( start_col < 0 )
+ start_col = 0;
+ if ( end_col > eth->col_count )
+ end_col = eth->col_count - 1;
total = 0;
for (col = start_col; col < end_col; col++){
- if (col == max_col)
- break;
total += eth->columns [col]->width;
}
}
diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c
index 6c1dd1d07f..286b1a8352 100644
--- a/widgets/e-table/e-table-item.c
+++ b/widgets/e-table/e-table-item.c
@@ -1083,7 +1083,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
default:
return_val = FALSE;
}
- return TRUE;
+ return return_val;
}
/*
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index a9f494db04..634d7934ef 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -416,6 +416,10 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
ETableGroup *child = child_node->child;
if (e_table_group_get_focus(child)) {
old_col = e_table_group_get_focus_column(child);
+ if ( old_col == -1 )
+ old_col = 0;
+ if ( start_col == -1 )
+ start_col = e_table_header_count(e_table_group_get_header(child)) - 1;
if (direction == E_FOCUS_END)
list = list->prev;
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 68bc3e7abf..1f4e2037cd 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -205,6 +205,15 @@ e_table_group_resize (ETableGroup *e_table_group)
etg_signals [RESIZE]);
}
+ETableHeader *
+e_table_group_get_header (ETableGroup *etg)
+{
+ g_return_val_if_fail (etg != NULL, NULL);
+ g_return_val_if_fail (E_IS_TABLE_GROUP (etg), NULL);
+
+ return etg->header;
+}
+
static int
etg_event (GnomeCanvasItem *item, GdkEvent *event)
{
diff --git a/widgets/table/e-table-group.h b/widgets/table/e-table-group.h
index 1b3f346290..0dd62eb125 100644
--- a/widgets/table/e-table-group.h
+++ b/widgets/table/e-table-group.h
@@ -71,6 +71,7 @@ void e_table_group_set_focus (ETableGroup *etg,
gint view_col);
gboolean e_table_group_get_focus (ETableGroup *etg);
gint e_table_group_get_focus_column (ETableGroup *etg);
+ETableHeader *e_table_group_get_header (ETableGroup *etg);
ETableCol *e_table_group_get_ecol (ETableGroup *etg);
ETableGroup *e_table_group_new (GnomeCanvasGroup *parent,
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index af3989beff..91aa366932 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* E-table-col-head.c: TableColHead implementation
*
@@ -328,13 +329,14 @@ e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col)
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
{
- const int max_col = eth->col_count;
+ if ( start_col < 0 )
+ start_col = 0;
+ if ( end_col > eth->col_count )
+ end_col = eth->col_count - 1;
total = 0;
for (col = start_col; col < end_col; col++){
- if (col == max_col)
- break;
total += eth->columns [col]->width;
}
}
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 6c1dd1d07f..286b1a8352 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1083,7 +1083,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
default:
return_val = FALSE;
}
- return TRUE;
+ return return_val;
}
/*