aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShakti Sen <shprasad@novell.com>2005-09-30 14:37:42 +0800
committerShakti Prasad Sen <shaktis@src.gnome.org>2005-09-30 14:37:42 +0800
commitd67cc3d9cae4026acc54c04dbfe0f69d7c8cf53d (patch)
tree56b5c19e81447e526cc306d265ebe6a49a54b6cf
parent2384116f8a84c5e327bdf3f5e5c503869b804086 (diff)
downloadgsoc2013-evolution-d67cc3d9cae4026acc54c04dbfe0f69d7c8cf53d.tar.gz
gsoc2013-evolution-d67cc3d9cae4026acc54c04dbfe0f69d7c8cf53d.tar.zst
gsoc2013-evolution-d67cc3d9cae4026acc54c04dbfe0f69d7c8cf53d.zip
Sets the corresponding 'Folder name'. (create_folder_subscription_dialog):
2005-09-30 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. svn path=/trunk/; revision=30426
-rw-r--r--plugins/exchange-operations/ChangeLog17
-rw-r--r--plugins/exchange-operations/exchange-folder-subscription.c10
-rw-r--r--plugins/exchange-operations/exchange-folder-subscription.h2
-rw-r--r--plugins/exchange-operations/exchange-folder.c34
-rw-r--r--plugins/exchange-operations/org-gnome-exchange-operations.eplug.in8
5 files changed, 59 insertions, 12 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index df7d0de15f..5b3684d737 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,20 @@
+2005-09-30 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-28 Sarfraaz Ahmed <asarfraaz@novell.com>
* exchange-account-setup.c (owa_authenticate_user) : Propogate the
diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c
index f2fd349dac..2dbeb64d87 100644
--- a/plugins/exchange-operations/exchange-folder-subscription.c
+++ b/plugins/exchange-operations/exchange-folder-subscription.c
@@ -92,7 +92,7 @@ setup_name_selector (GladeXML *glade_xml, ENameSelector **name_selector_ret)
}
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_xml)
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 *glade_xml, gchar *mail_account)
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 *mail_account, gchar **user_email_addre
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
diff --git a/plugins/exchange-operations/exchange-folder-subscription.h b/plugins/exchange-operations/exchange-folder-subscription.h
index af53799c65..470bc988de 100644
--- a/plugins/exchange-operations/exchange-folder-subscription.h
+++ b/plugins/exchange-operations/exchange-folder-subscription.h
@@ -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
diff --git a/plugins/exchange-operations/exchange-folder.c b/plugins/exchange-operations/exchange-folder.c
index ab1c419650..bfdf2babee 100644
--- a/plugins/exchange-operations/exchange-folder.c
+++ b/plugins/exchange-operations/exchange-folder.c
@@ -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 (EPopup *ep, EPopupItem *p, void *data)
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 (EPlugin *ep, EMMenuTargetSelect *target)
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 (EPlugin *ep, EMMenuTargetSelect *target)
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);
+}
diff --git a/plugins/exchange-operations/org-gnome-exchange-operations.eplug.in b/plugins/exchange-operations/org-gnome-exchange-operations.eplug.in
index 331b156e40..1ae16d376a 100644
--- a/plugins/exchange-operations/org-gnome-exchange-operations.eplug.in
+++ b/plugins/exchange-operations/org-gnome-exchange-operations.eplug.in
@@ -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">