aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/e-contact-editor-address.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-25 12:04:20 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-25 12:04:20 +0800
commit442ed02adb1d86a177b465fa656f2148a71230b1 (patch)
tree330994ee5a908daa85acbbda3efa477010556b8a /addressbook/gui/contact-editor/e-contact-editor-address.c
parent8896a36925cc5ec873878caf1a0842f0c830f33e (diff)
downloadgsoc2013-evolution-442ed02adb1d86a177b465fa656f2148a71230b1.tar
gsoc2013-evolution-442ed02adb1d86a177b465fa656f2148a71230b1.tar.gz
gsoc2013-evolution-442ed02adb1d86a177b465fa656f2148a71230b1.tar.bz2
gsoc2013-evolution-442ed02adb1d86a177b465fa656f2148a71230b1.tar.lz
gsoc2013-evolution-442ed02adb1d86a177b465fa656f2148a71230b1.tar.xz
gsoc2013-evolution-442ed02adb1d86a177b465fa656f2148a71230b1.tar.zst
gsoc2013-evolution-442ed02adb1d86a177b465fa656f2148a71230b1.zip
[ roll forward from the 1.2 branch. fixes #25540, part of #29630, as well
2002-11-23 Chris Toshok <toshok@ximian.com> [ roll forward from the 1.2 branch. fixes #25540, part of #29630, as well as other selection issues in the contact editor and ACL issues in the ldap backend ] * backend/pas/pas-backend-ldap.c (check_schema_support): reset the schema check state to FALSE if the read returned nothing (and the user had not authenticated). we'll requery if/when they auth. (query_ldap_root_dse): free the schema dn before assigning over it. (pas_backend_ldap_connect): added a diagnostic warning about the root dse query failing in anonymous mode (if it in fact did fail.) (pas_backend_ldap_process_authenticate_user): if we successfully authed, requery the root dse to pick up any attributes that might be protected, and retry the schema query if that failed before. * gui/contact-editor/e-contact-editor.c (full_name_clicked): set the dialog's editable state based on the new field "fullname_editable", and only do the Ok button handling if this flag is TRUE. (full_addr_clicked): set the dialog's editable state based on the editable state for the particular address (from editor->address_editable[]). also, only do the Ok button handling if this flag is TRUE. (_address_arrow_pressed): use the address_editable array to determine whether the address text and the mailing address checkbutton are sensitive. (enable_writable_fields): figure out if fullname_editable is TRUE/FALSE, also, init the address_editable flags based on the field list, and handle the address checkbutton. * gui/contact-editor/fulladdr.glade: change the label names to label-<name> to match {entry,combo}-<name>. * gui/contact-editor/fullname.glade: same. * gui/contact-editor/e-contact-editor-fullname.c (e_contact_editor_fullname_class_init): rename ARG_IS_READ_ONLY to ARG_EDITABLE, to reflect the correct sense of the flag. (e_contact_editor_fullname_set_arg): same, and make the labels sensitive/insensitive depending on the editable state of the dialog. * gui/contact-editor/e-contact-editor-address.c (e_contact_editor_address_class_init): rename ARG_IS_READ_ONLY to ARG_EDITABLE, to reflect the correct sense of the flag. (e_contact_editor_address_set_arg): same, and make the labels sensitive/insensitive depending on the editable state of the dialog. svn path=/trunk/; revision=18910
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-editor-address.c')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c
index 1c54b3c122..81ee9b9330 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-address.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-address.c
@@ -49,7 +49,7 @@ static GtkDialogClass *parent_class = NULL;
enum {
PROP_0,
PROP_ADDRESS,
- PROP_IS_READ_ONLY
+ PROP_EDITABLE
};
GType
@@ -95,7 +95,7 @@ e_contact_editor_address_class_init (EContactEditorAddressClass *klass)
/*_( */"XXX blurb" /*)*/,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_IS_READ_ONLY,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
@@ -481,9 +481,9 @@ e_contact_editor_address_set_property (GObject *object, guint prop_id,
e_contact_editor_address->address = e_card_delivery_address_copy(g_value_get_pointer (value));
fill_in_info(e_contact_editor_address);
break;
- case PROP_IS_READ_ONLY: {
+ case PROP_EDITABLE: {
int i;
- char *entry_names[] = {
+ char *widget_names[] = {
"entry-street",
"entry-city",
"entry-ext",
@@ -491,11 +491,18 @@ e_contact_editor_address_set_property (GObject *object, guint prop_id,
"entry-region",
"combo-country",
"entry-code",
+ "label-street",
+ "label-city",
+ "label-ext",
+ "label-po",
+ "label-region",
+ "label-country",
+ "label-code",
NULL
};
e_contact_editor_address->editable = g_value_get_boolean (value) ? TRUE : FALSE;
- for (i = 0; entry_names[i] != NULL; i ++) {
- GtkWidget *w = glade_xml_get_widget(e_contact_editor_address->gui, entry_names[i]);
+ for (i = 0; widget_names[i] != NULL; i ++) {
+ GtkWidget *w = glade_xml_get_widget(e_contact_editor_address->gui, widget_names[i]);
if (GTK_IS_ENTRY (w)) {
gtk_entry_set_editable (GTK_ENTRY (w),
e_contact_editor_address->editable);
@@ -505,6 +512,9 @@ e_contact_editor_address_set_property (GObject *object, guint prop_id,
e_contact_editor_address->editable);
gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_address->editable);
}
+ else if (GTK_IS_LABEL (w)) {
+ gtk_widget_set_sensitive (w, e_contact_editor_address->editable);
+ }
}
break;
}
@@ -527,7 +537,7 @@ e_contact_editor_address_get_property (GObject *object, guint prop_id,
extract_info(e_contact_editor_address);
g_value_set_pointer (value, e_card_delivery_address_ref(e_contact_editor_address->address));
break;
- case PROP_IS_READ_ONLY:
+ case PROP_EDITABLE:
g_value_set_boolean (value, e_contact_editor_address->editable ? TRUE : FALSE);
break;
default: