aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor/e-contact-editor-fullname.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-fullname.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-fullname.c')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index bf733b6af1..bd51c71605 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -43,7 +43,7 @@ static GtkDialogClass *parent_class = NULL;
enum {
PROP_0,
PROP_NAME,
- PROP_IS_READ_ONLY
+ PROP_EDITABLE
};
GType
@@ -89,7 +89,7 @@ e_contact_editor_fullname_class_init (EContactEditorFullnameClass *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" /*)*/,
@@ -170,19 +170,24 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
e_contact_editor_fullname->name = e_card_name_copy(g_value_get_pointer (value));
fill_in_info(e_contact_editor_fullname);
break;
- case PROP_IS_READ_ONLY: {
+ case PROP_EDITABLE: {
int i;
- char *entry_names[] = {
+ char *widget_names[] = {
"combo-title",
"combo-suffix",
"entry-first",
"entry-middle",
"entry-last",
+ "label-title",
+ "label-suffix",
+ "label-first",
+ "label-middle",
+ "label-last",
NULL
};
e_contact_editor_fullname->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_fullname->gui, entry_names[i]);
+ for (i = 0; widget_names[i] != NULL; i ++) {
+ GtkWidget *w = glade_xml_get_widget(e_contact_editor_fullname->gui, widget_names[i]);
if (GTK_IS_ENTRY (w)) {
gtk_entry_set_editable (GTK_ENTRY (w),
e_contact_editor_fullname->editable);
@@ -192,6 +197,9 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
e_contact_editor_fullname->editable);
gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_fullname->editable);
}
+ else if (GTK_IS_LABEL (w)) {
+ gtk_widget_set_sensitive (w, e_contact_editor_fullname->editable);
+ }
}
break;
}
@@ -214,7 +222,7 @@ e_contact_editor_fullname_get_property (GObject *object, guint prop_id,
extract_info(e_contact_editor_fullname);
g_value_set_pointer (value, e_card_name_ref(e_contact_editor_fullname->name));
break;
- case PROP_IS_READ_ONLY:
+ case PROP_EDITABLE:
g_value_set_boolean (value, e_contact_editor_fullname->editable ? TRUE : FALSE);
break;
default: