From 2a564072b7b15a8e7ecc99b61f96b9dfe4bef37c Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Wed, 14 Jan 2004 10:14:05 +0000 Subject: [PATCH] Changed layout when adding new options SVN revision: 678 --- src/elogd.c | 62 ++++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index afd8322f..fe7cac26 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.190 2004/01/14 10:14:05 midas + Changed layout when adding new options + Revision 1.189 2004/01/14 10:04:17 midas Fixed bug of disappearing icons @@ -454,8 +457,8 @@ BOOL check_login_user(LOGBOOK * lbs, char *user); LBLIST get_logbook_hierarchy(void); int is_logbook_in_group(LBLIST pgrp, char *logbook); void free_logbook_hierarchy(LBLIST root); -void show_top_text(LOGBOOK *lbs); -void show_bottom_text(LOGBOOK *lbs); +void show_top_text(LOGBOOK * lbs); +void show_bottom_text(LOGBOOK * lbs); /*---- Funcions from the MIDAS library -----------------------------*/ @@ -4205,7 +4208,7 @@ void set_redir(LOGBOOK * lbs, char *redir) else { if (lbs) sprintf(str, "../%s/", lbs->name_enc); - else if (getcfg_topgroup()) + else if (getcfg_topgroup()) sprintf(str, "."); } @@ -4631,7 +4634,8 @@ LBLIST get_logbook_hierarchy(void) /* check if node is subgroup of other node */ if (!lb_list[k].name[0]) { for (k = 0; k < root->n_members; k++) - if (equal_ustring(root->member[i]->member[j]->name, root->member[k]->name)) { + if (equal_ustring + (root->member[i]->member[j]->name, root->member[k]->name)) { /* node is allocated twice, so free one... */ free(root->member[i]->member[j]); @@ -4860,7 +4864,7 @@ void show_standard_title(char *logbook, char *text, int printable) /*------------------------------------------------------------------*/ -void show_top_text(LOGBOOK *lbs) +void show_top_text(LOGBOOK * lbs) { char str[NAME_LENGTH]; int size; @@ -4896,7 +4900,7 @@ void show_top_text(LOGBOOK *lbs) /*------------------------------------------------------------------*/ -void show_bottom_text(LOGBOOK *lbs) +void show_bottom_text(LOGBOOK * lbs) { char str[NAME_LENGTH]; int size; @@ -5971,13 +5975,14 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL sprintf(str, loc("Add %s"), attr_list[index]); if (equal_ustring(getparam("extend"), str)) { - rsprintf - ("\n", - input_size, input_maxlen, attr_list[index], attrib[index]); - - rsprintf(" "); + rsprintf(""); rsprintf(loc("Add new %s here"), attr_list[index]); - rsprintf("\n"); + rsprintf(" : \n"); + + rsprintf + ("\n", + input_maxlen, attr_list[index], attrib[index]); + } else { @@ -6098,8 +6103,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL if (text[0]) { if (bedit) { - if (bupload - || (!bupload && !breedit) + if (bupload || (!bupload && !breedit) || (breedit && !getcfg_cond(lbs->name, condition, "Preset text", str))) rsputs(text); } else { @@ -6583,7 +6587,7 @@ void show_find_form(LOGBOOK * lbs) loc("Search text also in attributes")); rsprintf("\n"); - show_bottom_text(lbs); + show_bottom_text(lbs); rsprintf("\r\n"); } @@ -7230,7 +7234,7 @@ int remove_user(LOGBOOK * lbs, char *user) int ascii_compare(const void *s1, const void *s2) { - return stricmp(*(char **)s1, *(char **)s2); + return stricmp(*(char **) s1, *(char **) s2); } /*------------------------------------------------------------------*/ @@ -7284,29 +7288,29 @@ void show_config_page(LOGBOOK * lbs) /* count user list */ for (n = 0;; n++) { - if (!enum_user_line(lbs, n, str)) + if (!enum_user_line(lbs, n, str)) break; } /* allocate list of users and populate it */ user_list = calloc(sizeof(char *), n); - for (i=0 ; i%s\n", user_list[i], user_list[i]); else rsprintf("