[evolution-patches] Patch for trunk, fixing bug #51626: can't navigate to the Click to add a task area by Tab Key
- From: Bruce Tao <bruce tao sun com>
- To: evolution-patches lists ximian com
- Cc: jpr ximian com, mkestner ximian com
- Subject: [evolution-patches] Patch for trunk, fixing bug #51626: can't navigate to the Click to add a task area by Tab Key
- Date: Thu, 01 Apr 2004 21:54:19 -0500
When you navigate into the area which displays the tasks, you can first
enter the "Click to add .." item and
begin to fill it if necessary. And by pressing Ctrl+Tab you can jump out
of the "Click to add .." row and navigate
to the first existing task.
The patch enclosed contains modifications across three files under
gal/e-table/.
But I believe that it doesn't affect any other functionalities of the
whole application.
Please check it , thanks !
Best wishes from Bruce Tao. 8-)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/ChangeLog,v
retrieving revision 1.925
diff -u -r1.925 ChangeLog
--- ChangeLog 10 Mar 2004 06:28:46 -0000 1.925
+++ ChangeLog 1 Apr 2004 13:27:01 -0000
@@ -1,3 +1,19 @@
+2004-04-01 Bruce Tao <bruce tao sun com>
+
+ Fixes #51626
+
+ * e-table-click-to-add.c: (etcta_event): Add an entry for
+ focus_in event, do the same thing as button_press event.
+
+ * e-table-item.c: (eti_event): When pressing Ctrl+Tab in the
+ click-to-add item, do nothing but only pass the event to some
+ other functions in e-table.c.
+
+ * e-table.c: (table_canvas_focus_event_cb), (click_to_add_event),
+ (e_table_setup_table): Focus first the click-to-add item when the
+ canvas is being focused. Then if the user press Ctrl+Tab, focus the
+ first existing task.
+
2004-03-10 Hao Sheng <hao sheng sun com>
Fixes #55198
Index: e-table-click-to-add.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-table-click-to-add.c,v
retrieving revision 1.37
diff -u -r1.37 e-table-click-to-add.c
--- e-table-click-to-add.c 17 Dec 2003 02:35:20 -0000 1.37
+++ e-table-click-to-add.c 1 Apr 2004 13:27:04 -0000
@@ -348,6 +348,10 @@
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
switch (e->type){
+ case GDK_FOCUS_CHANGE:
+ if (!e->focus_change.in)
+ return FALSE;
+
case GDK_BUTTON_PRESS:
if (etcta->text) {
gtk_object_destroy(etcta->text);
Index: e-table-item.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-table-item.c,v
retrieving revision 1.233
diff -u -r1.233 e-table-item.c
--- e-table-item.c 26 Feb 2004 11:45:52 -0000 1.233
+++ e-table-item.c 1 Apr 2004 13:27:14 -0000
@@ -2682,6 +2682,10 @@
case GDK_Tab:
case GDK_KP_Tab:
case GDK_ISO_Left_Tab:
+ if ((e->key.state & GDK_CONTROL_MASK) != 0) {
+ return_val = FALSE;
+ break;
+ }
if (eti->cursor_mode == E_CURSOR_SPREADSHEET) {
if ((e->key.state & GDK_SHIFT_MASK) != 0){
/* shift tab */
Index: e-table.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-table.c,v
retrieving revision 1.228
diff -u -r1.228 e-table.c
--- e-table.c 2 Dec 2003 07:55:14 -0000 1.228
+++ e-table.c 1 Apr 2004 13:27:27 -0000
@@ -1117,12 +1117,42 @@
etable = E_TABLE (data);
- if (!canvas->focused_item && etable->group)
- focus_first_etable_item (etable->group);
+ //if (!canvas->focused_item && etable->group)
+ //focus_first_etable_item (etable->group);
+ gnome_canvas_item_grab_focus (etable->canvas_vbox);
+ gnome_canvas_item_grab_focus (etable->click_to_add);
return TRUE;
}
+static gboolean
+click_to_add_event (ETableClickToAdd *etcta, GdkEvent *e, ETable *et)
+{
+ GnomeCanvas *canvas;
+
+ canvas = GNOME_CANVAS (et->table_canvas);
+ switch (e->type) {
+ case GDK_KEY_PRESS:
+ switch (e->key.keyval) {
+ case GDK_Tab:
+ case GDK_KP_Tab:
+ case GDK_ISO_Left_Tab:
+ if (e->key.state & GDK_CONTROL_MASK) {
+ if (et->group)
+ focus_first_etable_item (et->group);
+ break;
+ }
+
+ default:
+ return FALSE;
+ }
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
static void
e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *header,
ETableModel *model)
@@ -1209,7 +1239,10 @@
e_canvas_vbox_add_item_start (
E_CANVAS_VBOX(e_table->canvas_vbox),
e_table->click_to_add);
-
+
+ g_signal_connect (
+ G_OBJECT (e_table->click_to_add), "event",
+ G_CALLBACK (click_to_add_event), e_table);
g_signal_connect (
G_OBJECT (e_table->click_to_add), "cursor_change",
G_CALLBACK (click_to_add_cursor_change), e_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]