[evolution-patches] Re: [Evolution-hackers] source selector behavior



On Fri, 2004-03-26 at 13:44, William Jon McCann wrote:
> >>Is this reasonable?
> > 
> > 
> > Yes, this is reasonable and was in fact considered at implementation
> > time.  It was discarded due to lack of time (when we were pushing for
> > gnome 2.6). The behaviour we want is that if you have a calendar
> > "highlighted" but not "checked" then operations such as creating a new 
> > event should automatically "check" the calendar so you can see what you
> > just added (apple's iCal does this).
> 
> I have a possible fix for the e-source-selector part of this.  The part 
> checking the source when a new event is added would still need to be done.
> 
> Does this look ok?

> Index: e-source-selector.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/widgets/misc/e-source-selector.c,v
> retrieving revision 1.14
> diff -p -u -r1.14 e-source-selector.c
> --- e-source-selector.c	24 Jan 2004 05:36:53 -0000	1.14
> +++ e-source-selector.c	26 Mar 2004 18:37:45 -0000
> @@ -416,6 +416,9 @@ selection_func (GtkTreeSelection *select
>  	GtkTreeIter iter;
>  	void *data;
>  
> +	if (selector->priv->checkboxes_shown)
> +		return TRUE;
> +
>  	if (selector->priv->toggled_last) {
>  		selector->priv->toggled_last = FALSE;

For this approach you can't just return TRUE, you must handle clearing
saved selection farther down the selection, and you must make sure
groups are non-selectable and (if memory servers) you must process the
toggled_last stuff to prevent check a toggle box from highlight the
whole row.

> @@ -476,7 +479,8 @@ cell_toggled_callback (GtkCellRendererTo
>  	} else {
>  		source = E_SOURCE (data);
>  
> -		if (e_source_selector_peek_primary_selection (selector) != source) {
> +		if (selector->priv->checkboxes_shown
> +		    || e_source_selector_peek_primary_selection (selector) != source) {
>  			if (source_is_selected (selector, source))
>  				unselect_source (selector, source);
>  			else

You should just be able to remove the check for the primary selection.

-JP
-- 
JP Rosevear <jpr ximian com>
Ximian, Inc.




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