[evolution-patches] Patch for bug #310837 (exchange-component)



Hi,

I am attaching a patch which fixes the bug #310837. It is to set the the 'Custom' role in 'Role:' combo box. It also fixes the bug #310493 completely. Please review the patch.

Thanks,
Shakti

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/ChangeLog,v
retrieving revision 1.23
diff -u -p -r1.23 ChangeLog
--- ChangeLog	18 Jul 2005 11:57:37 -0000	1.23
+++ ChangeLog	19 Jul 2005 06:00:11 -0000
@@ -1,3 +1,11 @@
+2005-07-19  Shakti Sen <shprasad novell com>
+
+	* exchange-permissions-dialog.c (display_role, get_widgets):
+	Added a label named 'Custom' to show appropriate role in the 'Role:'
+	combo box.
+
+	Fixes bug#310837 
+
 2005-07-15  Shakti Sen <shprasad novell com>
 
 	* exchange-folder-permission.c: Added the functions 
Index: exchange-permissions-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-permissions-dialog.c,v
retrieving revision 1.4
diff -u -p -r1.4 exchange-permissions-dialog.c
--- exchange-permissions-dialog.c	18 Jul 2005 11:57:37 -0000	1.4
+++ exchange-permissions-dialog.c	19 Jul 2005 06:00:12 -0000
@@ -66,6 +66,9 @@ struct _ExchangePermissionsDialogPrivate
 
 	/* The Role menu */
 	GtkComboBox *role_optionmenu;
+
+	/* Custom label is added or not */
+	gboolean custom_added;
 	
 	GtkWidget *separator, *custom;
 	E2kPermissionsRole selected_role;
@@ -560,9 +563,19 @@ display_role (ExchangePermissionsDialog 
 			    -1);
 
 	if (role == E2K_PERMISSIONS_ROLE_CUSTOM) {
-		/* FIXME: To show Custom */
-		role = E2K_PERMISSIONS_ROLE_NUM_ROLES + 1;
+		if (dialog->priv->custom_added == FALSE) {
+			gtk_combo_box_append_text (GTK_COMBO_BOX (dialog->priv->role_optionmenu), _("Custom"));
+			dialog->priv->custom_added = TRUE;
+		}
+		role = E2K_PERMISSIONS_ROLE_NUM_ROLES;
+	}
+	else	{
+		if (dialog->priv->custom_added) {
+			gtk_combo_box_remove_text (GTK_COMBO_BOX (dialog->priv->role_optionmenu), E2K_PERMISSIONS_ROLE_NUM_ROLES);
+			dialog->priv->custom_added = FALSE;
+		}
 	}
+		
 	gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->priv->role_optionmenu), role);
 }
 
@@ -722,6 +735,8 @@ get_widgets (ExchangePermissionsDialog *
 	GET_WIDGET (role_optionmenu, GTK_COMBO_BOX);
 	g_signal_connect (dialog->priv->role_optionmenu, "changed",
 			  G_CALLBACK (role_changed), dialog);
+
+	dialog->priv->custom_added = FALSE;
 
 #define GET_TOGGLE(name, value, callback) \
 	GET_WIDGET (name, GTK_TOGGLE_BUTTON); \


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