Re: [Evolution-hackers] source selector behavior

JP Rosevear wrote:
On Thu, 2004-03-25 at 15:40, William Jon McCann wrote:


It seems that when the text description of a source in the source selector is clicked the source is selected and toggled.

This has the negative side effect of toggling sources when a right click is used. A right click usually only brings up the context menu.

So an inactive source will be activated when a user wants to view properties, delete, copy, etc.

Another problem is that selected sources can't be toggled. This is related to the first problem.

Basically, the issue is decoupling toggled-state and selection-state in Calendar and Tasks and retaining the coupling in Mail and Contacts.

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?


PS. Sorry to post to both lists, I'm not sure which one this should go to.
Index: ChangeLog
RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
retrieving revision 1.284
diff -p -u -r1.284 ChangeLog
--- ChangeLog	26 Mar 2004 17:12:05 -0000	1.284
+++ ChangeLog	26 Mar 2004 18:37:45 -0000
@@ -1,3 +1,8 @@
+2004-03-26  William Jon McCann  <mccann jhu edu>
+	* e-source-selector.c (cell_toggled_callback, selection_func):
+	Decouple check box and highlight when checkbox is shown.
 2004-03-26  Rodney Dawes  <dobey ximian com>
 	* e-multi-config-dialog.c (init): Remove the dialog separator
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;
@@ -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);

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