Re: Autoactivation problem in BonoboControlFrame



Hi Martin,

On 29 Nov 2000, Martin Baulig wrote:
> just discovered a little problem in the autoactivation code of
> the BonoboControlFrame:
 
        Grief; so you did :-) good catch, thanks. However, this code is in
freeze, so I'd like to be very sure that changing this doesn't impact
Nautilus or I will be scalped.

> Wouldn't it be better to only emit this signal when there's a state
> change ?

	Yes.

>       if (control->priv->automerge && control->priv->active != activated) {
>               if (activated)
>                       bonobo_control_auto_merge (control);
>               else
>                       bonobo_control_auto_unmerge (control);
>                       
>                 gtk_signal_emit (GTK_OBJECT (control), control_signals [ACTIVATE], (gboolean) activated);
>         }

	We need to emit the ACTIVATE signal especialy if we are not in
automerge mode. So I'd prefer instead:

+	if (control->priv->active != activated)
+                 gtk_signal_emit (GTK_OBJECT (control), control_signals [ACTIVATE], (gboolean) activated);
-	gtk_signal_emit (GTK_OBJECT (control), control_signals [ACTIVATE], (gboolean) activated);

	Could you test that and commit if there are no issues ?

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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