Re: [evolution-patches] Addressbook patch to fix #55056 (Summary:keyboard navigation is disable )



hi, Chris
I have committed this patch .

The function "g_object_ref (e_minicard->editor)" should be saved.
If leaving this line out,evolution will crash.

And also I set the first VCARD be focused as default.

Thanks a lot for your help.

Best regards
hao.sheng





Chris Toshok wrote:

On Mon, 2004-04-05 at 18:17 -0400, sh wrote:
Hi, Chris

Thank you for your  review my patch.
I have used the new function (eab_editor_raise) to instead of the old
functions.

Would you like to spend a little time to review it again?


comments below, mostly minor.  Once these are addressed the patch is
fine to commit.

Chris

Plain text document attachment (patch_for_55056_b2.diff)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1630
diff -u -r1.1630 ChangeLog
--- ChangeLog	31 Mar 2004 03:36:50 -0000	1.1630
+++ ChangeLog	31 Mar 2004 09:38:44 -0000
@@ -1,3 +1,12 @@
+2004-03-31  Hao Sheng  <hao sheng sun com>
+
+	* gui/widgets/e-minicard.c :
+	(e_minicard_event) : implement keyboard navigation(TAB/shift+TAB)
+	(activaite_editor) : add a new function to activiate contact editor
+	for support "Enter" key
+
+	Fixes #55056
+
2004-03-30  Chris Toshok  <toshok ximian com>

	[ fixes bug #34777 ]
Index: gui/widgets/e-minicard.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-minicard.c,v
retrieving revision 1.112
diff -u -r1.112 e-minicard.c
--- gui/widgets/e-minicard.c	24 Mar 2004 20:18:49 -0000	1.112
+++ gui/widgets/e-minicard.c	31 Mar 2004 09:38:44 -0000
@@ -519,6 +519,46 @@
}

static gboolean
+activiate_editor(GnomeCanvasItem *item)
+{
+	EMinicard *e_minicard;
+	e_minicard = E_MINICARD (item);
+
+	if (e_minicard->editor) {
+		 eab_editor_raise (e_minicard->editor);
+	} else {
+		EBook *book = NULL;
+		if (E_IS_MINICARD_VIEW(item->parent)) {
+			g_object_get(item->parent, "book", &book, NULL);
+		}
+ + if (book != NULL) {
+			if (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST)) {
+				EContactListEditor *editor = eab_show_contact_list_editor (book, e_minicard->contact,
+											   FALSE, e_minicard->editable);
+				e_minicard->editor = G_OBJECT (editor);
+			}
+			else {
+				EContactEditor *editor = eab_show_contact_editor (book, e_minicard->contact,
+										  FALSE, e_minicard->editable);
+				e_minicard->editor = G_OBJECT (editor);
+			}
+			g_object_ref (e_minicard->editor);

i know the original code had this as well, but isn't this going to leave
us with too many refs on the editor?  Can you try leaving this line out
and seeing if we crash (and leave it in and see if we leak?)






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]