Index: gui/dialogs/task-page.c
===================================================================
--- gui/dialogs/task-page.c	(revision 34370)
+++ gui/dialogs/task-page.c	(working copy)
@@ -70,7 +70,6 @@
 	EAccountList *accounts;
 	GList *address_strings;
 	EMeetingAttendee *ia;	
-	char *default_address;
 	char *user_add;
 	ECalComponent *comp;
 
@@ -215,7 +214,6 @@
 	priv->accounts = NULL;
 	priv->address_strings = NULL;
 	priv->ia = NULL;
-	priv->default_address = NULL;
 	priv->invite = NULL;
 	
 	priv->model = NULL;
@@ -697,6 +695,8 @@
 			if (organizer.value != NULL) {
 				const gchar *strip = itip_strip_mailto (organizer.value);
 				gchar *string;
+				GList *list = NULL;
+
 				if (itip_organizer_is_user (comp, page->client) || itip_sentby_is_user (comp)) {
 					if (e_cal_get_static_capability (
 								page->client,
@@ -720,7 +720,14 @@
 				else
 					string = g_strdup (strip);
 
+				if (!priv->user_org) {
+					list = g_list_append (list, string);
+					gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), list);
+					gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE);
+				}
+
 				g_free (string);
+				g_list_free (list);
 				priv->existing = TRUE;
 			}
 		} else {
@@ -1917,6 +1924,7 @@
 	gboolean subscribed_cal = FALSE;
 	ESource *source = NULL;
 	const char *user_addr = NULL;
+	gchar *addr_string = NULL;
 
 	def_account = itip_addresses_get_default();
 	if (def_account && def_account->enabled)
@@ -1933,20 +1941,19 @@
 	else 
 		user_addr = (backend_address && *backend_address) ? backend_address : NULL;
 
-	priv->default_address = NULL;
 	if (user_addr)
 		for (l = priv->address_strings; l != NULL && user_addr; l = l->next)
 			if (g_strrstr ((gchar *) l->data, user_addr) != NULL) {
-				priv->default_address = (gchar *) l->data;
+				addr_string = (gchar *) l->data;
 				break;
 			}
 
-	if (!priv->default_address && def_address)
-		priv->default_address = def_address;
+	if (!addr_string && def_address)
+		addr_string = def_address;
 
-	if (priv->default_address) {
+	if (addr_string) {
 		if (!priv->comp || !e_cal_component_has_organizer (priv->comp)) {
-			gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), priv->default_address);
+			gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), addr_string);
 			/* FIXME: Use accessor functions to access private members of a GtkCombo widget */
 			gtk_widget_set_sensitive (GTK_WIDGET (GTK_COMBO (priv->organizer)->button), !subscribed_cal);
 		}
@@ -2002,6 +2009,7 @@
 		
 		a = (EAccount *)e_iterator_get(it);
 
+		/* skip disabled accounts */
 		if (!a->enabled)
 			continue;
 
Index: gui/dialogs/event-page.c
===================================================================
--- gui/dialogs/event-page.c	(revision 34370)
+++ gui/dialogs/event-page.c	(working copy)
@@ -83,7 +83,6 @@
 	EAccountList *accounts;
 	GList *address_strings;
 	EMeetingAttendee *ia;	
-	char *default_address;
 	char *user_add;
 	ECalComponent *comp;
 
@@ -256,7 +255,6 @@
 	priv->accounts = NULL;
 	priv->address_strings = NULL;
 	priv->ia = NULL;
-	priv->default_address = NULL;
 	priv->invite = NULL;
 	
 	priv->model = NULL;
@@ -3151,6 +3149,7 @@
 	gboolean subscribed_cal = FALSE;
 	ESource *source = NULL;
 	const char *user_addr = NULL;
+	gchar *addr_string = NULL;
 
 	def_account = itip_addresses_get_default();
 	if (def_account && def_account->enabled)
@@ -3167,20 +3166,19 @@
 	else
  		user_addr = (backend_address && *backend_address) ? backend_address : NULL;
 
-	priv->default_address = NULL;
 	if (user_addr)
 		for (l = priv->address_strings; l != NULL && user_addr; l = l->next)
 			if (g_strrstr ((gchar *) l->data, user_addr) != NULL) {
-				priv->default_address = (gchar *) l->data;
+				addr_string = (gchar *) l->data;
 				break;
 			}
 
-	if (!priv->default_address && def_address)
-		priv->default_address = def_address;
+	if (!addr_string && def_address)
+		addr_string = def_address;
 
-	if (priv->default_address) {
+	if (addr_string) {
 		if (!priv->comp || !e_cal_component_has_organizer (priv->comp)) {
-			gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), priv->default_address);
+			gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry), addr_string);
 			/* FIXME: Use accessor functions to access private members of a GtkCombo widget */
 			gtk_widget_set_sensitive (GTK_WIDGET (GTK_COMBO (priv->organizer)->button), !subscribed_cal);
 		}
@@ -3236,7 +3234,6 @@
 		
 		a = (EAccount *)e_iterator_get(it);
 
-	
 		/* skip disabled accounts */
 		if (!a->enabled)
 			continue;
Index: gui/dialogs/memo-page.c
===================================================================
--- gui/dialogs/memo-page.c	(revision 34370)
+++ gui/dialogs/memo-page.c	(working copy)
@@ -98,7 +98,6 @@
 	GtkWidget *source_selector;
 
 	GList *address_strings;
-	char *default_address;
 
 	ENameSelector *name_selector;
 
@@ -178,7 +177,6 @@
 	priv->updating = FALSE;
 
 	priv->address_strings = NULL;
-	priv->default_address = NULL;
 }
 
 /* Destroy handler for the memo page */
@@ -930,7 +928,7 @@
 
 				e_cal_get_cal_address(client, &backend_addr, NULL);
 
-				if (backend_addr && (COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_PAGE_IS_SHARED))
+				if (COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_PAGE_IS_SHARED)
 					memo_page_select_organizer (mpage, backend_addr);
 
 				set_subscriber_info_string (mpage, backend_addr);
@@ -1116,9 +1114,10 @@
 	gboolean subscribed_cal = FALSE;
 	ESource *source = NULL;
 	const char *user_addr = NULL;
+	gchar *addr_string = NULL;
 
 	def_account = itip_addresses_get_default();
-	if (def_account)
+	if (def_account && def_account->enabled)
 		def_address = g_strdup_printf("%s <%s>", def_account->id->name, def_account->id->address);
 
 	priv = mpage->priv;
@@ -1130,21 +1129,21 @@
 	if (user_addr) 
 		subscribed_cal = TRUE;
 	else 
-		user_addr = backend_address;
+		user_addr = (backend_address && *backend_address) ? backend_address : NULL;
 
-	priv->default_address = NULL;
-	for (l = priv->address_strings; l != NULL; l = l->next)
-		if (g_strrstr ((gchar *) l->data, user_addr) != NULL) {
-			priv->default_address = (gchar *) l->data;
-			break;
-		}
+	if (user_addr)
+		for (l = priv->address_strings; l != NULL; l = l->next)
+			if (g_strrstr ((gchar *) l->data, user_addr) != NULL) {
+				addr_string = (gchar *) l->data;
+				break;
+			}
 
-	if (!priv->default_address && def_account)
-		priv->default_address = def_address;
+	if (!addr_string && def_address)
+		addr_string = def_address;
 
-	if (priv->default_address) {
+	if (addr_string) {
 		if (COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_PAGE_NEW_ITEM) {
-			gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry), priv->default_address);
+			gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry), addr_string);
 			/* FIXME: Use accessor functions to access private members of a GtkCombo widget */
 			gtk_widget_set_sensitive (GTK_WIDGET (GTK_COMBO (priv->org_combo)->button), !subscribed_cal);
 		}
@@ -1198,6 +1197,11 @@
 			gchar *full = NULL;
 
 			a = (EAccount *)e_iterator_get(it);
+
+			/* skip disabled accounts */
+			if (!a->enabled)
+				continue;
+
 			full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
 
 			priv->address_strings = g_list_append(priv->address_strings, full);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34370)
+++ ChangeLog	(working copy)
@@ -1,3 +1,16 @@
+2007-10-11  Suman Manjunath  <msuman@novell.com>
+
+	** Fix for bug #270605
+
+	* gui/dialogs/event-page.c: (event_page_init),
+	(event_page_select_organizer), (event_page_construct): Code cleanup
+	* gui/dialogs/memo-page.c: (memo_page_init), (source_changed_cb),
+	(memo_page_select_organizer), (memo_page_construct): Skip disabled accounts.
+	* gui/dialogs/task-page.c: (task_page_init),
+	(task_page_fill_widgets), (task_page_select_organizer),
+	(task_page_construct): Code cleanup, show organizer of assigned tasks, if
+	it already exists.
+
 2007-10-09  Matthew Barnes  <mbarnes@redhat.com>
 
 	** Fixes part of bug #437579
