~ubuntu-branches/ubuntu/maverick/xdm/maverick

« back to all changes in this revision

Viewing changes to chooser.c

  • Committer: Bazaar Package Importer
  • Author(s): David Nusinow
  • Date: 2006-06-30 00:42:11 UTC
  • mto: (7.1.1 gutsy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20060630004211-puz2hz052bab3kq9
Tags: upstream-1.0.5
ImportĀ upstreamĀ versionĀ 1.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $XdotOrg: xc/programs/xdm/chooser.c,v 1.2 2004/04/23 19:54:42 eich Exp $
 
2
 * $XdotOrg: app/xdm/chooser.c,v 1.5 2006/03/11 04:07:00 alanc Exp $
3
3
 * $Xorg: chooser.c,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $
4
4
 *
5
5
Copyright 1990, 1998  The Open Group
140
140
static int FromHex (char *s, char *d, int len);
141
141
static int oldline;
142
142
 
143
 
Widget      toplevel, label, viewport, paned, list, box, cancel, acceptit, ping;
 
143
static Widget       toplevel, label, viewport, paned, list, box, cancel, acceptit, ping;
144
144
 
145
145
static void     CvtStringToARRAY8(
146
146
    XrmValuePtr args,
1030
1030
{
1031
1031
  XawListReturnStruct   *r;
1032
1032
  HostName              *h;
1033
 
  r = XawListShowCurrent (list);
 
1033
 
1034
1034
  /* Assume the next host is willing */
1035
1035
  XawListHighlight (list,line);
1036
1036
  r = XawListShowCurrent (list);
1047
1047
        Arg             size[2];
1048
1048
        Dimension       height, portheight;
1049
1049
        Position        y;
1050
 
        int             lineheight, liney, newy = 0;
 
1050
        int             lineheight, liney;
1051
1051
 
1052
1052
        XtSetArg (size[0], XtNheight, &height);
1053
1053
        XtSetArg (size[1], XtNy, &y);
1066
1066
                                      (liney + lineheight) - portheight);
1067
1067
        }
1068
1068
        
1069
 
        return 1;
 
1069
        XtFree((char *) r);
 
1070
        return 1;
1070
1071
      }
1071
1072
    }
1072
 
  } 
 
1073
  }
 
1074
  XtFree((char *) r);
1073
1075
  return 0; 
1074
1076
}
1075
1077
 
1100
1102
static void
1101
1103
Storeold (Widget w, XEvent *event, String *params, Cardinal *num_params)
1102
1104
{
1103
 
  oldline = (XawListShowCurrent(list))->list_index;
 
1105
  XawListReturnStruct   *r = XawListShowCurrent(list);
 
1106
 
 
1107
  oldline = r->list_index;
 
1108
  XtFree((char *) r);
1104
1109
}
1105
1110
 
1106
1111
/*
1165
1170
  else
1166
1171
    HostCycle(r->list_index,NameTableSize,keysym);
1167
1172
 
 
1173
  XtFree((char *) r);
1168
1174
  return;
1169
1175
}
1170
1176
 
1185
1191
      Selectfirst();
1186
1192
    else
1187
1193
      HostCycle(r->list_index,NameTableSize,event->xbutton.button);
1188
 
 
1189
 
  return;
 
1194
    
 
1195
    XtFree((char *) r);
 
1196
    return;
1190
1197
}
1191
1198
 
1192
1199
 
1213
1220
            }
1214
1221
        exit (OBEYSESS_DISPLAY);
1215
1222
    }
 
1223
    XtFree((char *) r);
1216
1224
}
1217
1225
 
1218
1226
/* ARGSUSED */
1223
1231
    HostName            *h;
1224
1232
    
1225
1233
    r = XawListShowCurrent (list);
1226
 
    if (r->list_index == XAW_LIST_NONE)
1227
 
        return;
1228
 
    for (h = hostNamedb; h; h = h->next)
1229
 
        if (!strcmp (r->string, h->fullname))
1230
 
            if (!h->willing)
1231
 
                XawListUnhighlight (list);
 
1234
    if (r->list_index != XAW_LIST_NONE) {
 
1235
        for (h = hostNamedb; h; h = h->next)
 
1236
            if (!strcmp (r->string, h->fullname))
 
1237
                if (!h->willing)
 
1238
                    XawListUnhighlight (list);
 
1239
    }
 
1240
    XtFree((char *) r);
1232
1241
}
1233
1242
 
1234
1243
/* ARGSUSED */