diff options
author | Shakti Sen <shprasad@novell.com> | 2005-07-19 17:36:43 +0800 |
---|---|---|
committer | Shakti Prasad Sen <shaktis@src.gnome.org> | 2005-07-19 17:36:43 +0800 |
commit | f1b1519f5e799ffe2c3fad590d08012a12f68628 (patch) | |
tree | 4f40cd6994556497d96539618c0e7d01971cc7d5 /plugins | |
parent | f8e576490297a7f65e1dd496385f9728cd327832 (diff) | |
download | gsoc2013-evolution-f1b1519f5e799ffe2c3fad590d08012a12f68628.tar.gz gsoc2013-evolution-f1b1519f5e799ffe2c3fad590d08012a12f68628.tar.zst gsoc2013-evolution-f1b1519f5e799ffe2c3fad590d08012a12f68628.zip |
Added a label named 'Custom' to show appropriate role in the 'Role:' combo
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
svn path=/trunk/; revision=29798
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/exchange-operations/ChangeLog | 8 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-permissions-dialog.c | 19 |
2 files changed, 25 insertions, 2 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 9d0b9d6cb0..7b8deec265 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -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-18 Sarfraaz Ahmed <asarfraaz@novell.com> * exchange-folder-size-display.c (parent_destroyed) : This is no longer diff --git a/plugins/exchange-operations/exchange-permissions-dialog.c b/plugins/exchange-operations/exchange-permissions-dialog.c index 8571d3630f..e312ff1a7b 100644 --- a/plugins/exchange-operations/exchange-permissions-dialog.c +++ b/plugins/exchange-operations/exchange-permissions-dialog.c @@ -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 *dialog) -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); } @@ -723,6 +736,8 @@ get_widgets (ExchangePermissionsDialog *dialog, GladeXML *xml) 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); \ g_object_set_data (G_OBJECT (dialog->priv->name), \ |