Re: [evolution-patches] patch for review of bug 42128



Hi Jeff,

I just do not want the bug appear in 1.4 release, and the patch
definitely not simply a wrong patch. I have explained it in the
bugzilla. let try to explain again.

bonoboui seems know nothing about gtk widget, it only send verb to
component. Currently, it just send to wrong component. To correct this,
we need to keep track which component the focus is in. A gtk widget of
course do not handle this. That is why this problem happen. Correct me
if I am wrong.

So the fix maybe not easy.  But if you can ensure that the bonoboui
bug(as you said) will be fixed before 1.4, then everything is ok. 

And the patch just work well and it do not break anything.

York



On Sat, 2003-05-10 at 01:10, Jeffrey Stedfast wrote:
> this patch is wrong. since composer_keypressed_cb() returns FALSE if the
> key wasn't Escape, the signal propogates to the children. The bonobo
> menus are intercepting the signal and should be emitting the "activate"
> signal for the menu item which should then be calling the callback that
> handles cut, copy or paste.
> 
> Somehow the cut/copy/paste callbacks are not being called. Fixing that
> is the correct solution.
> 
> Jeff
> 
> On Fri, 2003-05-09 at 08:35, Yuedong Du wrote:
> > Hi all,
> > 
> > The bug lead to ctrl+c/v on composer  suject do not work.
> > see  http://bugzilla.ximian.com/show_bug.cgi?id=42128
> > 
> > 
> > Regards
> > York
> > 
> > ______________________________________________________________________
> > Index: e-msg-composer.c
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
> > retrieving revision 1.391
> > diff -u -r1.391 e-msg-composer.c
> > --- e-msg-composer.c	29 Apr 2003 16:55:52 -0000	1.391
> > +++ e-msg-composer.c	9 May 2003 07:27:57 -0000
> > @@ -2808,12 +2808,25 @@
> >  static int
> >  composer_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
> >  {
> > +        EMsgComposer *composer = user_data;
> > +        gboolean result;
> > +
> >  	if (event->keyval == GDK_Escape) {
> >  		do_exit (E_MSG_COMPOSER (widget));
> >  		
> >  		g_signal_stop_emission_by_name (widget, "key-press-event");
> >  		return TRUE; /* Handled.  */
> >  	}
> > +
> > +        if (GTK_IS_ENTRY (composer->focused_entry)) {
> > +                                                                                
> > +                g_signal_emit_by_name(composer->focused_entry,
> > +                                      "key_press_event", event, &result);
> > +                if (result) {
> > +                    g_signal_stop_emission_by_name (widget, "key_press_event");
> > +                    return TRUE; /* Handled.  */
> > +                }
> > +        }
> >  	
> >  	return FALSE; /* Not handled. */
> >  }
> > @@ -2875,7 +2888,7 @@
> >  	
> >  	g_signal_connect (composer, "key-press-event",
> >  			  G_CALLBACK (composer_key_pressed),
> > -			  NULL);
> > +			  composer);
> >  	g_signal_connect (composer, "destroy",
> >  			  G_CALLBACK (msg_composer_destroy_notify),
> >  			  NULL);
> > 
> > ______________________________________________________________________
> > Index: ChangeLog
> > ===================================================================
> > RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
> > retrieving revision 1.535
> > diff -u -r1.535 ChangeLog
> > --- ChangeLog	29 Apr 2003 16:55:52 -0000	1.535
> > +++ ChangeLog	9 May 2003 12:15:29 -0000
> > @@ -1,3 +1,9 @@
> > +2003-05-09  Yuedong Du <yuedong du sun com>
> > +
> > +	* e-msg-composer.c(composer_key_pressed): if focus in subject,
> > +	let the gtk widget handle key_pressed event first.
> > +	fix bug #42128
> > +
> >  2003-04-28  Jeffrey Stedfast  <fejj ximian com>
> >  
> >  	* e-msg-composer.c (autosave_manager_query_load_orphans): Change




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