[gq-commit] gq/src input.c,1.40,1.41
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2002-07-13 07:07:43
|
Update of /cvsroot/gqclient/gq/src In directory usw-pr-cvs1:/tmp/cvs-serv18457 Modified Files: input.c Log Message: * Take care of FLAG_NO_USER_MOD when changing displaytypes * some cosmetic changes Index: input.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/input.c,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** input.c 12 Jul 2002 20:27:52 -0000 1.40 --- input.c 13 Jul 2002 07:07:37 -0000 1.41 *************** *** 263,266 **** --- 263,270 ---- w = new_h->get_widget(form, d, NULL, NULL); + if (form->flags & FLAG_NO_USER_MOD) { + gtk_widget_set_sensitive(w, 0); + } + gtk_widget_show(w); *************** *** 519,522 **** --- 523,530 ---- 2, 3, row_arrow, row_arrow + 1, 0, GTK_FILL, 5, 0); + + if (form->flags & FLAG_NO_USER_MOD) { + gtk_widget_set_sensitive(form->morebutton, 0); + } } formlist = formlist->next; *************** *** 736,740 **** /* don't bother adding in empty fields */ if(ndata) { - /* printf("%s: %s\n", form->attrname, ndata->data); */ form->values = g_list_append(form->values, ndata); } --- 744,747 ---- *************** *** 1156,1165 **** /* pass 1: deleted attributes, and deleted/added values */ ! while(oldlist) { oldform = (struct formfill *) oldlist->data; newform = lookup_attribute(newlist, oldform->attrname); ! /* oldform->values can come up NULL if the attribute was in the form ! only because add_attrs_by_oc() added it. Not a delete in this case... */ ! if(oldform->values != NULL && (newform == NULL || newform->values == NULL)) { /* attribute deleted */ mod = malloc(sizeof(LDAPMod)); --- 1163,1176 ---- /* pass 1: deleted attributes, and deleted/added values */ ! for( ; oldlist ; oldlist = oldlist->next ) { oldform = (struct formfill *) oldlist->data; + + /* if (oldform->flags & FLAG_NO_USER_MOD) continue; */ newform = lookup_attribute(newlist, oldform->attrname); ! /* oldform->values can come up NULL if the attribute was in ! the form only because add_attrs_by_oc() added it. Not a ! delete in this case... */ ! if(oldform->values != NULL && ! (newform == NULL || newform->values == NULL)) { /* attribute deleted */ mod = malloc(sizeof(LDAPMod)); *************** *** 1230,1235 **** } - - oldlist = oldlist->next; } oldlist = oldlist_tmp; --- 1241,1244 ---- |