[evolution-patches] Exchange: patch for bug #317019 and #317023



Hi,

I have created a patch for bug #317019 and #317023. I have created a
single patch which addresses both the bugs. Please review it.

Thanks,
Shakti


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/ChangeLog,v
retrieving revision 1.54
diff -u -p -r1.54 ChangeLog
--- ChangeLog	23 Sep 2005 10:52:03 -0000	1.54
+++ ChangeLog	23 Sep 2005 11:39:53 -0000
@@ -1,3 +1,20 @@
+2005-09-23  Shakti Sen <shprasad novell com>
+
+	* exchange-folder-subscription.c (setup_folder_name_combo): Sets the
+	corresponding 'Folder name'.
+	(create_folder_subscription_dialog): Sets the cursor to User's entry
+	text field.
+	* exchange-folder-subscription.h: Added one more argument to function
+	create_folder_subscription_dialog() to set the window title.
+	* exchange-folder.c (org_gnome_exchange_inbox_subscription),
+	(org_gnome_exchange_addressbook_subscription),
+	(org_gnome_exchange_calendar_subscription),
+	(org_gnome_exchange_tasks_subscription): Added newly.
+	* org-gnome-exchange-operations.eplug.in: Changed the activate callback
+	function names so that it can show appropriate window title.
+
+	Fixes bug #317019, #317023.
+	
 2005-09-22  Praveen Kumar  <kpraveen novell com>
 
 	** Fixes bug 312849
Index: exchange-folder-subscription.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-folder-subscription.c,v
retrieving revision 1.3
diff -u -p -r1.3 exchange-folder-subscription.c
--- exchange-folder-subscription.c	25 Jul 2005 06:12:03 -0000	1.3
+++ exchange-folder-subscription.c	23 Sep 2005 11:39:54 -0000
@@ -92,7 +92,7 @@ setup_name_selector (GladeXML *glade_xml
 }
 
 static void
-setup_folder_name_combo (GladeXML *glade_xml)
+setup_folder_name_combo (GladeXML *glade_xml, gchar *fname)
 {
 	GtkWidget *combo;
 	GList *string_list;
@@ -115,7 +115,7 @@ setup_folder_name_combo (GladeXML *glade
 	gtk_combo_set_popdown_strings (GTK_COMBO (combo), string_list);
 	g_list_free (string_list);
 
-	gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), "Calendar");
+	gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), fname);
 }
 
 static void
@@ -157,7 +157,7 @@ setup_server_option_menu (GladeXML *glad
 
 
 gboolean
-create_folder_subscription_dialog (gchar *mail_account, gchar **user_email_address_ret, gchar **folder_name_ret)
+create_folder_subscription_dialog (gchar *mail_account, gchar *fname, gchar **user_email_address_ret, gchar **folder_name_ret)
 {
 	ENameSelector *name_selector;
 	GladeXML *glade_xml;
@@ -177,10 +177,12 @@ create_folder_subscription_dialog (gchar
 
 	dialog = glade_xml_get_widget (glade_xml, "dialog");
 	g_return_val_if_fail (dialog != NULL, FALSE);
+	gtk_window_set_title (GTK_WINDOW (dialog), g_strdup_printf ("%s %s", _("Subscribe to Other User's"), fname));
 
 	name_selector_widget = setup_name_selector (glade_xml, &name_selector);
+	gtk_widget_grab_focus (name_selector_widget);
 	setup_server_option_menu (glade_xml, mail_account);
-	setup_folder_name_combo (glade_xml);
+	setup_folder_name_combo (glade_xml, fname);
 	folder_name_entry = glade_xml_get_widget (glade_xml, "folder-name-entry");
 
 	/* Connect the callback to set the OK button insensitive when there is
Index: exchange-folder-subscription.h
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-folder-subscription.h,v
retrieving revision 1.2
diff -u -p -r1.2 exchange-folder-subscription.h
--- exchange-folder-subscription.h	14 Jul 2005 07:00:51 -0000	1.2
+++ exchange-folder-subscription.h	23 Sep 2005 11:39:54 -0000
@@ -2,6 +2,6 @@
 #define __EXCHANGE_FOLDER_SUBSCRIPTION_H__
 
 gboolean
-create_folder_subscription_dialog (gchar *mail_account, gchar **user_email_address_ret, gchar **folder_name_ret);
+create_folder_subscription_dialog (gchar *mail_account, gchar *fname, gchar **user_email_address_ret, gchar **folder_name_ret);
 
 #endif
Index: exchange-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-folder.c,v
retrieving revision 1.12
diff -u -p -r1.12 exchange-folder.c
--- exchange-folder.c	26 Aug 2005 10:28:30 -0000	1.12
+++ exchange-folder.c	23 Sep 2005 11:39:54 -0000
@@ -43,7 +43,11 @@
 #include "addressbook/gui/widgets/eab-popup.h"
 #include "exchange-folder-subscription.h"
 
-void org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target);
+void org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, gchar *fname);
+void org_gnome_exchange_inbox_subscription (EPlugin *ep, EMMenuTargetSelect *target);
+void org_gnome_exchange_addressbook_subscription (EPlugin *ep, EMMenuTargetSelect *target);
+void org_gnome_exchange_calendar_subscription (EPlugin *ep, EMMenuTargetSelect *target);
+void org_gnome_exchange_tasks_subscription (EPlugin *ep, EMMenuTargetSelect *target);
 void org_gnome_exchange_check_subscribed (EPlugin *ep, ECalPopupTargetSource *target);
 void org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, void *data);
 void org_gnome_exchange_check_address_book_subscribed (EPlugin *ep, EABPopupTargetSource *target);
@@ -540,7 +544,7 @@ org_gnome_exchange_folder_unsubscribe (E
 
 
 void
-org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target)
+org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target, gchar *fname)
 {
 	ExchangeAccount *account = NULL;
 	EFolder *folder = NULL;
@@ -570,7 +574,7 @@ org_gnome_exchange_folder_subscription (
 		return;
 	}	
 
-	create_folder_subscription_dialog (account->account_name, &user_email_address, &folder_name);
+	create_folder_subscription_dialog (account->account_name, fname, &user_email_address, &folder_name);
 
 	if (user_email_address && folder_name) {
 		result = exchange_account_discover_shared_folder (account, user_email_address, folder_name, &folder);
@@ -611,3 +615,27 @@ org_gnome_exchange_folder_subscription (
 	exchange_account_open_folder (account, g_strdup_printf ("/%s", user_email_address));
 }
 
+void
+org_gnome_exchange_calendar_subscription (EPlugin *ep, EMMenuTargetSelect *target)
+{
+	gchar *folder_name = "Calendar";
+	org_gnome_exchange_folder_subscription (ep, target, folder_name);
+}
+void
+org_gnome_exchange_addressbook_subscription (EPlugin *ep, EMMenuTargetSelect *target)
+{
+	gchar *folder_name = "Contacts";
+	org_gnome_exchange_folder_subscription (ep, target, folder_name);
+}
+void
+org_gnome_exchange_tasks_subscription (EPlugin *ep, EMMenuTargetSelect *target)
+{
+	gchar *folder_name = "Tasks";
+	org_gnome_exchange_folder_subscription (ep, target, folder_name);
+}
+void
+org_gnome_exchange_inbox_subscription (EPlugin *ep, EMMenuTargetSelect *target)
+{
+	gchar *folder_name = "Inbox";
+	org_gnome_exchange_folder_subscription (ep, target, folder_name);
+}
Index: org-gnome-exchange-operations.eplug.in
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/org-gnome-exchange-operations.eplug.in,v
retrieving revision 1.9
diff -u -p -r1.9 org-gnome-exchange-operations.eplug.in
--- org-gnome-exchange-operations.eplug.in	25 Jul 2005 12:11:25 -0000	1.9
+++ org-gnome-exchange-operations.eplug.in	23 Sep 2005 11:39:54 -0000
@@ -142,7 +142,7 @@
 			verb="FolderSubscription"
 			path="/commands/FolderSubscription"
 			enable="all"
-			activate="org_gnome_exchange_folder_subscription"/>
+			activate="org_gnome_exchange_inbox_subscription"/>
 		</menu>
 	</hook>
 	<hook class="org.gnome.evolution.calendar.bonobomenu:1.0">
@@ -153,7 +153,7 @@
 			verb="FolderSubscription"
 			path="/commands/FolderSubscription"
 			enable="all"
-			activate="org_gnome_exchange_folder_subscription"/>
+			activate="org_gnome_exchange_calendar_subscription"/>
 		</menu>
 	</hook>
 	<hook class="org.gnome.evolution.calendar.bonobomenu:1.0">
@@ -164,7 +164,7 @@
 			verb="FolderSubscription"
 			path="/commands/FolderSubscription"
 			enable="all"
-			activate="org_gnome_exchange_folder_subscription"/>
+			activate="org_gnome_exchange_tasks_subscription"/>
 		</menu>
 	</hook>
 	<hook class="org.gnome.evolution.addressbook.bonobomenu:1.0">
@@ -175,7 +175,7 @@
 			verb="FolderSubscription"
 			path="/commands/FolderSubscription"
 			enable="all"
-			activate="org_gnome_exchange_folder_subscription"/>
+			activate="org_gnome_exchange_addressbook_subscription"/>
 		</menu>
 	</hook>
 	<hook class="org.gnome.evolution.calendar.popup:1.0">


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