[evolution-patches] patch for #41830 in bugzilla
- From: sh sh <hs150204 sun com>
- To: hpj ximian com
- Cc: evolution-patches ximian com
- Subject: [evolution-patches] patch for #41830 in bugzilla
- Date: Mon, 15 Nov 2004 21:04:40 +0800
hi, hpj
Attach is a patch for #41830 in bugzilla.ximian.com .
Would you like to spend a little time to review it, please?
Best regards
hao.sheng
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/ChangeLog,v
retrieving revision 1.900
diff -u -p -r1.900 ChangeLog
--- ChangeLog 10 Oct 2004 21:12:05 -0000 1.900
+++ ChangeLog 15 Nov 2004 13:00:39 -0000
@@ -1,3 +1,13 @@
+2004-11-15 Hao Sheng <hao sheng sun com>
+
+ * gal/widgets/e-categories.c:
+ (e_categories_rebuild): grab the focus on the cell of the Etable
+ again after rebuilt the e-categories.
+ (focus_current_etable_item): Finds the current descendant of the group
+ that is an ETableItem and focuses it.
+ (e_categories_has_save_id): return false and make the Etable widget
+ can't be focused.
+
2004-10-10 Malcolm Tredinnick <malcolm commsecure com au>
* configure.in: Remove redundant call to AC_PROG_INTLTOOL and
Index: gal/widgets/e-categories.c
===================================================================
RCS file: /cvs/gnome/gal/gal/widgets/e-categories.c,v
retrieving revision 1.35
diff -u -p -r1.35 e-categories.c
--- gal/widgets/e-categories.c 10 Jun 2004 17:01:14 -0000 1.35
+++ gal/widgets/e-categories.c 15 Nov 2004 13:00:48 -0000
@@ -78,6 +78,7 @@ static gboolean e_categories_value_is_em
static char * e_categories_value_to_string (ETableModel *etc, int col, const void *value, gpointer data);
static void e_categories_toggle (ECategories *categories, int row);
static void e_categories_rebuild (ECategories *categories);
+static void focus_current_etable_item (ETableGroup *group, int row);
#define PARENT_TYPE GTK_TYPE_DIALOG
static GtkDialogClass *parent_class = NULL;
@@ -462,6 +463,7 @@ table_click (ETable *table, int row, int
if (col == 1) {
categories->priv->selected_list[row] = !categories->priv->selected_list[row];
e_categories_rebuild (categories);
+ focus_current_etable_item (E_TABLE_GROUP(categories->priv->table->group), row);
}
return TRUE;
}
@@ -731,6 +733,29 @@ e_categories_value_at (ETableModel *etc,
return categories->priv->category_list[row];
}
+/* Finds the current descendant of the group that is an ETableItem and focuses it */
+static void
+focus_current_etable_item (ETableGroup *group, int row)
+{
+ GnomeCanvasGroup *cgroup;
+ GList *l;
+
+ cgroup = GNOME_CANVAS_GROUP (group);
+
+ for (l = cgroup->item_list; l; l = l->next) {
+ GnomeCanvasItem *i;
+
+ i = GNOME_CANVAS_ITEM (l->data);
+
+ if (E_IS_TABLE_GROUP (i))
+ focus_current_etable_item (E_TABLE_GROUP (i), row);
+ else if (E_IS_TABLE_ITEM (i)) {
+ e_table_item_set_cursor (E_TABLE_ITEM (i), 0, row);
+ gnome_canvas_item_grab_focus (i);
+ }
+ }
+}
+
static void
e_categories_rebuild (ECategories *categories)
{
@@ -755,6 +780,7 @@ e_categories_toggle (ECategories *catego
{
categories->priv->selected_list[row] = !categories->priv->selected_list[row];
e_categories_rebuild (categories);
+ focus_current_etable_item (E_TABLE_GROUP(categories->priv->table->group), row);
}
/* This function sets the value at a particular point in our ETableModel. */
@@ -766,6 +792,7 @@ e_categories_set_value_at (ETableModel *
categories->priv->selected_list[row] =
GPOINTER_TO_INT (val);
e_categories_rebuild (categories);
+ focus_current_etable_item (E_TABLE_GROUP(categories->priv->table->group), row);
}
if ( col == 1 )
return;
@@ -781,7 +808,7 @@ e_categories_is_cell_editable (ETableMod
static gboolean
e_categories_has_save_id (ETableModel *etc, gpointer data)
{
- return TRUE;
+ return FALSE;
}
static char *
begin:vcard
fn:hao sheng
n:sheng;hao
org:Sun Microsystems China Engineering & Research Institute;Desktop Group
adr:;;10/F Chuangxin Plaza, Tsinghua Science Park;Beijing;;100083;P.R.China
email;internet:hao sheng sun com
title:Software Engineer Intern
tel;work:+8610-82618200-82111
tel;cell:+86-13520134555
version:2.1
end:vcard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]