[evolution-patches] *NEW* Patch for #300968 Updated



Dear hpj,

Here is the updated patch for #300968 which had been edited according to your proposal.

the related URL is:
http://bugzilla.gnome.org/show_bug.cgi?id=300968
The patch for this bug is also available on the above URL.

It is about addressbook part.

Will you please help me to review it?

Thanks a lot.

Yours,
Mengjie

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1932
diff -u -p -r1.1932 ChangeLog
--- ChangeLog	21 Apr 2005 08:47:54 -0000	1.1932
+++ ChangeLog	21 Apr 2005 10:16:43 -0000
@@ -1,3 +1,12 @@
+2005-04-21  Mengjie Yu  <meng-jie yu sun com>
+
+	* gui/widgets/e-minicard-view-widget.c:
+	(e_minicard_view_widget_class_init),
+	(e_minicard_view_widget_real_focus_in_event):
+	Add focus_in_event function.
+
+	Fixes #300968 (gnome bugzilla bugID)
+
 2005-04-17  Yu Mengjie  <meng-jie yu sun com>
 
 	* gui/widgets/e-minicard.c: (e_minicard_event):
Index: gui/widgets/e-minicard-view-widget.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-minicard-view-widget.c,v
retrieving revision 1.33
diff -u -p -r1.33 e-minicard-view-widget.c
--- gui/widgets/e-minicard-view-widget.c	6 Apr 2004 14:39:29 -0000	1.33
+++ gui/widgets/e-minicard-view-widget.c	21 Apr 2005 10:16:46 -0000
@@ -38,6 +38,8 @@ static void e_minicard_view_widget_reflo
 static void e_minicard_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
 static void e_minicard_view_widget_style_set     (GtkWidget *widget, GtkStyle *previous_style);
 static void e_minicard_view_widget_realize       (GtkWidget *widget);
+static gboolean e_minicard_view_widget_real_focus_in_event (GtkWidget *widget, GdkEventFocus *event);
+
 
 static ECanvasClass *parent_class = NULL;
 
@@ -158,6 +160,8 @@ e_minicard_view_widget_class_init (EMini
 	widget_class->style_set     = e_minicard_view_widget_style_set;
 	widget_class->realize       = e_minicard_view_widget_realize;
 	widget_class->size_allocate = e_minicard_view_widget_size_allocate;
+	widget_class->focus_in_event = e_minicard_view_widget_real_focus_in_event;
+
 
 	canvas_class->reflow        = e_minicard_view_widget_reflow;
 
@@ -438,3 +442,30 @@ e_minicard_view_widget_get_view         
 	else
 		return NULL;
 }
+
+static gboolean 
+e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *event)
+{
+	GnomeCanvas *canvas;
+	EMinicardViewWidget *view;
+
+	canvas = GNOME_CANVAS (widget);
+	view = E_MINICARD_VIEW_WIDGET(widget);
+
+	if (!canvas->focused_item) {
+		EReflow *reflow = E_REFLOW (view->emv);
+		if (reflow->count) {
+			int unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), 0);
+
+			if (unsorted != -1)
+				canvas->focused_item = reflow->items [unsorted];
+		}
+	}
+
+	if (GTK_WIDGET_CLASS(parent_class)->focus_in_event)
+		return GTK_WIDGET_CLASS(parent_class)->focus_in_event (widget, event);
+	else
+		return FALSE;
+
+}
+


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